public function indexAction() { if ($this->view->login->group_id != 1) { $this->error("权限不够", "操作权限不够"); } $query = Doctrine_Query::create(); $query->from('DBModel_User u'); $query->leftJoin('u.Department dp'); $query->leftJoin('u.Group gp'); $query->orderBy('u.id desc'); $gp = $_GET['page']; if (Zend_Validate::is($gp, 'Int')) { $curPage = $gp; } else { $curPage = 1; } $page = new Das_Page(); $page->setPerPage(10); $page->setCurPage($curPage); $page->setQuery($query); $page->setView($this->view); $page->setModName("user"); $page->process(); $this->view->render("user.html"); $query->free(); }
public function indexAction() { //$dv = new Das_ViewUtil(); //$params = array('a'=>'test','id'=>1); //$dv->url("xfile" , "edit" , $params); // //$this->view->render("index.html"); //die("searching"); $k = $_POST['q']; //die($k); $gp = $_GET['page']; if (Zend_Validate::is($gp, 'Int')) { $curPage = $gp; } else { $curPage = 1; } $q = Doctrine_Query::create(); $q->from("DBModel_XFile f"); $q->leftJoin('f.Department d'); $q->leftJoin('f.FileAccept ac'); $q->addWhere("f.title LIKE '%" . $k . "%' "); if ($this->view->login->group_id == 3) { //确保登录用户能看见自己的信息 $q->addWhere("department_id = ? ", $this->view->login->department_id); //确保信息被发送到登录用户所属部门 if ($this->view->login->group_id == 3) { $added_sql = "FIND_IN_SET('%s',sendto) > 0 "; $added_sql = sprintf($added_sql, $this->view->login->department_id); $q->orWhere($added_sql); } $q->andWhere("is_xfwj = 0"); $q->orderBy('f.id desc'); } else { $q->addWhere("is_xfwj = 0"); $q->orderBy('f.id desc'); } $page = new Das_Page(); $page->setPerPage(10); $page->setCurPage($curPage); $page->setModName("xfile"); $page->setQuery($q); $page->setView($this->view); $page->process(); $this->view->render("xfile.html"); $q->free(); }
public function showAction() { $query = Doctrine_Query::create(); $query->from('DBModel_Note n'); $query->orderBy('n.id desc'); $gp = $_GET['page']; if (Zend_Validate::is($gp, 'Int')) { $curPage = $gp; } else { $curPage = 1; } $page = new Das_Page(); $page->setPerPage(10); $page->setCurPage($curPage); $page->setModName("note"); $page->setQuery($query); $page->setView($this->view); $page->process(); $this->view->render("shownote.html"); $query->free(); }
public function indexAction() { if ($this->view->login->group_id != 1) { $this->error("权限不够", "操作权限不够"); } $gp = $_GET['page']; if (Zend_Validate::is($gp, 'Int')) { $curPage = $gp; } else { $curPage = 1; } $q = Doctrine_Query::create(); $q->from('DBModel_AcceptType'); $page = new Das_Page(); $page->setPerPage(10); $page->setCurPage($curPage); $page->setModName("Atype"); $page->setQuery($q); $page->setView($this->view); $page->process(); $this->view->render("accepttype.html"); $q->free(); }
public function catindexAction() { $query = Doctrine_Query::create(); $query->from('DBModel_GovPublicCat d'); $gp = $_GET['page']; if (Zend_Validate::is($gp, 'Int')) { $curPage = $gp; } else { $curPage = 1; } $page = new Das_Page(); $page->setPerPage(10); $page->setCurPage($curPage); $page->setModName("gov"); $page->setQuery($query); $page->setView($this->view); $page->process(); $this->view->render("govpubliccat.html"); }
public function xiafawenjianAction() { $query = Doctrine_Query::create(); $query->from('DBModel_XFile f'); $query->leftJoin('f.Department d'); $query->leftJoin('f.FileAccept ac'); $query->orderBy('f.id desc'); if ($this->view->login->group_id == 3) { // 确保登录用户能看见自己的信息 // $query->addWhere("department_id = ? ", $this->view->login->department_id); // 确保信息被发送到登录用户所属部门 if ($this->view->login->group_id == 3) { $added_sql = "FIND_IN_SET('%s',sendto) > 0 "; $added_sql = sprintf($added_sql, $this->view->login->department_id); $query->orWhere($added_sql); } $query->andWhere("is_xfwj = 1"); $query->orderBy('f.id desc'); } else { $query->addWhere("is_xfwj = 1"); $query->orderBy('f.id desc'); } $gp = $_GET['page']; if (Zend_Validate::is($gp, 'Int')) { $curPage = $gp; } else { $curPage = 1; } $page = new Das_Page(); $page->setPerPage(10); $page->setCurPage($curPage); $page->setModName("Xfile"); $page->setQuery($query); $page->setView($this->view); $page->process(); $this->view->render("xfile.html"); $query->free(); }