get_tag_list()));
$page->set_title("Image {$image->id}: ".html_escape($image->get_tag_list()));
$page->add_html_header("");
$page->add_html_header("");
$page->add_html_header("");
$page->add_html_header("get_thumb_link())."\">");
$page->add_html_header("id}"))."\">");
$page->set_heading(html_escape($image->get_tag_list()));
$page->add_block(new Block("Navigation", $this->build_navigation($image), "left", 0));
$page->add_block(new Block(null, $this->build_info($image, $editor_parts), "main", 10));
//$page->add_block(new Block(null, $this->build_pin($image), "main", 11));
}
public function display_admin_block(Page $page, $parts) {
if(count($parts) > 0) {
$page->add_block(new Block("Image Controls", join("
", $parts), "left", 50));
}
}
protected function build_pin(Image $image) {
global $database;
if(isset($_GET['search'])) {
$search_terms = explode(' ', $_GET['search']);
$query = "search=".url_escape($_GET['search']);
}
else {
$search_terms = array();
$query = null;
}
$h_prev = "Prev";
$h_index = "Index";
$h_next = "Next";
$script = "
";
return "$h_prev | $h_index | $h_next$script";
}
protected function build_navigation(Image $image) {
$h_pin = $this->build_pin($image);
$h_search = "
Uploaded by $h_owner $h_date";
if($user->is_admin()) {
$html .= " ($h_ip)";
}
if(!is_null($image->source)) {
if(substr($image->source, 0, 7) == "http://" || substr($image->source, 0, 8) == "https://") {
$html .= " (source)";
}
else {
$html .= " (source)";
}
}
$html .= $this->build_image_editor($image, $editor_parts);
return $html;
}
protected function build_image_editor(Image $image, $editor_parts) {
if(count($editor_parts) == 0) return ($image->is_locked() ? "
[Image Locked]" : "");
if(isset($_GET['search'])) {$h_query = "search=".url_escape($_GET['search']);}
else {$h_query = "";}
$html = " (edit info)";
$html .= "