【php开源代码栏目提醒】:网学会员在php开源代码频道为大家收集整理了class_add.php提供大家参考,希望对大家有所帮助!
<?
session_start();//建立seesion
if(session_is_registered("tsc_sess") && session_is_registered("id_sess")){
//有验证
}
else{
//无经过验证
session_destroy();
header("location:boss.htm");
}
?>
<?
// 导入两个数据库组件 BEGIN
include("db_conn.php");
include("db_func.php");
// 导入两个数据库组件 END
// 取出留言数据并依发布时间递减排序的 SQL 语法
$SQLStr = "SELECT * FROM book ORDER BY time DESC";
$res = db_query($SQLStr); // 执行 SQL 命令
?>
<head>
<style type="text/css">
<!--
body {
background-image: url(imagg/c_p.gif);
}
-->
</style>
<title>删除留言</title></head>
<body b
gproperties="fixed">
<STYLE>
<!--
BODY
{
SCROLLBAR-FACE-COLOR: #fcb4d8;
SCROLLBAR-HIGHLIGHT-COLOR: #fcfcfc;
SCROLLBAR-SHADOW-COLOR: #fcfcfc;
SCROLLBAR-3DLIGHT-COLOR: #fcb4d8;
SCROLLBAR-ARROW-COLOR: #fc6cd8;
SCROLLBAR-TRACK-COLOR: #fcd8fc;
SCROLLBAR-DARKSHADOW-COLOR: #fcb4d8;
SCROLLBAR-BASE-COLOR: #fcd8d8
}
-->
</STYLE>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<p><img src="imagg/4.gif" width="324" height="103"></p>
<table width="375" height="36" border="0" align="center">
<tr>
<td bgcolor="#E474C9" width="300">
<div align="center"><font color="#FF0033" size="+2"><marquee behavior=scroll>
<font color="#FFFFFF" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong>欢迎使用留言版管理</strong> </font>
</marquee>
</font></div> </td>
<td bgcolor="#E783CE" width="30"> </td>
<td bgcolor="#EA95D5" width="20"> </td>
<td bgcolor="#F1B8E3" width="7"> </td>
<td bgcolor="#F4CCEB" width="3"> </td>
</tr>
</table>
<br>
<table width="378" border="0" align="center">
<tr bordercolor="#F1B8E3">
<td width="35">
<div align="center"><font color="#0099FF" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong>─</strong></font></div></td>
<td width="80">
<div align="center"><font color="#000000" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong><a href="boss_message_del.php">删除留言</a></strong></font></div></td>
<td width="35">
<div align="center"><font color="#0099FF" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong>─</strong></font></div></td>
<td width="100"><font color="#000000" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong><a href="boss_message.php">留言板管理</a></strong></font></td>
<td width="35">
<div align="center"><font color="#0099FF" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong>─</strong></font></div></td>
<td width="80"><font color="#000000" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong><a href="boss_index.php">回管理页</a></strong></font></td>
<td width="35"><div align="center"><font color="#0099FF" face="正谦樱桃小丸子字, 细明体, 标楷体"><strong>─</strong></font></div></td>
</tr>
</table>
<?
if (db_num_rows($res)>0) // 若数据表中有数据
{
$num = db_num_rows($res); // 取得数据笔数
$check = $p+10; // 每页抓取 10 笔数据
// 呈现留言列表的字段内容 BEGIN
for ($i=1;$i<=$num;$i++) // 用来呈现多笔留言数据的回圈
{
$row = db_fetch_array($res);
// 选取第 $p 笔到 $check 笔数据
if ($i>=$p && $i<$check)
{
echo "<form action=message_del.php method=post>
<center>
<table width=600 border=0>
<tr>
<td width=150 scope=col><font size=2 color=#003366>主题:</font><font size=2 color=#FF3300>".$row['m_title']."</font></td>";
if ($row['talk_user']=='悄悄话')
{
echo "<td width=469 rowspan=3 scope=col><font size=2 color=#ff0000>".$row['content']."</font>";
}
else
{
echo "<td width=469 rowspan=3 scope=col>".$row['content']."</td></tr>";
}
echo " <tr>
<td scope=row><font size=2 color=#3399FF>发言人:<font color=#666666
size=2>".$row['name']."</td>
</tr>
<tr>
<td rowspan=2 scope=col><font size=2 color=#003366><img src=".$row['img']." width =100 height =110><br><font color=Green size=2>文章编号:".$row['id']."
</td>
</tr>
<tr>
<td scope=row><font size=2>".$row['time']." <font color=#003366>来自:</font><font color=#CCCCCC>".$row['ip']."</font>
";
echo "<input type=checkbox name=chkbox[] value='".$row['id']."'></td></tr></table></p></P>";
echo "<img src=imagg/line.gif>";
$j = $i+1;
}
}
// 呈现留言
列表的字段内容 END
}
?>
<td align="center">
<div align="center">
<input type="submit" name="Submit" value="删除留言">
</div>
<table width="406" border="0" align="center">
<tr bordercolor="#FF99CC">
<td align="center">
<!--- 将 p 值设为 0, 让模组从第一笔数据开始抓取 ---->
<a href="boss_message_del.php">第一