function confirm_action() { var r=confirm("Are You Sure?"); if (r==true) { return true; } else { return false; } }
'; } public function request_button($image_id) { return make_form(make_link("note/add_request")) . ' '; } public function nuke_notes_button($image_id) { return make_form(make_link("note/nuke_notes")) . ' '; } public function nuke_requests_button($image_id) { return make_form(make_link("note/nuke_requests")) . ' '; } public function search_notes_page(Page $page) { //IN DEVELOPMENT, NOT FULLY WORKING $html = '
'; $page->set_title(html_escape("Search Note")); $page->set_heading(html_escape("Search Note")); $page->add_block(new Block("Search Note", $html, "main", 10)); } // check action POST on form public function display_note_system(Page $page, $image_id, $recovered_notes, $adminOptions) { $page->add_html_header("", 100); $page->add_html_header("", 101); $html = "
".make_form(make_link("note/add_note"))."
".make_form(make_link("note/edit_note"))."
"; if($adminOptions) $html .= " ".make_form(make_link("note/delete_note"))."
"; $html .= "
"; $page->add_block(new Block(null, $html, "main", 1)); } public function display_note_list($images, $pageNumber, $totalPages) { global $page; $pool_images = ''; foreach($images as $pair) { $image = $pair[0]; $thumb_html = $this->build_thumb_html($image); $pool_images .= ''. ''.$thumb_html.''. ''; } $this->display_paginator($page, "note/list", null, $pageNumber, $totalPages); $page->set_title("Notes"); $page->set_heading("Notes"); $page->add_block(new Block("Notes", $pool_images, "main", 20)); } public function display_note_requests($images, $pageNumber, $totalPages) { global $page; $pool_images = ''; foreach($images as $pair) { $image = $pair[0]; $thumb_html = $this->build_thumb_html($image); $pool_images .= ''. ''.$thumb_html.''. ''; } $this->display_paginator($page, "requests/list", null, $pageNumber, $totalPages); $page->set_title("Note Requests"); $page->set_heading("Note Requests"); $page->add_block(new Block("Note Requests", $pool_images, "main", 20)); } public function display_histories($histories, $pageNumber, $totalPages) { global $user, $page; $html = "". "". "". "". "". "". ""; if(!$user->is_anonymous()){ $html .= ""; } $html .= "". ""; $n = 0; foreach($histories as $history) { $oe = ($n++ % 2 == 0) ? "even" : "odd"; $image_link = "".$history['image_id'].""; $history_link = "".$history['note_id'].".".$history['review_id'].""; $user_link = "".$history['user_name'].""; $revert_link = "Revert"; $html .= "". "". "". "". "". ""; if(!$user->is_anonymous()){ $html .= ""; } } $html .= "
ImageNoteBodyUpdaterDateAction
".$image_link."".$history_link."".$history['note']."".$user_link."".autodate($history['date'])."".$revert_link."
"; $page->set_title("Note Updates"); $page->set_heading("Note Updates"); $page->add_block(new Block("Note Updates", $html, "main", 10)); $this->display_paginator($page, "note/updated", null, $pageNumber, $totalPages); } public function display_history($histories, $pageNumber, $totalPages) { global $user, $page; $html = "". "". "". "". "". "". ""; if(!$user->is_anonymous()){ $html .= ""; } $html .= "". ""; $n = 0; foreach($histories as $history) { $oe = ($n++ % 2 == 0) ? "even" : "odd"; $image_link = "".$history['image_id'].""; $history_link = "".$history['note_id'].".".$history['review_id'].""; $user_link = "".$history['user_name'].""; $revert_link = "Revert"; $html .= "". "". "". "". "". ""; if(!$user->is_anonymous()){ $html .= ""; } } $html .= "
ImageNoteBodyUpdaterDateAction
".$image_link."".$history_link."".$history['note']."".$user_link."".autodate($history['date'])."".$revert_link."
"; $page->set_title("Note History"); $page->set_heading("Note History"); $page->add_block(new Block("Note History", $html, "main", 10)); $this->display_paginator($page, "note/updated", null, $pageNumber, $totalPages); } } ?>