<?php include("sql/conn.php"); 
session_start(); //开着身份验证，以后写

include("adm/zysj.php");

if($_GET['ys'])
{
$ys = $wzs*($_GET['ys']-1);
}	 
else
{
$ys = 0;
}

?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?php include("adm/all/gjz.txt"); ?> 页游快讯</title>
<meta name="description" content="<?php include("adm/all/description.txt"); ?> 页游快讯" />
<meta name="keywords" content="<?php include("adm/all/gjz.txt"); ?> 页游快讯" />
<link  href="css/css<?php include("adm/all/css.txt"); ?>.css" rel="stylesheet" type="text/css">

<style type="text/css">
<!--
#dh27 {
	width: 958px;
	overflow: hidden;

}
#dh28 {
	width: 688px;
	overflow: hidden;
	float: left;
	border-right-width: 1px;
	border-right-style: solid;
	border-right-color: #00FFFF;
	font-size: 16px;
	text-align: left;
}
#dh29 {
	width: 258px;
	overflow: hidden;
	float: right;
	white-space:nowrap;
	text-align: left;
}
-->
</style>



</head>

<?php
////////////////////////////////////////////////////////////////////////
$file = fopen("adm/tm.txt", "r") or exit("Unable to open file!");
while(!feof($file))
  {
$hang = fgets($file);
$res=explode("%%",$hang,20);
  }/////获得表格表头
///////////////////////////////////////////////////////////////////////////
?>


<?PHP
include("han2.php");
////////////////////////显示当前时间的函数
function gtime($tt)
  {
$hour = substr(date("H:i:s",$tt),0,2);
$hour=(int)$hour; 
$dl = array('【通宵推荐】','【通宵推荐】','【通宵推荐】','凌晨3点整','凌晨4点整','早晨5点整','早晨6点整','早晨7点整','上午8点整','上午9点整','上午10点整','中午11点整','中午12点整','下午13点整','下午14点整','下午15点整','下午16点整','晚上17点整','晚上18点整','晚上19点整','晚上20点整','晚上21点整','晚上22点整','【通宵推荐】');
$tt = date("m月d日",$tt);
return $tt;
  }
/////////////////////////
?>

<body >
<div id="top">
<?php include("user.php");  ?>
</div>
<?php include("gh.php");  ?>

<div align="center">
<?php include("logo.php");  ?>

<div id="dh" ><?php 
 if(file_exists("dh1.php"))
 {
include("dh1.php"); 
 }
 else
 {
include("action/dh1.php"); 
 }
?></div>

</div>

<div class="clear"></div>


<div align="center">
<div id="nr">



<div class="RoundedCorner">
<b class="rtop"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>

<div id="dh27">


<div id="dh28">




<div id="dh3">

<?php 
 if(file_exists("topx.php"))
 {
include("topx.php"); 
 }
 else
 {
include("action/topx.php"); 
 }
?>

</div>

<div class="clear"></div>


<br />

<TABLE ><tr><td ><a href="wzlb.php"><strong>页游新闻 </strong></a> <strong>|</strong>
</td></tr></table><hr>


<table class='wztd2'>
<?php
//echo "<tr class='wztd2'><td >标题</td><td>时间</td></tr>";

$result = mysql_query("SELECT * FROM wz where fl = 'web1' ORDER BY id DESC LIMIT ".$ys.",".$wzs);
while($row = mysql_fetch_array($result))
{

echo "<tr align=left class='wztd2'><td align='left' width='521'>◆<a href=wz_". $row['id']. ".html target=_blank >";
$tm = $row['tm'];
//////////////////循环替换////////////////////
$result8 = mysql_query("SELECT * FROM ck");
while($row8 = mysql_fetch_array($result8))
  {
$tm = str_replace($row8['old'],$row8['new'],$tm);
  }
//////////////////循环替换////////////////////
echo $tm;
echo "</a>";


echo "</td><td width='218'>";
$tim = date("m-d-H:i:s",$row['time']);
echo  $tim;
////echo "-".$row['id'];
echo "</td></tr>";

}
?>
</table>

<br /><hr>


<?php 

$result = mysql_query("SELECT * FROM wz");//查看总留言数并分页
$num = mysql_num_rows($result);
echo "文章总数".$num." 个";
$ys = ceil($num/$wzs);

if($ys>10){
$ys=10;
}

for ($i=1; $i<=$ys; $i++)
{
if ($_GET['ys']!=$i)
echo "〖<a href=?ys=".$i.">".$i."</a>〗";
else
echo "<strong>[".$i."]</strong>";

}

echo "</p>";

?> 


</div>

<div id="dh29">

<?php 
 if(file_exists("right.php"))
 {
include("right.php"); 
 }
 else
 {
include("action/right.php"); 
 }
?>

</div>



</div>

<b class="rbottom"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b>
</div>



</div></div>

<div class="clear"></div>


<?php 
 if(file_exists("foot.php"))
 {
include("foot.php"); 
 }
 else
 {
include("action/foot.php"); 
 }
?>
</body>
