Пример #1
0
     }
     $f = $field . '_click';
     $model->{$f} = count($model->getContactClickedUsers());
     $model->update($f);
     echo $model->{$f};
 }
 public function actionSubmitTcForm()
 {
     if (isset($_POST['CompanyListingAgreement'])) {
         $model = new CompanyListingAgreement('show-popup');
         $model->attributes = $_POST['CompanyListingAgreement'];
Пример #2
0
{
    public $userId;
    public function run()
    {
        $userId = $this->userId;
        $existed = CompanyListingAgreement::model()->exists(array('condition' => 'user_id=:user', 'params' => array(':user' => $userId)));
        if ($existed) {
            return;
        }
        $model = new CompanyListingAgreement('show-popup');
        $model->user_id = $userId;
Пример #3
0
 public function actionTcAgreement()
 {
     $model = new CompanyListingAgreement('search');
     $model->unsetAttributes();
     // clear any default values
     $this->render('agreement', array('model' => $model, 'actions' => $this->listActionsCanAccess));
 }