Response message updates.

This commit is contained in:
Nate Jones 2014-02-23 09:39:12 +00:00
parent 2339334bdc
commit 80b546406e
6 changed files with 20 additions and 49 deletions

View File

@ -49,7 +49,7 @@ else {
//required to be a superadmin to update an account that is a member of the superadmin group //required to be a superadmin to update an account that is a member of the superadmin group
$superadmin_list = superadmin_list($db); $superadmin_list = superadmin_list($db);
if (if_superadmin($superadmin_list, $user_uuid)) { if (if_superadmin($superadmin_list, $user_uuid)) {
if (!if_group("superadmin")) { if (!if_group("superadmin")) {
echo "access denied"; echo "access denied";
return; return;
} }
@ -105,7 +105,7 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") {
return; return;
} }
//get the number of rows in v_user_settings //get the number of rows in v_user_settings
$sql = "select count(*) as num_rows from v_user_settings "; $sql = "select count(*) as num_rows from v_user_settings ";
$sql .= "where user_setting_category = 'domain' "; $sql .= "where user_setting_category = 'domain' ";
$sql .= "and user_setting_subcategory = 'time_zone' "; $sql .= "and user_setting_subcategory = 'time_zone' ";
@ -199,10 +199,8 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") {
//$_SESSION["template_content"] = ''; //$_SESSION["template_content"] = '';
//redirect the browser //redirect the browser
require_once "resources/header.php"; $_SESSION["message"] = $text['confirm-update'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/core/user_settings/user_edit.php\">\n"; header("Location: ".PROJECT_PATH."/core/user_settings/user_edit.php");
echo "<div align='center'>".$text['confirm-update']."</div>";
require_once "resources/footer.php";
return; return;
} }
else { else {

View File

@ -71,12 +71,8 @@ if (strlen($group_name) > 0) {
} }
//redirect the user //redirect the user
require_once "resources/header.php"; $_SESSION["message"] = $text['message-add'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=groups.php\">\n"; header("Location: groups.php");
echo "<div align='center'>\n";
echo $text['message-add']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
} }

View File

@ -46,7 +46,7 @@ else {
$group_name = check_str($_REQUEST["id"]); $group_name = check_str($_REQUEST["id"]);
$group_new = check_str($_REQUEST["ext"]); $group_new = check_str($_REQUEST["ext"]);
} }
//get the groups data //get the groups data
$sql = "select * from v_groups "; $sql = "select * from v_groups ";
$sql .= "where domain_uuid = '$domain_uuid' "; $sql .= "where domain_uuid = '$domain_uuid' ";
@ -60,7 +60,7 @@ else {
$group_name = $row["group_name"]; $group_name = $row["group_name"];
} }
unset ($prep_statement); unset ($prep_statement);
//copy the groups //copy the groups
$group_uuid = uuid(); $group_uuid = uuid();
$sql = "insert into v_groups "; $sql = "insert into v_groups ";
@ -100,7 +100,7 @@ else {
$sql .= "group_permission_uuid, "; $sql .= "group_permission_uuid, ";
$sql .= "domain_uuid, "; $sql .= "domain_uuid, ";
$sql .= "permission_name, "; $sql .= "permission_name, ";
$sql .= "group_name "; $sql .= "group_name ";
$sql .= ")"; $sql .= ")";
$sql .= "values "; $sql .= "values ";
$sql .= "("; $sql .= "(";
@ -115,21 +115,8 @@ else {
unset ($prep_statement); unset ($prep_statement);
//redirect the user //redirect the user
require_once "resources/header.php"; $_SESSION["message"] = $text['message-copy'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=groups.php\">\n"; header("Location: groups.php");
echo "<br />\n";
echo "<div align='center'>\n";
echo " <table width='40%'>\n";
echo " <tr>\n";
echo " <th align='left'>".$text['message-message']."</th>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td class='row_style1'><strong>".$text['message-copy']."</strong></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <br />\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
?> ?>

View File

@ -47,12 +47,8 @@ else {
$permission->restore(); $permission->restore();
//show a message to the user //show a message to the user
require_once "resources/header.php"; $_SESSION["message"] = $text['message-restore'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=groups.php\">\n"; header("Location: groups.php");
echo "<div align='center'>\n";
echo $text['message-restore']."\n";
echo "</div>\n";
require_once "resources/footer.php";
return; return;
?> ?>

View File

@ -166,10 +166,8 @@ if (count($_POST)>0 && check_str($_POST["persistform"]) != "1") {
//$log_type = 'user'; $log_status='add'; $log_add_user=$_SESSION["username"]; $log_desc= "username: ".$username." user added."; //$log_type = 'user'; $log_status='add'; $log_add_user=$_SESSION["username"]; $log_desc= "username: ".$username." user added.";
//log_add($db, $log_type, $log_status, $log_desc, $log_add_user, $_SERVER["REMOTE_ADDR"]); //log_add($db, $log_type, $log_status, $log_desc, $log_add_user, $_SERVER["REMOTE_ADDR"]);
require_once "resources/header.php"; $_SESSION["message"] = $text['message-add'];
echo "<meta http-equiv=\"refresh\" content=\"3;url=index.php\">\n"; header("Location: index.php");
echo "<div align='center'>".$text['message-add']."</div>";
require_once "resources/footer.php";
return; return;
} }

View File

@ -85,10 +85,8 @@ else {
$sql .= "and user_uuid = '$user_uuid' "; $sql .= "and user_uuid = '$user_uuid' ";
$db->exec(check_sql($sql)); $db->exec(check_sql($sql));
//redirect the user //redirect the user
require_once "resources/header.php"; $_SESSION["message"] = $text['message-update'];
echo "<meta http-equiv=\"refresh\" content=\"2;url=usersupdate.php?id=$user_uuid\">\n"; header("Location: usersupdate.php?id=".$user_uuid);
echo "<div align='center'>".$text['message-update']."</div>";
require_once "resources/footer.php";
return; return;
} }
@ -285,15 +283,13 @@ if (count($_POST) > 0 && $_POST["persistform"] != "1") {
//$_SESSION["template_content"] = ''; //$_SESSION["template_content"] = '';
//redirect the browser //redirect the browser
require_once "resources/header.php"; $_SESSION["message"] = $text['message-update'];
if (if_group("admin")) { if (if_group("admin")) {
echo "<meta http-equiv=\"refresh\" content=\"2;url=usersupdate.php?id=$user_uuid\">\n"; header("Location: usersupdate.php?id=".$user_uuid);
} }
else { else {
echo "<meta http-equiv=\"refresh\" content=\"2;url=usersupdate.php?id=$user_uuid\">\n"; header("Location: usersupdate.php");
} }
echo "<div align='center'>".$text['message-update']."</div>";
require_once "resources/footer.php";
return; return;
} }
else { else {