Exemplo n.º 1
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->bindData();
     }
 }
Exemplo n.º 2
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->Categories->DataSource = $this->DataAccess->queryCategories();
         $this->Categories->dataBind();
     }
 }
Exemplo n.º 3
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $this->CategoryName->Text = $this->_category->Name;
         $this->CategoryDescription->Text = $this->_category->Description;
     }
 }
Exemplo n.º 4
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     $this->Status->Visible = $this->_post->Status !== PostRecord::STATUS_PUBLISHED && $this->_post->Status !== PostRecord::STATUS_STICKY;
     $this->CategoryList->DataSource = $this->DataAccess->queryCategoriesByPostID($this->_post->ID);
     $this->CategoryList->dataBind();
     $this->CommentList->DataSource = $this->DataAccess->queryCommentsByPostID($this->_post->ID);
     $this->CommentList->dataBind();
 }
Exemplo n.º 5
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $userRecord = $this->_userRecord;
         $this->Username->Text = $userRecord->Name;
         $this->FullName->Text = $userRecord->FullName;
         $this->Email->Text = $userRecord->Email;
         $this->Website->Text = $userRecord->Website;
     }
 }
Exemplo n.º 6
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     $this->PostList->DataSource = $this->_posts;
     $this->PostList->dataBind();
     if ($this->getPageOffset() > 0) {
         if (($offset = $this->getPageOffset() - $this->getPageSize()) < 0) {
             $offset = 0;
         }
         $this->PrevPage->NavigateUrl = $this->formUrl($offset);
         $this->PrevPage->Visible = true;
     }
     if (count($this->_posts) === $this->getPageSize()) {
         $this->NextPage->NavigateUrl = $this->formUrl($this->getPageOffset() + $this->getPageSize());
         $this->NextPage->Visible = true;
     }
 }
Exemplo n.º 7
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $postRecord = $this->_postRecord;
         $this->Title->Text = $postRecord->Title;
         $this->Content->Text = $postRecord->Content;
         $this->DraftMode->Checked = $postRecord->Status === PostRecord::STATUS_DRAFT;
         $this->Categories->DataSource = $this->DataAccess->queryCategories();
         $this->Categories->dataBind();
         $cats = $this->DataAccess->queryCategoriesByPostID($postRecord->ID);
         $catIDs = array();
         foreach ($cats as $cat) {
             $catIDs[] = $cat->ID;
         }
         $this->Categories->SelectedValues = $catIDs;
     }
 }
Exemplo n.º 8
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     if (!$this->IsPostBack) {
         $parameters = $this->Application->Parameters;
         $this->SiteTitle->Text = $parameters['SiteTitle'];
         $this->SiteSubtitle->Text = $parameters['SiteSubtitle'];
         $this->SiteOwner->Text = $parameters['SiteOwner'];
         $this->AdminEmail->Text = $parameters['AdminEmail'];
         $this->MultipleUser->Checked = TPropertyValue::ensureBoolean($parameters['MultipleUser']);
         $this->AccountApproval->Checked = TPropertyValue::ensureBoolean($parameters['AccountApproval']);
         $this->PostPerPage->Text = $parameters['PostPerPage'];
         $this->RecentComments->Text = $parameters['RecentComments'];
         $this->PostApproval->Checked = TPropertyValue::ensureBoolean($parameters['PostApproval']);
         $themes = $this->Service->ThemeManager->AvailableThemes;
         $this->ThemeName->DataSource = $themes;
         $this->ThemeName->dataBind();
         $this->ThemeName->SelectedValue = array_search($parameters['ThemeName'], $themes);
     }
 }
Exemplo n.º 9
0
 public function onLoad($param)
 {
     parent::onLoad($param);
     $this->ErrorMessage->Text = $this->Application->SecurityManager->validateData(urldecode($this->Request['msg']));
 }