list.cgi
来自「--黑客防线-精华奉献本(攻册)」· CGI 代码 · 共 575 行 · 第 1/2 页
CGI
575 行
</SCRIPT>
<BODY scroll=no style=MARGIN:0px>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=100% width=100%>
<TBODY><TR><TD align=middle id=frmTitle noWrap vAlign=center>
<IFRAME frameBorder=0 name=yuzi scrolling=auto src=list.cgi?menu=many style=HEIGHT:100%;VISIBILITY:inherit;WIDTH:110px;Z-INDEX:2></IFRAME>
<TD bgColor=$bgcolor3>
<TABLE border=0 cellPadding=0 cellSpacing=0 height=100%>
<TBODY><tr><TD onclick=switchSysBar() style=HEIGHT:100%;>
<font style=COLOR:white;CURSOR:hand;FONT-FAMILY:Webdings;FONT-SIZE:9pt>
<SPAN id=switchPoint>3</SPAN>
</TBODY></TABLE></TD><TD style=WIDTH:100%>
EOF
if($id ne ""){
open (CHAT,"$filepath/list/$id.cgi");
$line=<CHAT>;
close(CHAT);
($bzmc,$rpass,$bzrmail,$outurl,$bbsname)=split(/\t/,$line);
print <<EOF;
<title>$bbsname</title>
<IFRAME frameBorder=0 id=main name=main scrolling=yes src=bbs$Cookies{style}.cgi?id=$id style=HEIGHT:100%;VISIBILITY:inherit;WIDTH:100%;Z-INDEX:1></IFRAME>
</TR></TBODY></TABLE></html>
EOF
}else{
print <<EOF;
<title>$cityname</title>
<IFRAME frameBorder=0 id=main name=main scrolling=yes src=list.cgi?menu=main_frame style=HEIGHT:100%;VISIBILITY:inherit;WIDTH:100%;Z-INDEX:1></IFRAME>
</TR></TBODY></TABLE></html>
EOF
}
exit;
}
sub many{
open (FILE,"$filepath/data/people.cgi");
@LINES=<FILE>;
close(FILE);
$people=@LINES;
print "Content-type: text/html\n\n";
print <<EOF;
<HTML><HEAD>
<meta http-equiv=Content-Type content="text/html;charset=gb2312"><link href=$imagurl/bbs.css rel=stylesheet>
</HEAD>
<BODY bgColor=$bgcolor0 topMargin=0 leftmargin=0>
<table border=0 width=110 cellpadding=0 height=100%><tr>
<td width=100% align=center bgcolor=$bgcolor1 height=1%>
<script>
if(top==self)document.location='list.cgi';
today=new Date();
var day; var date;
if(today.getDay()==0)day="星期日"
if(today.getDay()==1)day="星期一"
if(today.getDay()==2)day="星期二"
if(today.getDay()==3)day="星期三"
if(today.getDay()==4)day="星期四"
if(today.getDay()==5)day="星期五"
if(today.getDay()==6)day="星期六"
date=(today.getYear())+"年"+(today.getMonth() + 1 )+"月"+today.getDate()+"日<br>今天是:"+day+"";
document.write(date);
</script>
EOF
if($username eq ""){
print <<EOF;
<br><SCRIPT>hour=new Date().getHours()
if(hour < 6){document.write("凌晨好!")}
else if (hour < 9){document.write("早上好!")}
else if (hour < 12){document.write("上午好!")}
else if (hour < 14){document.write("中午好!")}
else if (hour < 17){document.write("下午好!")}
else if (hour < 19){document.write("傍晚好!")}
else if (hour < 22){document.write("晚上好!")}
else {document.write("夜里好!")}</script></td></tr>
<tr>
<td width=100% align=center valign=top><br><font color=$bgcolor4>
$from
<br><br>
您目前是访客<br><br>
--欢迎您的到来--<br><br>
<A target=main href=login.cgi><FONT color=$bgcolor4>■ 登陆社区</a><br><br>
<A target=main href=yhxiu.cgi#mail><FONT color=$bgcolor4>■ 找回密码</a><br><br>
<A target=main href=yhreg.cgi><FONT color=$bgcolor4>■ 注册会员</a><br><br>
<A target=main href=list.cgi?menu=main_frame><FONT color=$bgcolor4>■ 返回首页</a>
</td></tr>
<td width=100% align=center height=1%>
<FONT color=$bgcolor4>---------------- <br>
<A target=main href=yhreg.cgi?menu=online_frame><FONT color=$bgcolor4>在线用户:$people人</a><br>
注册会员:$membertol人<br>
---------------- <br>
Version $ver
</td></tr>
EOF
}else{
$tol=$rfy+$rhf;
open(NUMBER,"$filepath/guest/2$username.cgi");
$NUMBER=<NUMBER>;
close(NUMBER);
($lys,$oldlys,$money,$charm)=split(/\t/,$NUMBER);
if($Cookies{estate} eq "1"){$estate="隐身";}else{$estate="在线";}
print <<EOF;
<style>BODY{scrollbar-face-color:$bgcolor0;scrollbar-3dlight-color:$bgcolor0;scrollbar-darkshadow-color:$bgcolor0;scrollbar-track-color:$bgcolor0;scrollbar-arrow-color:ffffff;scrollbar-shadow-color:ffffff;}</style>
<br><acronym title=' 个人信息
姓名: $username
状态: $estate
等级: $levelname
威望: $rating
发贴: $tol
纹银: $money
魅力: $charm'>$username</acronym> <SCRIPT>hour=new Date().getHours()
if(hour < 6){document.write("凌晨好!")}
else if (hour < 9){document.write("早上好!")}
else if (hour < 12){document.write("上午好!")}
else if (hour < 14){document.write("中午好!")}
else if (hour < 17){document.write("下午好!")}
else if (hour < 19){document.write("傍晚好!")}
else if (hour < 22){document.write("晚上好!")}
else {document.write("夜里好!")}</script></td></tr>
<tr>
<SCRIPT>
function initIt(){
divColl=document.all.tags("DIV");
for(i=0; i<divColl.length; i++) {
whichEl=divColl(i);
if(whichEl.className=="child")whichEl.style.display="none";}
}
function expands(el) {
whichEl1=eval(el+"Child");
if (whichEl1.style.display=="none"){
initIt();
whichEl1.style.display="block";
}else{whichEl1.style.display="none";}
}
onload=initIt;
</SCRIPT>
<td width=100% valign=top height=100%>
<br>
EOF
########
if ($bbs_top){
@toltime=stat("$filepath/data/bbstop");
@modtime=gmtime(@toltime[9]);
@modtime[5]=@modtime[5]+1900;
@modtime[4]=@modtime[4]+1;
$modtime=@modtime[5]."年".@modtime[4]."月".@modtime[3]."日";
$rqtop=(-M "$filepath/data/bbstop");
if(($rqtop > $lucidatime)||(-z "$filepath/data/leftlist")){⊤}
open (FILE,"$filepath/data/bbstop") || ⊤
@line=<FILE>;
close(FILE);
open(TITLES,"$filepath/data/bbstop");
@hastitles=<TITLES>;
close(TITLES);
for ($i=0; $i<$bbs_top; $i++){
$hastitle=@hastitles[$i];
if($hastitle ne ""){
($wzs,$id,$bbsname)=split(/\t/,$hastitle);
$bbstop="$bbstop ├ <A href=bbs.cgi?id=$id target=main title=论题数:$wzs><font color=000000>$bbsname</A><br>";
}}
print <<EOF;
<A href=javascript:expands('bbstop') title='更新日期:$modtime'><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>论坛排行</FONT></A><BR>
<DIV class=child id=bbstopChild>$bbstop</DIV>
EOF
}else{
open(ROOM,"$filepath/data/leftlist");
@lines=<ROOM>;
close(ROOM);
if(@lines){
$i=1;
foreach $line (@lines){
($id1,$sort)=split(/__/,$line);
if($sort eq "" && $i eq 1){print " <A href=javascript:expands('h$i')><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>论坛导航</FONT></A><BR><DIV class=child id=h$i\Child>";}
if($sort ne ""){
print "</DIV> <A href=javascript:expands('h$i')><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>$sort</FONT></A><BR><DIV class=child id=h$i\Child>";
}else{
($id,$bbsname)=split(/\t/,$id1);
print " ├ <A href=bbs.cgi?id=$id target=main><font color=000000>$bbsname</A><br>";
}
$i++;
}
}
print "</DIV>";
}
########
open (PEO,"$filepath/fun.txt");
@fun=<PEO>;
close (PEO);
if(@fun){
print <<EOF;
<A href=javascript:expands('yuzi1')><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>社区娱乐</FONT></A><BR>
<DIV class=child id=yuzi1Child>
EOF
foreach $fun (@fun){
chomp($fun);
($funname,$funurl)=split(/__/,$fun);
print " ├ <A href=$funurl target=main><font color=000000>$funname</A><br>";
}
}
print <<EOF;
</DIV>
<A href=javascript:expands('yuzi2')><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>个人服务</FONT></A><BR>
<DIV class=child id=yuzi2Child>
├ <A href=yhxiu.cgi target=main><font color=000000>修改资料</A><br>
├ <A href=cookie.cgi?menu=setuppage target=main><font color=000000>个性设置</A><br>
├ <A href=photo.cgi target=main><font color=000000>照片上传</A><br>
├ <A href=portrait.cgi target=main><font color=000000>头像上传</A><br>
├ <A href=guest.cgi target=main><font color=000000>查看留言</A><br>
├ <A href=postlog.cgi?username=$username target=main><font color=000000>我的文章</A><br>
├ <A href=favorite.cgi target=main><font color=000000>我的收藏</A><br>
</DIV>
<A href=javascript:expands('yuzi3')><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>系统服务</FONT></A><BR>
<DIV class=child id=yuzi3Child>
├ <A href=affiche.cgi target=main><font color=000000>社区公告</A><br>
├ <A href=recycle.cgi target=main><font color=000000>回 收 站</A><br>
├ <A href=login.cgi target=main><font color=000000>更改用户</A><br>
├ <A href=member.cgi target=main><font color=000000>会员排行</A><br>
├ <A href=cjyh.cgi target=main><font color=000000>社区管理</A><br>
</DIV>
<A href=javascript:expands('yuzi4')><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>私人珍藏</FONT></A><BR>
<DIV class=child id=yuzi4Child>
EOF
open (PEO,"$filepath/favorites/$username.cgi")||open (PEO,">$filepath/favorites/$username.cgi");
@lineszd=<PEO>;
close (PEO);
foreach $lineszds (@lineszd) {
chomp($lineszds);
($rnamezd,$bbsming)=split(/\t/,$lineszds);
print " ├ <A href=bbs$Cookies{style}.cgi?id=$rnamezd target=main><font color=000000>$bbsming</A><br>";
}
print <<EOF;
</DIV>
<A href=javascript:expands('yuzi5')><IMG src=$imagurl/t_plus.gif border=0 align=absMiddle><font color=$bgcolor4>改变状态</FONT></A><BR>
<DIV class=child id=yuzi5Child>
├ <A href=cookie.cgi?menu=line><font color=000000>上 线</A><br>
├ <A href=cookie.cgi?menu=estate><font color=000000>隐 身</A><br>
</DIV>
<A href=list.cgi?menu=main_frame target=main><IMG src="$imagurl/t_sub.gif" border=0 align=absMiddle><font color=$bgcolor4>返回首页</FONT></A><BR>
<A href=cookie.cgi><IMG src="$imagurl/t_sub.gif" border=0 align=absMiddle><font color=$bgcolor4>离开社区</FONT></A>
</td></tr>
<tr><td height=1%>
<center><font color=$bgcolor4>
<FONT color=$bgcolor4>----------------<br>
<A target=main href=yhreg.cgi?menu=online_frame><FONT color=$bgcolor4>在线用户:$people人</a><br>
注册会员:$membertol人<br>
----------------<br>
Version $ver
</td></tr>
EOF
}}
sub lucida{
opendir (MEMBERDIR2, "$ImgDir/img");
@b = readdir(MEMBERDIR2);
closedir (MEMBERDIR2);
$star=$b[rand (@b)];
$star =~s/.jpg//g;
if(($star eq ".")||($star eq "..")){$star="$bzmc";}
$star2=$b[rand (@b)];
$star2 =~s/.jpg//g;
if(($star2 eq ".")||($star2 eq "..")){$star2="$bzmc";}
open(TMP,">$filepath/data/lucida");
print TMP "$star\t$star2";
close(TMP);
}
sub top{
open(ROOM,"$filepath/data/leftlist");
@lines=<ROOM>;
close(ROOM);
foreach $username1 (@lines){
($id1,$sort)=split(/__/,$username1);
($id,$bbsname)=split(/\t/,$id1);
if($id ne ""){
$i++;
open(PSD,"$filepath/list/$id/bbs");
@hastitles=<PSD>;
close(PSD);
$wzs=@hastitles;
@string[$i]="$wzs\t$id\t$bbsname\n";
}}
@string=(reverse sort{$a<=>$b}@string);
open(PSD,">$filepath/data/bbstop");
foreach(@string[0..9]){
$_=~s/\n//isg;
print PSD "$_\n";
}
close(PSD);
chmod(0666,"$filepath/data/bbstop");
}
######################### END OF SCRIPT #########################
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?