From b53ed5a470c400f5a6578dfd3eac8f7b4765d2fa Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Tue, 17 Mar 2009 20:26:29 +0000 Subject: [PATCH] fix login and some other things git-svn-id: http://www.observium.org/svn/observer/trunk@356 61d68cd4-352d-0410-923a-c4978735b2b8 --- config.php.default | 8 ++++---- html/includes/authenticate.inc | 25 ++++++++----------------- html/pages/preferences.php | 27 +++++++++++++++------------ poll-reachability.php | 2 +- renamehost.php | 2 +- 5 files changed, 29 insertions(+), 35 deletions(-) diff --git a/config.php.default b/config.php.default index f85aa1fdb2..594c942435 100755 --- a/config.php.default +++ b/config.php.default @@ -68,10 +68,10 @@ $config['show_locations'] = 1; # Enable Locations on menu ### Which additional features should we enable? -$config['enable_bgp'] = 1; # Enable BGP session collection and display -$config['enable_syslog'] = 1; # Enable Syslog -$config['enable_billing'] = 1; # Enable BGP session collection and display -$config['enable_inventory'] = 1; # Enable Inventory +$config['enable_bgp'] = 0; # Enable BGP session collection and display +$config['enable_syslog'] = 0; # Enable Syslog +$config['enable_billing'] = 0; # Enable BGP session collection and display +$config['enable_inventory'] = 0; # Enable Inventory ## Uncomment this to enable display of rancid-collected configs #$config['rancid_configs'] = '/var/lib/rancid/network/configs/'; diff --git a/html/includes/authenticate.inc b/html/includes/authenticate.inc index 0011d03de5..9c993b0cf1 100644 --- a/html/includes/authenticate.inc +++ b/html/includes/authenticate.inc @@ -1,17 +1,8 @@ "); echo("

User Preferences

"); -include("includes/update-preferences.inc.php"); - +include("includes/update-preferences-password.inc.php"); echo("
"); + +$pref_sql = "SELECT * FROM user_prefs" + + + echo("
"); echo("
"); echo("
"); -echo("

Change Password

"); +echo("
Change Password
"); -echo($password_message); +echo($changepass_message); -echo("
+echo(" - - - + + +
Old Password
New Password
New Password
Old Password
New Password
New Password
"); - echo("
"); echo("
"); -echo("

Device Permissions

"); +echo("
Device Permissions
"); -if($_SESSION['userlevel'] == '10') { echo("Global Administrative Access"); } -if($_SESSION['userlevel'] == '5') { echo("Global Viewing Access"); } +if($_SESSION['userlevel'] == '10') { echo("Global Administrative Access"); } +if($_SESSION['userlevel'] == '5') { echo("Global Viewing Access"); } 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"); diff --git a/poll-reachability.php b/poll-reachability.php index dcb1a9401c..30ead5d006 100755 --- a/poll-reachability.php +++ b/poll-reachability.php @@ -7,7 +7,7 @@ include("config.php"); include("includes/functions.php"); -$device_query = mysql_query("SELECT * FROM `devices` WHERE `device_id` LIKE '%" . $argv[1] . "' ORDER BY `device_id` DESC"); +$device_query = mysql_query("SELECT * FROM `devices` WHERE `device_id` LIKE '%" . $argv[1] . "' AND disabled = '0' ORDER BY `device_id` DESC"); while ($device = mysql_fetch_array($device_query)) { $id = $device['device_id']; diff --git a/renamehost.php b/renamehost.php index af5abbfaca..30b810d501 100755 --- a/renamehost.php +++ b/renamehost.php @@ -15,7 +15,7 @@ if($argv[1] && $argv[2]) { echo("Host doesn't exist!\n"); } } else { - echo("Host Rename Tool\nUsage: ./delhost.php \n"); + echo("Host Rename Tool\nUsage: ./renamehost.php \n"); } ?>