Пример #1
0
 public function login()
 {
     if (isset($_SESSION['userid'])) {
         Functions::redirect(Settings::cloutURL() . '/home');
     }
     View::Render('login', $this->data, Settings::viewFolder());
 }
Пример #2
0
 public function show($section_id)
 {
     //show single
     $this->data['section'] = Section::find($section_id, 'id');
     $ft = new FieldType();
     $this->data['fieldtypes'] = $ft->all();
     View::Render('settings.sections.edit', $this->data, Settings::viewFolder());
 }
Пример #3
0
 public static function Error404()
 {
     header("HTTP/1.0 404 Not Found");
     View::render(GRAFT_CONFIG['404Template']);
 }
Пример #4
0
 public function index()
 {
     $this->data['blog'] = Blog::All('date', 'DESC');
     View::Render('index', $this->data);
 }
Пример #5
0
 public function show($section)
 {
     $this->data['section'] = Section::find($section, 'slug');
     $this->data['records'] = Output::section($section)->all();
     View::Render('record.list', $this->data, Settings::viewFolder());
 }