Ejemplo n.º 1
0
 public static function setLog($catalog, $action, $itemId, $userId = 0)
 {
     $newLog = new CatLog();
     $newLog->catalog = $catalog;
     $newLog->action = $action;
     $newLog->item_id = $itemId;
     $newLog->user_id = $userId;
     $newLog->date = time();
     $newLog->date2 = date("Y-m-d");
     $newLog->save();
 }
Ejemplo n.º 2
0
 /**
  * This is the default 'index' action that is invoked
  * when an action is not explicitly requested by users.
  */
 public function actionIndex()
 {
     if (Yii::app()->user->isGuest) {
         Yii::app()->page->title = "Console авторизации";
         $this->actionLogin();
     } else {
         $list = CatLog::fetchAll(DBQueryParamsClass::CreateParams()->setOrderBy("id DESC")->setLimit(50)->setCache(0));
         Yii::app()->page->title = "Административный кабинет";
         $this->render("room", array("listStat" => $list));
     }
 }
Ejemplo n.º 3
0
 /**
  * This is the default 'index' action that is invoked
  * when an action is not explicitly requested by users.
  */
 public function actionIndex($limit = 50)
 {
     Yii::app()->page->title = "Статистика";
     $list = CatLog::fetchAll(DBQueryParamsClass::CreateParams()->setOrderBy("id DESC")->setLimit(50)->setCache(0));
     $this->render("index", array("list" => $list));
 }