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")) . '
						'.
					   		''.$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 = "".
				"".
            	"Image ".
				"Note ".
				"Body ".
				"Updater ".
            	"Date ";
				
		
		if(!$user->is_anonymous()){
			$html .= "Action ";
		}
		
		$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 .= "".
                	 "".$image_link." ".
					 "".$history_link." ".
					 "".$history['note']." ".
                	 "".$user_link." ".
					 "".autodate($history['date'])." ";
					 
			if(!$user->is_anonymous()){
				$html .= "".$revert_link." ";
			}
                	 
		}
		
		$html .= "  
";
					
		$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 = "".
				"".
            	"Image ".
				"Note ".
				"Body ".
				"Updater ".
            	"Date ";
				
		
		if(!$user->is_anonymous()){
			$html .= "Action ";
		}
		
		$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 .= "".
                	 "".$image_link." ".
					 "".$history_link." ".
					 "".$history['note']." ".
                	 "".$user_link." ".
					 "".autodate($history['date'])." ";
					 
			if(!$user->is_anonymous()){
				$html .= "".$revert_link." ";
			}
                	 
		}
		
		$html .= "  
";
					
		$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);
	}
 }        
 ?>