📄 bbs.cgi
字号:
}
print <<EOF;
<a href=$cgiurl?menu=fabiao1&id=$id&replytime=$index&retitles=$retitles><img border=0 src=$imagurl/hf.gif alt=回复 $retitles></a> <img border=0 src=$imagurl/ip.gif alt=$rusername的IP地址:$rfrom>
EOF
if (($userpsd eq $delpsd)||($userpsd eq $fbzdel)){
print "<a href=$cgiurl?menu=delreply&deltitle=$rthistime&id=$id&no=$re><img border=0 src=$imagurl/del.gif alt=删除此帖子></a>";
}
print<<EOF;
</td></tr>
<tr>
<td>
<table width=100% border=0 cellspacing=4>
<tr>
<td>
<tr>
<td valign=top rowspan=2 align=center><IMG SRC=$imagurl/Image$tu.gif><br>$deji</td>
<td width=99% rowspan=2>$rcomment
EOF
if(($rqm ne "")){
print "<br>——————————<br>$rqm";
}
print <<EOF;
<td align=right valign=top>$onlined</td>
</tr>
<tr>
<td align=right valign=bottom><img src=$imagurl/system.gif alt="$ie$win"></td>
</td>
</tr>
</table>
</td>
</tr><tr bgcolor=#ffedc8><td align="center">作者:
EOF
if($rmail ne ""){
print "<a href=mailto:$rmail>$rusername</a> ";
}else{
print "$rusername ";
}
if(($rhome ne "")&&($rhome ne "http://")){
print "<a target=_blank href=$rhome>$rhome</a>";
}
print <<EOF;
时间:$rthistime 来源:
EOF
if($rcity ne ""){
print "$rcity";
}else{
print "$rfrom";
}
print <<EOF;
</td>
</tr>
</table> </center>
</div>
<br>
EOF
}
}
}
}
if ($rhasreply eq "0"){print "<br>";}print "管理选项: ";
if ( -X "$filepath/list/$id/$index"){
print "<a href=quote.cgi?menu=lock&id=$id&replytime=$index>打开主题</a>";}else{
print "<a href=quote.cgi?menu=lock&id=$id&replytime=$index>关闭主题</a>";}
if ( -X "$filepath/list/$id/$index"."b"){
print " | <a href=quote.cgi?menu=jing&id=$id&replytime=$index>从精华区中移出</a>";}else{
print " | <a href=quote.cgi?menu=jing&id=$id&replytime=$index>添加到精华区</a>";}
print " | <a href=$cgiurl?menu=deltitle&deltitle=$index&id=$id>删除主题</a>";
print <<EOF;
<hr noShade SIZE=1 width=450>
<div align=center>
<table border=0 cellSpacing=4 width=545>
<tbody>
<tr align=middle>
<td class=unnamed1 width=533>本论坛言论纯属发表者个人意见,与<font color=#ff6633><b>
<font face=Arial, Helvetica, sans-serif>$zyname</font></b></font>
立场无关</td>
</tr>
<tr align=middle>
<td class=unnamed1 width=533>免费论坛服务由<font color=#cc0033>
</font><font color=#ff6633><b><font Helvetica, sans-serif><a href=$zyurl target=_blank>$zyname</a></font></b></font><font color=#cc0033>
</font>提供 技术支持:<b><a href=http://www.yuzi.net target=_blank>Yuzi工作室</a></b></td>
</tr>
</tbody>
</table>
EOF
exit;
}
##########
sub findtitle{
open(TITLES,"$filepath/list/$id/bbs");
@hastitles=<TITLES>;
close(TITLES);
$size=0;
$size1=0;
$syy=$page-20;
$findtmp="$filepath/data/$id.tmp";
open(TMP,">$findtmp");
foreach $hastitle (@hastitles){
$hastitle =~ s/\n//g;
if($hastitle ne ""){
($index)=split(/\t/,$hastitle);
if ( -e "$filepath/list/$id/$index"){
open(TITLES,"$filepath/list/$id/$index");
@a=<TITLES>;
close(TITLES);
foreach $m (@a){
$m=~ s/\n//g;
if($m ne ""){
($rtitles,$rthistime,$rusername,$nr,$rfrom,$rhasreply,$remote,$rlastname,$rlasttime,$re,$rhassee)=split(/\t/,$m);
}
}
}
if (($rusername =~ /$search/gi)||($nr=~ /$search/gi)||($rtitles=~ /$search/gi)||($rlastname=~ /$search/gi) ||($rlasttime=~ /$search/gi) ){
$size=$size+1;
$newtitle=$rtitles."\t".$index."\t".$rusername."\t".$rcomment."\t".$rfrom."\t".$rhasreply."\t".$remote."\t".$rlastname."\t".$rlasttime."\t".$re."\t".$rhassee;
print TMP $newtitle."\n";
}
}
}
close(TMP);
open(TITLES,"$findtmp");
@hastitles=<TITLES>;
close(TITLES);
&send_html;
print <<EOF;
<html>
<head>
<title>$bbsname</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
a:link { font-family: "宋体", "serif"; font-size: 9pt; color: #004080; text-decoration: none}
a:hover { color: #004080; text-decoration: underline; background-color: #CCCC99}
a:visited { text-decoration: none}
body { font-family: "宋体", "serif"; font-size: 9pt}
td { font-family: "宋体", "serif"; font-size: 9pt}
input { font-size: 9pt}
p { font-size: 9pt}
br { font-size: 9pt}
tr { font-size: 9pt}
table { font-size: 9pt}
input{font-size:9pt;background-color:#FFFFFF}
</style>
</head>
<SCRIPT language=JavaScript>
function openWindow(url) {
popupWin = window.open('guest.cgi?guest=$username&password=$userpsd','','resizable,scrollbars')
}
</SCRIPT>
<body topmargin=0>
$htmlt
<table width="100%" border="0" cellpadding="4" cellspacing="0" background=$imagurl/tablebg.gif>
<tr>
<td><font color="#FFFFFF">论坛名称:<a href="$cgiurl?id=$id"><font color="#FFFFFF">$bbsname</a></font> 版主:<a href=yhreg.cgi?menu=viewuser&username=$admname target=_blank><font color=#FFFFFF>$admname</a></font> <a href=yhreg.cgi?menu=viewuser&username=$fbzmc target=_blank><font color=#FFFFFF>$fbzmc</a></font></td>
<td><font color=#ffffff><marquee width=300>$jj</marquee></font></td>
<td align=right>
EOF
if(($outurl ne "")&&($outurl ne "http://")){
print "<a href=$outurl target=_blank><font color=#FFFFFF>$outurl</font></a></td>";
}else{print "<a href=list.cgi target=_top><font color=#FFFFFF>$cityname</font></a></td>";}
print <<EOF;
</tr>
</table>
<br>
<table border="0" cellPadding="0" cellSpacing="0" height="16"
style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px">
<tr>
<td height="16" width="500"><table
border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left"><left><table border="0" borderColor="#008000"
borderColorDark="#9EC49D" borderColorLight="#65A264" cellPadding="0" cellSpacing="1"
height="19">
<TBODY>
</TBODY>
<tr>
<td><a href="$cgiurl?menu=fabiao&id=$id"><img src="$imagurl/sbutton-post2.gif" border="0"></a></td>
</tr>
</table>
</center></div></td>
</tr>
</table>
</td>
<td width=100% align=right><span style=font-size: 9pt><a href=$cgiurl?menu=findtitle&search=$lasttime&id=$id>查看今天的帖子</a><font color=#FF0000>>></font><a href=reg.cgi target=_blank>免费申请</a><font color=#FF0000>>></font><a href=xiu.cgi target=_blank>版主资料修改</a><font color=#FF0000>>></font><a href=yhreg.cgi target=_blank>用户资料注册</a><font color=#FF0000>>></font><a href=yhxiu.cgi target=_blank>用户资料修改</a><font color=#FF0000>>></font><a href=yhreg.cgi?id=$id&menu=guoke target=_blank>用户排行榜</a><font color=#FF0000>>></font><a href=$cgiurl?menu=viewjh&id=$id>精华区</a><font color=#FF0000>>></font><a href=$imagurl/help.htm target=_blank>使用帮助</a>
<br>
EOF
if ($username ne ""){
print "<img src=$imagurl/101.gif><a href=javascript:openWindow()>$username的留言本</a> ";
}
print <<EOF;
<img src=$imagurl/101.gif><a href=yhreg.cgi?menu=online>在线人数: <font color=#FF0000>$people</font></a> <img src=$imagurl/101.gif>找到相关文章: <font color=#ff0000>$size</font></span></td>
</tr>
</table>
<table border="1" align="center" width="100%" cellpadding="0" cellspacing="0" bordercolorlight="#008000" bordercolordark="#FFFFFF">
<tr align=center>
<td background=$imagurl/tablebg.gif width=5%> </td>
<td background=$imagurl/tablebg.gif width=2%> </td>
<td background=$imagurl/tablebg.gif width=38%>文章标题</td>
<td background=$imagurl/tablebg.gif width=7%>新窗口</td>
<td background=$imagurl/tablebg.gif width=7%>作者</td>
<td background=$imagurl/tablebg.gif width=8%>回复数</td>
<td background=$imagurl/tablebg.gif width=8%>最后回复</td>
<td background=$imagurl/tablebg.gif width=18%>最后更新时间</td>
<td background=$imagurl/tablebg.gif width=7%>阅览数</td>
</tr>
EOF
$chgcolor=0;
for ($i=$page; $i<$page+20; $i++){
$hastitle=@hastitles[$i];
$hastitle=~ s/\n//g;
if($hastitle ne ""){
($rtitles,$rthistime,$rusername,$rcomment,$rfrom,$rhasreply,$emote,$lastname,$rlasttime,$re,$rhassee)=split(/\t/,$hastitle);
unless($rhassee){$rhassee="0";}
if($rhasreply<5){$hot="closed.gif";}
if($rhasreply>=5){$hot="hot.gif";}
if($rhasreply<=0){$hot="closedb.gif";}
if ( -X "$filepath/list/$id/$rthistime"){$hot="lock.gif";}
($oldday)=split(/\./,$rlasttime);
$new="";
if(($rhassee<=10)&&($oldday eq $lasttime)){$new="new.gif";}
if ($rusername eq $username){$my="my.gif";}else{$my="";}
if ( -X "$filepath/list/$id/$re"){$my="jh.gif";}
print <<EOF;
<tr BGCOLOR="#FFF5E1" align="center">
<td bgcolor=FFF5E1>
<img src=$imagurl/$hot>
</td>
EOF
if ($my ne ""){
print <<EOF;
<td bgcolor="#FFF5E1"><img src=$imagurl/$my></td>
<td align="left"><img src="$imagurl/$emote.gif"> <a href="$cgiurl?menu=show&slttitle=$rthistime&id=$id">$rtitles
EOF
}else{
print <<EOF;
<td bgcolor="#FFF5E1"> </td>
<td align="left"><img src="$imagurl/$emote.gif"> <a href="$cgiurl?menu=show&slttitle=$rthistime&id=$id">$rtitles
EOF
}
print <<EOF;
</a>
EOF
if(($new ne "")){
print "<img src=$imagurl/$new>";
}
print <<EOF;
</td>
<td bgcolor=FFF5E1><a href="#" onClick="javascript:open('$cgiurl?menu=show&slttitle=$rthistime&id=$id','','resizable,scrollbars')"><img border=0 src="$imagurl/newwin.gif"> </a></td>
<td BGCOLOR="#FFF5E1"><a href="yhreg.cgi?menu=viewuser&username=$rusername" target=_blank>$rusername</a></td>
<td bgcolor=FFF5E1>$rhasreply</td>
<td BGCOLOR="#FFF5E1"><a href="yhreg.cgi?menu=viewuser&username=$lastname" target=_blank>$lastname</a></td>
<td bgcolor=FFF5E1><a href=$cgiurl?menu=show&slttitle=$rthistime&id=$id#$rlasttime><img src=$imagurl/lastpost.gif border=0 alt=到最后发表的帖子上></a> $rlasttime</td>
<td BGCOLOR="#FFF5E1">$rhassee</td>
</tr>
EOF
}
}
print <<EOF;
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td align=left valign=baseline>所有时间为 北京时间. 格式: 年-月-日.</td>
<td align="right">
EOF
if($syy>-1){
print "<a href=$cgiurl?menu=findtitle&id=$id&search=$search&page=$syy><img src=$imagurl/sbutton-backpage.gif border=0></a>";
}else{
print "<a href=javascript:history.back(1)><img src=$imagurl/sbutton-backpage.gif border=0></a>";
}
if(($size>20)&&($i<$size)){
print "<a href=$cgiurl?menu=findtitle&id=$id&search=$search&page=$i><img src=$imagurl/sbutton-nextpage.gif border=0></a>";
}else{
print "<img src=$imagurl/sbutton-nextpage.gif border=0>";
}
if(($outurl ne "")&&($outurl ne "http://")){
print "<a href=$outurl><img src=$imagurl/sbutton-back.gif border=0></a>";
}else{
print "<a href=javascript:history.back(1)><img src=$imagurl/sbutton-back.gif border=0></a>";
}
print <<EOF;
</td>
</tr>
</table>
<table border="0" width="100%">
<tr valign="top">
<td width="100%" valign="middle" align="center">
<table width="350" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#008000" bordercolordark="#FFFFFF">
<tr bgcolor="#CFE3FE">
<form method="post" action="$cgirul">
<td background=$imagurl/tablebg.gif width="100%" align="center" colspan="2"> <input type="hidden" name="menu" value="findtitle"><font color=white>输入您要搜索的字符 </font><input type="hidden" name="id" size="28" value="$id" maxlength="46"><input type="hidden" name="userpsd" value="$userpsd"><input type="hidden" name="username" value="$username"><input type="text" name="search" size="20" value=""> <input name="submit" type="submit" style="background-image: url('$imagurl/tablebg.gif'); border: 0px" value=" 搜 索 ">
</td>
</form>
</tr>
<tr bgcolor="#CFE3FE">
<form method="post" action="$cgiurl">
<td background=$imagurl/tablebg.gif width="100%" align="center" colspan="2"> <input type="hidden" name="menu" value="win"><font color=white>您的姓名 </font><input type="text" name="username" size="9" value=""><font color=white> 您的密码 </font><input type="password" name="userpsd" size="9" value=""><input type="hidden" name="id" size="28" value="$id" maxlength="46"> <input name="submit" type="submit" style="background-image: url('$imagurl/tablebg.gif') ; border: 0px" value=" 登 陆 ">
</td>
</form>
</tr>
</table>
</td>
</tr>
</table><br>
<center>$htmlw
<hr noShade SIZE=1 width=450>
<div align=center>
<table border=0 cellSpacing=4 width=545>
<tbody>
<tr align=middle>
<td class=unnamed1 width=533>本论坛言论纯属发表者个人意见,与<font color=#ff6633><b>
<font face=Arial, Helvetica, sans-serif>$zyname</font></b></font>
立场无关</td>
</tr>
<tr align=middle>
<td class=unnamed1 width=533>免费论坛服务由<font color=#cc0033>
</font><font color=#ff6633><b><font Helvetica, sans-serif><a href=$zyurl target=_blank>$zyname</a></font></b></font><font color=#cc0033>
</font>提供 技术支持:<b><a href=http://www.yuzi.net target=_blank>Yuzi工作室</a></b></td>
</tr>
</tbody>
</table>
</html>
EOF
exit;
}
######################### END OF SCRIPT #########################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -