Update dialplan_edit.php
This commit is contained in:
parent
ddb5c25acb
commit
76b83eca66
|
|
@ -206,7 +206,7 @@
|
|||
else if ($action == "update") {
|
||||
messages::add($text['message-update']);
|
||||
}
|
||||
header("Location: ?id=".$dialplan_uuid.(($app_uuid != '') ? "&app_uuid=".$app_uuid : null));
|
||||
header("Location: ?id=".escape($dialplan_uuid).(($app_uuid != '') ? "&app_uuid=".escape($app_uuid) : null));
|
||||
exit;
|
||||
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
|
|
@ -364,7 +364,7 @@
|
|||
|
||||
//show the content
|
||||
echo "<form method='post' name='frm' action=''>\n";
|
||||
echo "<input type='hidden' name='app_uuid' value='".$app_uuid."'>\n";
|
||||
echo "<input type='hidden' name='app_uuid' value='".escape($app_uuid)."'>\n";
|
||||
|
||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\">\n";
|
||||
echo " <tr>\n";
|
||||
|
|
@ -373,10 +373,10 @@
|
|||
echo " </td>\n";
|
||||
echo " <td width='70%' align='right'>\n";
|
||||
if (permission_exists('dialplan_xml')) {
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-xml']."' onclick=\"window.location='dialplan_xml.php?id=".$dialplan_uuid."&".((strlen($app_uuid) > 0) ? "app_uuid=".$app_uuid : null)."';\" value='".$text['button-xml']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-xml']."' onclick=\"window.location='dialplan_xml.php?id=".escape($dialplan_uuid)."&".((strlen($app_uuid) > 0) ? "app_uuid=".escape($app_uuid) : null)."';\" value='".$text['button-xml']."'>\n";
|
||||
}
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php".((strlen($app_uuid) > 0) ? "?app_uuid=".$app_uuid : null)."';\" value='".$text['button-back']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='dialplan_copy.php?id=".$dialplan_uuid."';}\" value='".$text['button-copy']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='dialplans.php".((strlen($app_uuid) > 0) ? "?app_uuid=".escape($app_uuid) : null)."';\" value='".$text['button-back']."'>\n";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-copy']."' onclick=\"if (confirm('".$text['confirm-copy']."')){window.location='dialplan_copy.php?id=".escape($dialplan_uuid)."';}\" value='".$text['button-copy']."'>\n";
|
||||
echo " <input type='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
|
@ -399,7 +399,7 @@
|
|||
echo " ".$text['label-name']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' width='70%' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_name' maxlength='255' placeholder='' value=\"".escape(htmlspecialchars($dialplan_name))."\" required='required'>\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_name' maxlength='255' placeholder='' value=\"".escape($dialplan_name)."\" required='required'>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
|
|
@ -408,7 +408,7 @@
|
|||
echo " ".$text['label-number']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' align='left'>\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_number' maxlength='255' placeholder='' value=\"".escape(htmlspecialchars($dialplan_number))."\">\n";
|
||||
echo " <input class='formfld' type='text' name='dialplan_number' maxlength='255' placeholder='' value=\"".escape($dialplan_number)."\">\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
|
||||
|
|
@ -499,10 +499,10 @@
|
|||
}
|
||||
if (is_array($_SESSION['domains'])) foreach ($_SESSION['domains'] as $row) {
|
||||
if ($row['domain_uuid'] == $domain_uuid) {
|
||||
echo " <option value='".$row['domain_uuid']."' selected='selected'>".$row['domain_name']."</option>\n";
|
||||
echo " <option value='".$row['domain_uuid']."' selected='selected'>".escape($row['domain_name'])."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".$row['domain_uuid']."'>".$row['domain_name']."</option>\n";
|
||||
echo " <option value='".$row['domain_uuid']."'>".escape($row['domain_name'])."</option>\n";
|
||||
}
|
||||
}
|
||||
echo " </select>\n";
|
||||
|
|
@ -539,7 +539,7 @@
|
|||
echo " ".$text['label-description']."\n";
|
||||
echo " </td>\n";
|
||||
echo " <td class='vtable' align='left' width='70%'>\n";
|
||||
echo " <textarea class='formfld' style='width: 250px; height: 68px;' name='dialplan_description'>".escape(htmlspecialchars($dialplan_description))."</textarea>\n";
|
||||
echo " <textarea class='formfld' style='width: 250px; height: 68px;' name='dialplan_description'>".escape($dialplan_description)."</textarea>\n";
|
||||
echo " </td>\n";
|
||||
echo " </tr>\n";
|
||||
echo " </table>\n";
|
||||
|
|
@ -617,13 +617,13 @@
|
|||
}
|
||||
//add the primary key uuid
|
||||
if (strlen($dialplan_detail_uuid) > 0) {
|
||||
echo " <input name='dialplan_details[".$x."][dialplan_detail_uuid]' type='hidden' value=\"".$dialplan_detail_uuid."\">\n";
|
||||
echo " <input name='dialplan_details[".$x."][dialplan_detail_uuid]' type='hidden' value=\"".escape($dialplan_detail_uuid)."\">\n";
|
||||
}
|
||||
//tag
|
||||
$selected = "selected=\"selected\" ";
|
||||
echo "<td class='vtablerow' style='".$no_border."' onclick=\"label_to_form('label_dialplan_detail_tag_".$x."','dialplan_detail_tag_".$x."');\" nowrap='nowrap'>\n";
|
||||
if ($element['hidden']) {
|
||||
echo " <label id=\"label_dialplan_detail_tag_".$x."\">".$dialplan_detail_tag."</label>\n";
|
||||
echo " <label id=\"label_dialplan_detail_tag_".$x."\">".escape($dialplan_detail_tag)."</label>\n";
|
||||
}
|
||||
echo " <select id='dialplan_detail_tag_".$x."' name='dialplan_details[".$x."][dialplan_detail_tag]' class='formfld' style='width: 97px; ".$element['visibility']."'>\n";
|
||||
echo " <option></option>\n";
|
||||
|
|
@ -636,12 +636,12 @@
|
|||
//type
|
||||
echo "<td class='vtablerow' style='".$no_border."' onclick=\"label_to_form('label_dialplan_detail_type_".$x."','dialplan_detail_type_".$x."');\" nowrap='nowrap'>\n";
|
||||
if ($element['hidden']) {
|
||||
echo " <label id=\"label_dialplan_detail_type_".$x."\">".$dialplan_detail_type."</label>\n";
|
||||
echo " <label id=\"label_dialplan_detail_type_".$x."\">".escape($dialplan_detail_type)."</label>\n";
|
||||
}
|
||||
echo " <select id='dialplan_detail_type_".$x."' name='dialplan_details[".$x."][dialplan_detail_type]' class='formfld' style='width: auto; ".$element['visibility']."' onchange='change_to_input(this);'>\n";
|
||||
if (strlen($dialplan_detail_type) > 0) {
|
||||
echo " <optgroup label='selected'>\n";
|
||||
echo " <option value=\"".htmlspecialchars($dialplan_detail_type)."\">".htmlspecialchars($dialplan_detail_type)."</option>\n";
|
||||
echo " <option value=\"".escape($dialplan_detail_type)."\">".escape($dialplan_detail_type)."</option>\n";
|
||||
echo " </optgroup>\n";
|
||||
}
|
||||
else {
|
||||
|
|
@ -678,11 +678,13 @@
|
|||
//}
|
||||
//if (strlen($dialplan_detail_tag) == 0 || $dialplan_detail_tag == "action" || $dialplan_detail_tag == "anti-action") {
|
||||
echo " <optgroup label='".$text['optgroup-applications']."'>\n";
|
||||
if (is_array($_SESSION['switch']['applications'])) foreach ($_SESSION['switch']['applications'] as $row) {
|
||||
if (strlen($row) > 0) {
|
||||
$application = explode(",", $row);
|
||||
if ($application[0] != "name" && stristr($application[0], "[") != true) {
|
||||
echo " <option value='".$application[0]."'>".$application[0]."</option>\n";
|
||||
if (is_array($_SESSION['switch']['applications'])) {
|
||||
foreach ($_SESSION['switch']['applications'] as $row) {
|
||||
if (strlen($row) > 0) {
|
||||
$application = explode(",", $row);
|
||||
if ($application[0] != "name" && stristr($application[0], "[") != true) {
|
||||
echo " <option value='".$application[0]."'>".$application[0]."</option>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -711,14 +713,14 @@
|
|||
unset ($prep_statement, $sql, $bridge_statement);
|
||||
}
|
||||
}
|
||||
echo " <label id=\"label_dialplan_detail_data_".$x."\">".htmlspecialchars($dialplan_detail_data_mod)."</label>\n";
|
||||
echo " <label id=\"label_dialplan_detail_data_".$x."\">".escape($dialplan_detail_data_mod)."</label>\n";
|
||||
}
|
||||
echo " <input id='dialplan_detail_data_".$x."' name='dialplan_details[".$x."][dialplan_detail_data]' class='formfld' type='text' style='width: calc(100% - 2px); min-width: calc(100% - 2px); max-width: calc(100% - 2px); ".$element['visibility']."' placeholder='' value=\"".htmlspecialchars($dialplan_detail_data)."\">\n";
|
||||
echo " <input id='dialplan_detail_data_".$x."' name='dialplan_details[".$x."][dialplan_detail_data]' class='formfld' type='text' style='width: calc(100% - 2px); min-width: calc(100% - 2px); max-width: calc(100% - 2px); ".$element['visibility']."' placeholder='' value=\"".escape($dialplan_detail_data)."\">\n";
|
||||
echo "</td>\n";
|
||||
//break
|
||||
echo "<td class='vtablerow' style='".$no_border."' onclick=\"label_to_form('label_dialplan_detail_break_".$x."','dialplan_detail_break_".$x."');\" nowrap='nowrap'>\n";
|
||||
if ($element['hidden']) {
|
||||
echo " <label id=\"label_dialplan_detail_break_".$x."\">".$dialplan_detail_break."</label>\n";
|
||||
echo " <label id=\"label_dialplan_detail_break_".$x."\">".escape($dialplan_detail_break)."</label>\n";
|
||||
}
|
||||
echo " <select id='dialplan_detail_break_".$x."' name='dialplan_details[".$x."][dialplan_detail_break]' class='formfld' style='width: auto; ".$element['visibility']."'>\n";
|
||||
echo " <option></option>\n";
|
||||
|
|
@ -731,7 +733,7 @@
|
|||
//inline
|
||||
echo "<td class='vtablerow' style='".$no_border." text-align: center;' onclick=\"label_to_form('label_dialplan_detail_inline_".$x."','dialplan_detail_inline_".$x."');\" nowrap='nowrap'>\n";
|
||||
if ($element['hidden']) {
|
||||
echo " <label id=\"label_dialplan_detail_inline_".$x."\">".$dialplan_detail_inline."</label>\n";
|
||||
echo " <label id=\"label_dialplan_detail_inline_".$x."\">".escape($dialplan_detail_inline)."</label>\n";
|
||||
}
|
||||
echo " <select id='dialplan_detail_inline_".$x."' name='dialplan_details[".$x."][dialplan_detail_inline]' class='formfld' style='width: auto; ".$element['visibility']."'>\n";
|
||||
echo " <option></option>\n";
|
||||
|
|
@ -744,12 +746,12 @@
|
|||
if ($element['hidden']) {
|
||||
echo " <label id=\"label_dialplan_detail_group_".$x."\">".$dialplan_detail_group."</label>\n";
|
||||
}
|
||||
echo " <input id='dialplan_detail_group_".$x."' name='dialplan_details[".$x."][dialplan_detail_group]' class='formfld' type='number' min='0' step='1' style='width: 30px; text-align: center; ".$element['visibility']."' placeholder='' value=\"".htmlspecialchars($dialplan_detail_group)."\" onclick='this.select();'>\n";
|
||||
echo " <input id='dialplan_detail_group_".$x."' name='dialplan_details[".$x."][dialplan_detail_group]' class='formfld' type='number' min='0' step='1' style='width: 30px; text-align: center; ".$element['visibility']."' placeholder='' value=\"".escape($dialplan_detail_group)."\" onclick='this.select();'>\n";
|
||||
/*
|
||||
echo " <select id='dialplan_detail_group_".$x."' name='dialplan_details[".$x."][dialplan_detail_group]' class='formfld' style='".$element['width']." ".$element['visibility']."'>\n";
|
||||
echo " <option value=''></option>\n";
|
||||
if (strlen($dialplan_detail_group)> 0) {
|
||||
echo " <option $selected value='".htmlspecialchars($dialplan_detail_group)."'>".htmlspecialchars($dialplan_detail_group)."</option>\n";
|
||||
echo " <option $selected value='".escape($dialplan_detail_group)."'>".escape($dialplan_detail_group)."</option>\n";
|
||||
}
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
|
|
@ -762,13 +764,13 @@
|
|||
//order
|
||||
echo "<td class='vtablerow' style='".$no_border." text-align: center;' onclick=\"label_to_form('label_dialplan_detail_order_".$x."','dialplan_detail_order_".$x."');\" nowrap='nowrap'>\n";
|
||||
if ($element['hidden']) {
|
||||
echo " <label id=\"label_dialplan_detail_order_".$x."\">".$dialplan_detail_order."</label>\n";
|
||||
echo " <label id=\"label_dialplan_detail_order_".$x."\">".escape($dialplan_detail_order)."</label>\n";
|
||||
}
|
||||
echo " <input id='dialplan_detail_order_".$x."' name='dialplan_details[".$x."][dialplan_detail_order]' class='formfld' type='number' min='0' step='1' style='width: 32px; text-align: center; ".$element['visibility']."' placeholder='' value=\"".htmlspecialchars($dialplan_detail_order)."\" onclick='this.select();'>\n";
|
||||
echo " <input id='dialplan_detail_order_".$x."' name='dialplan_details[".$x."][dialplan_detail_order]' class='formfld' type='number' min='0' step='1' style='width: 32px; text-align: center; ".$element['visibility']."' placeholder='' value=\"".escape($dialplan_detail_order)."\" onclick='this.select();'>\n";
|
||||
/*
|
||||
echo " <select id='dialplan_detail_order_".$x."' name='dialplan_details[".$x."][dialplan_detail_order]' class='formfld' style='".$element['width']." ".$element['visibility']."'>\n";
|
||||
if (strlen($dialplan_detail_order)> 0) {
|
||||
echo " <option $selected value='".htmlspecialchars($dialplan_detail_order)."'>".htmlspecialchars($dialplan_detail_order)."</option>\n";
|
||||
echo " <option $selected value='".escape($dialplan_detail_order)."'>".escape($dialplan_detail_order)."</option>\n";
|
||||
}
|
||||
$i=0;
|
||||
while($i<=999) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue