Correct string quoting
String quoting was incompatible with PHP 7
This commit is contained in:
parent
594367cbd4
commit
bd257cec9b
|
@ -6,14 +6,14 @@
|
|||
* and open the template in the editor.
|
||||
*/
|
||||
$forminfo =array(
|
||||
array("name"=>"dev_buttons",label=>"Buttons Configuration"),
|
||||
array("name"=>"button",label=>"Buttons ",help=>"help.")
|
||||
);
|
||||
array('name'=>'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");
|
||||
$buttons_type= array("empty","line","speeddial");
|
||||
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'devstate'=> "Change Status");
|
||||
$buttons_type= array('empty','line','speeddial');
|
||||
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> 'Record Calls','devstate'=> 'Change Status');
|
||||
|
||||
//$lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
||||
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
||||
|
@ -27,8 +27,8 @@ $show_buttons =1;
|
|||
//print_r($hint_list);
|
||||
if (!empty($_REQUEST['id'])) {
|
||||
$dev_id = $_REQUEST['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));
|
||||
$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'];
|
||||
|
@ -37,19 +37,19 @@ if (!empty($_REQUEST['id'])) {
|
|||
}
|
||||
if (!empty($_REQUEST['new_id'])) {
|
||||
$val = $_REQUEST['type'];
|
||||
$dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val));
|
||||
$dev_schema = $this-> getSccpModelInformation('byid', false, 'all', array('model' =>$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'];
|
||||
$dev_schema = $this-> getSccpModelInformation('byid', false, "all", array('model' =>$val));
|
||||
$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->HWextension_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;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ if (!empty($_REQUEST['ru_id'])) {
|
|||
<h3><i class="fa fa-minus"></i><?php echo _($forminfo[0]['label']) ?></h3>
|
||||
</div>
|
||||
<div class="section" data-id="<?php echo $forminfo[0]['name'];?>">
|
||||
<div class="row"> <div class="form-group">
|
||||
<div class="row"> <div class="form-group">
|
||||
<div class="col-sm-2">
|
||||
<label class="control-label">Help</label>
|
||||
<i class="fa fa-question-circle fpbx-help-icon" data-for="frmbuttons"></i>
|
||||
|
@ -84,14 +84,14 @@ if (!empty($_REQUEST['ru_id'])) {
|
|||
hold = To be implemented</li><li>transfer = To be implemented</li><li>multiblink = To be implemented</li><li>mobility = To be implemented</li><li>conference = To be implemented</li>
|
||||
</ui></ui>");?></span>
|
||||
</div>
|
||||
|
||||
</div></div>
|
||||
|
||||
</div></div>
|
||||
<?php
|
||||
for ($line_id = 0; $line_id <=$max_buttons; $line_id ++) {
|
||||
// print_r($db_buttons[$line_id]);
|
||||
$show_form_mode = '';
|
||||
$defaul_tv = (empty($db_buttons[$line_id])) ? "empty": $db_buttons[$line_id]['buttontype'];
|
||||
$defaul_btn = (empty($db_buttons[$line_id])) ? "": $db_buttons[$line_id]['name'];
|
||||
$defaul_tv = (empty($db_buttons[$line_id])) ? 'empty': $db_buttons[$line_id]['buttontype'];
|
||||
$defaul_btn = (empty($db_buttons[$line_id])) ? '': $db_buttons[$line_id]['name'];
|
||||
$defaul_opt = (empty($db_buttons[$line_id])) ? array(''): explode(',', $db_buttons[$line_id]['options']);
|
||||
|
||||
$show_form_mode = $defaul_tv;
|
||||
|
@ -139,14 +139,14 @@ if (!empty($_REQUEST['ru_id'])) {
|
|||
}
|
||||
// print_r($def_hint_btn);
|
||||
// print_r($defaul_opt);
|
||||
|
||||
|
||||
echo '<!-- Begin button :'.$line_id.' -->';
|
||||
echo '<div class="line_button element-container" '.(($line_id < $show_buttons)?"":"hidden ").'data-id="'.$line_id.'">';
|
||||
// echo 'Mode : '.$show_form_mode. ' opt: ';
|
||||
// print_r( $defaul_opt);
|
||||
|
||||
?>
|
||||
<div class="row"> <div class="form-group">
|
||||
?>
|
||||
<div class="row"> <div class="form-group">
|
||||
<div class="col-sm-2">
|
||||
<label class="control-label" for="<?php echo $forminfo[1]['name'].$line_id; ?> "><?php echo _($forminfo[1]['label'].$line_id).(($line_id =="0")?' Default ':''); ?></label>
|
||||
</div>
|
||||
|
@ -206,7 +206,7 @@ if (!empty($_REQUEST['ru_id'])) {
|
|||
echo '</div><div class="col-xs-5">';
|
||||
|
||||
echo '<select class="form-control" name="'.$forminfo[1]['name'].$line_id.'_hline" >';
|
||||
|
||||
|
||||
foreach ($hint_list as $data) {
|
||||
$select = (($data['key']==$def_hint_btn)?"selected":"");
|
||||
echo '<option value="'.$data['key'].'" '.$select.' >'.$data['exten'].' / '.$data['label'].'</option>';
|
||||
|
@ -215,7 +215,7 @@ if (!empty($_REQUEST['ru_id'])) {
|
|||
echo '</div>';
|
||||
?>
|
||||
</div>
|
||||
<!-- if Line Type = feature Show Futures Park -->
|
||||
<!-- if Line Type = feature Show Futures Park -->
|
||||
<div data-type='feature' class="lineid_<?php echo $line_id.(($show_form_mode=='feature')? '':' hidden');?>" name="<?php echo $forminfo[1]['name'].$line_id.'_hint';?>">
|
||||
<div class="col-xs-5">
|
||||
<?php
|
||||
|
@ -250,12 +250,12 @@ if (!empty($_REQUEST['ru_id'])) {
|
|||
<?php
|
||||
echo '<!-- End button :'.$line_id.' -->';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="section-butom" data-for="<?php echo $forminfo[0]['name'];?>">
|
||||
<h3></h3>
|
||||
|
|
Loading…
Reference in a new issue