Example #1
0
 public function actionBannerActivate()
 {
     if (!Yii::app()->request->isAjaxRequest) {
         return false;
     }
     $id = (int) Yii::app()->request->getParam('id');
     if ($id) {
         Advert::model()->updateCounters(array('clicks' => 1), "id = :id", array(':id' => $id));
     }
 }
Example #2
0
 /**
  * Returns the static model of the specified AR class.
  * @return AdminAdvert the static model class
  */
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }