Esempio n. 1
0
 public function library($page_no = 1)
 {
     $items = new Snip_Model();
     $this->pagination = new Pagination(array('base_url' => 'home/library/', 'uri_segment' => 'library', 'total_items' => $items->get_total_snips_public()));
     //Load the snip library table
     $snips = $items->get_snips_public($page_no, $this->pagination->sql_offset);
     $content = new View('snip/snipLibrary');
     $content->items = $snips;
     // page to get starting at offset, number of items to get
     $this->template->title = "Public Snippet Library";
     $this->template->template_head .= '<link href="/files/CSS/snipLibrary.css" rel="stylesheet" type="text/css" />';
     $home_nav = new view('home_nav');
     $home_nav->highlight = 'library';
     $this->template->page_nav = $home_nav;
     $this->template->page_content = $content;
 }