<?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 SearchgridWidget extends CWidget
{
     
    
    public function run()
    {
	 
	      $attributes = (array)Yii::app()->request->getQuery('PlaceAnAd', array());
	      $model = new PlaceAnAd;
	      $model->attributes = $attributes;
	      $model->keyword = @$attributes['keyword'];
          $states  = States::model()->StateList();
          $category  = Category::model()->listData();
          $this->render('searchgrid', compact("model",'category',"states"));
    }
}
