コード例 #1
0
ファイル: Page.php プロジェクト: harsh5455555/Scrawler
 function init()
 {
     $this->t = \Scrawler\Core\site()->template();
     $site = \Scrawler\Core\site()->config()->site;
     $this->t->addData(['site' => $site]);
     \Scrawler\Core\site()->session()->start_session('_s', false);
 }
コード例 #2
0
ファイル: Admin.php プロジェクト: ninawekunal/Scrawler
 function post()
 {
     if (isset($_POST['email']) && isset($_POST['password'])) {
         $email = $_POST['email'];
         $password = $_POST['password'];
         $login = \Scrawler\Core\site()->db()->login($email, $password);
         if ($login) {
             header('Location: http://' . $_SERVER['SERVER_NAME'] . '/admin');
         }
     }
 }
コード例 #3
0
ファイル: Home.php プロジェクト: ninawekunal/Scrawler
 function get()
 {
     echo $this->t->render('home', array('posts' => \Scrawler\Core\site()->post()->view(), 'name' => \Scrawler\Core\site()->config()->name, 'description' => \Scrawler\Core\site()->config()->description));
 }
コード例 #4
0
ファイル: Config.php プロジェクト: ninawekunal/Scrawler
 function init()
 {
     $data = \Scrawler\Core\site()->db()->get_site();
     $this->config = array('site' => $data[0], 'name' => $data[1], 'description' => $data[2]);
 }