コード例 #1
0
 /**
  * Manages all models.
  */
 public function actionManage()
 {
     $model = new Reports('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Reports'])) {
         $model->attributes = $_GET['Reports'];
     }
     $columnTemp = array();
     if (isset($_GET['GridColumn'])) {
         foreach ($_GET['GridColumn'] as $key => $val) {
             if ($_GET['GridColumn'][$key] == 1) {
                 $columnTemp[] = $key;
             }
         }
     }
     $columns = $model->getGridColumn($columnTemp);
     $this->pageTitle = Yii::t('phrase', 'Abuse Reports');
     $this->pageDescription = Yii::t('phrase', 'This page lists all of the reports your users have sent in regarding inappropriate content, system abuse, spam, and so forth. You can use the search field to look for reports that contain a particular word or phrase. Very old reports are periodically deleted by the system.');
     $this->pageMeta = '';
     $this->render('admin_manage', array('model' => $model, 'columns' => $columns));
 }
コード例 #2
0
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Reports('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Reports'])) {
         $model->attributes = $_GET['Reports'];
     }
     $this->render('admin', array('model' => $model));
 }