Example #1
0
 public function __toString()
 {
     if (Application::current_user()) {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/Header_Authorized.html');
     } else {
         return AMDisplayObject::renderDisplayObjectWithURLAndDictionary($_SERVER['DOCUMENT_ROOT'] . '/application/controls/Header.html');
     }
 }
 protected function page_load()
 {
     if ($this->isPostBack) {
         if (isset($_POST['ChannelCreate'])) {
             new ChannelCreate();
         }
     }
     $this->user = Application::current_user();
     if (!$this->user) {
         header('location:/account/logout');
     }
 }
 protected function page_load()
 {
     if ($this->isPostBack) {
         if (isset($_POST['AccountModify'])) {
             new AccountModify();
         }
     }
     $session = Application::session();
     $this->user = Application::current_user();
     if (isset($session->forms['AccountModify'])) {
         $this->messages = $session->forms['AccountModify']['messages'];
         unset($session->forms['AccountModify']);
     }
     if (!$this->user) {
         header('location:/account/logout');
     }
 }