From 19585fed4ce99a45e16697c54f4ce000f531c810 Mon Sep 17 00:00:00 2001 From: PhantomVl Date: Tue, 19 Sep 2017 18:36:29 +0300 Subject: [PATCH] Prerelease 19.09.2017 Cisco Format Mac Model Information Device Right Menu --- !Readme.txt/bacgroundImage.txt | 6 +- Sccp_manager.class.php | 74 +++++++++++++++++++------ assets/js/sccp_manager.js | 31 +++++++++++ conf/Sccp.class.php | 6 +- i18n/ru_RU/LC_MESSAGES/sccp_manager.mo | Bin 37219 -> 37690 bytes i18n/ru_RU/LC_MESSAGES/sccp_manager.po | 30 ++++++++-- i18n/sccp_manager.pot | 24 +++++++- install.php | 2 +- views/form.adddevice.php | 1 + views/hardware.phone.php | 7 +-- views/hardware.rnav.php | 23 ++++++++ views/sccpgeneral.xml | 6 +- views/server.codec.php | 2 +- views/server.model.php | 22 +++++++- 14 files changed, 195 insertions(+), 39 deletions(-) create mode 100644 views/hardware.rnav.php diff --git a/!Readme.txt/bacgroundImage.txt b/!Readme.txt/bacgroundImage.txt index 48b877e..61e7c02 100644 --- a/!Readme.txt/bacgroundImage.txt +++ b/!Readme.txt/bacgroundImage.txt @@ -1,5 +1,8 @@ https://github.com/chan-sccp/chan-sccp/wiki/Adding-custom-background-images +> Real Time ! +http://silver-golem.livejournal.com/431942.html + General Information Cisco IP Phones support either colored or monochrom background images in various resolutions (depending on model). The background can either be set up in sccp.conf server side or the user can be enabled to select a background image from a defined list of backgrounds. The image has to be a graphic file with .PNG extension. Other requirements apply, depending on phone model (see below). @@ -39,4 +42,5 @@ The Image file is used for the background of the phone display. An additional th URL="TFTP:Desktops/640x480x24/sccp_2.png"/> -While the resolution is fix, the phones are able to reduce the color depth if the original image uses too many colors. \ No newline at end of file +While the resolution is fix, the phones are able to reduce the color depth if the original image uses too many colors. + diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index 1febe12..6ed1c82 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -8,6 +8,17 @@ // https://github.com/chan-sccp/chan-sccp/wiki/Conferencing // https://github.com/chan-sccp/chan-sccp/wiki/Frequently-Asked-Questions // http://chan-sccp-b.sourceforge.net/doc/_howto.xhtml#nf_adhoc_plar +/* + * ToDo: + * + Cisco Format Mac + * + Model Information + * + Device Right Menu + * - WiFi Config + * - suport kvstore ????? + * - Shared Line ???? + * - bug Fix + * + */ namespace FreePBX\modules; @@ -136,7 +147,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { } if ((array) $this->xml_data) { foreach ($this->xml_data->xpath('//page_group[@name="' . $grup_name . '"]') as $item) { -// $htmlret .= print_r($item,1); $htmlret .= load_view(__DIR__ . '/views/formShow.php', array( 'itm' => $item, 'h_show' => $heder_show, 'form_prefix' => $form_prefix, 'fvalues' => $form_values, @@ -249,7 +259,13 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { 'submit' => array( 'name' => 'ajaxsubmit', 'id' => 'ajaxsubmit', - 'value' => _("Submit") + 'value' => _("Save") + ), + 'Save' => array( + 'name' => 'ajaxsubmit2', + 'id' => 'ajaxsubmit2', + 'stayonpage' => 'yes', + 'value' => _("Save + Continue") ), 'cancel' => array( 'name' => 'cancel', @@ -411,7 +427,12 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { return $this->pagedata; } - + public function getRightNav($request) { + if(isset($request['tech_hardware']) && ($request['tech_hardware'] == 'cisco')) { + return load_view(__DIR__."/views/hardware.rnav.php",array('request' => $request)); + } + } + public function ajaxRequest($req, &$setting) { switch ($req) { case 'savesettings': @@ -675,8 +696,9 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $value = $get_settings[$hdr_prefix . $key . '_net'] . '/' . $get_settings[$hdr_prefix . $key . '_mask']; break; case 'name': - if (!empty($get_settings[$hdr_prefix . 'mac'])) { - $value = 'SEP' . $get_settings[$hdr_prefix . 'mac']; + if (!empty($get_settings[$hdr_prefix . 'mac'])) { + $value = $get_settings[$hdr_prefix . 'mac']; + $value = 'SEP' . strtoupper(str_replace(array('.','-',':'),'',$value)); // Delete mac Seporated from string $name_dev = $value; } break; @@ -1855,9 +1877,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { function getSccp_model_information($get = "all", $validate = false, $format_list = "all", $filter = array()) { global $db; - $file_ext = array('.loads','.sbn','.SBN'); + $file_ext = array('.loads','.LOADS','.sbn','.SBN','.bin','.BIN'); $dir = $this->sccppath["tftp_path"]; + $dir_tepl = $this->sccppath["tftp_templets"]; switch ($format_list) { case "model": $sel_inf = "model, vendor, dns, buttons"; @@ -1900,20 +1923,39 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $i = 0; if ($validate) { for ($i = 0; $i < count($raw_settings); $i++) { - $file = $dir . '/' . $raw_settings[$i]['loadimage']; - $raw_settings[$i]['validate'] = 'no'; - if (strtolower($raw_settings[$i]['vendor']) == 'cisco') { - foreach ($file_ext as $value) { - if (file_exists($file.$value)) { - $raw_settings[$i]['validate'] = 'yes'; - break; + $raw_settings[$i]['validate'] = '-;-'; + if (!empty($raw_settings[$i]['loadimage'])) { + $file = $dir . '/' . $raw_settings[$i]['loadimage']; + if (is_dir($file)){ + $file .= '/' . $raw_settings[$i]['loadimage']; + } + $raw_settings[$i]['validate'] = 'no;'; + if (strtolower($raw_settings[$i]['vendor']) == 'cisco') { + foreach ($file_ext as $value) { + if (file_exists($file.$value)) { + $raw_settings[$i]['validate'] = 'yes;'; + break; + } + } + } else { + if (file_exists($file)) { + $raw_settings[$i]['validate'] = 'yes;'; } } } else { - if (file_exists($file)) { - $raw_settings[$i]['validate'] = 'yes'; - } + $raw_settings[$i]['validate'] = '-;'; } + if (!empty($raw_settings[$i]['nametemplet'])) { + $file = $dir_tepl . '/' . $raw_settings[$i]['nametemplet']; + if (file_exists($file)) { + $raw_settings[$i]['validate'] .= 'yes'; + } else { + $raw_settings[$i]['validate'] .= 'no'; + } + } else { + $raw_settings[$i]['validate'] .= '-'; + } + } } return $raw_settings; diff --git a/assets/js/sccp_manager.js b/assets/js/sccp_manager.js index bfac029..30e6108 100644 --- a/assets/js/sccp_manager.js +++ b/assets/js/sccp_manager.js @@ -24,6 +24,37 @@ $(document).ready(function () { } }); + $('#ajaxsubmit2').on('click', function (e) { + var vdata = ''; + var snd_command = 'savesettings'; + $('.fpbx-submit').each(function () { + vdata = vdata + $(this).serialize() + '&'; + }); + if ($('.fpbx-submit').data('id') == "hw_edit") { + snd_command = 'save_hardware'; + } + $.ajax({ + type: 'POST', + url: 'ajax.php?module=sccp_manager&command=' + snd_command, + data: vdata, + success: function (data) { + if (data.status === true) { + if (data.message) { + alert(data.message); + } else { + alert('Data Save'); + } + } else { + if (Array.isArray(data.message)) { + data.message.forEach(function (entry) { + fpbxToast(entry, 'error', 'error'); + }); + } + } + } + }); + }); + $('#ajaxsubmit').on('click', function (e) { var vdata = ''; var snd_command = 'savesettings'; diff --git a/conf/Sccp.class.php b/conf/Sccp.class.php index 18bb044..052cabb 100644 --- a/conf/Sccp.class.php +++ b/conf/Sccp.class.php @@ -137,7 +137,7 @@ class Sccp extends \FreePBX\modules\Core\Driver { "flag" => $flag++ ), "dnd" => array( - "value" => "no", + "value" => "UserDefined", "flag" => $flag++ ), "silencesuppression" => array( @@ -197,8 +197,8 @@ class Sccp extends \FreePBX\modules\Core\Driver { unset($select); $select[] = array('value' => 'yes', 'text' => 'Yes'); $select[] = array('value' => 'no', 'text' => 'No'); - $tt = _("Silence Suppression."); - $tmparr['silencesuppression'] = array('prompttext' => _('Silence Suppression'), 'value' => 'yes', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); + $tt = _("Silence Suppression. Asterisk Not suported"); + $tmparr['silencesuppression'] = array('prompttext' => _('Silence Suppression'), 'value' => 'no', 'tt' => $tt, 'select' => $select, 'level' => 1, 'type' => 'radio'); unset($select); $select[] = array('value' => 'default', 'text' => _('default')); diff --git a/i18n/ru_RU/LC_MESSAGES/sccp_manager.mo b/i18n/ru_RU/LC_MESSAGES/sccp_manager.mo index 51025a38698b5e428bbe6dfa972dfd4020d2094c..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gstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-09-14 13:48+0300\n" -"PO-Revision-Date: 2017-09-15 12:55+0300\n" +"PO-Revision-Date: 2017-09-19 18:10+0300\n" "Last-Translator: \n" "Language-Team: LANGUAGE Alex\n" "Language: ru\n" @@ -576,12 +576,12 @@ msgid "General Device configuration" msgstr "Абонентского устройство" #: views/sccpgeneral.xml: -msgid "Device ID SEP.[XXXXXXXXXXXX]=MAC" -msgstr "Устройство ID SEP : [XXXXXXXXXXXX]=MAC" +msgid "Device SEP ID.[XXXXXXXXXXXX]=MAC" +msgstr "Устройство SEP ID : [XXXXXXXXXXXX]=MAC" #: views/sccpgeneral.xml: -msgid "The MAC address of the phone" -msgstr "Прямое подключение" +msgid "The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX or XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX" +msgstr "Укажите MAC устройства. 12 знаков MAC в формате XXXX.XXXX.XXXX / XX-XX-XX-XX-XX-XX / XXXXXXXXXXXX" #: views/sccpgeneral.xml: msgid "Type" @@ -603,6 +603,10 @@ msgstr "Модуль ресширения являются специфичны msgid "Device Label" msgstr "Название Устройства" +#: views/sccpgeneral.xml: +msgid "Device SEP ID" +msgstr "Идентификатор устройства SEP ID" + #: views/sccpgeneral.xml: msgid "The information in the upper right corner of the device screen" msgstr "Информация в правом верхнем углу экрана устройства" @@ -874,3 +878,19 @@ msgstr "Добавить шаблон как неактивный" #: views/server.model: msgid "Device is enabled" msgstr "Устройство включено" + +#: views/server.model: ---------------------------- +msgid "Device Descriptions" +msgstr "Описание" + +#: views/server.model: +msgid "Device type" +msgstr "Модель" + +#: views/server.model: +msgid "Actions" +msgstr "Действие" + +#: views/server.model: +msgid "Status" +msgstr "Статус" diff --git a/i18n/sccp_manager.pot b/i18n/sccp_manager.pot index a056200..5dff382 100644 --- a/i18n/sccp_manager.pot +++ b/i18n/sccp_manager.pot @@ -668,11 +668,11 @@ msgid "General Device configuration" msgstr "" #: views/sccpgeneral.xml: -msgid "Device ID SEP.[XXXXXXXXXXXX]=MAC" +msgid "Device SEP ID.[XXXXXXXXXXXX]=MAC" msgstr "" #: views/sccpgeneral.xml: -msgid "The MAC address of the phone" +msgid "The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX or XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX" msgstr "" #: views/sccpgeneral.xml: @@ -702,6 +702,10 @@ msgstr "" msgid "Device Label" msgstr "" +#: views/sccpgeneral.xml: +msgid "Device SEP ID" +msgstr "" + #: views/sccpgeneral.xml: msgid "The information in the upper right corner of the device screen" msgstr "" @@ -1008,3 +1012,19 @@ msgstr "" #: views/server.model: msgid "Device is enabled" msgstr "" + +#: views/server.model: ---------------------------- +msgid "Device Descriptions" +msgstr "" + +#: views/server.model: +msgid "Device type" +msgstr "" + +#: views/server.model: +msgid "Actions" +msgstr "" + +#: views/server.model: +msgid "Status" +msgstr "" diff --git a/install.php b/install.php index 9d5da4c..d9f6c25 100644 --- a/install.php +++ b/install.php @@ -145,7 +145,7 @@ if (!empty($version)) { $sql = "REPLACE INTO `sccpdevmodel` (`model`, `vendor`, `dns`, `buttons`, `loadimage`, `loadinformationid`, `enabled`, `nametemplet`) VALUES ('12 SP', 'CISCO', 1, 1, '', 'loadInformation3', 0, NULL)," . "('12 SP+', 'CISCO', 1, 1, '', 'loadInformation2', 0, NULL), ('30 SP+', 'CISCO', 1, 1, '', 'loadInformation1', 0, NULL), ('30 VIP', 'CISCO', 1, 1, '', 'loadInformation5', 0, NULL), ('3911', 'CISCO', 1, 1, '', 'loadInformation446', 0, NULL), ('3951', 'CISCO', 1, 1, '', 'loadInformation412', 0, ''), ('6901', 'CISCO', 1, 0, 'SCCP6901.9-2-1-a', 'loadInformation547', 0, NULL), ('6911', 'CISCO', 1, 0, 'SCCP6911.9-2-1-a', 'loadInformation548', 0, NULL), ('6921', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation496', 0, NULL), ('6941', 'CISCO', 1, 1, 'SCCP69xx.9-2-1-0', 'loadInformation495', 0, NULL), ('6945', 'CISCO', 1, 0, 'SCCP6945.9-2-1-0', 'loadInformation564', 0, NULL), ('6961', 'CISCO', 1, 0, 'SCCP69xx.9-2-1-0', 'loadInformation497', 0, NULL), ('7902', 'CISCO', 1, 1, 'CP7902080002SCCP060817A', 'loadInformation30008', 0, NULL), " . "('7905', 'CISCO', 1, 1, 'CP7905080003SCCP070409A', 'loadInformation20000', 0, NULL), ('7906', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation369', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7910', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation6', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7911', 'CISCO', 1, 1, 'SCCP11.9-2-1S', 'loadInformation307', 1, 'SEP0000000000.cnf.xml_791x_template'), ('7912', 'CISCO', 1, 1, 'CP7912080004SCCP080108A', 'loadInformation30007', 0, NULL), ('7914', 'CISCO', 0, 14, 'S00105000400', 'loadInformation124', 1, NULL),('7914,7914', 'CISCO', 0, 28, 'S00105000400', 'loadInformation124', 1, NULL), ('7915', 'CISCO', 0, 24, 'B015-1-0-4', 'loadInformation227', 1, NULL), ('7915,7915', 'CISCO', 0, 48, 'B015-1-0-4', 'loadInformation228', 1, NULL), ('7916', 'CISCO', 0, 24, 'B015-1-0-4', 'loadInformation229', 1, NULL), " . - "('7916,7916', 'CISCO', 0, 48, 'B016-1-0-4', 'loadInformation230', 1, NULL), ('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL), ('7921', 'CISCO', 1, 1, 'CP7921G-1.4.1SR1', 'loadInformation365', 0, NULL),('7925', 'CISCO', 1, 2, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, NULL), ('7926', 'CISCO', 1, 1, 'CP7926G-1.4.1SR1', 'loadInformation557', 0, NULL), ('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL), ('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL), ('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL), ('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-4-0', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template'), ('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_796x_template'), " . + "('7916,7916', 'CISCO', 0, 48, 'B016-1-0-4', 'loadInformation230', 1, NULL), ('7920', 'CISCO', 1, 1, 'cmterm_7920.4.0-03-02', 'loadInformation30002', 0, NULL), ('7921', 'CISCO', 1, 1, 'CP7921G-1.4.1SR1', 'loadInformation365', 0, NULL),('7925', 'CISCO', 1, 6, 'CP7925G-1.4.1SR1', 'loadInformation484', 0, NULL), ('7926', 'CISCO', 1, 1, 'CP7926G-1.4.1SR1', 'loadInformation557', 0, NULL), ('7931', 'CISCO', 1, 34, 'SCCP31.9-2-1S', 'loadInformation348', 0, NULL), ('7935', 'CISCO', 1, 2, 'P00503021900', 'loadInformation9', 0, NULL), ('7936', 'CISCO', 1, 1, 'cmterm_7936.3-3-21-0', 'loadInformation30019', 0, NULL), ('7937', 'CISCO', 1, 1, 'apps37sccp.1-4-4-0', 'loadInformation431', 0, 'SEP0000000000.cnf.xml_7937_template'), ('7940', 'CISCO', 1, 2, 'P0030801SR02', 'loadInformation8', 1, 'SEP0000000000.cnf.xml_796x_template'), " . "('7941', 'CISCO', 1, 2, 'SCCP41.9-2-1S', 'loadInformation115', 0, 'SEP0000000000.cnf.xml_796x_template'),('7941G-GE', 'CISCO', 1, 2, 'SCCP41.9-2-1S', 'loadInformation309', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7942', 'CISCO', 1, 2, 'SCCP42.9-2-1S', 'loadInformation434', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7945', 'CISCO', 1, 2, 'SCCP45.9-2-1S', 'loadInformation435', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7960', 'CISCO', 3, 6, 'P0030801SR02', 'loadInformation7', 1, 'SEP0000000000.cnf.xml_796x_template'), ('7961', 'CISCO', 3, 6, 'SCCP41.9-2-1S', 'loadInformation30018', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7961G-GE', 'CISCO', 3, 6, 'SCCP41.9-2-1S', 'loadInformation308', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7962', 'CISCO', 3, 6, 'SCCP42.9-2-1S', 'loadInformation404', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7965', 'CISCO', 3, 6, 'SCCP45.9-2-1S', 'loadInformation436', 0, 'SEP0000000000.cnf.xml_796x_template'), ('7970', 'CISCO', 3, 8, 'SCCP70.9-2-1S', 'loadInformation30006', 0, NULL), ('7971', 'CISCO', 1, 2, 'SCCP75.9-2-1S', 'loadInformation119', 0, NULL), ('7975', 'CISCO', 3, 8, 'SCCP75.9-2-1S', 'loadInformation437', 0, NULL), ('7985', 'CISCO', 3, 8, 'cmterm_7985.4-1-7-0', 'loadInformation302', 0, NULL), ('8941', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation586', 0, NULL), ('8945', 'CISCO', 1, 0, 'SCCP894x.9-2-2-0', 'loadInformation585', 0, NULL), ('ATA 186', 'CISCO', 1, 1, 'ATA030204SCCP090202A', 'loadInformation12', 0, NULL), ('ATA 187', 'CISCO', 1, 1, 'ATA187.9-2-3-1', 'loadInformation550', 0, NULL), ('CN622', 'MOTOROLA', 1, 1, '', 'loadInformation335', 0, NULL), ('Digital Access', 'CISCO', 1, 1, 'D001M022', 'loadInformation40', 0, NULL), ('Digital Access+', 'CISCO', 1, 1, 'D00303010033', 'loadInformation42', 0, NULL), ('E-Series', 'NOKIA', 1, 1, '', '', 0, NULL), ('ICC', 'NOKIA', 1, 1, '', '', 0, NULL), " . "('IP Communicator', 'CISCO', 1, 1, '', 'loadInformation30016', 0, NULL), ('Nokia E', 'Nokia', 0, 28, '', 'loadInformation275', 0, NULL), ('VGC Phone', 'CISCO', 1, 1, '', 'loadInformation10', 0, NULL), ('VGC Virtual', 'CISCO', 1, 1, '', 'loadInformation11', 0, NULL);"; $check = $db->query($sql); diff --git a/views/form.adddevice.php b/views/form.adddevice.php index 3c8011e..344bba5 100644 --- a/views/form.adddevice.php +++ b/views/form.adddevice.php @@ -18,6 +18,7 @@ if (!empty($_REQUEST['id'])) { case 'name': $key = 'mac'; $val = str_replace('SEP', '', $val); + $val = implode('.',sscanf($val, '%4s%4s%4s')); // Convert to Cisco display Format break; case 'hwlang': $tmpar = explode(":",$val); diff --git a/views/hardware.phone.php b/views/hardware.phone.php index c9ea9de..f1cb060 100644 --- a/views/hardware.phone.php +++ b/views/hardware.phone.php @@ -6,7 +6,6 @@ */ // vim: set ai ts=4 sw=4 ft=phtml: - ?>
@@ -26,12 +25,12 @@
- +
- - + + diff --git a/views/hardware.rnav.php b/views/hardware.rnav.php new file mode 100644 index 0000000..6f9f204 --- /dev/null +++ b/views/hardware.rnav.php @@ -0,0 +1,23 @@ +
+  +  +
+
+ + + + + + +
+ diff --git a/views/sccpgeneral.xml b/views/sccpgeneral.xml index 558d8b1..f057dae 100644 --- a/views/sccpgeneral.xml +++ b/views/sccpgeneral.xml @@ -528,13 +528,13 @@ and open the template in the editor. - + mac 000000000 sccp-custom - The MAC address of the phone + The MAC address of the phone. You must specify 12 characters in the format XXXX.XXXX.XXXX or XX-XX-XX-XX-XX-XX or XXXXXXXXXXXX @@ -557,7 +557,7 @@ and open the template in the editor. - + mac 000000000 diff --git a/views/server.codec.php b/views/server.codec.php index e40dfdb..738e002 100644 --- a/views/server.codec.php +++ b/views/server.codec.php @@ -15,7 +15,7 @@ if (!empty($_REQUEST['id'])) { $db_res = $this->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); if (!empty($db_res['allow'])) { $i = 1; - foreach(explode(',', $db_res['allow']) as $c){ + foreach(explode(';', $db_res['allow']) as $c){ $codec_list[$c] = $i; $i ++; } diff --git a/views/server.model.php b/views/server.model.php index 381ce79..8221adf 100644 --- a/views/server.model.php +++ b/views/server.model.php @@ -41,9 +41,9 @@ - + - + @@ -223,13 +223,29 @@ exp_model += ''; return exp_model; } + + function SetColColorFirm(value, row, index) { + if (row['validate'].split(';')[0] === 'no') { + return 'No found '+ value; + } + return value; + } + function SetColColorTempl(value, row, index) { + if (row['validate'].split(';')[1] === 'no') { + return 'No found ' + value ; + } + return value; + + } function SetRowColor(row, index) { var tclass = "active"; if (row['enabled'] === 1) { tclass = (index % 2 === 0) ? "info" : "info"; } - if (row['validate'] === 'no') { + if ((row['validate'] === 'yes;yes') || (row['validate'] === 'yes;-')) { +// tclass = (row['enabled'] === '1') ? "danger" : "warning"; + } else { tclass = (row['enabled'] === '1') ? "danger" : "warning"; } return {classes: tclass};