📄 qijibook.php
字号:
<input type="submit" name="submitadd" value="提交" style='background-color:white;color:#000000;border:1 double'>
<input type="reset" name="submit2" value="清空" style='background-color:white;color:#000000;border:1 double'>
</p>
</form>
</div>
</td>
</tr>
<tr>
<td width="454"> </td>
</tr>
</table>
</div>
</body>
</html>
<?}}
elseif ($action=="reply")
{
if ($submitreply)
{
if ($name==$admin[name] and $password==$admin[password])
{ $fp=@file("$admin[path]/message");$t=1;
$n=count($fp);
for ($i=$n;$i>=0;$i--)
if ($t!=0)
{ $info=$fp[$i];
$arr=explode ("|",$info);
if ($arr[0]==$num) { $t=0;$replymessage=str($replymessage);
$arr[reply]=$replymessage."\n";
$info=str_replace("\n","",$info);
$newinfo=$info."|".$arr[reply];
$fp[$i]=$newinfo;
$fp1=fopen ("$admin[path]/message","w");
for ($j=0;$j<$n;$j++) fputs ($fp1,"$fp[$j]");
fclose($fp1); }
}
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
echo "<HTML><HEAD><TITLE>回复留言</TITLE>";
echo "<META content=\"text/html; charset=gb2312\" http-equiv=Content-Type>";
echo "<link rel=\"stylesheet\" href=\"style.css\">";
echo "<meta HTTP-EQUIV=\"REFRESH\" CONTENT=\"2;URL=$admin[url]\">";
echo "</head><body topmargin=\"0\"><br>";
echo "<ul>回复留言成功,即将返回留言簿首页.<br>";
echo " <br>请等待 系统正在创建这个新的页面...<br>";
echo " <br></font>";
echo "<a href='$admin[url]'>如果你的浏览器没有自动的返回到留言簿首页,或者你不想再等待,请点这里返回.";
echo "</font></a></ul>";
}
else { showerror("用户名或密码错误,没有管理员权限!"); }
}
else { ?>
<html>
<head>
<title>回复留言(版主才能回复)</title>
<link rel="stylesheet" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<table width="512" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="512">
<div align="center">
<h1>回复留言</h1>
</div>
</td>
</tr>
<tr>
<td width="512">
<div align="center">-------------------------------------------------------------------------------------
<form name="reply" action="<?echo "$PHP_SELF?action=reply&num=$num";?>" method="post" >
<table width="512" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="143">
<div align="right">版主ID:</div>
</td>
<td width="360">
<input type="text" name="name">
</td>
</tr>
<tr>
<td width="143">
<div align="right">版主密码:</div>
</td>
<td width="360">
<input type="password" name="password">
</td>
</tr>
<tr>
<td valign="top" width="143">
<div align="right">回复内容:</div>
</td>
<td width="360">
<textarea name="replymessage" cols="50" rows="8"></textarea>
</td>
</tr>
</table>
<p align="center">
<input type="submit" name="submitreply" value="提交" style='background-color:white;color:#000000;border:1 double'>
<input type="reset" name="Submit2" value="清空" style='background-color:white;color:#000000;border:1 double'>
</p>
</form>
</div>
</td>
</tr>
<tr>
<td width="454"> </td>
</tr>
</table>
</div>
</body>
</html><?}
}
elseif ($action=="del")
{ if ($submitdel)
{if ($name==$admin[name] and $password==$admin[password])
{ $fp=@file("$admin[path]/message");
$n=count($fp);
for ($i=0;$i<$n;$i++)
{ $arr=$fp[$i];
$info=explode("|",$arr);
if ($info[0]==$num)
{
for ($j=$i;$j<$n;$j++)
{
$fp[$j]=$fp[$j+1];
$arr1=$fp[$j];
$info=explode("|",$arr1);
$info[0]=$j+1;
$newinfo=implode("|",$info);
$fp[$j]=$newinfo;
}
}
}
$fp1=fopen ("$admin[path]/message","w");
for ($i=0;$i<$n-1;$i++) {fputs ($fp1,"$fp[$i]");}
fclose($fp1);
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">";
echo "<HTML><HEAD><TITLE>删除留言</TITLE>";
echo "<META content=\"text/html; charset=gb2312\" http-equiv=Content-Type>";
echo "<link rel=\"stylesheet\" href=\"style.css\">";
echo "<meta HTTP-EQUIV=\"REFRESH\" CONTENT=\"2;URL=$admin[url]\">";
echo "</head><body topmargin=\"0\"><br>";
echo "<ul>删除留言成功,即将返回留言簿首页.<br>";
echo " <br>请等待 系统正在创建这个新的页面...<br>";
echo " <br></font>";
echo "<a href='$admin[url]'>如果你的浏览器没有自动的返回到留言簿首页,或者你不想再等待,请点这里返回.";
echo "</font></a></ul>";
}
else { showerror("密码错误,不允许删除!"); }
}
else {?>
<html>
<head>
<title>删除留言</title>
<link rel="stylesheet" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<div align="center"><h1>删除留言</h1>
<form name="del" action="<? echo "$PHP_SELF?action=del&num=$num"; ?>" method="post" >
<table width="512" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2">-------------------------------------------------------------------------------------</td>
</tr>
<tr>
<td width="242">版主ID:
<input type="text" name="name">
</td>
<td width="270">版主密码:
<input type="password" name="password">
</td>
</tr>
<tr>
<td colspan="2" height="7">-------------------------------------------------------------------------------------</td>
</tr>
<tr>
<td colspan="2" height="33">
<div align="center">
<input type="submit" name="submitdel" value="删除" style='background-color:white;color:#000000;border:1 double'>
</div>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?}}
else {?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style.css">
<title><?echo $admin[bbsname];?></title>
</head>
<body bgcolor="#ffffff">
<div align="center">
<table width="512" border="0" cellspacing="0" cellpadding="0" height="105">
<tr>
<td colspan="4" height="69">
<div align="center">
<h1><font face="Comic Sans MS">jlqiji.wo.to</font><font face="宋体"></font></h1>
</div>
</td>
</tr>
<tr>
<td height="15">
<div align="center"><a href="<? echo "$admin[url]?action=add";?>">[我要留言]</a></div>
</td>
<td height="15">
<div align="center"><a href="http://molicool.51.net/luxingyun.htm">[站长照片]</a></div>
</td>
<td height="15">
<div align="center"><a href="mailto:<?echo $admin[email];?>">[联系版主]</a></div>
</td>
<td height="15">
<div align="center"><a href="<? echo $admin[home];?>">[返回主页]</a></div>
</td>
</tr>
</table>
<table width="512" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>-------------------------------------------------------------------------------------</td>
</tr>
</table>
<?
$fp=@file("$admin[path]/message") or die ("无法打开文件");
$total=count($fp);
if ($total<=$admin[page])
{
for($i=$total-1;$i>=0;$i--)
{
$line=$fp[$i];
messageshow($line);
}
}
else
{
$pages=intval($total/$admin[page]);
if (($total%$admin[page])!=0) $pages++;
if (isset($topage))
{
if ($topage>$pages) $page=$pages;
else $page=$topage;
}
if (!isset($page))
$page=1;
//计算记录偏移量
$offset=$admin[page]*($page-1);
//循环显示
$j=$total-$offset-$admin[page];
if ($j<0) $j=0; //判断数组是否到末尾
for ($i=$total-$offset-1;$i>=$j;$i--)
{ $line=$fp[$i];
messageshow($line);
}?>
<table width="512" border="0" cellspacing="0" cellpadding="0" style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all; WORD-WRAP: break-word">
<tr>
<td><div align="center">
<?
for ($i=1;$i<$page;$i++)
echo "<a href='$admin[url]?page=".$i."'>第".$i."页</a> ";
echo "第".$page."页 ";
for ($i=$page+1;$i<=$pages;$i++)
echo "<a href='$admin[url]?page=".$i."'>第".$i."页</a> ";
//显示转到页数
echo "<form action='$admin[url]' method='post'> ";
//计算首页、上一页、下一页、尾页的页数值
$first=1;
$prev=$page-1;
$next=$page+1;
$last=$pages;
if ($page>1)
{
echo "<a href='$admin[url]?page=".$first."'>首页</a> ";
echo "<a href='$admin[url]?page=".$prev."'>上一页</a> ";
}
if ($page<$pages)
{
echo "<a href='$admin[url]?page=".$next."'>下一页</a> ";
echo "<a href='$admin[url]?page=".$last."'>尾页</a> ";
}
echo "转到<input type=text name='topage' size='2' value=".$page.">页";
echo "<input type=submit name='more' value='Go' style='background-color:white;color:#000000;border:1 double'>";
echo "</form>"; ?>
</div></td>
</tr>
</table><?
}
echo $admin[copyright]." 程序:魔力闪客~~Ten QQ:21236157";
}
echo"<body background=../lai/00_rsbg.gif>";
?>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -