Пример #1
0
 public function actionProcesscategory()
 {
     $model = new CustomerCategory();
     $user_id = Commonmodel::getOrganID();
     $category = $_GET;
     $category['user_id'] = $user_id;
     $category['update_time'] = time();
     $bool = false;
     if (!empty($_GET['id'])) {
         $bool = CustomerCategory::model()->updateByPk($_GET['id'], $category);
     } else {
         $model->attributes = $category;
         $model->create_time = time();
         $bool = $model->save();
     }
     echo $bool;
 }