<!DOCTYPE>
<?php 
require_once("config.php");
$ad = "select * from ad";
$ad = mysql_query($ad,$config);
$ad = mysql_fetch_array($ad);
$sql = "select * from win  where id='1'";
$win = mysql_query($sql,$config);
$win = mysql_fetch_array($win);

?>

<head>
<link  rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
<link  rel="bookmark" href="favicon.ico" type="image/x-icon"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link  type="text/css" href="style/index.css" rel="stylesheet"/>
</head>
<title><?php echo $win['title']?></title>
<meta  name="keywords" content="<?php echo $win['keywords']?>"/>
<meta  name="description" content="<?php echo $win['description']?>"/>
<body>
<div id="top"></div>
<div id="logo">
<div class="left"><img src="<?php echo $win['logo']?>"  /> </div>
</body>
<div class="right">
<ul>
<li><a href="?p=index">首页</a></li>
<li><a href="?p=down">下载中心</a></li>
<li><a href="?p=help">帮助中心</a></li>
<li><a href="?p=new">最新动态</a></li>
</ul>
</div>
</div>
<div id="main">
<?php
isset($_GET['p'])?$p=$_GET['p']:$p="index";
$pp=preg_match("/^([a-z]){1,5}$/",$p);
if($pp=="1"){
    require("template/$p.php");
}else{
     echo "<script>window.onload=function(){alert('地址出错');location.href='index.php';}</script>";
    
}

?>
</div>

<div id="dibu">
<div class="nr"><?php echo $win['banquan']; ?><br />
<?php echo $win['icp']?> <?php echo $win['lianxi'];?>
<?php echo $win['cnzz']?>

</div>
</div>


