📄 list.cgi
字号:
}
print <<EOF;
<TR>
<TD bgColor=#ffffff colSpan=6><B><FONT color=#0099cc >在线用户</FONT></B> <A href=cookie.cgi>退出社区</a>
</TD></TR>
<TR>
<TD vAlign=top align=middle bgColor=#ffffff><IMG src="$imagurl/online.gif">
</TD>
<TD vAlign=top bgColor=#ffffff colSpan=6><B><A href="yhreg.cgi?menu=online">看看现在谁在这个论坛</A></B>
(<font color=#FF0000>$people</font>)<BR></FONT>
EOF
open(PSD,"$filename");
@lines1=<PSD>;
close(PSD);
foreach $line (@lines1) {
if ($line ne "") {
($rip,$r1,$r2,$r3,$r4,$rtime,$rname,$rid)=split(/,/,$line);
print "<a href=$ym/yhreg.cgi?menu=viewuser&username=$rname target=_blank>$rname</a>\n";
}
}
print <<EOF;
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<tr>
<td colspan="6">
EOF
$j=$size;
while ($j>0) {
print "<a href=list.cgi?menu=show&page=$ii>" if ($page != $ii);
print "[$ii]";
print "</a>" if ($page != $ii);
$j=$j-$perpage;
$ii--;
}
print <<EOF;
</td>
</tr>
</table>
</center></div>
</body>
</html>
EOF
exit;
}
##########
sub send_html {
if ($has_send ne "1") {
print "Content-type: text/html\n\n";
$has_send = "1";
}
}
sub index{
&send_html;
if($id ne ""){
print <<EOF;
<html><frameset framespacing="0" border="false" frameborder="0" rows="*,20"><frame name="main" src="bbs.cgi?id=$id"><frame name="yuzi" scrolling="no" src="list.cgi?menu=many"></frameset></html>
EOF
}else{
print <<EOF;
<html><head><title>$cityname</title></head><frameset framespacing="0" border="false" frameborder="0" rows="*,20"><frame name="main" src="list.cgi?menu=show"><frame name="yuzi" scrolling="no"></frameset></html>
EOF
}
exit;
}
sub many{
open (FILE,"$filepath/data/people.cgi");
@LINES=<FILE>;
close(FILE);
$people=@LINES;
&send_html;
if($username eq ""){
print <<EOF;
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>.lh22px {
FONT-SIZE: 12px; LINE-HEIGHT: 22px; FONT-FAMILY: 宋体
}
A {
TEXT-DECORATION: none
}
BODY {
FONT-SIZE: 9pt; LINE-HEIGHT: 18px; FONT-FAMILY: 宋体
}
TD {
FONT-SIZE: 9pt; LINE-HEIGHT: 18px; FONT-FAMILY: 宋体
}
A:hover {
COLOR: #ff0000; TEXT-DECORATION: none
}
</STYLE>
</HEAD>
<BODY text=#ffffff vLink=#ffff00 link=#ffff00 bgColor=#37639F topMargin=0>
<TABLE height=24 width="100%" border=0>
<TBODY>
<TR>
<TD height=20>
<P align=center><A target=main href="yhreg.cgi?menu=online"><FONT color=white>社区现有 <FONT color=#ffff00>$people</FONT></FONT><font color="#ffff00">
</font><FONT
color=white>位朋友</FONT></A></P></TD>
<TD height=20>
<P align=center><FONT color=#ffff80>$ENV{'REMOTE_ADDR'}</FONT><font color="#ffff80">
</font>
<script language="javaScript">
now = new Date(),hour = now.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>
欢迎光临</P></TD>
<TD height=20>
<P align=center><A target=main href="login.cgi"><FONT color=white>登陆社区</FONT></A></P></TD>
<TD height=20>
<P align=center>当前等级:<FONT color=#ffff80> 访 客 </FONT></P></TD>
<TD height=20>
<P align=center><A target=main href="yhreg.cgi"><FONT color=white>注册您的个人资料</FONT></A></P></TD>
<TD height=20>
<P align=center><a target="main" href="list.cgi?menu=show"><FONT color=white>返回社区首页</FONT></a></P></TD></TR></TBODY></TABLE></BODY></HTML>
EOF
}else{
open(PSD,"$filepath/yhzl/$username.cgi");
$line=<PSD>;
close(PSD);
($rdpassword,$rdname,$rdmail,$rdhome,$rdlasttime,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rdfy,$rdhf,$tu,$jiao)=split(/\t/,$line);
$fy1=$rdfy+0;
$hf1=$rdhf+0;
$tol=$fy1+$hf1;
if($tol < 11){$deji="新手上路";}
elsif ($tol > 10 && $tol < 31){$deji="一般站友";}
elsif ($tol > 30 && $tol < 101){$deji="中级站友";}
elsif ($tol > 100 && $tol < 201){$deji="高级站友";}
elsif ($tol > 200 && $tol < 501){$deji="老 站 友";}
elsif ($tol > 500 && $tol < 1001){$deji="长 老 级";}
elsif ($tol > 1000 && $tol < 2001){$deji="本站元老";}
elsif ($tol > 2000){$deji="开国大老";}
unless(-f "$filepath/guest/3$username.cgi"){
open(TMP,">$filepath/guest/3$username.cgi");
close(TMP);
chmod(0666,"$filepath/guest/3$username.cgi");
}
open(NUMBER,"$filepath/guest/2$username.cgi");
$NUMBER=<NUMBER>;
close(NUMBER);
($lys,$oldlys,$money,$charm)=split(/\t/,$NUMBER);
print <<EOF;
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<meta HTTP-EQUIV="REFRESH" CONTENT=60>
<STYLE type=text/css>.lh22px {
FONT-SIZE: 12px; LINE-HEIGHT: 22px; FONT-FAMILY: 宋体
}
A {
TEXT-DECORATION: none
}
BODY {
FONT-SIZE: 9pt; LINE-HEIGHT: 18px; FONT-FAMILY: 宋体
}
TD {
FONT-SIZE: 9pt; LINE-HEIGHT: 18px; FONT-FAMILY: 宋体
}
A:hover {
COLOR: #ff0000; TEXT-DECORATION: none
}
</STYLE>
</HEAD>
<BODY text=#ffffff vLink=#ffff00 link=#ffff00 bgColor=#37639F topMargin=0>
<TABLE height=24 width="100%" border=0>
<TBODY>
<TR>
<TD height=20>
<P align=center><A target=main href="yhreg.cgi?menu=online"><FONT color=white>社区现有 <FONT color=#ffff00>$people</FONT></FONT><font color="#ffff00">
</font><FONT color=white>位朋友</FONT></A></P></TD>
<TD height=20>
<P align=center><select size="1" style="font-size: 9pt">
<option> 个人信息 </option>
<option>┏━━━━━┓</option>
<option>┃当前等级 ┃</option>
<option>┃ $deji┃</option>
<option> 发贴总数:$tol</option>
<option> 货币金额:$money</option>
<option> 魅力指数:$charm</option>
<option>┗━━━━━┛</option>
</select>
</P></TD>
<TD height=20>
<P align=center>
<P align=center><select onchange="if(this.options[this.selectedIndex].value!='') {parent.main.location=this.options[this.selectedIndex].value;} else {this.selectedIndex=0;}" size="1" style="font-size: 9pt">
<option> 社区娱乐 </option>
<option>┏━━━━┓</option>
<option value=sorry.cgi> 礼品屋</option>
<option value=sorry.cgi> 社区银行</option>
<option value=sorry.cgi> 社区监狱</option>
<option value=sorry.cgi> 社区博彩</option>
<option value=sorry.cgi> 社区议会</option>
<option>┗━━━━┛</option>
</select>
</A></P></TD>
<TD height=20>
<P align=center>
<P align=center><select onchange="if(this.options[this.selectedIndex].value!='') {parent.main.location=this.options[this.selectedIndex].value;} else {this.selectedIndex=0;}" size="1" style="font-size: 9pt">
<option> 社区服务 </option>
<option>┏━━━━┓</option>
<option value=yhxiu.cgi?username=$username&userpsd=$userpsd> 修改资料 </option>
<option value=sorry.cgi> 照片上传 </option>
<option value=search.cgi?menu=look> 查询网友 </option>
<option value=guest.cgi?guest=$username&password=$userpsd> 查看留言 </option>
<option value=$imagurl/calendar.htm> 我的日历 </option>
<option>┗━━━━┛</option>
</select>
</A></P></TD>
<TD height=20>
<P align=center><select onchange="if(this.options[this.selectedIndex].value!='') {parent.main.location=this.options[this.selectedIndex].value;} else {this.selectedIndex=0;}" size="1" style="font-size: 9pt">
<option> 私人珍藏 </option>
<option>┏━━━━┓</option>
EOF
open (PEO,"$filepath/guest/3$username.cgi");
@lineszd=<PEO>;
close (PEO);
foreach $lineszds (@lineszd) {
$lineszds=~ s/\n//g;
($rnamezd)=split(/,/,$lineszds);
if ( -e "$filepath/list/$rnamezd.cgi"){
open(TITLES,"$filepath/list/$rnamezd.cgi");
@a=<TITLES>;
close(TITLES);
foreach $m (@a){
($rname,$rpass,$rmail,$rhome,$rtitle)=split(/\t/,$m);
print "<option value=bbs.cgi?id=$rnamezd> $rtitle </option>";
}
}
}
print <<EOF;
<option>┗━━━━┛</option>
</select>
</P></TD>
<TD height=20>
<P align=center><a href=list.cgi?menu=show target=main><FONT color=white>返回社区首页</FONT></P></TD>
</TR></TBODY></TABLE></BODY></HTML>
EOF
}
}
######################### END OF SCRIPT #########################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -