* Time: 3:36 PM */ class BankRequestController extends Controller { public function actionIndex() { $model = new BankRequest(); if (isset($_POST['BankRequest'])) { $model->attributes = $_POST['BankRequest']; $model->choosetype = isset($_POST['choosetype']) ? $_POST['choosetype'] : 0; $model->property_type_code = isset($_POST['property_type_code']) ? is_array($_POST['property_type_code']) ? implode(',', $_POST['property_type_code']) : "" : ''; if ($model->validate()) { $model->tenancy_expiry_datepicker = MyFormat::indexDateToDbDate($model->tenancy_expiry_datepicker); $model->target_price = (double) $model->target_price; if ($model->save()) { //email to Admin SendEmail::sendMailBankRequestToAdmin($model); $link_thanks = Yii::app()->createAbsoluteUrl('page/index', array('slug' => Pages::getSlugById(PAGE_THANK_BANK_VALUATION_REQUEST))); $this->redirect($link_thanks);
//if($model->validate() && $model->login()) if ($model->validate()) { if (!empty($returnUrl)) { $this->redirect($returnUrl); } /* Change at yii 1.1.13: * we not use: if (strpos(Yii::app()->user->returnUrl,'/index.php')===false) to check returnUrl */ if (strtolower(Yii::app()->user->returnUrl) !== strtolower(Yii::app()->baseUrl . '/')) { $this->redirect(Yii::app()->user->returnUrl); } $this->redirect(Yii::app()->createAbsoluteUrl('member/member_profile/myprofile')); } } // display the login form $this->render('user_login/login', array('model' => $model)); } catch (Exception $exc) { throw new CHttpException(404, 'Invalid request. Please do not repeat this request again.'); } } /** * <Jason> * <*****@*****.**> * Logs out the current user and redirect to homepage. */ public function actionLogout() { $role_id = Yii::app()->user->role_id;
<p class="note"><em>Minimum 6 letters and/or numbers</em></p> </div> </div> <div class="row clearfix"> <label class="lb-1"></label> <div class="group-1"> <?php echo $form->checkBox($model, 'is_subscriber'); ?> <p><strong>Please send me updates, monthly newsletter and partner offers</strong></p> </div> </div> <?php $link_PAGE_Terms_Of_Service = Yii::app()->createAbsoluteUrl('site/view_page', array('slug' => Pages::getSlugById(PAGE_Terms_Of_Service))); $link_PAGE_Privacy_Policy = Yii::app()->createAbsoluteUrl('site/view_page', array('slug' => Pages::getSlugById(PAGE_Privacy_Policy))); ?> <div class="w-2 clearfix"> <button type="submit" class="btn-3">Register</button> </div> <p class="note space-1">By registering your account you agree to OneHome Infologic’s <a href="<?php echo $link_PAGE_Terms_Of_Service; ?> " target="_blank">Terms of Service</a> and <a href="<?php echo $link_PAGE_Privacy_Policy; ?> " target="_blank">Privacy Policy</a>.</p> <?php