Esempio n. 1
0
 public function actionUpdateEngage()
 {
     try {
         $this->pageTitle = 'Update Engage - ' . Yii::app()->params['title'];
         $this->layout = 'application.views.layouts.ajax';
         $model = ProEngageUs::model()->findByPk($_GET['engage_id']);
         $model->scenario = 'engage';
         if (isset($_POST['ProEngageUs'])) {
             $model->attributes = $_POST['ProEngageUs'];
             if ($model->validate()) {
                 if (!$model->getErrors()) {
                     if ($model->save('price', 'remark')) {
                         Yii::app()->user->setFlash('success', "Your Engage has been sended!");
                         $model->price = '';
                         $model->remark = '';
                         $model->termandcondition = 0;
                         die('<script type="text/javascript">parent.$.fancybox.close(); parent.fnUpdateGridView("#list-engage-grid");   </script>');
                     }
                 }
             }
         }
         $this->render('engageus', array('model' => $model));
     } catch (Exception $exc) {
         echo $exc->getMessage();
     }
 }
Esempio n. 2
0
<?php

$LinkLogout = Yii::app()->createAbsoluteUrl('site/logout');
$LinkSubmitTestimonial = Yii::app()->createAbsoluteUrl('member/member_profile/submitTestimonials');
$LinkEditAccount = '';
if (Yii::app()->user->role_id == ROLE_LANDLORD) {
    // for landlord
    $LinkEditAccount = Yii::app()->createAbsoluteUrl('member/landlord/myprofile');
    $ListOfTenancies = ProTransactions::getListTenanciesLandlord(array('limit' => ProTransactions::LIMIT_PROPERTIES));
    $LinkViewAllTenancies = Yii::app()->createAbsoluteUrl('member/landlord/property');
}
$ListOfProperties = ProEngageUs::getListEngage(array('limit' => ProTransactions::LIMIT_PROPERTIES));
$cmsFormater = new CmsFormatter();
if (Yii::app()->user->role_id == ROLE_TENANT) {
    $LinkEditAccount = Yii::app()->createAbsoluteUrl('member/tenant/myprofile');
    $ListOfTenancies = ProTransactions::getListTenancies(array('limit' => ProTransactions::LIMIT_PROPERTIES));
    $LinkViewAllTenancies = Yii::app()->createAbsoluteUrl('member/tenant/property');
}
$LinkMyshortlist = Yii::app()->createAbsoluteUrl('member/member_profile/myshortlist');
$LinkEngageus = Yii::app()->createAbsoluteUrl('member/member_profile/engageus');
?>

<!--  aside -->
<aside class="sidebar">
    <!-- box -->
    <div class="box-7">
            <div class="user-wrap clearfix">
<!--            <div class="image">
                <img src="img/user.jpg" alt="image" />
            </div>-->
            <div class="content" style="margin-left: 0;">