<?php defined('MW_PATH') || exit('No direct script access allowed');

/**
 * ArticleCategoriesWidget
 * 
 * @package MailWizz EMA
 * @author Serban George Cristian <cristian.serban@mailwizz.com> 
 * @link http://www.mailwizz.com/
 * @copyright 2013-2014 MailWizz EMA (http://www.mailwizz.com)
 * @license http://www.mailwizz.com/license/
 * @since 1.0
 */
 
class SubSearchWidget extends CWidget
{
    public $mode;
     
    public function run()
    {
		    $mode = $this->mode;  
		    $property_for_sale = Category::model()->findAllByAttributes(array('section_id'=>PlaceAnAd::SALE_ID,'isTrash'=>'0','status'=>'A'),array('order'=>'t.category_name'));
			$property_for_rent = Category::model()->findAllByAttributes(array('section_id'=>PlaceAnAd::RENT_ID,'isTrash'=>'0','status'=>'A'),array('order'=>'t.category_name'));
	
			$this->render('form',compact('property_for_sale','property_for_rent','mode'));
    }
}
