Exemple #1
0
 public function actionIndex($current = 1)
 {
     $pb = new PageBar();
     $pb->current = $current;
     $pb->total = $this->connection->createCommand("select count(user_id) from xm_user  where isadmin = 1 and loginname !='administrator'")->queryScalar();
     $admins = $this->connection->createCommand("select * from xm_user where isadmin = 1 and loginname !='administrator' order by createtime desc limit " . $pb->getStart() . "," . $pb->rows)->queryAll();
     $this->render('index', array('pagebar' => $pb, 'admins' => $admins));
 }
Exemple #2
0
 public function actionIndex($current = 1)
 {
     $pb = new PageBar();
     $pb->current = $current;
     $pb->total = $this->connection->createCommand("select count(employ_id) from xm_employee where lang = '" . $this->mgrlang . "' " . $this->self . " " . $this->inmodule_1 . " ")->queryScalar();
     $employees = $this->connection->createCommand("select e.*,m.category from xm_employee e left join xm_module m on e.module_id = m.module_id  where e.lang = '" . $this->mgrlang . "' " . $this->self . " " . $this->inmodule_2 . "  order by e.orderby asc limit " . $pb->getStart() . "," . $pb->rows)->queryAll();
     $this->render('index', array('pagebar' => $pb, 'employees' => $employees));
 }