<?php
defined('PP_PATH') or exit;
class search_control extends base_control{
	public $_cfg = array();
	public $_var = array();
	public function __construct(){
		parent::__construct();
		$this->_cfg = $this->runtime->xget();
		$this->_var['topcid'] = -1;	
	}
	public function index(){
		$keyword = urldecode(R('keyword'));
		$keyword = safe_str($keyword);

		$this->_cfg['titles'] = $keyword;

		$this->assign('pp', $this->_cfg);
		$this->assign('pp_var', $this->_var);
		$this->assign('keyword', $keyword);

		$GLOBALS['run'] = &$this;
		$GLOBALS['keyword'] = &$keyword;

		$_ENV['_theme'] = &$this->_cfg['theme'];
		$this->display('search.htm');
	}
}