Exemplo n.º 1
0
 public function actionLots()
 {
     $this->model->authAdmin();
     $itemInPage = 5;
     if ($this->request->itemInPage != '') {
         $itemInPage = $this->request->itemInPage;
     }
     $direction = $this->request->direction;
     $sort = $this->request->sort;
     $allItem = AbstractModel::getOnCount('lot', 'id');
     $pagItem = $allItem / $itemInPage;
     if ($allItem % $itemInPage) {
         $pagItem++;
     }
     $this->view->lots = AbstractModel::getAll('Model_Lot', 'lot');
     //AbstractModel::getOnLimit('Model_Lot', 'lot');
     $this->view->paginatorItem = $pagItem;
     if ($this->request->deLot !== '') {
         $deLot = (int) $this->request->deLot;
         AbstractModel::deleteOnId('lot', $deLot);
         //app::redirect($_SERVER['HTTP_REFERER']);
     }
     $this->view->render('lots');
     $this->view->display();
 }
Exemplo n.º 2
0
 public function getAll(array $inputParam = array())
 {
     $param = array_merge(array('select' => 'sections.title as section_title,projects.*', 'join' => 'sections ON (projects.section_id = sections.id)', 'orderby' => 'sections.created DESC, projects.created DESC'), $inputParam);
     return parent::getAll($param);
 }
Exemplo n.º 3
0
 public function getAll(array $inputParam = array())
 {
     $param = array_merge(array('select' => 'projects.title as project_title,samples.*', 'join' => 'projects ON (samples.project_id = projects.id)'), $inputParam);
     return parent::getAll($param);
 }
Exemplo n.º 4
0
 public function getAll(array $inputParam = array())
 {
     $param = array_merge(array('onlyStatusOn' => false), $inputParam);
     return parent::getAll($param);
 }
Exemplo n.º 5
0
 public function getAll()
 {
     return parent::getAll(array('orderby' => $this->_tablename . '.id ASC'));
 }