コード例 #1
0
ファイル: AjaxController.php プロジェクト: jasonhai/onehome
             $model->update();
             Users::UpdateUserVendorPurchaserOnly($model);
             // - not user -> copy 2 file upload form table user to this tenant at this transaction
             // sẽ không lưu file upload ở 2 chỗ nữa, chỉ lưu bên table user,
             // vì hiện tại không cho edit tenant or landlord
             //                    if($oldUser){ // không check kiểu này nữa
             if ($model->is_new_user == 1) {
                 $mUser = Users::model()->findByPk($model->user_id);
                 if ($mUser && $model->is_new_user && $model->id_type != Users::ID_TYPE_CITIZENSHIP) {
                     // save 2 file upload if have to table user
                     Users::saveTwoFileOfTenant($mUser, $model);
                 }
                 //                        Users::copyTwoFileFromUserToTenant($mUser, $model);
             }
             // copy 2 file upload form table user to this tenant at this transaction
             die('<script type="text/javascript">parent.$.fancybox.close(); parent.fnUpdateBoxTenant();</script>');
         }
     }
     $this->render('CreateTransaction/AgentUpdateTenant', array('model' => $model));
 } catch (Exception $exc) {
     throw new CHttpException(404, $exc->getMessage());