📄 gb.php
字号:
<?php
function index($lines,$no){
global $admin,$config;
list($line[id],$line[name],$line[goss],$line[number],$line[email],$line[url],$line[face],$line[emot],$line[locale],$line[ip],$line[content],$line[time],$line[hid],$line[tz],$line[reply],$line[rytime],$line[uptime],$line[recy])=explode("\t",$lines);
$time = date("Y-m-d.H:i",$line[time]);
if($line[number] <> ""){
if($line[goss] == 2){
$href="<a href=\"#\" title=\"MSN:${line[number]}\">";
}elseif($line[goss] == "qq" or $line[goss] == 3){
$href="<a href=\"http://search.tencent.com/cgi-bin/friend/user_show_info?ln=${line[number]}\" target=\"_blank\" title=\"OICQ:${line[number]}\">";
}elseif($line[goss] == 4){
$href="<a href=\"#\" title=\"雅虎通:${line[number]}\">";
}elseif($line[goss] == 5){
$href="<a href=\"#\" title=\"网易泡泡:${line[number]}\">";
}elseif($line[goss] == 6){
$href="<a href=\"#\" title=\"朗玛UC:${line[number]}\">";
}elseif($line[goss] == 7){
$href="<a href=\"#\" title=\"E话通:${line[number]}\">";
}else{
$href="<a href=\"#\" title=\"ICQ:${line[number]}\">";
}
$goss = $href."即时通讯</font>";
}else{
$goss="<font color=\"#C0C0C0\">即时通讯</font>";
}
if($line[email] <> ""){
$email = encodemail($line[email]);
$mail="<a href=\"mailto:${email}\" title=\"E-Mail:${email}\">电子邮件</a>";
}else{
$mail="<font color=\"#C0C0C0\">电子邮件</font>";
}
if($line[url] <> "")
$url="<a href='http://${line[url]}' title=\"Home:http://${line[url]}\" target='_blank'>主页地址</a>";
else
$url="<font color=\"#C0C0C0\">主页地址</font>";
if($line[hid] == "on")
$cwqqh = "<font face=\"Wingdings\" color=\"#008000\" title=\"这是给你的悄悄话\">(</font> ";
else
$cwqqh = "";
if($config[ubb])
$content = ubb($line[content]);
else
$content = ereg_replace("\[br\]"," ",$line[content]);
$checkbox = "";
if($admin) $checkbox = "<input type=\"checkbox\" name=\"id[]\" value=\"$line[id]\">";
if($line[name] == $config[bookbz])
$guecol = "#B6FCC2";
else
$guecol = "#FFFFFF";
if($line[uptime] <> "")
$edit = ' <img border="0" src="images/xg.gif" width="7" height="9" alt="版主编辑:'.date("Y-m-d.H:i",$line[uptime]).'">';
else
$edit = "";
if($no == 0){
$mno = "<font color=\"#0000FF\">固顶留言</font>";
$topcolor = "#9FC5FD";
}else{
$mno = "NO:".$no;
$topcolor = "#D5D5D5";
}
print <<<index
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#4F4F4F" width="100%">
<tr>
<td width="20%" bgcolor="#EFEFEF" valign="top">
<table border="0" cellpadding="2" cellspacing="0" width="100%">
<tr>
<td width="100%" align="center" class="shadow" height="49">
<img border="0" src="images/face/face${line[face]}.gif" width="32" height="32" alt="头像"></td>
</tr>
<tr>
<td width="100%" style="filter:glow(color=${guecol},direction=135)" align="center"><font color="#33AAFF" title="称呼">${line[name]}</font></td>
</tr>
<tr>
<td width="100%" align="center">$checkbox</td>
</tr>
index;
if($admin){
if($line[recy] != "") echo "<tr><td width=\"100%\" align=\"center\"><font color=\"#CC0033\">已被回收</font></td></tr>";
}
print <<<index
</table>
</td>
<td width="80%" bgcolor="#FFFFFF" valign="top">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="100%" bgcolor="#EFEFEF">
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="16%" class="shadow" align="center">${url}</td>
<td width="16%" class="shadow" align="center">${mail}</td>
<td width="14%" class="shadow" align="center">${goss}</td>
<td width="34%" align="right">
index;
if($admin){
$nrhgt = "70";
$ip = $line[ip];
echo "〖 ";
if(($line[hid] <> "on")or($line[email] != "")){
echo "<a href=\"reply.php?id=${line[id]}\" title=回复此条留言>回复</a> ";
}else{
echo "<font color=\"#C0C0C0\">回复</font> ";
}
echo "<a href=\"edit.php?id=${line[id]}\" title=\"修改此条留言\">编辑</a> ";
if($line[recy] == ""){
echo "<a href=\"del.php?mode=mar&id=${line[id]}\" onclick=\"return Mark();\" title=\"移到回收站\">回收</a> ";
}else{
echo "<a href=\"del.php?mode=rec&id=${line[id]}\" title=\"还原此条留言\">还原</a> ";
}
echo "<a href=\"del.php?id=${line[id]}\" onclick=\"return Delonw();\" title=\"删除此条留言\">删除</a> ";
if($line[hid] == "on"){
echo "<font color=\"#C0C0C0\">固顶</font> 〗";
}elseif($no > 0){
echo "<a href=\"edit.php?act=top&id=${line[id]}\" title=\"把此条留言固顶\">固顶</a> 〗";
}else{
echo "<a href=\"edit.php?act=top\" title=\"取消留言固顶\">取消</a> 〗";
}
}else{
$nrhgt = "45";
list($ip1,$ip2,$ip3,$ip4) = explode(".",$line[ip]);
$ip = $ip1.".".$ip2.".*.*";
}
print <<<index
</td>
<td width="15%" align="center">${mno}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%">
<table border="0" cellpadding="3" cellspacing="0" style="table-layout: fixed" bordercolor="#111111" width="100%" height="{$nrhgt}">
<tr>
<td width="6%" class="shadow" valign="top" align="center">
<img border="0" src="images/emot/em${line[emot]}.gif" height="12" alt="表情"></td>
<td width="94%" class="shadow" valign="top">${cwqqh}${content}${edit}</td>
</tr>
<tr>
<td width="100%" class="shadow" colspan="2" height="10"></td>
</tr>
index;
if($line[reply] <> ""){
$replytime = date("Y-m-d.H:i",$line[rytime]);
echo "<tr><td width=\"6%\" class=\"shadow\" valign=\"top\" align=\"center\">";
echo " <img border=\"0\" src=\"images/reply.gif\" alt=\"回复\" align=\"absbottom\" width=\"15\" height=\"15\">";
echo "</td><td width=\"94%\" class=\"shadow\" valign=\"top\"><font color=\"#808000\" title=\"回复时间:".$replytime."\">".$line[reply];
echo "</font></td></tr>";
}
print <<<index
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#EFEFEF">
<table border="0" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
<tr>
<td width="35%" class="shadow"> 时间:${time}</td>
<td width="26%" class="shadow">来自:${line[locale]}</td>
<td width="32%" class="shadow">IP:{$ip}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#4F4F4F" width="100%" height="3" bgcolor="{$topcolor}">
<tr>
<td width="100%"></td>
</tr>
</table>
index;
}
function hidden($htime,$heomt,$no){
$time = date("Y-m-d.H:i",$htime);
print <<<hidden
<table border="0" cellspacing="0" width="100%" bgcolor="#4F4F4F">
<tr>
<td width="100%">
<table border="0" cellpadding="2" cellspacing="0" width="100%" bgcolor="#FFFFFF">
<tr>
<td width="17%" align="right">
<img border="0" src="images/emot/em${heomt}.gif" height="12" alt="表情"></td>
<td width="25%"> <font color="#808080" title="只有版主可看到">悄悄话...</font></td>
<td width="46%"><font color="#808080">时间:${time}</font></td>
<td width="12%"><font color="#808080">NO:${no}</font></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#4F4F4F" width="100%" height="3" bgcolor="#D5D5D5">
<tr>
<td width="100%"></td>
</tr>
</table>
hidden;
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -