<?php
require_once('session.php');
require_once('../fun/funsql.php'); 
require_once('../fun/funlogic.php');
require_once('../fun/funclass.php');
require_once('../fun/funnews.php');
if (isset($_GET["rel"])){$rel=$_GET["rel"];}else{$rel="";}
$classstr = new classstr($dbz);
$newsstr = new newsstr($dbz);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Home</title>
<link href="css_body.css" rel="stylesheet" type="text/css" />
</head>
<script type="text/javascript" src="../fun/adminjs.js"></script>
<body>

<?php if($rel=='news_config'){
$fp=openfile('../cache/newsconfig.txt');
$fparr=split(",,",$fp);
?>
<div class='bodytitle'><div class='bodytitleleft'></div><div class='bodytitletxt'>信息配置</div></div>
<table width="96%" border="0" cellpadding="0" cellspacing="0" 
	align="center" style="margin-bottom:8px;display:block" id="td1" >
<tr> 
<td>
<form id="form1" name="form1" method="post" action="query.php?rel=news_config">
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">
<tr align="center" height="24">
<td height="30" colspan="3" align="left" bgcolor="#EDF9D5"><b>&nbsp;信息配置</b>    &nbsp;&nbsp;</td>
</tr>
<tr align="center"> 
<td width="20%" height="25" bgcolor="#FFFFFF">变量说明</td>
<td bgcolor="#FFFFFF">变量值</td>
<td width="30%" bgcolor="#FFFFFF">介绍</td>
</tr> 
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 首页分类下信息显示条数:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='index' value='<?php echo $fparr[0] ?>' style='width:60%'></td>
<td align="left" bgcolor="#FFFFFF">输入数字</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 分类下信息显示条数:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='class' value='<?php echo $fparr[1] ?>' style='width:60%'></td>
<td align="left" bgcolor="#FFFFFF">输入数字</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 分类列表下信息显示条数:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='list' value='<?php echo $fparr[2] ?>' style='width:60%'></td>
<td align="left" bgcolor="#FFFFFF">输入数字</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 最近更新信息显示条数:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='update' value='<?php echo $fparr[3] ?>' style='width:60%'></td>
<td align="left" bgcolor="#FFFFFF">输入数字</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 人气排行信息显示条数:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='hot' value='<?php echo $fparr[4] ?>' style='width:60%'></td>
<td align="left" bgcolor="#FFFFFF">输入数字</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 推荐信息显示条数:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='vip' value='<?php echo $fparr[5] ?>' style='width:60%'></td>
<td align="left" bgcolor="#FFFFFF">输入数字</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息标题显示字数:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='size' value='<?php echo $fparr[6] ?>' style='width:60%'></td>
<td align="left" bgcolor="#FFFFFF">输入数字</td>
</tr>

<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 其它设置:</td>
<td align="left" bgcolor="#FFFFFF">
<?php if ($fparr[7]=='1'){?><input type="checkbox" name="ping" value="1" checked="checked" /><?php }else{?><input type="checkbox" name="ping" value="1" /><?php }?> 评论 <?php if ($fparr[8]=='1'){?><input type="checkbox" name="style" value="1" checked="checked" /><?php }else{?><input type="checkbox" name="style" value="1" /><?php }?> 标题前显示分类  <?php if ($fparr[9]=='1'){?><input type="checkbox" name="time" value="1" checked="checked" /><?php }else{?><input type="checkbox" name="time" value="1" /><?php }?> 标题后显示时间
</td>
<td align="left" bgcolor="#FFFFFF">其它</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">
<tr align="center" height="24">
  <td height="30" colspan="3" align="left" bgcolor="#EDF9D5"><b>&nbsp;请按照说明设置.</b></td>
  </tr>
<tr align="center" height="24">
  <td height="30" colspan="3" align="center" bgcolor="#FFFFFF"><input type="submit" name="Submit" value="确定" />
    <input type="reset" name="Submit2" value="重置" /></td>
  </tr>
</table>
</form>
</td>
</tr>
</table>
<?php }?>
<?php if($rel=='news_add'){?>
<div id="useradd" style="display:none;background-color:#EDF9D5;width:250;height:50; border:1px double #336699;"> 
<div style="margin:5px;">
<form action="query.php?rel=news_source_add" method="post" name="newsld_add">
&nbsp;&nbsp;增加作者:<input name="mg" type="text" maxlength="20" /><input type="hidden" name="types" value="0" />&nbsp;&nbsp;<input 

name="" type="submit" value="添加" />&nbsp;&nbsp;<a href="#" onclick="closediv('useradd')">隐藏</a>
</form>
</div>
</div>

<div id="sourceadd" style="display:none;background-color:#EDF9D5;width:250;height:50; border:1px double #336699;"> 
<div style="margin:5px;">
<form action="query.php?rel=news_source_add" method="post" name="newsld_add">
&nbsp;&nbsp;增加来源:<input name="mg" type="text" maxlength="20" /><input type="hidden" name="types" value="1" />&nbsp;&nbsp;<input 

name="" type="submit" value="添加" />&nbsp;&nbsp;<a href="#" onclick="closediv('sourceadd')">隐藏</a>
</form>
</div>
</div>

<div id="userlist" style="display:none;background-color:#EDF9D5;width:250;height:50; border:1px double #336699;"> 
<div style="margin:5px;">
<?php  echo $newsstr->newssource(0,1) ?><br />
<a href="#" onclick="closediv('userlist')">隐藏</a>
</div>
</div>

<div id="sourcelist" style="display:none;background-color:#EDF9D5;width:250;height:50; border:1px double #336699;"> 
<div style="margin:5px;">
<?php  echo $newsstr->newssource(1,1) ?><br />
<a href="#" onclick="closediv('sourcelist')">隐藏</a>
</div>
</div>

<div class='bodytitle'><div class='bodytitleleft'></div><div class='bodytitletxt'>信息添加</div></div>
<table width="96%" border="0" cellpadding="0" cellspacing="0" align="center" style="margin-bottom:8px;display:block" id="td1" >
<tr> 
<td>
<form id="form1" name="form1" method="post" action="query.php?rel=news_add">
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">
<tr align="center" height="24">
<td height="30" colspan="3" align="left" bgcolor="#EDF9D5"><b>&nbsp;信息添加</b>    &nbsp;&nbsp;</td>
</tr>
<tr align="center"> 
<td width="20%" height="25" bgcolor="#FFFFFF">变量说明</td>
<td bgcolor="#FFFFFF">变量值</td>
<td width="30%" bgcolor="#FFFFFF">介绍</td>
</tr>  
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息标题:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='titles' id='titles' value='' style='width:60%' maxlength="100"></td>
<td align="left" bgcolor="#FFFFFF">获取前100字符</td>
</tr>
<tr>
<td align="left" bgcolor="#FFFFFF" colspan="3">作者:<select name="users"><?php echo $newsstr->newssource(0,0)?></select> <a href="#" onclick="showdiv('useradd')">添加</a> <a href="#" onclick="showdiv('userlist')">列表</a> 来源:<select name="sources"><?php echo $newsstr->newssource(1,0)?></select> <a href="#" onclick="showdiv('sourceadd')">添加</a> <a href="#" onclick="showdiv('sourcelist')">列表</a>  <input type="checkbox" name="vips" value="1" /> 推荐 <input type="checkbox" name="headlines" value="1" /> 头条 <input type="checkbox" name="slides" value="1" /> 幻灯 <input type="checkbox" name="tops" value="1" /> 置顶</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息关键字:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='keywords' id='keywords' value='' style='width:60%' maxlength="100"></td>
<td align="left" bgcolor="#FFFFFF">获取前100字符</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息描述:</td>
<td align="left" bgcolor="#FFFFFF">
<textarea name="dis" id="id" rows="4" cols="50"></textarea></td>
<td align="left" bgcolor="#FFFFFF">获取前200字符</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息图片:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='imgs' id='imgs' value='' style='width:60%' maxlength="100"> <a href="#" onclick="winshow('upfile.htm',800,600)">上传图片</a> <a href="#" onclick="winshow('upfilelist.php',800,600)">图片列表</a></td>
<td align="left" bgcolor="#FFFFFF">信息图片</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 所属分类:</td>
<td align="left" bgcolor="#FFFFFF">
<select name="cid">
<?php 
$classstr->classarr();
echo $classstr->classadd();
?>
</select>
</td>
<td align="left" bgcolor="#FFFFFF">所属分类</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td align="left" bgcolor="#FFFFFF" colspan="3">信息内容: <input type="checkbox" name="clearhtml" value="1" /> 清除内容的HTML标签 文章分页代码: {[c9:pagelist]} 请在需要分页的地方插入</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td align="left" bgcolor="#FFFFFF" colspan="3">
<?php 
include_once("../fck/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;//实例化
$oFCKeditor->BasePath = '../fck/';//这个路径一定要和上面那个引入路径一致，否则会报错:找不到fckeditor.html页面
$oFCKeditor->Value = '' ;
$oFCKeditor->Width = '100%' ; 
$oFCKeditor->Height = '300' ; 
$oFCKeditor->Create() ;
?>
</td>
</tr>

</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">
<tr align="center" height="24">
  <td height="30" colspan="3" align="left" bgcolor="#EDF9D5"><b>&nbsp;请按照说明设置.</b></td>
  </tr>
<tr align="center" height="24">
  <td height="30" colspan="3" align="center" bgcolor="#FFFFFF"><input type="submit" name="Submit" value="确定" /> 
    <input type="reset" name="Submit2" value="重置" /></td>
  </tr>
</table>
</form>
</td>
</tr>
</table>
<?php }?>

<?php 
if($rel=='news_info'){
  $id=funstr($_GET["id"]);
  $page=funstr($_GET["page"]);
  $sql=query("select * from ".$dbz."news where id=$id");
  if($row=fetch($sql)){
    if($row["vips"]==1){$vips='checked=\"checked\"';}else{$vips='';};
    if($row["headlines"]==1){$headlines='checked=\"checked\"';}else{$headlines='';};
	if($row["slides"]==1){$slides='checked=\"checked\"';}else{$slides='';};
	if($row["tops"]==1){$tops='checked=\"checked\"';}else{$tops='';};
?>
<div class='bodytitle'><div class='bodytitleleft'></div><div class='bodytitletxt'>信息修改</div></div>
<table width="96%" border="0" cellpadding="0" cellspacing="0" 
	align="center" style="margin-bottom:8px;display:block" id="td1" >
<tr> 
<td>
<form id="form1" name="form1" method="post" action="query.php?rel=news_info">
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">
<tr align="center" height="24">
<td height="30" colspan="3" align="left" bgcolor="#EDF9D5"><b>&nbsp;信息修改</b>    &nbsp;&nbsp;</td>
</tr>
<tr align="center"> 
<td width="20%" height="25" bgcolor="#FFFFFF">变量说明</td>
<td bgcolor="#FFFFFF">变量值</td>
<td width="30%" bgcolor="#FFFFFF">介绍</td>
</tr>  
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息标题:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='titles' id='titles' value='<?php echo $row["titles"] ?>' style='width:60%' maxlength="100"></td>
<td align="left" bgcolor="#FFFFFF">获取前100字符</td>
</tr>
<tr>
<td align="left" bgcolor="#FFFFFF" colspan="3">作者:<select name="users"><option value="<?php echo $row["users"] ?>" selected="selected"><?php echo $row["users"] ?></option><?php echo $newsstr->newssource(0,0)?></select> 来源:<select name="sources"><option value="<?php echo $row["sources"] ?>" selected="selected"><?php echo $row["sources"] ?></option><?php echo $newsstr->newssource(1,0)?></select> <input type="checkbox" name="vips" value="1" <?php echo $vips; ?> /> 推荐 <input type="checkbox" name="headlines" value="1" <?php echo $headlines; ?> /> 头条 <input type="checkbox" name="slides" value="1" <?php echo $slides; ?> /> 幻灯 <input type="checkbox" name="tops" value="1" <?php echo $tops; ?> /> 置顶</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息关键字:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='keywords' id='keywords' value='<?php echo $row["keywords"] ?>' style='width:60%' maxlength="100"></td>
<td align="left" bgcolor="#FFFFFF">获取前100字符</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息描述:</td>
<td align="left" bgcolor="#FFFFFF">
<textarea name="dis" id="id" rows="4" cols="50"><?php echo $row["dis"] ?></textarea></td>
<td align="left" bgcolor="#FFFFFF">获取前200字符</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 信息图片:</td>
<td align="left" bgcolor="#FFFFFF">
<input type='text' name='imgs' id='imgs' value='<?php echo $row["imgs"] ?>' style='width:60%' maxlength="100"></td>
<td align="left" bgcolor="#FFFFFF">信息图片</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td height="30" align="left" bgcolor="#FFFFFF"> 所属分类:</td>
<td align="left" bgcolor="#FFFFFF">
<select name="cid">

<?php 
echo $newsstr->classnewscid($row["cid"],1);
$classstr->classarr();
echo $classstr->classadd();
?>
</select>
</td>
<td align="left" bgcolor="#FFFFFF">所属分类</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td align="left" bgcolor="#FFFFFF" colspan="3">信息内容: <input type="checkbox" name="clearhtml" value="1" /> 清除内容的HTML标签 文章分页代码: {[c9:pagelist]} 请在需要分页的地方插入</td>
</tr>
<tr align="center" height="24" bgcolor="#FFFFFF"> 
<td align="left" bgcolor="#FFFFFF" colspan="3">
<?php 
include_once("../fck/fckeditor.php") ;
$oFCKeditor = new FCKeditor('FCKeditor1') ;//实例化
$oFCKeditor->BasePath = '../fck/';//这个路径一定要和上面那个引入路径一致，否则会报错:找不到fckeditor.html页面
$oFCKeditor->Value = $row["mg"] ;
$oFCKeditor->Width = '100%' ; 
$oFCKeditor->Height = '300' ; 
$oFCKeditor->Create() ;
?>
</td>
</tr>

</table>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">
<tr align="center" height="24">
  <td height="30" colspan="3" align="left" bgcolor="#EDF9D5"><b>&nbsp;请按照说明设置.</b></td>
  </tr>
<tr align="center" height="24">
  <td height="30" colspan="3" align="center" bgcolor="#FFFFFF">
  <input type="hidden" value="<?php echo $page; ?>" name="page" />
  <input type="hidden" value="<?php echo $id; ?>" name="id" />
  <input type="submit" name="Submit" value="确定" /> 
    <input type="reset" name="Submit2" value="重置" /></td>
  </tr>
</table>
</form>
</td>
</tr>
</table>
<?php }}?>

<?php 
if ($rel=='news'){
//信息分页条数
$num=30;
//获取分页
$page=@funstr($_GET["page"]);
$cid=@funstr($_GET["cid"]);
$audit=@funstr($_GET["audit"]);
//$tags=@funstr($_GET["tags"]);
$sqls='';
if($cid<>''){$sqls="where cid=$cid";}
if($audit<>''){$sqls="where audits=0";}
//if($tags<>''){$sqls="where titles link $tags";}
if($page==''){$page=0;}
if($page<0){$page=0;}
//获取信息总数
$newsnum=$newsstr->newsnum($sqls);

?>
<div class='bodytitle'><div class='bodytitleleft'></div><div class='bodytitletxt'>信息管理</div></div>
<form id="form3" name="form3" method="post" action="query.php?rel=news_all">
<table width="96%" border="0" cellpadding="0" cellspacing="0" align="center" style="margin-bottom:8px;display:block" id="td1" >
<tr> 
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">

<tr align="center"> 
<td  height="25" bgcolor="#FFFFFF" align="left">ID</td>
<td bgcolor="#FFFFFF" align="left">标题</td>
<td bgcolor="#FFFFFF" align="left">审/荐/头/幻/置</td>
<td bgcolor="#FFFFFF" align="left">所属分类</td>
<td bgcolor="#FFFFFF" align="left">评论</td>
<td bgcolor="#FFFFFF" align="left">人气</td>
<td bgcolor="#FFFFFF" align="left">顶/踩</td>
<td bgcolor="#FFFFFF" align="left">时间</td>
<td bgcolor="#FFFFFF" align="left">管理</td>
</tr>
<?php 
$list=0;
if ($newsnum==0){
  echo "<tr><td colspan=\"9\"><strong>暂时没有文章.</strong></td></tr>";
}
else{
  //总页数
  
  $list=ceil($newsnum/$num);
  echo $newsstr->newslist($num*$page,$num,$page,$sqls);
}

?>
<tr align="center" height="24">
  <td height="30" align="left" bgcolor="#FFFFFF" colspan="9"><a href="#" onclick="checkbox('checkbox',<?php echo $num; ?>)">全选/取消</a> <input type="hidden" name="i" value="<?php echo $num; ?>" />
  <input type="submit" name="Submit3" value="批量删除" /> 分页: <?php echo $page+1;?>/<?php echo $list;?> <a href="news.php?rel=news&page=0&cid=<?php echo $cid?>&audit=<?php echo $audit;?>">首页</a> <?php if ($page==0){echo "上一页"; }else{ echo "<a href=\"news.php?rel=news&page=".($page-1)."&cid=$cid&audit=$audit\">上一页</a>"; }?> <?php if (($page+1)<$list){echo "<a href=\"news.php?rel=news&page=".($page+1)."&cid=$cid&audit=$audit\">下一页</a>"; }else{ echo "下一页"; }?> <?php if (($page+1)<>$list){echo "<a href=\"news.php?rel=news&page=".($list-1)."&cid=$cid&audit=$audit\">尾页</a>"; }else{ echo "尾页"; }?></form></td>
  </tr>
</table>
</td>
</tr>
</table>
<?php }?>

<?php if($rel=='comments'){
//信息分页条数
$num=30;
$page=@funstr($_GET["page"]);
$nid=@funstr($_GET["nid"]);
$sqls='';
if($nid<>''){$sqls="where nid=$nid";}
if($page==''){$page=0;}
if($page<0){$page=0;}
//获取信息总数
$newsnum=$newsstr->commentsnum($sqls);
?>
<div class='bodytitle'><div class='bodytitleleft'></div><div class='bodytitletxt'>评论管理</div></div>
<form id="form3" name="form3" method="post" action="query.php?rel=comments_all">
<table width="96%" border="0" cellpadding="0" cellspacing="0" align="center" style="margin-bottom:8px;display:block" id="td1" >
<tr> 
<td>
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">

<tr align="center"> 
<td  height="25" bgcolor="#FFFFFF" align="left">ID</td>
<td bgcolor="#FFFFFF" align="left">所属</td>
<td bgcolor="#FFFFFF" align="left">邮箱</td>
<td bgcolor="#FFFFFF" align="left">QQ</td>
<td bgcolor="#FFFFFF" align="left">状态</td>
<td bgcolor="#FFFFFF" align="left">IP</td>
<td bgcolor="#FFFFFF" align="left">内容</td>
<td bgcolor="#FFFFFF" align="left">回复</td>
<td bgcolor="#FFFFFF" align="left">时间</td>
<td bgcolor="#FFFFFF" align="left">管理</td>
</tr>
<?php 
$list=0;
if ($newsnum==0){
  echo "<tr><td colspan=\"10\"><strong>暂时没有评论.</strong></td></tr>";
}
else{
  //总页数
  
  $list=ceil($newsnum/$num);
  echo $newsstr->commentslist($num*$page,$num,$page,$sqls);
}

?>

<tr align="center" height="24">
  <td height="30" align="left" bgcolor="#FFFFFF" colspan="10"><a href="#" onclick="checkbox('checkbox',<?php echo $num; ?>)">全选/取消</a> <input type="hidden" name="i" value="<?php echo $num; ?>" />
  <input type="submit" name="Submit3" value="批量删除" /> 分页: <?php echo $page+1;?>/<?php echo $list;?> <a href="news.php?rel=comments&page=0&nid=<?php echo $nid?>">首页</a> <?php if ($page==0){echo "上一页"; }else{ echo "<a href=\"news.php?rel=comments&page=".($page-1)."&nid=$nid\">上一页</a>"; }?> <?php if (($page+1)<$list){echo "<a href=\"news.php?rel=comments&page=".($page+1)."&nid=$nid\">下一页</a>"; }else{ echo "下一页"; }?> <?php if (($page+1)<>$list){echo "<a href=\"news.php?rel=comments&page=".($list-1)."&nid=$nid\">尾页</a>"; }else{ echo "尾页"; }?></form></td>
  </tr>
</table>
</td>
</tr>
</table>
<?php }?>

<?php if ($rel=='comments_replys'){
$id=funstr($_GET["id"]);
$sql=query("select * from ".$dbz."comments where id=$id");
if($row=fetch($sql)){
?>
<div class='bodytitle'><div class='bodytitleleft'></div><div class='bodytitletxt'>回复评论</div></div>
<table width="96%" border="0" cellpadding="0" cellspacing="0" 
	align="center" style="margin-bottom:8px;display:block" id="td1" >
<tr> 
<td>
<form id="form1" name="form1" method="post" action="query.php?rel=comments_replys">
<table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#E2F5BC" class="sysinfo">
<tr align="center"> 
<td width="20%" height="25" bgcolor="#FFFFFF" align="left">回复评论:</td>
<td bgcolor="#FFFFFF" align="left"><textarea name="replys" rows="5" cols="50"><?php echo $row["replys"]; ?></textarea></td>
<td width="30%" bgcolor="#FFFFFF" align="left">200字内</td>
</tr> 
  <tr align="center" height="24">
  <td height="30" bgcolor="#FFFFFF" colspan="3" align="center">
  <input type="hidden" name="id" value="<?php echo $row["id"]; ?>" />
  <input type="submit" name="Submit3" value="确定" />
      <input type="reset" name="Submit2" value="重置" />
  </td>
  </tr>
</table>
</form>
</td>
</tr>
</table>
<?php }}?>

<?php mysql_close();?>
</body>
</html>