From 81b0dff16654dd67bc15937bd653fc3f65475359 Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Mon, 25 Sep 2006 02:51:03 +0000 Subject: track ip history, fix pagination on admin/user and fix some acl stuff that I forgot about --- lib/class/user.class.php | 18 ++++++++++++++++++ lib/ui.lib.php | 3 ++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 09f1c3dc..01617595 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -496,6 +496,24 @@ class User { } // update_stats + /** + * insert_ip_history + * This inserts a row into the IP History recording this user at this + * address at this time in this place, doing this thing.. you get the point + */ + function insert_ip_history() { + + $ip = ip2int($_SERVER['REMOTE_ADDR']); + $date = time(); + $user = $this->id; + + $sql = "INSERT INTO ip_history (`ip`,`user`,`date`) VALUES ('$ip','$user','$date')"; + $db_results = mysql_query($sql, dbh()); + + return true; + + } // insert_ip_history + /** * create * inserts a new user into ampache diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 88f050ec..7eec5525 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -169,7 +169,8 @@ function show_users () { } $db_result = mysql_query($view->sql, $dbh); - + // wow this is stupid + $GLOBALS['view'] = $view; require(conf('prefix') . "/templates/show_users.inc"); } // show_users() -- cgit