'dev_buttons', 'label'=>'Buttons Configuration'), array('name'=>'button', 'label'=>'Buttons', 'help'=>'help') ); //$buttons_type= array("empty","line","service","feature","speeddial"); // "feature","service" -- Add leter ! $buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line"); $feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'devstate'=> "Change Status"); if ($_REQUEST['tech_hardware'] === 'cisco') { $lines_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension'); } else { $lines_list = $this->dbinterface->getSipTableData('extensionList'); } $hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ; $line_id =0; $max_buttons =56; //Don't know hardware type so set a maximum. On save, this is set to actual max buttons $show_buttons =1; if (!empty($_REQUEST['id'])) { $dev_id = $_REQUEST['id']; $db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id)); $db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $dev_id)); $show_buttons = $db_device['buttons']; if (!empty($db_device['addon_buttons'])) { $show_buttons += $db_device['addon_buttons']; } //$show_buttons = $max_buttons; } if (!empty($_REQUEST['new_id'])) { $val = $_REQUEST['type']; $dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val)); // $db_device = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_byid', array("id" => $val)); $show_buttons = $dev_schema[0]['buttons']; if (!empty($_REQUEST['addon'])) { $val = $_REQUEST['addon']; $dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val)); $show_buttons += $dev_schema[0]['buttons']; } //$show_buttons = $max_buttons; } if (!empty($_REQUEST['ru_id'])) { $dev_id = $_REQUEST['ru_id']; $db_buttons = $this->dbinterface->getSccpDeviceTableData('get_sccpdevice_buttons', array("id" => $dev_id)); $show_buttons = $max_buttons; } ?>