Example #1
0
                 $aBody = array('{NAME}' => $model->name, '{EMAIL}' => $model->email, '{PHONE}' => $model->phone, '{POSITION}' => $model->position, '{MESSAGE}' => nl2br(strip_tags($model->comment)));
                 $aSubject = array('{POSITION}' => $model->position);
                 $sTo = Yii::app()->params['adminEmail'];
                 CmsEmail::sendmail(MAIL_RESUME_USER, $aSubject, $aBody, $sTo);
                 $sTo = $model->email;
                 CmsEmail::sendmail(MAIL_RESUME_USER, $aSubject, $aBody, $sTo);
             }
         }
     }
     $this->render('career/resume', array('model' => $model, 'flag' => $flag));
 }
 public function actionListingDetail($draft = 0)
 {
     $model = $draft == 1 ? LhListing::model()->findByAttributes(array('slug' => $_GET['slug'])) : LhListing::model()->findBySlug($_GET['slug']);
     if (is_null($model)) {
         throw new Exception('Invalid request');
     }
     $view = empty($m) ? 'listing_detail' : 'listing_map';
     $model->view_count++;
     $model->update('view_count');
     // build breadscrumb
     $searchParams = array('index');
     $breadcrumbs = array();
     // property type (child)
     $searchParams['property_type_code[]'] = $model->property_type_1;
     $breadcrumbs[$model->rPropertyType->name] = $searchParams;
     // district
     $searchParams['location[]'] = $model->location_id;
     $breadcrumbs[$model->rLocationDistrict->name] = $searchParams;
     // buidling name
     if ($model->building_name) {
         $searchParams['building'] = $model->building_name;
         $breadcrumbs[$model->building_name] = $searchParams;
     }
     // listing type: sale/rent
     $searchParams['listing_for'] = $model->listing_type == 1 ? 'for_rent' : 'for_sale';
     $typeText = $model->listing_type == 1 ? "For Rent" : "For Sale";
Example #2
0
     $email_to = $Listing->user->email_not_login;
     $from = $model->email;
     //      CmsEmail::sendmail(EMAIL_SHORTLIST_ENQUIRY, $aSubject, $aBody, $email_to, $Listing->user->email_not_login, $sSubject);
     CmsEmail::sendmail(EMAIL_SHORTLIST_ENQUIRY, $aSubject, $aBody, $email_to, $from);
 }
 public static function sendEmailEnquiryForAgent($model)
 {
     $Listing = Listing::model()->findByPk($model->property_id);
Example #3
0
?>
</div>
                </div>
                <p class="type"><?php 
echo Listing::FormatListedDate($model);
?>
</p>
				
				<p>&nbsp;<i class="fa fa-eye fa-lg"></i>&nbsp;&nbsp;
					<?php 
echo (int) $model->view_count;
?>
 views</p>
				
				<div class="addthis_native_toolbox" data-title="<?php 
echo CmsFormatter::getListingNameDetail($model);
?>
"
					 accesskey=""data-url="<?php 
echo $this->createAbsoluteUrl('site/listingdetail', array('slug' => $model->slug));
?>
"></div>				
            </div>
        </div>
    </div>
    
    <div class="green-tab">
        <!-- Nav tabs -->
        <ul class="nav nav-tabs" role="tablist">
            <li <?php 
if (!isset($_GET['m'])) {
Example #4
0
         <div class="wrapper breadcrumb"></div>
        <?php 
} else {
    $this->breadcrumbs = array(array('controller' => Yii::app()->controller->id, 'action' => Yii::app()->controller->action->id));
    if (isset($this->breadcrumbs)) {
        foreach ($this->breadcrumbs as $item) {
            if ($item['controller'] == 'page') {
                if (isset($_GET['slug']) && $_GET['slug'] != "") {
                    $page = Pages::findBySlug($_GET['slug']);
                    $page_root = array();
                    if ($page->parent_id != 0) {
                        $page_root = Pages::findRootParentModel($page->parent_id);
                    }
                    if ($page_root) {
                        $name_breadcrum = '<a href="' . Yii::app()->createAbsoluteUrl('page/index', array('slug' => $page_root->slug)) . '">' . $page_root->title . "</a> &raquo; <strong>" . $page->title . "</strong>";
                    } else {
                        $name_breadcrum = "<strong>" . $page->title . "</strong>";
                    }
                }
            } else {
                if ($item['action'] == 'listingdetail') {
                    if (isset($_GET['slug']) && $_GET['slug'] != "") {
                        $listing = Listing::findBySlug($_GET['slug']);
                        if ($listing) {
                            //$name_breadcrum = "<span>".$listing->rPropertyType->name."</span> &raquo; <strong>".$listing->property_name_or_address."</strong>";
                            $name_breadcrum = "<span>" . $listing->rPropertyType->name . "</span> &raquo; <strong>" . CmsFormatter::getListingNameDetail($listing) . "</strong>";
                        }
                    }
                } else {
                    $link = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];