Ejemplo n.º 1
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Ad('search');
     $adverlist = Adver::getDropList();
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Ad'])) {
         $model->attributes = $_GET['Ad'];
     }
     if ($model->pid == 0) {
         $model->pid = '';
     }
     if ($model->is_show == 0) {
         $model->is_show = '';
     }
     $this->render('admin', array('model' => $model, 'adverlist' => $adverlist));
 }
Ejemplo n.º 2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Ad('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Ad'])) {
         $model->attributes = $_GET['Ad'];
     }
     $this->render('admin', array('model' => $model));
 }
Ejemplo n.º 3
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Ad('search', array('criteria' => array('with' => array('screens' => array('condition' => 'screen_id = ' . $this->_screen->id)), 'together' => true)));
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Ad'])) {
         $model->attributes = $_GET['Ad'];
     }
     $this->render('admin', array('model' => $model));
 }