diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php index 4803598..a62076f 100644 --- a/Sccp_manager.class.php +++ b/Sccp_manager.class.php @@ -741,7 +741,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { } } else { $this->deleteSccpDeviceXML('all'); - $models = $this->dbinterface->get_db_SccpTableData("SccpDevice"); + $models = $this->dbinterface->HWextension_db_SccpTableData("SccpDevice"); } $this->createDefaultSccpXml(); // Default XML @@ -915,7 +915,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { return $result; break; case 'getExtensionGrid': - $result = $this->dbinterface->get_db_SccpTableData('SccpExtension'); + $result = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension'); if (empty($result)) { return array(); } @@ -940,7 +940,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { case 'getPhoneGrid': $cmd_type = !empty($request['type']) ? $request['type'] : ''; - $result = $this->dbinterface->get_db_SccpTableData('SccpDevice', array('type' => $cmd_type)); + $result = $this->dbinterface->HWextension_db_SccpTableData('SccpDevice', array('type' => $cmd_type)); if ($cmd_type == 'cisco-sip') { return $result; } @@ -1030,7 +1030,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { 'monitor' => array('name' => 'Record Calls', 'value' => '') ); - // $lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension'); + // $lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension'); $max_btn = ((!empty($get_settings['buttonscount']) ? $get_settings['buttonscount'] : 100)); $last_btn = $max_btn; for ($it = $max_btn; $it >= 0; $it--) { @@ -1075,7 +1075,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { case 'monitor': $btn_t = 'speeddial'; $btn_opt = (string) $get_settings['button' . $it . '_line']; - $db_res = $this->dbinterface->get_db_SccpTableData('SccpExtension', array('name' => $btn_opt)); + $db_res = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension', array('name' => $btn_opt)); $btn_n = $db_res[0]['label']; $btn_opt .= ',' . $btn_opt . $this->hint_context['default']; break; @@ -1145,7 +1145,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $save_settings = array(); $save_codec = array(); $name_dev = ''; - $db_field = $this->dbinterface->get_db_SccpTableData("get_colums_sccpdevice"); + $db_field = $this->dbinterface->HWextension_db_SccpTableData("get_colums_sccpdevice"); $hw_id = (empty($get_settings['sccp_deviceid'])) ? 'new' : $get_settings['sccp_deviceid']; $hw_type = (empty($get_settings['sccp_device_typeid'])) ? 'sccpdevice' : $get_settings['sccp_device_typeid']; $update_hw = ($hw_id == 'new') ? 'update' : 'clear'; @@ -1384,7 +1384,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { ); */ $name_dev = ''; - $db_field = $this->dbinterface->get_db_SccpTableData("get_colums_sccpuser"); + $db_field = $this->dbinterface->HWextension_db_SccpTableData("get_colums_sccpuser"); // $hw_id = (empty($get_settings['sccp_deviceid'])) ? 'new' : $get_settings['sccp_deviceid']; // $update_hw = ($hw_id == 'new') ? 'update' : 'clear'; $hw_prefix = 'SEP'; @@ -1806,13 +1806,13 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { if (!empty($hw_list)) { $buton_list = array(); foreach ($hw_list as $value) { - $buton_tmp = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial', 'id' => $value['name'])); + $buton_tmp = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial', 'id' => $value['name'])); if (!empty($buton_tmp)) { $buton_list = array_merge($buton_list, $buton_tmp); } } } else { - $buton_list = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial')); + $buton_list = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_buttons", array('buttontype' => 'speeddial')); } if (empty($buton_list)) { return array('Response' => ' Found 0 device ', 'data' => ''); @@ -1897,13 +1897,13 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { $data_value = array(); $dev_line_data = null; - $dev_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id)); + $dev_config = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id)); // Support Cisco Sip Device if (!empty($dev_config['type'])) { if (strpos($dev_config['type'], 'sip') !== false) { $sccp_native = false; $tmp_bind = $this->sipconfigs->getSipConfig(); - $dev_ext_config = $this->dbinterface->get_db_SccpTableData("SccpDevice", array('name' => $dev_id, 'fields' => 'sip_ext')); + $dev_ext_config = $this->dbinterface->HWextension_db_SccpTableData("SccpDevice", array('name' => $dev_id, 'fields' => 'sip_ext')); $data_value = array_merge($data_value, $dev_ext_config); $data_tmp = explode(';', $dev_ext_config['sip_lines']); $data_value['sbind'] = array(); @@ -2152,7 +2152,7 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO { } // Update info from sccp_db - $tmp_data = $this->dbinterface->get_db_SccpTableData('SccpExtension'); + $tmp_data = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension'); foreach ($tmp_data as $value) { $name_l = $value['name']; if (!empty($res[$name_l . $default_hint])) { diff --git a/Sccp_manager.inc/dbinterface.class.php b/Sccp_manager.inc/dbinterface.class.php index 6dde6c2..7d06c13 100644 --- a/Sccp_manager.inc/dbinterface.class.php +++ b/Sccp_manager.inc/dbinterface.class.php @@ -32,7 +32,7 @@ class dbinterface public function get_db_SccpTableByID($dataid, $data = array(), $indexField = '') { $resut = array(); - $raw = $this->get_db_SccpTableData($dataid, $data); + $raw = $this->HWextension_db_SccpTableData($dataid, $data); if (empty($raw) || empty($indexField)) { return $raw; } @@ -43,7 +43,7 @@ class dbinterface return $resut; } - public function get_db_SccpTableData($dataid, $data = array()) + public function HWextension_db_SccpTableData($dataid, $data = array()) { if ($dataid == '') { return false; @@ -216,7 +216,7 @@ class dbinterface } break; case "extension": - $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (dns = 0)ORDER BY model "; + $sql = "SELECT " . $sel_inf . " FROM sccpdevmodel WHERE (dns = 0) and (enabled > 0) ORDER BY model "; break; case "enabled": case "phones": diff --git a/Sccp_manager.inc/xmlinterface.class.php b/Sccp_manager.inc/xmlinterface.class.php index a836a12..81d1881 100644 --- a/Sccp_manager.inc/xmlinterface.class.php +++ b/Sccp_manager.inc/xmlinterface.class.php @@ -134,7 +134,7 @@ class xmlinterface 'phoneServices' => 'null', 'certHash' => 'null', 'deviceSecurityMode' => '1'); -// $var_hw_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id)); +// $var_hw_config = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id)); if (empty($dev_config)) { return false; @@ -506,7 +506,7 @@ class xmlinterface 'phoneServices' => 'null', 'certHash' => 'null', 'deviceProtocol' => 'SIP', 'deviceSecurityMode' => '1'); -// $var_hw_config = $this->dbinterface->get_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id)); +// $var_hw_config = $this->dbinterface->HWextension_db_SccpTableData("get_sccpdevice_byid", array('id' => $dev_id)); if (empty($dev_config)) { return false; diff --git a/conf/sccpgeneral.xml.v433 b/conf/sccpgeneral.xml.v433 index 62a0590..6bc426c 100644 --- a/conf/sccpgeneral.xml.v433 +++ b/conf/sccpgeneral.xml.v433 @@ -1284,7 +1284,7 @@ and open the template in the editor. Base Version before all crash :-) addon NONE - + hw_select sccp-custom Addon: Addons are model specific and only work with certain base phones. This phone model is identified as being a phone that does not accept sidecars. Update devmodel if this is not correct. diff --git a/views/advserver.keyset.php b/views/advserver.keyset.php index 7beba8c..2dc039c 100644 --- a/views/advserver.keyset.php +++ b/views/advserver.keyset.php @@ -26,20 +26,20 @@ $keysetarray = $this->extconfigs->getextConfig('keyset'); 'uriaction' => array('default')); */ // ------------------------------------- Key Set Display information --------------------------------------------------------- -$keynamearray = array('onhook' => array(sname => 'ONHOOK', name =>'Display Onhook',help =>'help.'), - 'connected' => array(sname => 'CONNECTED', name =>'Display Connected',help =>'help.'), - 'onhold' => array(sname => 'ONHOLD', name =>'Display onhold',help =>'help.'), - 'ringin' => array(sname => 'RINGIN', name =>'Display ringin',help =>'help.'), - 'offhook' => array(sname => 'OFFHOOK', name =>'Display offhook',help =>'help.'), - 'conntrans' => array(sname => 'CONNTRANS', name =>'Display conntrans',help =>'help.'), - 'digitsfoll' => array(sname => 'DIGITSFOLL', name =>'Display digitsfoll',help =>'help.'), - 'connconf' => array(sname => 'CONNCONF', name =>'Display connconf',help =>'help.'), - 'ringout' => array(sname => 'RINGOUT', name =>'Display ringout',help =>'help.'), - 'offhookfeat'=> array(sname => 'OFFHOOKFEAT', name =>'Display offhookfeat',help =>'help.'), - 'onhint' => array(sname => 'ONHINT', name =>'Display onhint',help =>'help.'), - 'onstealable'=> array(sname => 'onstealable', name =>'Display onstealable',help =>'help.'), - 'holdconf' => array(sname => 'HOLDCONF', name =>'Display holdconf',help =>'help.'), - 'uriaction' => array(sname => '', name =>'Display uriaction',help =>'help.') +$keynamearray = array('onhook' => array('sname' => 'ONHOOK', 'name' =>'Display Onhook', 'help' =>'help.'), + 'connected' => array('sname' => 'CONNECTED', 'name' =>'Display Connected', 'help' =>'help.'), + 'onhold' => array('sname' => 'ONHOLD', 'name' =>'Display onhold', 'help' =>'help.'), + 'ringin' => array('sname' => 'RINGIN', 'name' =>'Display ringin', 'help' =>'help.'), + 'offhook' => array('sname' => 'OFFHOOK', 'name' =>'Display offhook', 'help' =>'help.'), + 'conntrans' => array('sname' => 'CONNTRANS', 'name' =>'Display conntrans', 'help' =>'help.'), + 'digitsfoll' => array('sname' => 'DIGITSFOLL', 'name' =>'Display digitsfoll', 'help' =>'help.'), + 'connconf' => array('sname' => 'CONNCONF', 'name' =>'Display connconf', 'help' =>'help.'), + 'ringout' => array('sname' => 'RINGOUT', 'name' =>'Display ringout', 'help' =>'help.'), + 'offhookfeat'=> array('sname' => 'OFFHOOKFEAT', 'name' =>'Display offhookfeat', 'help' =>'help.'), + 'onhint' => array('sname' => 'ONHINT', 'name' =>'Display onhint', 'help' =>'help.'), + 'onstealable'=> array('sname' => 'onstealable', 'name' =>'Display onstealable', 'help' =>'help.'), + 'holdconf' => array('sname' => 'HOLDCONF', 'name' =>'Display holdconf', 'help' =>'help.'), + 'uriaction' => array('sname' => '', 'name' =>'Display uriaction', 'help' =>'help.') ); ?> diff --git a/views/form.adddevice.php b/views/form.adddevice.php index edb43fe..2b91823 100644 --- a/views/form.adddevice.php +++ b/views/form.adddevice.php @@ -29,7 +29,7 @@ if (!empty($_REQUEST['new_id'])) { if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; $dev_new = $dev_id; - $db_res = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); + $db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); foreach ($db_res as $key => $val) { if (!empty($val)) { switch ($key) { diff --git a/views/form.addruser.php b/views/form.addruser.php index 2deedb0..898d4d3 100644 --- a/views/form.addruser.php +++ b/views/form.addruser.php @@ -11,7 +11,7 @@ $dev_new = null; if (!empty($_REQUEST['ru_id'])) { $dev_id = $_REQUEST['ru_id']; $def_val['id'] = array("keyword" => 'id', "data" => $dev_id, "seq" => "99"); - $db_res = $this->dbinterface->get_db_SccpTableData('get_sccpuser', array("id" => $dev_id)); + $db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpuser', array("id" => $dev_id)); if (!empty($db_res)) { foreach ($db_res as $key => $val) { if (!empty($val)) { diff --git a/views/form.addsdevice.php b/views/form.addsdevice.php index 99899be..1c0e38c 100644 --- a/views/form.addsdevice.php +++ b/views/form.addsdevice.php @@ -29,7 +29,7 @@ if (!empty($_REQUEST['new_id'])) { if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; $dev_new = $dev_id; - $db_res = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); + $db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); foreach ($db_res as $key => $val) { if (!empty($val)) { switch ($key) { diff --git a/views/form.buttons.php b/views/form.buttons.php index 217bc85..5c17594 100644 --- a/views/form.buttons.php +++ b/views/form.buttons.php @@ -19,8 +19,8 @@ $feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'dev */ -$lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension'); -//$hint_list = $this->dbinterface->get_db_SccpTableData('SccpExtension'); +$lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension'); +//$hint_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension'); $hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ; // print_r($hint_list); @@ -30,8 +30,8 @@ $show_buttons =1; //print_r($hint_list); if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; - $db_buttons = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); - $db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); + $db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); + $db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); $max_buttons = $db_device['buttons']; if (!empty($db_device['addon_buttons'])) { $max_buttons += $db_device['addon_buttons']; @@ -41,7 +41,7 @@ if (!empty($_REQUEST['id'])) { if (!empty($_REQUEST['new_id'])) { $val = $_REQUEST['type']; $dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val)); -// $db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $val)); +// $db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $val)); $max_buttons = $dev_schema[0]['buttons']; if (!empty($_REQUEST['addon'])) { $val = $_REQUEST['addon']; @@ -52,7 +52,7 @@ if (!empty($_REQUEST['new_id'])) { } if (!empty($_REQUEST['ru_id'])) { $dev_id = $_REQUEST['ru_id']; - $db_buttons = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); + $db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); $show_buttons = $max_buttons; } diff --git a/views/form.sbuttons.php b/views/form.sbuttons.php index 12b0b89..0157378 100644 --- a/views/form.sbuttons.php +++ b/views/form.sbuttons.php @@ -15,9 +15,9 @@ $forminfo =array( $buttons_type= array("empty","line","speeddial"); $feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'devstate'=> "Change Status"); -//$lines_list = $this->dbinterface->get_db_SccpTableData('SccpExtension'); +//$lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension'); $lines_list = $this->sipconfigs->get_db_sip_TableData('Device'); -//$hint_list = $this->dbinterface->get_db_SccpTableData('SccpExtension'); +//$hint_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension'); $hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ; // print_r($lines_list); @@ -27,8 +27,8 @@ $show_buttons =1; //print_r($hint_list); if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; - $db_buttons = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); - $db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); + $db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); + $db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); $max_buttons = $db_device['buttons']; if (!empty($db_device['addon_buttons'])) { $max_buttons += $db_device['addon_buttons']; @@ -38,7 +38,7 @@ if (!empty($_REQUEST['id'])) { if (!empty($_REQUEST['new_id'])) { $val = $_REQUEST['type']; $dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val)); -// $db_device = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $val)); +// $db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $val)); $max_buttons = $dev_schema[0]['buttons']; if (!empty($_REQUEST['addon'])) { $val = $_REQUEST['addon']; @@ -49,7 +49,7 @@ if (!empty($_REQUEST['new_id'])) { } if (!empty($_REQUEST['ru_id'])) { $dev_id = $_REQUEST['ru_id']; - $db_buttons = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); + $db_buttons = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_buttons', array("id" => $dev_id)); $show_buttons = $max_buttons; } diff --git a/views/formShow.php b/views/formShow.php index 047a38d..8ee01aa 100644 --- a/views/formShow.php +++ b/views/formShow.php @@ -46,9 +46,9 @@ $dialplan_list = array(); //$time_zone = \FreePBX::Sccp_manager()-> extconfigs-> getextConfig('cisco_time'); //$system_time_zone = \FreePBX::Sccp_manager()->getSysnemTimeZone(); //$sofkey_list = \FreePBX::Sccp_manager()-> srvinterface -> sccp_list_keysets(); -//$model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWDevice"); -//$extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension"); -//$device_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("SccpDevice"); +//$model_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWDevice"); +//$extension_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWextension"); +//$device_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("SccpDevice"); //$extension_list[]=array(model=>'NONE', vendor=>'CISCO', dns=>'0'); //$device_list[]=array(name=>'NONE', description=>'No Device'); @@ -659,26 +659,35 @@ foreach ($items as $child) { } if ($child['type'] == 'SDM') { if (empty($model_list)) { - $model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWDevice"); + $model_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWDevice"); } $select_opt= $model_list; } if ($child['type'] == 'SDMS') { if (empty($model_list)) { - $model_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWSipDevice"); + $model_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWSipDevice"); } $select_opt= $model_list; } if ($child['type'] == 'SDE') { if (empty($extension_list)) { - $extension_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("HWextension"); - $extension_list[]=array(model=>'NONE', vendor=>'CISCO', dns=>'0'); + $extension_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("HWextension"); + $extension_list[]=array( model => 'NONE', vendor => 'CISCO', dns => '0'); + foreach ($extension_list as &$data) { + $d_name = explode(';', $data['model']); + if (is_array($d_name) && (count($d_name) > 1)) { + $data['description'] = count($d_name).'x '.$d_name[0]; + } else { + $data['description'] = $data['model']; + } + } + unset($data); } $select_opt= $extension_list; } if ($child['type'] == 'SDD') { if (empty($device_list)) { - $device_list = \FreePBX::Sccp_manager()->dbinterface->get_db_SccpTableData("SccpDevice"); + $device_list = \FreePBX::Sccp_manager()->dbinterface->HWextension_db_SccpTableData("SccpDevice"); $device_list[]=array(name=>'NONE', description=>'No Device'); } $select_opt = $device_list; diff --git a/views/hardware.phone.php b/views/hardware.phone.php index ab20fe5..b5f3b9a 100644 --- a/views/hardware.phone.php +++ b/views/hardware.phone.php @@ -54,7 +54,12 @@ function DispayTypeFormatter(value, row, index) { var exp_model = value; if (row['addon'] !== null ) { - exp_model += ' + ' + row['addon']; + var posd = row['addon'].indexOf(';'); + if (posd >0) { + exp_model += ' + 2x ' + row['addon'].substring(0, posd); + } else { + exp_model += ' + ' + row['addon']; + } } return exp_model; diff --git a/views/hardware.sphone.php b/views/hardware.sphone.php index 3ac35f8..7ee550d 100644 --- a/views/hardware.sphone.php +++ b/views/hardware.sphone.php @@ -61,13 +61,17 @@ return exp_model; } - function DispayTypeFormatterS(value, row, index) { + function DispayTypeFormatter(value, row, index) { var exp_model = value; if (row['addon'] !== null ) { - exp_model += ' + ' + row['addon']; + var posd = row['addon'].indexOf(';'); + if (posd >0) { + exp_model += ' + 2x ' + row['addon'].substring(0, posd); + } else { + exp_model += ' + ' + row['addon']; + } } - return exp_model; - + return exp_model; } function LineFormatterS(value, row, index) { if (value === null) { diff --git a/views/server.codec.php b/views/server.codec.php index fe1476c..fe4eb17 100644 --- a/views/server.codec.php +++ b/views/server.codec.php @@ -16,7 +16,7 @@ $sccp_disalow = $sccp_disalow_def; if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; - $db_res = $this->dbinterface->get_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); + $db_res = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id)); if (!empty($db_res['allow'])) { $i = 1; foreach (explode(';', $db_res['allow']) as $c) { diff --git a/views/server.info.php b/views/server.info.php index 2487fca..b227895 100644 --- a/views/server.info.php +++ b/views/server.info.php @@ -422,7 +422,7 @@ if ($test_ami == 1) { // print_r($this->aminterface->close()); // // -//print_r($this->dbinterface->get_db_SccpTableData('SccpExtension')); +//print_r($this->dbinterface->HWextension_db_SccpTableData('SccpExtension')); // print_r($this->srvinterface->getеtestChanSCC()); // $test_data = $this->srvinterface-> astman_GetRaw('ExtensionStateList'); // print_r($test_data);