www.pudn.com > bbs3000afree.zip > bbs.cgi


#!/usr/bin/perl 
#------------------------------------------------------# 
#¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡±¾³ÌÐòΪYuzi¹¤×÷ÊÒÌṩ¡¡  ¡¡¡¡¡¡¡¡¡¡# 
#¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡YuziÂÛ̳3000(BBS3000)v4.00¡¡¡¡¡¡¡¡¡¡¡¡# 
#------------------------------------------------------# 
$cgipa=".";  # CGI³ÌÐòÎļþµÄ¾ø¶Ô·¾¶ 
###################### 
## ÒÔϲ¿·Ö²»ÐèÐÞ¸Ä ## 
###################### 
require "$cgipa/setup.cgi"; 
$cgiurl="bbs.cgi"; 
&GetCookies; 
########## 
if ($ENV{'REQUEST_METHOD'} eq "POST") { 
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); 
}else {$buffer = $ENV{'QUERY_STRING'};} 
@pairs = split(/&/, $buffer); 
foreach $pair (@pairs) { 
($name, $value) = split(/=/, $pair); 
$value=~tr/+/ /; 
$value=~s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; 
$value=~s/\t/    /g; 
$value=~s/>/>/g; 
$value=~s//g; 
$value=~s///g; 
$FORM{$name} = $value; 
} 
########## 
$id=$FORM{'id'}; 
$see=$FORM{'see'}; 
$emote=$FORM{'emote'}; 
$username=$FORM{'username'}; 
$yjhf=$FORM{'yjhf'}; 
$userpsd=$FORM{'userpsd'}; 
$titles=$FORM{'titles'}; 
$comment=$FORM{'comment'}; 
$search=$FORM{'search'}; 
$sign=$FORM{'sign'}; 
$menu=$FORM{'menu'}; 
$no=$FORM{'no'}; 
$replytime=$FORM{'replytime'}; 
$retitles=$FORM{'retitles'}; 
$deltitle=$FORM{'deltitle'}; 
$rdcomment=$FORM{'rdcomment'}; 
$slttitle=$FORM{'slttitle'}; 
if($username eq ""){$username=$Cookies{username}}; 
if($userpsd eq ""){$userpsd=$Cookies{password}}; 
$no=~s/\.//g; 
$id=~s/\.\.//g; 
$slttitle=~s/\.//g; 
$username=~s/\ //g; 
$username=~s/\¡¡//g; 
if($id=~m/[\#\&\*\=\+\\\:\"\/\<\>?'`ÿ]/){&errorview("IDÖв»Äܺ¬ÓÐÌØÊâ×Ö·û!");} 
if($username=~m/[\#\&\*\=\+\\\:\"\/\<\>?'`ÿ]/){&errorview("Ãû×ÖÖв»Äܺ¬ÓÐÌØÊâ×Ö·û!");} 
if($loginok eq "1" && $Cookies{username} eq ""){ 
print "Content-type: text/html\n\n";exit; 
} 
########## 
if (-d "$filepath/list/$id"){ 
open (CHAT,"$filepath/list/$id.cgi"); 
$line=; 
close(CHAT); 
($bzmc,$secret,$bzrmail,$outurl,$bbsname,$fbzmc2,$rtime,$htmlt,$htmlw,$jj,$fbzmc)=split(/\t/,$line); 
if ($Cookies{secret} ne $secret && $secret ne ""){print "Content-type: text/html\n\n";exit;}}else{&errorview("ϵͳ²»´æÔÚ´ËIDµÄÂÛ̳! ");} 
if($username){ 
$yhzlurl ="$filepath/yhzl/$username.cgi"; 
if($regok eq "0"){unless(-f $yhzlurl){ 
open(PSD,">$yhzlurl"); 
print PSD $userpsd."\t".$username."\t\t\t".$lasttime; 
close(PSD); 
chmod(0666,$yhzlurl);}} 
open(PSD,"$yhzlurl")||&errorview("¶Ô²»Æð£¬´ËÓû§Ãû»¹Ã»ÓÐ×¢²á!"); 
$liness=; 
close(PSD); 
($rdpassword,$rdname,$rdmail,$rdhome,$rlast,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rfy,$rhf,$tu,$jiao,$iewin,$QQ,$photo,$rating)=split(/\t/,$liness); 
if($rdpassword ne $userpsd){&errorview("¶Ô²»Æð£¬ÄúµÄÃÜÂë´íÎó!");}} 
if($bbsname eq ""){$bbsname="¹«¸æÀ¸";} 
if($FORM{'page'}){$page=$FORM{'page'};}else{$page =0;} 
if($menu eq "listtitle"){&listtitle;exit;} 
elsif($menu eq "show"){&show;exit;} 
elsif($menu eq "findtitle"){&findtitle;exit;} 
elsif($menu eq "win"){&win;exit;} 
elsif($menu eq "reply"){do "$cgipa/sub/reply.cgi";exit;} 
elsif($menu eq "addreply"){do "$cgipa/sub/addreply.cgi";exit;} 
elsif($menu eq "vote"){do "$cgipa/sub/vote.cgi";exit;} 
elsif($menu eq "delreply"){do "$cgipa/sub/delreply.cgi";exit;} 
elsif($menu eq "deltitle"){do "$cgipa/sub/deltitle.cgi";exit;} 
elsif($menu eq "viewjh"){do "$cgipa/sub/viewjh.cgi";exit;} 
elsif($menu eq "editform"){do "$cgipa/sub/editform.cgi";exit;} 
elsif($menu eq "reditform"){do "$cgipa/sub/reditform.cgi";exit;} 
elsif($menu eq "edit"){do "$cgipa/sub/edit.cgi";exit;} 
elsif($menu eq "redit"){do "$cgipa/sub/redit.cgi";exit;} 
elsif($menu eq ""){ 
print "Content-type: text/html\n\n"; 
print <$bbsname 
 
EOF 
exit; 
} 
exit; 
########## 
sub listtitle{ 
&people; 
if ($username){ 
$counter ="$filepath/guest/2$username.cgi"; 
open(NUMBER,"$counter")||open(NUMBER,">$counter"); 
$NUMBER=; 
close(NUMBER); 
($lys,$oldlys,$money,$charm)=split(/\t/,$NUMBER); 
if ($lys>0){ 
open(NUMBER,">$counter"); 
print NUMBER "0"."\t"."$oldlys"."\t"."$money"."\t"."$charm"; 
close(NUMBER); 
}} 
open(TITLES,"$filepath/list/$id/bbs")||open(TITLES,">$filepath/list/$id/bbs"); 
@hastitles=; 
close(TITLES); 
$size=@hastitles; 
if ($size < 2){print "Content-type: text/html\n\nÕýÔÚ¸üÐÂË÷ÒýÎļþ...";exit;} 
open(PSD,"$filepath/list/bbs"); 
$index=; 
close(PSD); 
open(PSD,"$filepath/list/$index"); 
$line=; 
close(PSD); 
($index)=split(/\t/,$line); 
&css; 
print <if(top==self)document.location='$cgiurl?id=$id'; 
$bbsname£¨BBS ·ç¸ñ£©$htmlt
ÂÛ̳Ãû³Æ£º$bbsname¡¡¡¡°æÖ÷£º$bzmc $fbzmc $fbzmc2$outurl

 ·¢±íÎÄÕ Ìí¼ÓÒéÌâ>>Ãâ·ÑÂÛ̳ÉêÇë>>°æÖ÷×ÊÁÏÐÞ¸Ä>>Óû§×ÊÁÏ×¢²á>>Óû§×ÊÁÏÐÞ¸Ä>>ÍøÂçѰºô»ú>>¾«»ªÇø
ˢе±Ç°ÂÛ̳ EOF if (-e "$filepath/list/$id/top" && $page < $perpage){⊤} if ($lys<1){ print "ÎÒµÄÁôÑÔ²¾ "; }else{ print "ÄúÓÐ $lys ÌõÐÂÁôÑÔ "; } print <ÔÚÏßÈËÊý: $people ÂÛÌâÊý: $size ʹÓðïÖú
¹«¸æ£º$index ÔÚÏßÈËÔ±Áбí
EOF if ($Cookies{line} eq "1"){ foreach $line (@LINES) { ($rip,$r1,$r2,$r3,$rname,$tu,$namebbs,$rtitles)=split(/\t/,$line); if($rtitles){$rtitles="\nµ±Ç°¶¯×÷£ºä¯ÀÀ¡°$rtitles¡±";} $particular="»î¶¯Ê±¼ä£º$r1:$r2:$r3\nĿǰλÖãº$namebbs$rtitles"; if($rname ne "" && $tu ne "estate"){ $newline=""; if($NO_count <7){$NO_count ++;}else{$NO_count=1;} $newline=""if ($NO_count==7); $rname2="·¢ËÍѶϢ$rname$newline";} else{$rname2="";} $rname1="$rname1$rname2";} print <$rname1
EOF } print <
ÎÄÕ±êÌâ ×Ö[»Ø]×÷Õß ×îºó¸üÐÂʱ¼ä×îºó»Ø¸´ µã»÷ÆÀ
$tophtml EOF $see8=-1; if($sign){$page=$sign*$perpage-$perpage}; $syy=$page-$perpage; for ($i=$page; $i<$page+$perpage; $i++){ $rcomment=@hastitles[$i]; chomp($rcomment); open(TITLES,"$filepath/list/$id/$rcomment"); $m=; close(TITLES); ($rtitles,$rthistime,$rusername,$nr,$rfrom,$rhasreply,$emote,$lastname,$rlasttime,$re,$rhassee,$jing,$lock,$voteman,$votetol)=split(/\t/,$m); if($voteman){$alt{1}="Ì«²îÁË";$alt{2}="Óеã²î";$alt{3}="Ò»°ãÐÔ";$alt{4}="ͦ²»´í";$alt{5}="ÌØ±ðºÃ";$votetol=int($votetol/$voteman);$vote="$alt{$votetol}(¹²$votemanƱ)";}else{$vote="¡¡";} open (FILE, "$filepath/data/rank"); @rank = ; close(FILE); foreach $rank (@rank) { chomp($rank); if (($rank eq $Cookies{username})&&($Cookies{username} ne "")){ if ($lock eq "1"){$open="|½â";}else{$open="|Ëø";} $ranks="
$open|À­|ÒÆ|ɾ| 
";}} if($Cookies{badname} ne $rusername){ $nr=~s/<([^<]|\n)*>//g; $lnr=length($nr); if (length($rtitles) > 40) {$rtitles = substr($rtitles,0,40);$rtitles.="...";} if (length($nr) > 40) {$nr = substr($nr,0,40);$nr.="...";} $nr=~s/\'//g; $see8++; $see=$see8+$page; if($lock eq "1"){$hot="lock.gif";} elsif($rhasreply<1){$hot="closedb.gif";} elsif($rhasreply<15){$hot="closed.gif";} elsif($rhasreply>=15){$hot="hot.gif";} ($oldday)=split(/\./,$rlasttime); $new=""; if(($rhassee<=$people)&&($oldday eq $lasttime)){$new="";} if($jing eq "1"){$my="";} elsif($rusername eq $username){$my="";}else{$my="¡¡";} print < EOF print "$my"; print "д°¿Ú $rtitles $new"; $ii=0; if($rhasreply>15){ print "[µÚ "; $j=$rhasreply;while($j>0){$j=$j-15;}$ii++; $j=$rhasreply;while($j>0){print ""; print "$ii ";$j=$j-15;$ii++;} print "Ò³]"; $ii--;} if($rhasreply eq 0){$rhasreply=$lnr;}else{$sn=$rhasreply;$rhasreply="[$rhasreply]";} if($lastname ne "--"){$lastname="$lastname";} print <$rhasreply$rusername µ½×îз¢±íµÄÒ³ÃæÉÏ $rlasttime $lastname$rhassee$vote EOF }} if($page eq "0"){$page=$perpage;$ge=1}; $yep=$page/$perpage+1-$ge; $ysize=$size/$perpage; ($ysize,$spilth)=split(/\./,$ysize); if($spilth){$ysize++;} print <
Ö±½ÓÌøµ½µÚÒ³¡¡$yep/$ysizeÒ³
BBS ·ç¸ñ ÌÖÂÛÇø·ç¸ñ ÁôÑÔ²¾·ç¸ñ EOF if($syy>-1){ print ""; }else{ print ""; } if(($size>$perpage)&&($i<$size)){ print ""; }else{ print ""; } print <
EOF open(PEO,"$filepath/data/leftlist"); @lineszd=; close(PEO); if(@lineszd){ print <ÊäÈëÄúÒªËÑË÷µÄ×Ö·û
ÄúµÄÐÕÃû ÄúµÄÃÜÂë

$htmlw
±¾ÂÛ̳ÑÔÂÛ´¿Êô·¢±íÕ߸öÈËÒâ¼û£¬Óë $zyname Á¢³¡ÎÞ¹Ø
Ãâ·ÑÂÛ̳·þÎñÓÉ $zyname Ìṩ ¼¼ÊõÖ§³Ö£ºYuzi¹¤×÷ÊÒ
Yuzi Bulletin BoardTM Version $ver EOF exit; } ########## sub show{ if($slttitle eq ""){ open(TITLES2,"$filepath/list/$id/bbs"); @hastitles2=; close(TITLES2); $slttitle=@hastitles2[$see]; chomp($slttitle); } if($slttitle!~/^[0-9]+$/){&errorview("Ìû×ÓID´íÎó£¡");} open(TITLES,"$filepath/list/$id/$slttitle"); $m=; close(TITLES); ($rtitles,$rthistime,$rusername,$nr,$rfrom,$rhasreply,$remote,$rlastname,$rlasttime,$re,$rhassee,$jing,$lock,$voteman,$votetol)=split(/\t/,$m); unless($rtitles && $remote){print "Content-type: text/html\n\n";exit;} $rtitles=~s/[\"\'`]//g; if(length($rtitles)>40){$rtitles40=substr($rtitles,0,40);$rtitles40.="...";}else{$rtitles40=$rtitles;} if($Cookies{clicks} ne $slttitle){ print "Set-Cookie:clicks=$slttitle\n"; $rhassee++; open(PSD,">$filepath/list/$id/$slttitle"); print PSD $rtitles."\t".$rthistime."\t".$rusername."\t".$nr."\t".$rfrom."\t".$rhasreply."\t".$remote."\t".$rlastname."\t".$rlasttime."\t".$re."\t".$rhassee."\t".$jing."\t".$lock."\t".$voteman."\t".$votetol; close(PSD); &people; } if($voteman){$votetol=$votetol/$voteman;}else{$voteman=0;} if (-f "$filepath/yhzl/$rusername.cgi"){ open(PSD,"$filepath/yhzl/$rusername.cgi"); $lines=; close(PSD); ($rpassword,$rname,$rdmail,$rhome,$rlast,$rqm,$rsex,$rwork,$rcity,$rlove,$rfy,$rhf,$tu,$jiao,$iewin,$QQ,$photo,$rating,$levelname,$level)=split(/\t/,$lines); if($rating eq ""){$rating="0";} open (FILE, "$filepath/data/rank"); @rank = ; close(FILE); $titles=$rtitles; $titles=~s/ //g; foreach $rank (@rank) { chomp($rank); if (($rank eq $Cookies{username})&&($Cookies{username} ne "")){$ranks=" ²Ù×÷";}} if($rusername eq $bzmc || $rusername eq $fbzmc || $rusername eq $fbzmc2){$level="";$levelname="ÂÛ̳°æÖ÷";} $tol=$rfy+$rhf; if($rcity eq ""){($ip1,$ip2,$ip3,$ip4)=split(/\./,$rfrom);$rfrom="$ip1.$ip2.$ip3.*";$rcity=$rfrom;} if($QQ){$qq="$rusernameµÄQQºÅÂ룺$QQ¡¡";} if($rqm){$rqm="
¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª
$rqm
";} } if($see==""){$see=0;} $see2=$see-1;$see1=$see+1; if($see2 < 0){$see2=0;} &css; print <TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px} $rtitles
  Ö÷Ì⣺$rtitles40 - BBS3000 Internet Explorer
¡¡µ±Ç°Î»Öà $bbsname $rtitles

 ¡ö »Ø¸´Êý£º$rhasreply¡¡¡ô µã»÷Êý£º$rhassee ½«´ËÒ³·¢¸øÄúµÄÅóÓÑ
»Ø¸´ ÊÕ²Ø ´òÓ¡ ˢРƪĩ
"; } print <
×÷Õß Ö÷Ìâ: $rtitles EOF if($rhasreply>15){ print "( Ò³:"; if($page==0){$page=1}; $j=$rhasreply;while ($j>0) {$j=$j-15;}$ii++; $j=$rhasreply;while ($j>0) {print "" if ($page != $ii); print " $ii ";$j=$j-15;$ii++;} print ")
EOF if($page < 2){ print<
$rusername


$level
$levelname
ÍþÍû£º$rating$ranks
·¢±íÓÚ $rthistime¡¡¡¡ ²é¿´$rusernameµÄÐÅÏ¢¡¡¸ø$rusername·¢ÐÅ¡¡·ÃÎÊ$rusernameµÄÖ÷Ò³  $qq¸ø$rusernameÁôÑÔ¡¡±à¼­Ìû×Ó¡¡ÒýÓûظ´¡¡¸´ÖÆ´ËÌùÄÚÈÝ¡¡½«±¾Ìû×ÓÄÚÈÝͨ¹ýEmail´ò°üÏÂÔØ¡¡¼ÓΪºÃÓÑ¡¡É¾³ý´ËÌû×Ó
$nr$rqm
×Ü·¢ÌûÊý: $tol | À´Ô´: $rcity | ×¢²áÈÕÆÚ: $rlast$iewin IP: ÒѼǼ
EOF } if($rhasreply > 0 && $re ne ""){ open(REPLY,"$filepath/list/$id/$re"); @hasreply=; close(REPLY); $size=@hasreply; if($page==0){$page=1}; $pages=$page-1; $pages=$page*15-15; for($i=$pages; $i<$pages+15; $i++) { $m=@hasreply[$i]; $sn++; chomp($m); if($m){ ($rtime,$rthistime,$rusername,$nr,$rfrom,$remote,$retitles)=split(/\t/,$m); if($Cookies{badname} ne $rusername){ if (-f "$filepath/yhzl/$rusername.cgi"){ open(PSD,"$filepath/yhzl/$rusername.cgi"); $lines=; close(PSD); ($rpassword,$rname,$rmail,$rhome,$rlast,$rqm,$rsex,$rwork,$rcity,$rlove,$rfy,$rhf,$tu,$jiao,$iewin,$QQ,$photo,$rating,$levelname,$level)=split(/\t/,$lines); if($rating eq ""){$rating="0";} open (FILE, "$filepath/data/rank"); @rank = ; close(FILE); $titles=$rtitles; $titles=~s/ //g; foreach $rank (@rank) { chomp($rank); if (($rank eq $Cookies{username})&&($Cookies{username} ne "")){$ranks=" ²Ù×÷";}} if($rusername eq $bzmc || $rusername eq $fbzmc || $rusername eq $fbzmc2){$level="";$levelname="ÂÛ̳°æÖ÷";} $tol=$rfy+$rhf; if($rcity eq ""){($ip1,$ip2,$ip3,$ip4)=split(/\./,$rfrom);$rfrom="$ip1.$ip2.$ip3.*";$rcity=$rfrom;} $qq=""; if($QQ){$qq="$rusernameµÄQQºÅÂ룺$QQ¡¡";} if($rqm){$rqm="
¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª¡ª
$rqm
";} } print "
$rusername


$level
$levelname
ÍþÍû£º$rating$ranks
$retitles ·¢±íÓÚ $rthistime¡¡¡¡ ²é¿´$rusernameµÄÐÅÏ¢¡¡¸ø$rusername·¢ÐÅ¡¡·ÃÎÊ$rusernameµÄÖ÷Ò³¡¡$qq¸ø$rusernameÁôÑÔ¡¡±à¼­Ìû×Ó¡¡ÒýÓûظ´¡¡¸´ÖÆ´ËÌùÄÚÈÝ¡¡½«±¾Ìû×ÓÄÚÈÝͨ¹ýEmail´ò°üÏÂÔØ¡¡¼ÓΪºÃÓÑ¡¡É¾³ý´ËÌû×Ó
$nr$rqm
×Ü·¢ÌûÊý: $tol | À´Ô´: $rcity | ×¢²áÈÕÆÚ: $rlast$iewin IP: ÒѼǼ
EOF }}}} if($Cookies{xuansave}){$savechecked=checked;} print <
 ¿ìËٻظ´Ö÷Ì⣺ Re:$rtitles
 Ñ¡ÏÓû§Ãû£º ûÓÐ×¢²á£¿¡¡ÃÜÂ룺 Íü¼ÇÃÜÂ룿
¼ÇסÃÜÂë
HTMLÓï·¨
½ûÖ¹YBB´úÂë
½ûÖ¹±íÇé×Ö·û
¼ÄÓʼþ¸ø×÷Õß

 ÎÒÒªÆÀ±È£º ¹² $voteman Ʊ ¡¡
EOF print "
ËùÓÐʱ¼ä¾ùΪ: ±±¾©Ê±¼ä ¡üTOP "; if($rhasreply>15){ print "[µÚ"; if($page==0){$page=1}; $j=$rhasreply;while ($j>0) {$j=$j-15;}$ii2++; $j=$rhasreply;while ($j>0) {print "" if ($page != $ii2); print " $ii2 ";$j=$j-15;$ii2++;} print "Ò³]"; } print "
"; $onMouse=" "; print < EOF if ($lock eq "1"){print "$onMouse¿ª·ÅÖ÷Ìâ";}else{print "$onMouse¹Ø±ÕÖ÷Ìâ";} print "$onMouseÀ­Ç°Ö÷Ìâ"; print "$onMouseÒÆ¶¯Ö÷Ìâ$onMouseÖ÷ÌâÖö¥$onMouseÈ¡ÏûÖö¥"; print "$onMouse¼ÓÈ뾫»ª"; print "$onMouseÒÆ³ö¾«»ª"; print "$onMouseɾ³ýÖ÷Ìâ"; print < $htmlw
Powered by Yuzi Studios © 2001
Yuzi Bulletin BoardTM Version $ver EOF exit; } ########## sub findtitle{ if($search eq ""){&errorview("ÊäÈëÄúÒªËÑË÷µÄ×Ö·û£¡");} if($Cookies{search} eq "" || $ENV{'HTTP_COOKIE'} eq ""){print "Content-type: text/html\n\nÕýÔÚËÑË÷...";exit;} print "Set-Cookie:search=\n"; opendir(MEMBERDIR, "$filepath/list/$id"); @hastitles=readdir(MEMBERDIR); closedir(MEMBERDIR); @hastitles=reverse @hastitles; $size=0; foreach $hastitle (@hastitles){ if(length($hastitle) eq "14"){ open(TITLES,"$filepath/list/$id/$hastitle"); $a=; close(TITLES);} if($a =~ /$search/gi){ $size++; @hastitles[$size]="$a\n"; $a=""; }} &css; print <TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px} $bbsname£¨BBS ·ç¸ñ£©$htmlt
ÂÛ̳Ãû³Æ£º$bbsname¡¡¡¡°æÖ÷£º$bzmc $fbzmc $fbzmc2$outurl

 ·¢±íÎÄÕ Ìí¼ÓÒéÌâ>>Ãâ·ÑÂÛ̳ÉêÇë>>°æÖ÷×ÊÁÏÐÞ¸Ä>>Óû§×ÊÁÏ×¢²á>>Óû§×ÊÁÏÐÞ¸Ä>>ÍøÂçѰºô»ú>>¾«»ªÇø
ˢе±Ç°ÂÛ̳ ÎÒµÄÁôÑÔ²¾¡¡ËÑË÷×Ö·û: $search¡¡ÕÒµ½Ïà¹ØÎÄÕÂ: $size¡¡Ê¹ÓðïÖú
¡¡ÎÄÕ±êÌâ ×Ö[»Ø]×÷Õß ×îºó¸üÐÂʱ¼ä×îºó»Ø¸´ µã»÷
EOF $syy=$page-$perpage; for ($i=$page; $i<$page+$perpage; $i++){ $hastitle=@hastitles[$i]; if($hastitle){ ($rtitles,$rthistime,$rusername,$rcomment,$rfrom,$rhasreply,$emote,$lastname,$rlasttime,$re,$rhassee,$jing,$lock)=split(/\t/,$hastitle); if($Cookies{badname} ne $rusername){ $re = substr($re,0,14); if (length($rtitles) > 40) {$rtitles = substr($rtitles,0,40);$rtitles.="...";} if($lock eq "1"){$hot="lock.gif";} elsif($rhasreply<1){$hot="closedb.gif";} elsif($rhasreply<15){$hot="closed.gif";} elsif($rhasreply>=15){$hot="hot.gif";} ($oldday)=split(/\./,$rlasttime); $new=""; if(($rhassee<=$people)&&($oldday eq $lasttime)){$new="";} if($jing eq "1"){$my="";} elsif($rusername eq $username){$my="";}else{$my="¡¡";} print < $my
д°¿Ú $rtitles $new EOF $ii=0; if($rhasreply>15){ print "[µÚ "; $j=$rhasreply;while($j>0){$j=$j-15;}$ii++; $j=$rhasreply;while($j>0){print ""; print "$ii ";$j=$j-15;$ii++;} print "Ò³]";$ii--;} if($rhasreply eq 0){$rhasreply=length($rcomment);}else{$sn=$rhasreply;$rhasreply="[$rhasreply]";} if($lastname ne "--"){$lastname="$lastname";} print <$rhasreply$rusername µ½×îз¢±íµÄÒ³ÃæÉÏ $rlasttime $lastname$rhassee EOF }}} print <
ËùÓÐʱ¼äΪ ±±¾©Ê±¼äBBS ·ç¸ñ ÌÖÂÛÇø·ç¸ñ ÁôÑÔ²¾·ç¸ñ EOF if($syy>-1){ print ""; }else{ print ""; } if(($size>$perpage)&&($i<$size)){ print ""; }else{ print ""; } print <


ÊäÈëÄúÒªËÑË÷µÄ×Ö·û
ÄúµÄÐÕÃû ÄúµÄÃÜÂë

$htmlw
±¾ÂÛ̳ÑÔÂÛ´¿Êô·¢±íÕ߸öÈËÒâ¼û£¬Óë $zyname Á¢³¡ÎÞ¹Ø
Ãâ·ÑÂÛ̳·þÎñÓÉ $zyname Ìṩ ¼¼ÊõÖ§³Ö£ºYuzi¹¤×÷ÊÒ
Yuzi Bulletin BoardTM Version $ver EOF exit; } sub top{ open (FILE, "$filepath/list/$id/top"); @top = ; close(FILE); $size=$size+@top; foreach $top(@top) { chomp($top); open(TITLES,"$filepath/list/$id/$top"); $m=; close(TITLES); ($rtitles,$rthistime,$rusername,$nr,$rfrom,$rhasreply,$emote,$lastname,$rlasttime,$re,$rhassee,$jing,$lock,$voteman,$votetol)=split(/\t/,$m); if($voteman){$alt{1}="Ì«²îÁË";$alt{2}="Óеã²î";$alt{3}="Ò»°ãÐÔ";$alt{4}="ͦ²»´í";$alt{5}="ÌØ±ðºÃ";$votetol=int($votetol/$voteman);$vote="$alt{$votetol}(¹²$votemanƱ)";}else{$vote="¡¡";} open (FILE, "$filepath/data/rank"); @rank = ; close(FILE); foreach $rank (@rank) { chomp($rank); if (($rank eq $Cookies{username})&&($Cookies{username} ne "")){ if ($lock eq "1"){$open="|½â";}else{$open="|Ëø";} $ranks="
$open|Ïû|ÒÆ|ɾ
";}} $nr=~s/<([^>]|\n)*>//g; $lnr=length($nr); if (length($rtitles) > 40) {$rtitles = substr($rtitles,0,40);$rtitles.="...";} if (length($nr) > 40) {$nr = substr($nr,0,40);$nr.="...";} $nr=~s/\'//g; if($lock eq "1"){$hot="lock.gif";} elsif($rhasreply<1){$hot="closedb.gif";} elsif($rhasreply<15){$hot="closed.gif";} elsif($rhasreply>=15){$hot="hot.gif";} if($rhasreply eq 0){$rhasreply=$lnr;}else{$sn=$rhasreply;$rhasreply="[$rhasreply]";} if($lastname ne "--"){$lastname="$lastname";} if($rtitles){ $deltop++; $tophtml="
д°¿Ú $rtitles $new$ranks$rhasreply$rusername µ½×îз¢±íµÄÒ³ÃæÉÏ $rlasttime $lastname$rhassee$vote
$tophtml"; } } if($deltop < 1){unlink("$filepath/list/$id/top");} } sub people{ if($Cookies{estate} eq "1"){$tu=estate;} $people=1; open (FILE,"$filepath/data/people.cgi"); @LINES=; close(FILE); $SIZE=@LINES; open (FILE,">$filepath/data/people.cgi"); for ($i=0;$i<$SIZE;$i++) { $_=$LINES[$i]; ($addr,$come_hour,$come_min,$come_sec,$olduser)=split(/\t/,$_); $flag=($hour-$come_hour)*3600+($min-$come_min)*60+($sec-$come_sec); if($addr eq $from && $olduser eq $Cookies{username}){ print FILE $from."\t".$hour."\t".$min."\t".$sec."\t".$Cookies{username}."\t$tu\t$bbsname\t$rtitles40\t$cgiurl?$ENV{'QUERY_STRING'}\n"; $check=1; } elsif ($flag < $timepop && $flag > 0) { print FILE $_; $people++; }} if ($check == 0) { print FILE $from."\t".$hour."\t".$min."\t".$sec."\t".$Cookies{username}."\t$tu\t$bbsname\t$rtitles40\t$cgiurl?$ENV{'QUERY_STRING'}\n"; } close (FILE); } ######################### END OF SCRIPT #########################