Response message updates.

This commit is contained in:
Nate Jones
2014-02-21 03:02:55 +00:00
parent 450d2b5d90
commit be84f215c0
2 changed files with 25 additions and 35 deletions
+5 -9
View File
@@ -35,7 +35,7 @@ else {
} }
//add multi-lingual support //add multi-lingual support
require_once "app/calls/app_languages.php"; require_once "app_languages.php";
foreach($text as $key => $value) { foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']]; $text[$key] = $value[$_SESSION['domain']['language']['code']];
} }
@@ -93,13 +93,9 @@ if (strlen($id)>0) {
} }
//redirect the user
require_once "resources/header.php"; $_SESSION["message"] = $text['confirm-delete'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n"; header("Location: conferences.php");
echo "<div align='center'>\n"; return;
echo "".$text['confirm-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
?> ?>
+15 -21
View File
@@ -77,12 +77,10 @@ else {
$sql .= "and conference_uuid = '".$conference_uuid."' "; $sql .= "and conference_uuid = '".$conference_uuid."' ";
$sql .= "and user_uuid = '".$user_uuid."' "; $sql .= "and user_uuid = '".$user_uuid."' ";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
//redirect the browser
require_once "resources/header.php"; $_SESSION["message"] = $text['confirm-delete'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences_edit.php?id=$conference_uuid\">\n"; header("Location: conference_edit.php?id=".$conference_uuid);
echo "<div align='center'>".$text['confirm-delete']."</div>"; return;
require_once "resources/footer.php";
return;
} }
//add the user to the v_conference_users //add the user to the v_conference_users
@@ -106,12 +104,10 @@ else {
$sql_insert .= "'".$user_uuid."' "; $sql_insert .= "'".$user_uuid."' ";
$sql_insert .= ")"; $sql_insert .= ")";
$db->exec($sql_insert); $db->exec($sql_insert);
//redirect the browser
require_once "resources/header.php"; $_SESSION["message"] = $text['confirm-add'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences_edit.php?id=$conference_uuid\">\n"; header("Location: conference_edit.php?id=".$conference_uuid);
echo "<div align='center'>".$text['confirm-add']."</div>"; return;
require_once "resources/footer.php";
return;
} }
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
@@ -217,6 +213,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$dialplan_detail_group = '2'; $dialplan_detail_group = '2';
dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data); dialplan_detail_add($_SESSION['domain_uuid'], $dialplan_uuid, $dialplan_detail_tag, $dialplan_detail_order, $dialplan_detail_group, $dialplan_detail_type, $dialplan_detail_data);
$_SESSION["message"] = $text['confirm-add'];
} //if ($action == "add") } //if ($action == "add")
if ($action == "update") { if ($action == "update") {
@@ -271,6 +269,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "and dialplan_uuid = '$dialplan_uuid' "; $sql .= "and dialplan_uuid = '$dialplan_uuid' ";
$db->query($sql); $db->query($sql);
$_SESSION["message"] = $text['confirm-update'];
} //if ($action == "update") } //if ($action == "update")
//save the xml //save the xml
@@ -286,14 +286,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$switch_result = event_socket_request($fp, 'api '.$switch_cmd); $switch_result = event_socket_request($fp, 'api '.$switch_cmd);
} }
//redirect the browser header("Location: conferences.php");
require_once "resources/header.php"; return;
echo "<meta http-equiv=\"refresh\" content=\"2;url=conferences.php\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
} //if ($_POST["persistformvar"] != "true") } //if ($_POST["persistformvar"] != "true")
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
@@ -408,7 +402,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " <tr>\n"; echo " <tr>\n";
echo " <td class='vtable'>".$field['username']."</td>\n"; echo " <td class='vtable'>".$field['username']."</td>\n";
echo " <td>\n"; echo " <td>\n";
echo " <a href='conferences_edit.php?id=".$conference_uuid."&domain_uuid=".$_SESSION['domain_uuid']."&user_uuid=".$field['user_uuid']."&a=delete' alt='delete' onclick=\"return confirm('".$text['confirm-delete-2']."')\">$v_link_label_delete</a>\n"; echo " <a href='conference_edit.php?id=".$conference_uuid."&domain_uuid=".$_SESSION['domain_uuid']."&user_uuid=".$field['user_uuid']."&a=delete' alt='delete' onclick=\"return confirm('".$text['confirm-delete-2']."')\">$v_link_label_delete</a>\n";
echo " </td>\n"; echo " </td>\n";
echo " </tr>\n"; echo " </tr>\n";
} }