打印本文 打印本文  关闭窗口 关闭窗口
PHP+MYSQL的文章管理系统(二)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005/9/10 14:29:59
sp;      </TR>
        </TBODY>
      </TABLE>
    </TD></TR>
    <TR vAlign=top>
    <TD class=tenpt>
<?
if($data[locked]<>0)
{
  echo "<img src=images/lock.gif>对不起!本文已经被管理员锁定!";
}
else
  if($data[html]==1)
     highlight_string($data[cont]);
  else
     echo nl2br($data[cont]);
?>
      </TD>
  </TR>
  </TBODY></TABLE>
<table bordercolor=#339933 cellspacing=0 bordercolordark=#ffffff
cellpadding=0 align=center bordercolorlight=#000000 border=1 width=545>
  <tbody>
<TR bgColor=#cccccc>
    <th>
      <DIV align=center>发表评论</DIV>
    </th>
  </TR>
  <tr>
    <td>
<form name="form1" method="post" action="ping.php" onsubmit="return go()">
        您的姓名:
        <input type="text" name="name" class="border">
       &nbsp;&nbsp;您的电子邮件:
        <input type="text" name="mail" size=20 class="border">
        仅站长可见:<input type="checkbox" name="pub" value="<? echo $data[title];?>">
        <input type="hidden" name="p_id" value="<? echo $id;?>">
        <br>
        发表评论:
        <textarea name="cont" rows="8" cols="85"></textarea>
        <br>
        <br>
        <center>
          <input type="submit" name="Submit" value="提交" class="border">
          <input type="reset" name="Submit2" value="重写" class="border">
        </center></form>
        </td>
  </tr>
  <TR bgColor=#cccccc>
    <th>
      <DIV align=center>相关评论</DIV>
    </th>
  </TR>
  <tr>
  <td>
<?  $query="select * from $ping_tab where p_id='$id' order by time desc";
  $res=mysql_db_query("$database",$query);
  if(mysql_num_rows($res)>0)
   {$i=1;
   while($ping=mysql_fetch_array($res))
    echo "评论人:$ping[name]   电子邮件:$ping[mail]<br>&nbsp;&nbsp;".nl2br($ping[p_cont])."<br>时间:$ping[time]  来自:$ping[ip]<hr size=1>n" ;
   }
   else
   echo "暂时没有本文章的相关评论!";
  ?>
  </td>
  </tr>
  <tr bgcolor=#cccccc>
    <td>
      <div align=center><a
  href="javascript:window.close()">关闭窗口</a></div>
    </td>
  </tr>
  </tbody>
</table>
<?require "./inc/footer.inc";?> 

上一页  [1] [2] [3] 



打印本文 打印本文  关闭窗口 关闭窗口