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.
|
* and open the template in the editor.
|
||||||
*/
|
*/
|
||||||
$forminfo =array(
|
$forminfo =array(
|
||||||
array("name"=>"dev_buttons",label=>"Buttons Configuration"),
|
array('name'=>'dev_buttons','label'=>'Buttons Configuration'),
|
||||||
array("name"=>"button",label=>"Buttons ",help=>"help.")
|
array('name'=>'button','label'=>'Buttons','help'=>'help')
|
||||||
);
|
);
|
||||||
//$buttons_type= array("empty","line","service","feature","speeddial");
|
//$buttons_type= array("empty","line","service","feature","speeddial");
|
||||||
// "feature","service" -- Add leter !
|
// "feature","service" -- Add leter !
|
||||||
//$buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line");
|
//$buttons_type= array("empty","line","silent","monitor","speeddial","feature","adv.line");
|
||||||
$buttons_type= array("empty","line","speeddial");
|
$buttons_type= array('empty','line','speeddial');
|
||||||
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> "Record Calls",'devstate'=> "Change Status");
|
$feature_list= array('parkinglot'=>'Park Slots','monitor'=> 'Record Calls','devstate'=> 'Change Status');
|
||||||
|
|
||||||
//$lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
//$lines_list = $this->dbinterface->HWextension_db_SccpTableData('SccpExtension');
|
||||||
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
$lines_list = $this->sipconfigs->get_db_sip_TableData('Device');
|
||||||
|
@ -27,8 +27,8 @@ $show_buttons =1;
|
||||||
//print_r($hint_list);
|
//print_r($hint_list);
|
||||||
if (!empty($_REQUEST['id'])) {
|
if (!empty($_REQUEST['id'])) {
|
||||||
$dev_id = $_REQUEST['id'];
|
$dev_id = $_REQUEST['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));
|
||||||
$db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $dev_id));
|
$db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array('id' => $dev_id));
|
||||||
$max_buttons = $db_device['buttons'];
|
$max_buttons = $db_device['buttons'];
|
||||||
if (!empty($db_device['addon_buttons'])) {
|
if (!empty($db_device['addon_buttons'])) {
|
||||||
$max_buttons += $db_device['addon_buttons'];
|
$max_buttons += $db_device['addon_buttons'];
|
||||||
|
@ -37,19 +37,19 @@ if (!empty($_REQUEST['id'])) {
|
||||||
}
|
}
|
||||||
if (!empty($_REQUEST['new_id'])) {
|
if (!empty($_REQUEST['new_id'])) {
|
||||||
$val = $_REQUEST['type'];
|
$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));
|
// $db_device = $this->dbinterface->HWextension_db_SccpTableData('get_sccpdevice_byid', array("id" => $val));
|
||||||
$max_buttons = $dev_schema[0]['buttons'];
|
$max_buttons = $dev_schema[0]['buttons'];
|
||||||
if (!empty($_REQUEST['addon'])) {
|
if (!empty($_REQUEST['addon'])) {
|
||||||
$val = $_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'];
|
$max_buttons += $dev_schema[0]['buttons'];
|
||||||
}
|
}
|
||||||
$show_buttons = $max_buttons;
|
$show_buttons = $max_buttons;
|
||||||
}
|
}
|
||||||
if (!empty($_REQUEST['ru_id'])) {
|
if (!empty($_REQUEST['ru_id'])) {
|
||||||
$dev_id = $_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;
|
$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>
|
<h3><i class="fa fa-minus"></i><?php echo _($forminfo[0]['label']) ?></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" data-id="<?php echo $forminfo[0]['name'];?>">
|
<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">
|
<div class="col-sm-2">
|
||||||
<label class="control-label">Help</label>
|
<label class="control-label">Help</label>
|
||||||
<i class="fa fa-question-circle fpbx-help-icon" data-for="frmbuttons"></i>
|
<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>
|
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>
|
</ui></ui>");?></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div></div>
|
</div></div>
|
||||||
<?php
|
<?php
|
||||||
for ($line_id = 0; $line_id <=$max_buttons; $line_id ++) {
|
for ($line_id = 0; $line_id <=$max_buttons; $line_id ++) {
|
||||||
// print_r($db_buttons[$line_id]);
|
// print_r($db_buttons[$line_id]);
|
||||||
$show_form_mode = '';
|
$show_form_mode = '';
|
||||||
$defaul_tv = (empty($db_buttons[$line_id])) ? "empty": $db_buttons[$line_id]['buttontype'];
|
$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_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']);
|
$defaul_opt = (empty($db_buttons[$line_id])) ? array(''): explode(',', $db_buttons[$line_id]['options']);
|
||||||
|
|
||||||
$show_form_mode = $defaul_tv;
|
$show_form_mode = $defaul_tv;
|
||||||
|
@ -139,14 +139,14 @@ if (!empty($_REQUEST['ru_id'])) {
|
||||||
}
|
}
|
||||||
// print_r($def_hint_btn);
|
// print_r($def_hint_btn);
|
||||||
// print_r($defaul_opt);
|
// print_r($defaul_opt);
|
||||||
|
|
||||||
echo '<!-- Begin button :'.$line_id.' -->';
|
echo '<!-- Begin button :'.$line_id.' -->';
|
||||||
echo '<div class="line_button element-container" '.(($line_id < $show_buttons)?"":"hidden ").'data-id="'.$line_id.'">';
|
echo '<div class="line_button element-container" '.(($line_id < $show_buttons)?"":"hidden ").'data-id="'.$line_id.'">';
|
||||||
// echo 'Mode : '.$show_form_mode. ' opt: ';
|
// echo 'Mode : '.$show_form_mode. ' opt: ';
|
||||||
// print_r( $defaul_opt);
|
// print_r( $defaul_opt);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div class="row"> <div class="form-group">
|
<div class="row"> <div class="form-group">
|
||||||
<div class="col-sm-2">
|
<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>
|
<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>
|
</div>
|
||||||
|
@ -206,7 +206,7 @@ if (!empty($_REQUEST['ru_id'])) {
|
||||||
echo '</div><div class="col-xs-5">';
|
echo '</div><div class="col-xs-5">';
|
||||||
|
|
||||||
echo '<select class="form-control" name="'.$forminfo[1]['name'].$line_id.'_hline" >';
|
echo '<select class="form-control" name="'.$forminfo[1]['name'].$line_id.'_hline" >';
|
||||||
|
|
||||||
foreach ($hint_list as $data) {
|
foreach ($hint_list as $data) {
|
||||||
$select = (($data['key']==$def_hint_btn)?"selected":"");
|
$select = (($data['key']==$def_hint_btn)?"selected":"");
|
||||||
echo '<option value="'.$data['key'].'" '.$select.' >'.$data['exten'].' / '.$data['label'].'</option>';
|
echo '<option value="'.$data['key'].'" '.$select.' >'.$data['exten'].' / '.$data['label'].'</option>';
|
||||||
|
@ -215,7 +215,7 @@ if (!empty($_REQUEST['ru_id'])) {
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
?>
|
?>
|
||||||
</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 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">
|
<div class="col-xs-5">
|
||||||
<?php
|
<?php
|
||||||
|
@ -250,12 +250,12 @@ if (!empty($_REQUEST['ru_id'])) {
|
||||||
<?php
|
<?php
|
||||||
echo '<!-- End button :'.$line_id.' -->';
|
echo '<!-- End button :'.$line_id.' -->';
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div class="section-butom" data-for="<?php echo $forminfo[0]['name'];?>">
|
<div class="section-butom" data-for="<?php echo $forminfo[0]['name'];?>">
|
||||||
<h3></h3>
|
<h3></h3>
|
||||||
|
|
Loading…
Reference in a new issue