"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"); /* button = feature,PDefault,ParkingLot,default,RetrieveSingle feature,P.slot,parkinglot,P.slot, */ $lines_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension'); //$hint_list = $this->dbinterface->getSccpDeviceTableData('SccpExtension'); $hint_list = $this->getHintInformation(true, array('context'=>'park-hints')) ; // print_r($hint_list); $line_id =0; $max_buttons =56; $show_buttons =1; //print_r($hint_list); 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)); $max_buttons = $db_device['buttons']; if (!empty($db_device['addon_buttons'])) { $max_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)); $max_buttons = $dev_schema[0]['buttons']; if (!empty($_REQUEST['addon'])) { $val = $_REQUEST['addon']; $dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val)); $max_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; } ?>