<?php
class HtmlWidget extends Widget{
	// 引用页面
	public function render($data){
		// 前台页面导航
		if($data["html"] == "head"){ 
			$dhList =  array(
						array("name"=>"网站首页","link"=>"/Index/index.html"),
						array("name"=>"新闻公告","link"=>"/Index/xinwen.html"),
						array("name"=>"热门活动","link"=>"/Index/huodong.html"),
						array("name"=>"游戏大厅","link"=>"/Youxi/index.html"),
						array("name"=>"用户中心","link"=>"/Account/index.html"),
						array("name"=>"元宝充值","link"=>"/Pay/index.html"),
						array("name"=>"在线客服","link"=>"http://wpa.qq.com/msgrd?v=3&uin=".SERVICE."&site=qq&menu=yes"),
						array("name"=>"火爆论坛","link"=>FORUM)
					);
			// 今天0点开始的秒数
			$jin = strtotime(date("Y-m-d"));
			// 最终入驻人数
			$ren = round((time() - $jin) / 15);
			// 返回代码
			return $this->renderFile($data["html"],array("dhList"=>$dhList,"curr"=>$data["curr"],"ren"=>$ren));
		}
		// 后台页面导航
		if($data["html"] == "admhead"){ 
			$dhList =  array(
						array("name"=>"后台首页","link"=>"/Adm/Index/index.html"),
						array("name"=>"新闻管理","link"=>"/Adm/Xinwen/index.html"),
						array("name"=>"用户管理","link"=>"/Adm/Account/index.html"),
						array("name"=>"游戏管理","link"=>"/Adm/Youxi/index.html"),
						array("name"=>"区服管理","link"=>"/Adm/Youxi/qufu.html"),
						array("name"=>"财务管理","link"=>"/Adm/Caiwu/index.html"),
						array("name"=>"退出后台","link"=>"/Adm/Index/quit.html")
					);
			return $this->renderFile($data["html"],array("dhList"=>$dhList,"curr"=>$data["curr"]));
		}
		// 开服列表
		if($data["html"] == "qufu"){
			$qfList = F("qfList");
			return $this->renderFile($data["html"],array("qfList"=>$qfList));
		}
		// 其他页面
		return $this->renderFile($data["html"],$data);
	}
}
?>