Fix the time condition back button link.

This commit is contained in:
Mark Crane 2015-03-15 05:27:13 +00:00
parent ee2f31d4e9
commit 8448a2f504
2 changed files with 7 additions and 12 deletions

View File

@ -30,6 +30,11 @@
$text['button-advanced']['pt-pt'] = "Avancé";
$text['button-advanced']['fr-fr'] = "Avançado";
$text['button-search']['en-us'] = "Search";
$text['button-search']['es-cl'] = "Buscar";
$text['button-search']['pt-pt'] = "Pesquisar";
$text['button-search']['fr-fr'] = "Chercher";
$text['button-back']['en-us'] = "Back";
$text['button-back']['es-cl'] = "Volver";
$text['button-back']['pt-pt'] = "Voltar";

View File

@ -132,10 +132,8 @@ require_once "resources/header.php";
//execute query
$db->exec(check_sql($sql));
unset($sql);
}
else if ($action == "update") {
//update main dialplan entry
$sql = "update v_dialplans set ";
$sql .= "dialplan_name = '".$dialplan_name."', ";
@ -155,15 +153,12 @@ require_once "resources/header.php";
$sql .= "where dialplan_uuid = '".$dialplan_uuid."'; ";
$db->query($sql);
unset($sql);
}
//initialize dialplan detail group and order numbers
$dialplan_detail_group = 0;
$dialplan_detail_order = 0;
//clean up array
//remove presets not checked, restructure variable array
foreach ($_REQUEST['variable']['preset'] as $group_id => $conditions) {
@ -221,7 +216,6 @@ require_once "resources/header.php";
}
}
//process conditions
$conditions_exist = false;
@ -434,7 +428,6 @@ require_once "resources/header.php";
//get existing data to pre-populate form
if ($dialplan_uuid != '' && $_POST["persistformvar"] != "true") {
//get main dialplan entry
$orm = new orm;
$orm->name('dialplans');
@ -454,7 +447,6 @@ require_once "resources/header.php";
}
unset ($prep_statement);
//get dialplan detail conditions
$sql = "select dialplan_detail_group, dialplan_detail_tag, dialplan_detail_type, dialplan_detail_data from v_dialplan_details ";
$sql .= "where dialplan_uuid = '".$dialplan_uuid."' ";
@ -476,7 +468,6 @@ require_once "resources/header.php";
$result_count = count($result);
unset ($prep_statement, $sql);
//load current conditions into array (combined by group), and retrieve action and anti-action
$c = 0;
foreach ($result as $row) {
@ -493,7 +484,6 @@ require_once "resources/header.php";
}
}
//loop through available presets
foreach ($available_presets as $preset_number => $preset) {
foreach ($preset as $preset_name => $preset_variables) {
@ -729,9 +719,9 @@ echo " <br /><br />\n";
echo " ".$text['description-time_conditions']."\n";
echo " </td>\n";
echo " <td align='right' valign='top'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='".PROJECT_PATH."/app/dialplan/dialplans.php?app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-back']."'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='".PROJECT_PATH."/app/time_conditions/time_conditions.php?app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-back']."'>\n";
if (if_group("superadmin") && $action == 'update') {
echo " <input type='button' class='btn' name='' alt='".$text['button-advanced']."' onclick=\"document.location.href='".PROJECT_PATH."/app/dialplan/dialplan_edit.php?id=".$dialplan_uuid."&app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-advanced']."'>\n";
echo " <input type='button' class='btn' name='' alt='".$text['button-advanced']."' onclick=\"document.location.href='".PROJECT_PATH."/app/time_conditions/time_conditions.php?id=".$dialplan_uuid."&app_uuid=4b821450-926b-175a-af93-a03c441818b1'\" value='".$text['button-advanced']."'>\n";
}
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
echo " </td>\n";