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
$superadmin_list = superadmin_list($db);
if (if_superadmin($superadmin_list, $user_uuid)) {
if (!if_group("superadmin")) {
if (!if_group("superadmin")) {
echo "access denied";
return;
}
@@ -105,7 +105,7 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") {
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 .= "where user_setting_category = 'domain' ";
$sql .= "and user_setting_subcategory = 'time_zone' ";
@@ -199,10 +199,8 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") {
//$_SESSION["template_content"] = '';
//redirect the browser
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=".PROJECT_PATH."/core/user_settings/user_edit.php\">\n";
echo "<div align='center'>".$text['confirm-update']."</div>";
require_once "resources/footer.php";
$_SESSION["message"] = $text['confirm-update'];
header("Location: ".PROJECT_PATH."/core/user_settings/user_edit.php");
return;
}
else {

View File

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

View File

@@ -46,7 +46,7 @@ else {
$group_name = check_str($_REQUEST["id"]);
$group_new = check_str($_REQUEST["ext"]);
}
//get the groups data
$sql = "select * from v_groups ";
$sql .= "where domain_uuid = '$domain_uuid' ";
@@ -60,7 +60,7 @@ else {
$group_name = $row["group_name"];
}
unset ($prep_statement);
//copy the groups
$group_uuid = uuid();
$sql = "insert into v_groups ";
@@ -100,7 +100,7 @@ else {
$sql .= "group_permission_uuid, ";
$sql .= "domain_uuid, ";
$sql .= "permission_name, ";
$sql .= "group_name ";
$sql .= "group_name ";
$sql .= ")";
$sql .= "values ";
$sql .= "(";
@@ -115,21 +115,8 @@ else {
unset ($prep_statement);
//redirect the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=groups.php\">\n";
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";
$_SESSION["message"] = $text['message-copy'];
header("Location: groups.php");
return;
?>

View File

@@ -47,12 +47,8 @@ else {
$permission->restore();
//show a message to the user
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"2;url=groups.php\">\n";
echo "<div align='center'>\n";
echo $text['message-restore']."\n";
echo "</div>\n";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-restore'];
header("Location: groups.php");
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_add($db, $log_type, $log_status, $log_desc, $log_add_user, $_SERVER["REMOTE_ADDR"]);
require_once "resources/header.php";
echo "<meta http-equiv=\"refresh\" content=\"3;url=index.php\">\n";
echo "<div align='center'>".$text['message-add']."</div>";
require_once "resources/footer.php";
$_SESSION["message"] = $text['message-add'];
header("Location: index.php");
return;
}

View File

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