<?php
class goControl extends skymvc{
	
	function __construct(){
		parent::__construct();
		$this->loadConfig("taobao_config");
	}

	
	public function onDefault(){
			$url=get_post('url','h');
			$arr=parse_url($url);
			if(preg_match("/(taobao|tmall)\.com$/i",$arr['host'])){
				header("Location: $url");
			}else{
				header("Location: /index.php");
			}
	}
	
	public function onTo(){
		$url=get_post('url','h');
		$this->smarty->assign("url",$url);
		$this->smarty->display("to.html");
	}
	
}

?>