📄 gbook.php
字号:
<?
/* ----------------------------------------------------
-------------------------------------------------------- */
?>
<?
require("config.php");
if (empty($user)) { $user="admin"; }
?>
<html>
<head>
<title><? echo $gbookname; ?></title>
<style type="text/css">
<!--
a:hover { font-family: "宋体"; font-size: 12px; color: #0000FF; text-decoration: none}
a:link { font-family: "宋体"; font-size: 12px; text-decoration: none; color: #333333}
a:visited { font-family: "宋体"; font-size: 12px; text-decoration: none; color: #333333}
td { font-family: "宋体"; font-size: 12px}
-->
</style>
</head>
<script language=javascript>
<!--
function mOvr(src){ if (!src.contains(event.fromElement)){src.bgColor = '#ffFFFF';src.children(0).style.color='#000000'}}
function mOut(src){ if (!src.contains(event.toElement)){src.bgColor = '#ebebeb';src.children(0).style.color='#000000'}}
-->
</script>
<body topMargin=5 bgcolor="#ffffff" text="#000000" link="#4682B4" vlink="#4682B4" background="img/lines.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0" align=center>
<tr>
<td width="15"><img alt="" src="img/imac_scrn_1.gif" width="15" height="16" /></td>
<td background="img/imac_scrn_3.gif" width="100%"><img alt=""
src="img/spacer.gif" width="10" height="16" /></td>
<td width="16"><img alt="" src="img/imac_scrn_5.gif" width="16" height="16" /></td>
</tr>
<tr>
<td width="15" background="img/imac_scrn_9.gif"><img alt=""
src="img/spacer.gif" width="15" height="60" /></td>
<td align="center">
<table width="100%" bgcolor="#000000" border="0" cellspacing="1" cellpadding="1" align="center">
<tr>
<td height="20" align="center" background="img/lines.gif">
<img src=img/guestbook.gif border=0 width=200 height=16 title=留言本>
</td>
</tr>
<tr>
<td background="img/lines.gif">
<? echo $gbookad; ?>
</td>
</tr>
</table>
</td>
<td width="16" background="img/imac_scrn_10.gif"><img alt=""
src="img/spacer.gif" width="15" height="60" /></td>
</tr>
<tr>
<td width="15"><img alt="" src="img/imac_scrn_13.gif" width="15" height="16" /></td>
<td background="img/imac_scrn_14.gif" width="100%"><img alt=""
src="img/spacer.gif" width="10" height="16" /></td>
<td width="16"><img alt="" src="img/imac_scrn_11.gif" width="16" height="16" /></td>
</tr>
</table>
<table width="100%" height="6" border="0" cellspacing="0" cellpadding="0">
<tr><td></td></tr></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15"><img alt="" src="img/imac_scrn_1.gif" width="15" height="16" /></td>
<td background="img/imac_scrn_3.gif" width="100%"><img alt=""
src="img/spacer.gif" width="10" height="16" /></td>
<td width="16"><img alt="" src="img/imac_scrn_5.gif" width="16" height="16" /></td>
</tr>
<tr>
<td width="15" background="img/imac_scrn_9.gif"><img alt=""
src="img/spacer.gif" width="15" height="60" /></td>
<td align="center">
<?
function show(){
global $offset,$user,$pagesize;
$pathname="gbook.php";
@$msg=file("data/$user");
if ($msg){
$total=count($msg);
$counter=0;
$lpp=$pagesize;
if ($dir=="") { $dir="下一页"; }
if ($offset<=0) { $offset=0; }
if ($dir=="下一页") {
if ($total > $lpp) {
$counter=$offset;
$offset+=$lpp;
$num=$offset;
if ($num > $total) {
$num=$total; } }
else {
$num=$total; } }
elseif ($dir=="上一页") {
if ($total > $lpp){
$offset-=$lpp;
if ($offset < 0){ $offset=0; }
$counter=$offset-$lpp;
if ($counter < 0){ $counter=0; }
$num=$counter+$lpp; }
else {
$num=$total; } }
$page_num=ceil($total/$lpp);
$preoffset=$offset-$lpp-$lpp;
$nextoffset=$offset;
print "<table border=0 cellpadding=0 cellspacing=1 width=100%>
<tr><td>总计留言".$total."条 跳到第 ";
for($z=1;$z<=$page_num;$z++)
{$offset=($z-1)*$pagesize; echo "<a href='$pathname?user=$user&offset=$offset'>$z</a>"."\n";}
print "页";
if ($total > $lpp) {
if ($nextoffset > $lpp) {
print "<a href=\"$pathname?user=$user&offset=$preoffset\">上一页</a>\n"; }
if ($nextoffset < $total) {
print "<a href=\"$pathname?user=$user&offset=$nextoffset\">下一页</a>"; }}
print " <a href=\"#write\"><font color=brown>签写留言</font></a></td></tr></table>\n";
print "<table border=0 cellpadding=2 cellspacing=0 bordercolorlight=#008000
bordercolordark=#FFFFFF width=100%> ";
while ($counter<$num){
list($time,$name,$url,$text,$mail,$oicq,$date,$img,$ip)=explode("|",$msg[$counter]);
print "<table border=0 cellPadding=3 cellSpacing=1 height=8 width=\"98%\" align=\"center\" bgcolor=\"#000000\">
<tr>
<td bgcolor=#f7f7f7 rowSpan=3 valign=top width=155>
<table border=0 cellPadding=4 cellSpacing=0 width=\"100%\" style=\"WORD-BREAK: break-all\">
<tr>
<td align=middle width=\"41%\"><font color=#000000> </font></td>
<td align=middle width=\"17%\"><font color=#000000><img height=60 src=\"img/$img.gif\" width=60></font></td>
<td align=middle width=\"42%\"> </td>
</tr>
</table>
<P>姓名: <font color=#000000>$name</font><br>
来自: <font color=#000000>$ip</font><br>
邮件:<a href=\"mailto:$mail\" title=给".$name."发信>
<img border=0 src=\"coin/mail.gif\" width=\"15\" height=\"15\"> 邮件</a><br>
主页:<a href=\"$url\" target=_blank title=访问".$name."的主页>
<img border=0 src=\"coin/home.gif\" width=\"16\" height=\"16\"> 主页</a><br>
</P></td>
<td bgcolor=#ffffff width=503> <img height=16 src=\"coin/del.gif\" width=16>
发表于:$date
<tr style=\"WORD-BREAK: break-all\">
<td onMouseOver=mOvr(this) onMouseOut=mOut(this); bgcolor=#ebebeb width=503 height=68 valign=\"top\" style=\"WORD-BREAK: break-all\"><font face=宋体>$text</font>
<tr>
<td bgcolor=#f7f7f7 width=503> <a href=\"mailto:$mail\" title=给".$name."发信>
<img border=0 src=\"coin/mail.gif\" width=\"15\" height=\"15\"> 邮件</a>
<a href=\"$url\" target=_blank title=访问".$name."的主页> <img border=0 src=\"coin/home.gif\" width=\"16\" height=\"16\"> 主页</a>
<img alt=".$name."的OICQ:".$oicq." height=16 src=\"coin/oicq.gif\" width=16> OICQ
<img alt=".$name."的IP地址是:".$ip." border=0 height=15 src=\"coin/ip.gif\" width=13> IP
<a href='reply.php?user=$user&id=$time' title=回复该留言>
<img border=0 src=\"coin/replay.gif\"> 回复</a>
<a href='del.php?user=$user&id=$time' title=删除该留言>
<img border=0 src=\"coin/del.gif\"> 删除</a></td>
</tr>
</table>";
$counter++;
}
print "<table border=0 cellpadding=0 cellspacing=1 width=98%>
<tr><td>总计留言".$total."条 跳到第 ";
for($z=1;$z<=$page_num;$z++)
{$offset=($z-1)*$pagesize; echo "<a href='$pathname?user=$user&offset=$offset'>$z</a>"."\n";}
print "页";
if ($total > $lpp) {
if ($nextoffset > $lpp) {
print "<a href=\"$pathname?user=$user&offset=$preoffset\">上一页</a>\n"; }
if ($nextoffset < $total) {
print " <a href=\"$pathname?user=$user&offset=$nextoffset\">下一页</a>"; }}
print " </TD>";
print "</table>";
}else{
echo "还没有留言或无此用户";
exit();
}
}
show();
?>
<div align=center>
<form method="post" action="saveadd.php?user=<? echo $user; ?>">
<table width="98%" border="0" cellspacing="1" cellpadding="4" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#000000">
<tr bgcolor="#ebebeb">
<td width="10%" align="center" nowrap>你的大名:<a name="write"></a></td>
<td width="40%">
<input type="text" maxlength="10" name="name" size="32" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
<font color="#FF0000">必须</font>
</td>
<td width="10%" align="center" nowrap>你的邮件:</td>
<td width="40%">
<input maxlength="30" type="text" name="mail" size="35" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="@">
</td>
</tr>
<tr bgcolor="#ebebeb">
<td align="center" nowrap width="10%">你的OICQ:</td>
<td width="40%">
<input maxlength="10" type="text" name="oicq" size="32" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
</td>
<td width="10%" align="center" nowrap height="12">你的主页:</td>
<td width="40%" height="12">
<input type="text" name="url" size="35" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''" value="http://">
</td>
</tr>
<tr bgcolor="#ebebeb">
<td align="center" nowrap width="10%">留言内容:
<p><font color="#FF0000">必须</font></p>
</td>
<td align="left" width="40%">
<textarea name="text" cols="33" rows="6" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''"></textarea>
</td>
<td align="center" nowrap height="2" width="10%">选择图案:</td>
<td nowrap height="2" width="40%">
<input type="radio" name="img" value="0" checked>
<img src="img/0.gif" width="60" height="60">
<input type="radio" name="img" value="1">
<img src="img/1.gif" width="60" height="60">
</td>
</tr>
<tr bgcolor="#ebebeb">
<td align="center" nowrap colspan="4">
<input maxlength="1000" type="submit" name="Submit" value="添 加" style="color: #000000; background-color: #EEEEF8; border-style: solid; border-width: 0" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='EEEEF8'">
<input type="reset" name="Submit2" value="取 消" style="color: #000000; background-color: #EEEEF8; border-style: solid; border-width: 0" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='EEEEF8'">
</td>
</tr>
</table>
</form></div>
<table width="98%" border="0" cellspacing="1" cellpadding="4" align="center" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="#000000">
<tr bgcolor="#ebebeb">
<form action=search.php?user=<? echo $user; ?> method=post>
<td bgcolor="#ebebeb" height=34 width="100%">
<p align=center><FONT SIZE=2>搜索关键字:</FONT>
<input name=key size="12" maxlength="20" style="background-color:#ffffff; color:#8888AA; border: 1 double #B4B4B4" onMouseOver = "this.style.backgroundColor = '#E5F0FF'" onMouseOut = "this.style.backgroundColor = ''">
<input name=submit type=submit value=留言搜索 style="color: #000000; background-color: #EEEEF8; border-style: solid; border-width: 0" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='EEEEF8'">
</p>
</td>
</form>
</tr>
<br>
</td>
</tr>
</table>
</td>
<td width="16" background="img/imac_scrn_10.gif"><img alt=""
src="img/spacer.gif" width="15" height="60" /></td>
</tr>
<tr>
<td width="15"><img alt="" src="img/imac_scrn_13.gif" width="15" height="16" /></td>
<td background="img/imac_scrn_14.gif" width="100%"><img alt=""
src="img/spacer.gif" width="10" height="16" /></td>
<td width="16"><img alt="" src="img/imac_scrn_11.gif" width="16" height="16" /></td>
</tr>
</table>
<div align="center">
<center>
<table width="20%" cellspacing="0" cellpadding="0">
<tr>
<td height="36" colspan="2" align="center" width="673">程序提供:<A HREF="http://yesoo.cpgl.net/" target=_blank><font color="#acacac">
砀山网盟</font></a></td>
</tr>
</table>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -