示例#1
0
 public function run()
 {
     $this->controller->pageTitle = "Private";
     $proxy = new CHub();
     $result = $proxy->getHubList();
     $type = MemberType::model()->findAll();
     if (Yii::app()->request->isAjaxRequest) {
         $name = Yii::app()->request->getParam('name');
         $phone = Yii::app()->request->getParam('phone');
         $email = Yii::app()->request->getParam('email');
         $number = Yii::app()->request->getParam('number');
         $membertype = Yii::app()->request->getParam('membertype');
         $hub = Yii::app()->request->getParam('hub');
         $proxy = new PrivateOrder();
         $proxy->name = $name;
         $proxy->phone = $phone;
         $proxy->email = $email;
         $proxy->number = $number;
         $proxy->membertype = $membertype;
         $proxy->hub = $hub;
         $proxy->save();
         echo CJSON::encode(array('code' => 200, 'message' => 'success'));
     } else {
         $this->controller->render('private', array('data' => $result['data'], 'type' => $type));
     }
 }
示例#2
0
文件: BAuth.php 项目: itliuchang/test
 public function getUserType()
 {
     $result = MemberType::model()->findAll();
     if ($result) {
         return $result;
     }
 }
示例#3
0
 public function addMemberType(MemberType $l)
 {
     $this->collMemberTypes[] = $l;
     $l->setMemberTemplate($this);
 }