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/class/user.class.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/class/user.class.php')
-rw-r--r-- | lib/class/user.class.php | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/class/user.class.php b/lib/class/user.class.php index 66eb088e..efa5db8c 100644 --- a/lib/class/user.class.php +++ b/lib/class/user.class.php @@ -509,8 +509,8 @@ class User { else { $this->f_create_date = date("m\/d\/Y - H:i",$user->create_date); } /* Calculate their total Bandwidth Useage */ - $sql = "SELECT song.size FROM object_count LEFT JOIN song ON song.id=object_count.object_id " . - "WHERE object_count.userid='$this->uid' AND object_count.object_type='song'"; + $sql = "SELECT song.size FROM song LEFT JOIN object_count ON song.id=object_count.object_id " . + "WHERE object_count.user='$this->uid' AND object_count.object_type='song'"; $db_results = mysql_query($sql, dbh()); while ($r = mysql_fetch_assoc($db_results)) { @@ -533,6 +533,16 @@ class User { } // end switch $this->f_useage = round($total,2) . $name; + + /* Get Users Last ip */ + $sql = "SELECT ip FROM ip_history WHERE user = '$this->username' ORDER BY ip DESC LIMIT 1"; + $db_results = mysql_query($sql, dbh()); + + while ($r = mysql_fetch_assoc($db_results)) { + $this->ip_history = int2ip($r[ip]); + } + + } // format_user |