Set inbound routes default order to 100, and time conditions to 300.

This commit is contained in:
Mark Crane 2014-01-16 19:20:48 +00:00
parent 5632a79dff
commit a2e534cac2
2 changed files with 33 additions and 78 deletions

View File

@ -139,6 +139,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$dialplan_name = str_replace(" ", "_", $dialplan_name);
$dialplan_name = str_replace("/", "", $dialplan_name);
//set the context
if (count($_SESSION["domains"]) > 1) {
$context = 'default';
}
else {
$context = '$${domain_name}';
}
//start the atomic transaction
$count = $db->exec("BEGIN;"); //returns affected rows
@ -246,60 +254,6 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
unset($sql);
}
//set domain
if (count($_SESSION["domains"]) > 1) {
$dialplan_detail_uuid = uuid();
$sql = "insert into v_dialplan_details ";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "dialplan_uuid, ";
$sql .= "dialplan_detail_uuid, ";
$sql .= "dialplan_detail_tag, ";
$sql .= "dialplan_detail_type, ";
$sql .= "dialplan_detail_data, ";
$sql .= "dialplan_detail_order ";
$sql .= ") ";
$sql .= "values ";
$sql .= "(";
$sql .= "'$domain_uuid', ";
$sql .= "'$dialplan_uuid', ";
$sql .= "'$dialplan_detail_uuid', ";
$sql .= "'action', ";
$sql .= "'set', ";
$sql .= "'domain=".$_SESSION['domain_name']."', ";
$sql .= "'40' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
}
//set domain_name
if (count($_SESSION["domains"]) > 1) {
$dialplan_detail_uuid = uuid();
$sql = "insert into v_dialplan_details ";
$sql .= "(";
$sql .= "domain_uuid, ";
$sql .= "dialplan_uuid, ";
$sql .= "dialplan_detail_uuid, ";
$sql .= "dialplan_detail_tag, ";
$sql .= "dialplan_detail_type, ";
$sql .= "dialplan_detail_data, ";
$sql .= "dialplan_detail_order ";
$sql .= ") ";
$sql .= "values ";
$sql .= "(";
$sql .= "'$domain_uuid', ";
$sql .= "'$dialplan_uuid', ";
$sql .= "'$dialplan_detail_uuid', ";
$sql .= "'action', ";
$sql .= "'set', ";
$sql .= "'domain_name=".$_SESSION['domain_name']."', ";
$sql .= "'50' ";
$sql .= ")";
$db->exec(check_sql($sql));
unset($sql);
}
//set call_direction
if (count($_SESSION["domains"]) > 1) {
$dialplan_detail_uuid = uuid();
@ -918,23 +872,23 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "<tr>\n";
echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$text['label-order'].":\n";
echo " ".$text['label-order'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='public_order' class='formfld' style='width: 60%;'>\n";
echo " <select name='public_order' class='formfld' style='width: 60%;'>\n";
if (strlen(htmlspecialchars($public_order))> 0) {
echo " <option selected='yes' value='".htmlspecialchars($public_order)."'>".htmlspecialchars($public_order)."</option>\n";
echo " <option selected='yes' value='".htmlspecialchars($public_order)."'>".htmlspecialchars($public_order)."</option>\n";
}
$i=0;
while($i<=999) {
if (strlen($i) == 1) { echo " <option value='00$i'>00$i</option>\n"; }
if (strlen($i) == 2) { echo " <option value='0$i'>0$i</option>\n"; }
if (strlen($i) == 3) { echo " <option value='$i'>$i</option>\n"; }
$i++;
$i = 100;
while($i <= 999) {
if (strlen($i) == 1) { echo " <option value='00$i'>00$i</option>\n"; }
if (strlen($i) == 2) { echo " <option value='0$i'>0$i</option>\n"; }
if (strlen($i) == 3) { echo " <option value='$i'>$i</option>\n"; }
$i = $i + 10;
}
echo " </select>\n";
echo "<br />\n";
echo "\n";
echo " </select>\n";
echo " <br />\n";
echo " \n";
echo "</td>\n";
echo "</tr>\n";

View File

@ -42,9 +42,9 @@ foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
$order_by = $_GET["order_by"];
$order = $_GET["order"];
//set the variables
$order_by = check_str($_GET["order_by"]);
$order = check_str($_GET["order"]);
//get the post form variables and se them to php variables
if (count($_POST)>0) {
@ -1013,18 +1013,19 @@ echo "<td class='vncellreq' valign='top' align='left' nowrap>\n";
echo " ".$text['label-order'].":\n";
echo "</td>\n";
echo "<td class='vtable' align='left'>\n";
echo " <select name='dialplan_order' class='formfld' style='width: 60%;'>\n";
echo " <select name='dialplan_order' class='formfld' style='width: 60%;'>\n";
if (strlen(htmlspecialchars($dialplan_order))> 0) {
echo " <option selected='yes' value='".htmlspecialchars($dialplan_order)."'>".htmlspecialchars($dialplan_order)."</option>\n";
echo " <option selected='yes' value='".htmlspecialchars($dialplan_order)."'>".htmlspecialchars($dialplan_order)."</option>\n";
}
$i=0;
while($i<=999) {
if (strlen($i) == 1) { echo " <option value='00$i'>00$i</option>\n"; }
if (strlen($i) == 2) { echo " <option value='0$i'>0$i</option>\n"; }
if (strlen($i) == 3) { echo " <option value='$i'>$i</option>\n"; }
$i++;
$i = 300;
while($i <= 999) {
if (strlen($i) == 1) { echo " <option value='00$i'>00$i</option>\n"; }
if (strlen($i) == 2) { echo " <option value='0$i'>0$i</option>\n"; }
if (strlen($i) == 3) { echo " <option value='$i'>$i</option>\n"; }
$i = $i + 10;
}
echo " </select>\n";
echo " </select>\n";
echo "<br />\n";
echo "\n";
echo "</td>\n";