Response message updates, permission fix.

This commit is contained in:
Nate Jones 2014-02-21 02:13:06 +00:00
parent 81d5ea95e1
commit c23b49f3ad
3 changed files with 24 additions and 33 deletions

View File

@ -55,13 +55,9 @@ else {
unset($sql);
}
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_broadcast.php\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-delete']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return;
$_SESSION["message"] = $text['confirm-delete'];
header("Location: call_broadcast.php");
return;
?>

View File

@ -141,12 +141,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql));
unset($sql);
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_broadcast.php\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-add']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['confirm-add'];
header("Location: call_broadcast.php");
return;
} //if ($action == "add")
@ -177,12 +173,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$db->exec(check_sql($sql));
unset($sql);
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=call_broadcast.php\">\n";
echo "<div align='center'>\n";
echo "".$text['confirm-update']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['confirm-update'];
header("Location: call_broadcast.php");
return;
} //if ($action == "update")
} //if ($_POST["persistformvar"] != "true")

View File

@ -118,7 +118,7 @@ function cmd_async($cmd) {
//get information over event socket
if (!$fp) {
require_once "resources/header.php";
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
$msg = "<div align='center'>Connection to Event Socket failed.<br /></div>";
echo "<div align='center'>\n";
echo "<table width='40%'>\n";
echo "<tr>\n";
@ -179,13 +179,13 @@ function cmd_async($cmd) {
//method 1
$response = trim(event_socket_request($fp, 'api '.$cmd));
//method 2
//cmd_async($_SESSION['switch']['bin']['dir']."/fs_cli -x \"".$cmd."\";");
//spread the calls out so that they are scheduled with different times
if (strlen($broadcast_concurrent_limit) > 0 && strlen($broadcast_timeout) > 0) {
if ($broadcast_concurrent_limit == $count) {
if ($broadcast_concurrent_limit == $count) {
$sched_seconds = $sched_seconds + $broadcast_timeout;
$count=0;
}
@ -195,7 +195,6 @@ function cmd_async($cmd) {
}
fclose($fp);
//echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/app/calls_active/v_calls_active.php\">\n";
echo "<div align='center'>\n";
echo "<table width='50%'>\n";
echo "<tr>\n";
@ -203,19 +202,23 @@ function cmd_async($cmd) {
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='row_style1' align='center'>\n";
echo " <strong>".$text['label-call-broadcast']." $broadcast_name ".$text['label-has-been']."</strong>\n";
echo " <br /><br />\n";
echo " <table width='100%'>\n";
echo " <tr>\n";
echo " <td align='center'>\n";
echo " <a href='".PROJECT_PATH."/app/calls_active/calls_active.php'>".$text['label-view-calls']."</a>\n";
echo " </td>\n";
echo " </table>\n";
echo " <strong>".$text['label-call-broadcast']." ".$broadcast_name." ".$text['label-has-been']."</strong>\n";
if (permission_exists('call_active_view')) {
echo " <br /><br />\n";
echo " <table width='100%'>\n";
echo " <tr>\n";
echo " <td align='center'>\n";
echo " <a href='".PROJECT_PATH."/app/calls_active/calls_active.php'>".$text['label-view-calls']."</a>\n";
echo " </td>\n";
echo " </table>\n";
}
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</div>\n";
}
//show the footer