<?php
class admin_keywordsControl extends skymvc{
	public function __construct(){
		parent::__construct();
		if(empty($_SESSION['ssadmin'])){
				$this->gourl("".APPADMIN."?m=admin&a=login");	
		}
	}
	
	public function onDefault(){
		$content=file_get_contents("config/dict/my.txt");
		$this->smarty->assign(
			array(
				"content"=>$content
			)
		);
		$this->smarty->display("keywords.html");
	}
	
	public function onSave(){
		$content=post('content');
		file_put_contents("config/dict/my.txt",$content);
		$this->gomsg("保存成功");
	}
	
	public function onmakeword(){
		//获取标签
		$this->loadClass("keywords",false,false);
		$keyword=new keyword('config/dict/');
		$keyword->save_my();
		$this->gomsg("生成成功");
		//获取标签结束
	}
	
}

?>