コード例 #1
0
ファイル: actions.class.php プロジェクト: taryono/school
 public function executeSlideshowitem()
 {
     $this->module = $this->getModuleName();
     $catId = $this->getRequestParameter('id');
     $department_id = $this->get_department_id();
     $departmentAvailable = $this->tools->departmentAvailable($department_id);
     $this->criteria->add(WebSlideshowCategoryPeer::ID, $catId, Criteria::EQUAL);
     $this->slideshowCategory = WebSlideshowCategoryPeer::doSelectOne($this->criteria);
     if (!$this->slideshowCategory) {
         echo 'Menu ' . $initial . ' not found';
     }
     $this->criteria->add(WebSlideshowCategoryPeer::DEPARTMENT_ID, $departmentAvailable, Criteria::IN);
     $this->slideshowCategory = WebSlideshowCategoryPeer::doSelectOne($this->criteria);
     if (!$this->slideshowCategory) {
         echo 'Maaf, anda tidak memiliki hak untuk mengakses halaman ini.';
     }
     $this->section = $this->get_section();
 }
コード例 #2
0
ファイル: back_slideshow.php プロジェクト: taryono/school
     if (!$imageItem->validate()) {
         var_dump($imageItem->validate());
     }
     $imageItem->save();
     $output = array('success' => 1, 'data' => $param);
     $this->jsonwrapper->print_json($output);
 }
 public function categorydelete($param)
 {
     $department_id = $param['department_id'];
     $departmentAvailable = $this->tools->departmentAvailable($department_id);
     if (empty($param['id'])) {
         $this->jsonwrapper->show_json_error('param', 'Parameter id tidak ditemukan.');
     }
     $category = WebSlideshowCategoryPeer::retrieveByPK($param['id']);
     if (!$category) {
         $this->jsonwrapper->show_json_error('item', 'Item dengan id ' . $param['id'] . ' tidak ditemukan.');
     }