Example #1
0
 public function index()
 {
     //$uri = implode('/', func_get_args());
     $tpls = File::get_templates();
     $this->templatemanager->assign("templatez", $tpls);
     //$this->templatemanager->assign("uri", '');
     $this->templatemanager->show_template("templates_list");
 }
Example #2
0
 public function index()
 {
     if (defined('DEMO')) {
         show_error(__("This function is disabled in online demo!"));
     }
     $tpls = File::get_templates();
     $this->templatemanager->assign("templatez", $tpls);
     //$this->templatemanager->assign("uri", '');
     $this->templatemanager->show_template("templates_list");
 }
Example #3
0
 public function add($based_on_page_id = null)
 {
     if (!empty($based_on_page_id)) {
         $oldpage = Page::factory()->get_by_id($based_on_page_id);
     } else {
         $oldpage = null;
     }
     if (!$this->user->can('add_pages')) {
         $this->templatemanager->notify_next("You don't have enough permissions to add new page!", 'failure');
         redirect('administration/dashboard');
     }
     //$divs = $page->get_div_ids();
     //$contents = $page->content->get();
     $users = User::factory()->get();
     $roles = UserRole::factory()->get();
     $this->templatemanager->assign("oldPage", $oldpage);
     $this->templatemanager->assign("users", $users);
     $this->templatemanager->assign("roles", $roles);
     $this->templatemanager->assign("files", File::get_templates());
     //$this->templatemanager->assign("divs", $divs);
     $this->templatemanager->set_title("Add New Page");
     $this->templatemanager->show_template("pages_edit");
 }