当前位置:编程学习 > php >>

杏林同学录(九)

班级成员留言簿管理: class/notebook/delnote.php(做为现在的主流开发语言)
<?php(做为现在的主流开发语言)
session_start();
if(!session_is_registered("superlogin"))//检查是否注册
{
echo "<a href=../../superadmin.php(做为现在的主流开发语言)>请重新进行管理员登陆<BR>";
exit;
}
include ("../config.php(做为现在的主流开发语言)");
if($del==1){       //判断是否要删除
MySQL(和PHP搭配之最佳组合)_query("delete from notebook where time=$time",$db); //以留言时间为删除标志
echo "删除成功!";
}
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<TITLE>删除留言</TITLE>
<style type="text/css">
<!--
.blue9 {  font-size: 9pt; color: #0099FF; text-decoration: none}
.black9 {  font-size: 9pt; text-decoration: none}
.purple10 {  font-size: 10pt; color: #9900FF; text-decoration: none}
.white12 {  font-size: 12pt; color: #FFFFFF; text-decoration: none}
a:visited {  color: #FFFFFF}
a:link {  color: #FFFFFF}
-->
</style>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<?php(做为现在的主流开发语言)
$result = MySQL(和PHP搭配之最佳组合)_query("SELECT * FROM notebook",$db);
$row=MySQL(和PHP搭配之最佳组合)_num_rows($result);//查看结果有多少行
$max=$row; //帖子总数
//设每页显示10篇,$p总页数,$page第几页,$low 从第几行开始读,$x 读取几行
if (!$page){$page=1;}
$p=ceil($max/10);
$low=10*($page-1);
if($page==$p&&($max%10)<>0){$x=($max%10);} else {$x=10;}//如果是最后一页,且不是10的整倍数,读取$max除以10的余数,否则取10
if($max==0){$x=0;}//如果没有帖子,$x取0
$result = MySQL(和PHP搭配之最佳组合)_query("select * from notebook ORDER BY time DESC limit $low,$x",$db);
?>
<table width="98%" border="0" cellspacing="0" cellpadding="0" height="61">
  <tr>  
    <td height="62" width="34%"><img src="/edu/UploadPic/2008-2/2008215175819432.gif"" width="224" height="60" border="0"></td>
    <td height="62" width="66%">  
      <div align="center"><img src="/edu/UploadPic/2008-2/2008215175819247.gif"" width="410" height="60"><img src="/edu/UploadPic/2008-2/2008215175819829.gif"" width="60" height="60"></div>
    </td>
  </tr>
</table>
<table width="95%" border="1" cellspacing="0" cellpadding="0" height="253" bordercolordark="#FFFFFF" bordercolorlight="#003399" align="center">
  <tr>  
    <td height="250">
      <table width="95%" border="0" cellspacing="0" cellpadding="0" height="32" bgcolor="#3366FF">
        <tr>  
          <td width="28%" class="white12"><a href="../guest.php(做为现在的主流开发语言)" class="white12">首页</a>  
            > <a href="index.php(做为现在的主流开发语言)" class="white12">留言簿</a></td>
补充:Web开发 , php ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,