summaryrefslogtreecommitdiffstats
path: root/frontends/php/users.html
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-08-11 19:30:44 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-08-11 19:30:44 +0000
commitcf2559acb311684a357fe7babdeebab265a3e820 (patch)
tree608f474b1d2dea77e830447916c5a2f302b79826 /frontends/php/users.html
parent6861ee9f6bbe77fc150813eb7d7e15856ace7779 (diff)
Error handling in PHP frontend.
git-svn-id: svn://svn.zabbix.com/trunk@164 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/users.html')
-rw-r--r--frontends/php/users.html24
1 files changed, 18 insertions, 6 deletions
diff --git a/frontends/php/users.html b/frontends/php/users.html
index d85eec92..5e00581b 100644
--- a/frontends/php/users.html
+++ b/frontends/php/users.html
@@ -6,10 +6,6 @@
show_header($page["title"],0,0);
?>
-<?
- show_table_header("CONFIGURATION OF USERS");
- echo "<br>";
-?>
<?
if(isset($register))
@@ -19,24 +15,40 @@
if($password1==$password2)
{
$result=add_user($groupid,$name,$surname,$alias,$password1);
+ show_messages($result, "User added", "Cannot add user");
+ }
+ else
+ {
+ show_error_message("Cannot add user. Both passwords must be equal.");
}
}
if($register=="delete")
{
- delete_user($userid);
+ $result=delete_user($userid);
+ show_messages($result, "User successfully deleted", "Cannot delete user");
unset($userid);
}
if($register=="update")
{
if($password1==$password2)
{
- update_user($userid,$groupid,$name,$surname,$alias,$password1);
+ $result=update_user($userid,$groupid,$name,$surname,$alias,$password1);
+ show_messages($result, "Information successfully updated", "Cannot update information");
+ }
+ else
+ {
+ show_error_message("Cannot update user. Both passwords must be equal.");
}
}
}
?>
<?
+ show_table_header("CONFIGURATION OF USERS");
+ echo "<br>";
+?>
+
+<?
show_table_header("USERS");
echo "<TABLE BORDER=0 COLS=4 WIDTH=\"100%\" BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
echo "<TR><TD WIDTH=\"10%\"><B>Group</B></TD>";