<?php
if (!defined('IN_59MIAO'))
{
	exit('Access Defined');
}
//系统设置控制器
class BanspiderAction extends Action {
	public function __construct() {
		parent::__construct();
	}	
	public function index() {	
		$banarray=array('baiduspider'=>'百度','googlebot'=>'谷歌','sogou'=>'搜狗','sosospider'=>'腾讯SOSO','slurp'=>'雅虎','youdaobot'=>'有道','bingbot'=>'Bing','msnbot'=>'MSN','ia_archiver'=>'Alexa');
		$data=$this->_model->findOne();		
		$data[0]->ban_content=explode('|',$data[0]->ban_content);		
		$this->_tpl->assign('banspider',$data[0]);
		$this->_tpl->assign('banarray',$banarray);
		$this->_tpl->display(SMARTY_ADMIN.'setting/banspider.tpl');	
	}	
	//修改系统设置
	public function update() {	
		if(isset($_POST["send"])) $this->_model->update()?$this->_redirect->succ(Tool::getPrevPage(), '修改屏蔽蜘蛛设置成功！') : $this->_redirect->error('修改屏蔽蜘蛛设置失败！');	
		
		$this->_tpl->display(SMARTY_ADMIN.'setting/banspider.tpl');	
	}	
}
?>