Esempio n. 1
0
 public function actionEditing()
 {
     if (Application::getCurrentByKey('pageid')) {
         $condWhere['id'] = Application::getCurrentByKey('pageid');
         if ('operator' == Application::getCurrentByKey('role')) {
             $condWhere['author'] = Application::getCurrentByKey('username');
         }
         $this->view->items = Stuff::findByCondition($condWhere)[0];
     }
     $this->view->display($this->path . 'editing.php');
 }
Esempio n. 2
0
 public function actionSpecific()
 {
     if (Application::getCurrentByKey('pageid')) {
         $condWhere['id'] = Application::getCurrentByKey('pageid');
         if ('operator' == Application::getCurrentByKey('role')) {
             $condWhere['author'] = Application::getCurrentByKey('username');
         }
         $this->view->items = Stuff::findByCondition($condWhere)[0];
         $this->view->display($this->path . 'specific.php');
     } else {
         header('Location: /');
     }
 }