show uploader IP

git-svn-id: file:///home/shish/svn/shimmie2/trunk@151 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2007-06-03 10:27:15 +00:00
parent 2c0264095b
commit 1c81f2311e
2 changed files with 7 additions and 0 deletions

View file

@ -98,8 +98,10 @@ class ViewImage extends Extension {
}
private function build_info($image) {
global $user;
$owner = $image->get_owner();
$h_owner = html_escape($owner->name);
$h_ip = html_escape($image->owner_ip);
$i_owner_id = int_escape($owner->id);
$html = "";
@ -108,6 +110,9 @@ class ViewImage extends Extension {
$html .= "<p>Link: <input size='50' type='text' value='$slink'>";
}
$html .= "<p>Uploaded by <a href='".make_link("user/$h_owner")."'>$h_owner</a>";
if($user->is_admin()) {
$html .= " ($h_ip)";
}
$html .= "<p>".$this->build_pin($image->id);
return $html;

View file

@ -5,6 +5,7 @@ class Image {
var $height, $width;
var $hash, $filesize;
var $filename, $ext;
var $owner_ip;
var $posted;
public function Image($a=false, $b=false, $c=false) {
@ -19,6 +20,7 @@ class Image {
private function create_from_row($row) {
$this->id = $row['id'];
$this->owner_id = $row['owner_id'];
$this->owner_ip = $row['owner_ip'];
$this->filename = $row['filename'];
$this->filesize = $row['filesize'];
$this->hash = $row['hash'];