summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-25 02:51:03 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-25 02:51:03 +0000
commit81b0dff16654dd67bc15937bd653fc3f65475359 (patch)
tree7996b36b04f8a831b051142c251ad0b522e5b200 /lib
parente32557bf900153c5cfb0d2f28640aa9091ef7488 (diff)
downloadampache-81b0dff16654dd67bc15937bd653fc3f65475359.tar.gz
ampache-81b0dff16654dd67bc15937bd653fc3f65475359.tar.bz2
ampache-81b0dff16654dd67bc15937bd653fc3f65475359.zip
track ip history, fix pagination on admin/user and fix some acl stuff that I forgot about
Diffstat (limited to 'lib')
-rw-r--r--lib/class/user.class.php18
-rw-r--r--lib/ui.lib.php3
2 files changed, 20 insertions, 1 deletions
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
@@ -497,6 +497,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()