diff options
author | pb1dft <pb1dft@ampache> | 2006-10-27 21:14:40 +0000 |
---|---|---|
committer | pb1dft <pb1dft@ampache> | 2006-10-27 21:14:40 +0000 |
commit | 5db7a0e53c7a9e415254bbda05496e31cf2f699c (patch) | |
tree | cb80788fe089e03e383adfb26829e881528e1597 /lib/ui.lib.php | |
parent | e502a62b1ddc0278525bd890c6acc323b8eeefa3 (diff) | |
download | ampache-5db7a0e53c7a9e415254bbda05496e31cf2f699c.tar.gz ampache-5db7a0e53c7a9e415254bbda05496e31cf2f699c.tar.bz2 ampache-5db7a0e53c7a9e415254bbda05496e31cf2f699c.zip |
Strange error occured while commiting
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r-- | lib/ui.lib.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 1d11ea7f..dffe38fd 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -150,6 +150,38 @@ function show_users () { } // show_users() +/** + * show_ip_history + * shows ip_history of specific user(admin function) + */ + +function show_ip_history (){ + + $dbh = dbh(); + $date = time() - (86400*conf('user_ip_cardinality')); + $sql = "SELECT ip,date FROM ip_history where user = '$_REQUEST[user]' and date >= '$date' ORDER BY date DESC"; + $db_results = mysql_query($sql, $dbh); + + show_box_top(); +echo " <table class=\"tabledata\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n". + " <tr class=\"table-header\">\n". + " <td colspan=2>$_REQUEST[user]: IP History</td>\n". + " </tr>\n". + " <tr class=\"table-header\">\n". + " <td align=\"center\">\n". + " <b>Date</b>\n". + " </td>\n". + " <td align=\"center\">\n". + " <b>Ip Address</b>\n". + " </td>\n". + " </tr>\n"; + +while ($r = mysql_fetch_array($db_results)){ + echo "<tr class=". flip_class() .">\n <td>".date("m\/d\/Y-H:i",$r[date])."</td>\n <td>".int2ip($r[ip])."</td>\n</tr>\n"; + } +echo "</table>\n"; +show_box_bottom(); +} // show_ip_history /** * return_referer |