Exemplo n.º 1
0
 /**
  * Выводит список блогов
  *
  * @return void
  */
 public function actionIndex()
 {
     $blogs = new Blog('search');
     $blogs->unsetAttributes();
     $blogs->status = Blog::STATUS_ACTIVE;
     if (isset($_GET['Blog']['name'])) {
         $blogs->name = CHtml::encode($_GET['Blog']['name']);
     }
     $this->render('index', ['blogs' => $blogs]);
 }
Exemplo n.º 2
0
 /**
  * Выводит список блогов
  *
  * @return void
  */
 public function actionIndex()
 {
     $blogs = new Blog('search');
     $blogs->unsetAttributes();
     $blogs->status = Blog::STATUS_ACTIVE;
     $blogs->type = (int) Yii::app()->request->getQuery('type', Blog::TYPE_PUBLIC);
     if (isset($_GET['Blog']['name'])) {
         $blogs->name = CHtml::encode($_GET['Blog']['name']);
     }
     $this->render('index', array('blogs' => $blogs));
 }
Exemplo n.º 3
0
 /**
  * Управление блогами.
  *
  * @return nothing
  **/
 public function actionIndex()
 {
     $model = new Blog('search');
     $model->unsetAttributes();
     // clear any default values
     if (Yii::app()->getRequest()->getParam('Blog') !== null) {
         $model->setAttributes(Yii::app()->getRequest()->getParam('Blog'));
     }
     $this->render('index', array('model' => $model));
 }
Exemplo n.º 4
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Blog('search');
     $catelist = array();
     $catelist[0] = '全部';
     $catelist = $catelist + Category::getDropList(1);
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Blog'])) {
         $model->attributes = $_GET['Blog'];
     }
     if ($model->pid == 0) {
         $model->pid = '';
     }
     $this->render('admin', array('model' => $model, 'catelist' => $catelist));
 }
Exemplo n.º 5
0
 /**
  * Управление блогами.
  *
  * @return nothing
  **/
 public function actionIndex()
 {
     $model = new Blog('search');
     $model->unsetAttributes();
     if (Yii::app()->getRequest()->getParam('Blog') !== null) {
         $model->setAttributes(Yii::app()->getRequest()->getParam('Blog'));
     }
     $this->render('index', ['model' => $model]);
 }
Exemplo n.º 6
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Blog('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Blog'])) {
         $model->attributes = $_GET['Blog'];
     }
     $this->render('admin', array('model' => $model));
 }