fix login and some other things

git-svn-id: http://www.observium.org/svn/observer/trunk@356 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-03-17 20:26:29 +00:00
parent 3b6b3c6378
commit b53ed5a470
5 changed files with 29 additions and 35 deletions

View File

@@ -2,36 +2,39 @@
echo("<div style='margin: 10px'>");
echo("<h3>User Preferences</h3>");
include("includes/update-preferences.inc.php");
include("includes/update-preferences-password.inc.php");
echo("<div style='width: 800px; background-color: #fff; padding:5px; margin-bottom:10px; float:left;'>");
$pref_sql = "SELECT * FROM user_prefs"
echo("</div>");
echo("<div style='width: 300px; float: right;'>");
echo("<div style='background-color: #e5e5e5; border: solid #e5e5e5 10px; margin-bottom:10px;'>");
echo("<h2>Change Password</h2>");
echo("<div style='font-size: 18px; font-weight: bold; margin-bottom: 5px;'>Change Password</div>");
echo($password_message);
echo($changepass_message);
echo("<form method='post' action='?page=preferences'><input type=hidden name='action' value='changepass'>
echo("<form method='post' action='".$config['baseurl']."/preferences/'><input type=hidden name='action' value='changepass'>
<table>
<tr><td>Old Password</td><td><input type=password name=old_pass></input></td></tr>
<tr><td>New Password</td><td><input type=password name=new_pass></input></td></tr>
<tr><td>New Password</td><td><input type=password name=new_pass2></input></td></tr>
<tr><td>Old Password</td><td><input type=password name=old_pass autocomplete='off'></input></td></tr>
<tr><td>New Password</td><td><input type=password name=new_pass autocomplete='off'></input></td></tr>
<tr><td>New Password</td><td><input type=password name=new_pass2 autocomplete='off'></input></td></tr>
<tr><td></td><td align=right><input type=submit></td></tr></table></form>");
echo("</div>");
echo("<div style='background-color: #e5e5e5; border: solid #e5e5e5 10px; margin-bottom:10px;'>");
echo("<h3>Device Permissions</h3>");
echo("<div style='font-size: 18px; font-weight: bold; margin-bottom: 5px;'>Device Permissions</div>");
if($_SESSION['userlevel'] == '10') { echo("<strong>Global Administrative Access</strong>"); }
if($_SESSION['userlevel'] == '5') { echo("<strong>Global Viewing Access</strong>"); }
if($_SESSION['userlevel'] == '10') { echo("<strong class='blue'>Global Administrative Access</strong>"); }
if($_SESSION['userlevel'] == '5') { echo("<strong class='green'>Global Viewing Access</strong>"); }
if($_SESSION['userlevel'] == '1') {
$perms = mysql_query("SELECT * FROM `devices_perms` AS P, `devices` AS D WHERE `user_id` = '" . $user_id . "' AND P.device_id = D.device_id");