Beispiel #1
0
 public function getLogin()
 {
     if (!empty(Lib\user())) {
         Lib\redirect(SITE_URL);
     }
     echo Lib\template('../templates/authorization.php', ['token' => Lib\token(), 'login' => empty($_POST['login']) ? '' : $_POST['login'], 'site_url' => SITE_URL, 'style' => Lib\style($_COOKIE['style'])]);
 }
Beispiel #2
0
 public function getProfile()
 {
     if (empty(Lib\user())) {
         Lib\redirect(SITE_URL . '?action=login');
     }
     echo Lib\template('../templates/profile.php', ['site_url' => SITE_URL, 'style' => Lib\style($_COOKIE['style'])]);
 }
Beispiel #3
0
 /**
  * @param array $params
  * @return string
  */
 public function getHome($params = [])
 {
     if (empty(Lib\user())) {
         Lib\redirect(SITE_URL . '?action=login');
     }
     $message_id = empty($params['message_id']) ? null : (int) $params['message_id'];
     $messages = Lib\load_messages(\Epic\Lib\connection(), $message_id);
     echo Lib\template('../templates/home.php', ['messages' => $messages, 'token' => Lib\token(), 'style' => Lib\style($_COOKIE['style']), 'site_url' => SITE_URL, 'message_id' => $message_id]);
 }