#!/usr/bin/perl #------------------------------------------------------# #         本程序为Yuzi工作室提供       # #        Yuzi论坛3000(BBS3000)v4.00      # #------------------------------------------------------# $cgipa="."; # CGI程序文件的绝对路径 $listpage=20; # 社区每页显示的论坛数目 $refresh=120; #左边列表自动刷新时间(秒) $gomoney=10; #每次访问会员增加的钱 $goml=1; #每次访问会员增加的魅力 $bar="no"; #是否开启左边的滚动条,或自动 yes no auto ###################### ## 以下部分不需修改 ## ###################### require "$cgipa/setup.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=~s/\.\.//g; $FORM{$name} = $value; } $page=$FORM{'page'}; $username=$FORM{'username'}; $menu=$FORM{'menu'}; $id=$FORM{'id'}; $username=$Cookies{username}; $userpsd=$Cookies{password}; if($username ne ""){ open(PSD,"$filepath/yhzl/$username.cgi"); $line=; close(PSD); ($rpassword,$rusername,$rdmail,$rdhome,$rdlasttime,$rdqm,$rdsex,$rdwork,$rdcity,$rdlove,$rfy,$rhf,$tu,$jiao,$iewin,$QQ,$photo,$savecookie,$levelname,$level)=split(/\t/,$line); } $gtu=$tu; if($menu eq ""){&index;exit;} if($menu eq "main_frame"){ print "Content-type: text/html\n\n"; print < EOF exit; } open(TITLES,"$filepath/data/newmember"); $m=; close(TITLES); ($newmember,$membertol)=split(/\t/,$m); if($menu eq "many"){&many;exit;} if($menu eq "show"){&show;exit;} exit; ########## sub show{ open(PSD,"$filepath/temp/list.stat")||open(PSD,">$filepath/temp/list.stat"); $jrll=; close(PSD); 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社区首页\t\tlist.cgi target=_top\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社区首页\t\tlist.cgi target=_top\n"; if ( -e "$filepath/yhzl/$username.cgi"){ open(NUMBER,"$filepath/guest/2$username.cgi"); $NUMBER=; close(NUMBER); ($lys1,$oldlys1,$money1,$charm1)=split(/\t/,$NUMBER); $money1=$money1+$gomoney;$charm1=$charm1+$goml; open(NUMBER,">$filepath/guest/2$username.cgi"); print NUMBER "$lys1"."\t"."$oldlys1"."\t"."$money1"."\t"."$charm1"; close(NUMBER);} open(PSD,">$filepath/temp/list.stat"); $jrll++; print PSD $jrll; close(PSD); } close (FILE); open(PSD,"$filepath/list/bbs"); $index=; close(PSD); open(PSD,"$filepath/list/$index"); $line=; close(PSD); ($index)=split(/\t/,$line); &css; print <TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}
$cityname
$index 管理人员 社区区长:$admname 注册会员:$membertol 总访问量:$jrll
最新加盟:$newmember
论坛 主题 最后发表 版主 私人珍藏
EOF open(ROOM,"$filepath/data/list.cgi"); @lines=; close(ROOM); $size=@lines; $ii=0; $j=$size; while ($j>0) { $j=$j-$listpage; $ii++; } if($page eq ""){$page=1;} $pages=$page-1; $pages=$page*$listpage-$listpage; for($i=$pages; $i<$pages+$listpage; $i++) { $line=@lines[$i]; chomp($line); ($username1,$sort)=split(/__/,$line); if($sort ne ""){ print "
 $sort
"; }else{ ($username1)=split(/\t/,$username1); if($username1 ne ""){ open(TITLES,"$filepath/list/$username1.cgi")|| &errorview("系统不存在ID为$username1的论坛,请到社区管理->>论坛列表设置->>更新列表"); $m=; close(TITLES); ($rname,$secret,$rmail,$rhome,$rtitle,$fbzmc2,$rtime,$htmlt,$htmlw,$jj,$fbzmc,$add,$reply,$on)=split(/\t/,$m); $bbsbook="$filepath/list/$username1/bbs"; open(TITLES,"$bbsbook"); @hastitles=; close(TITLES); $wzs=@hastitles; if($wzs > 0){ $rq=(-M "$bbsbook"); $hastitle=@hastitles[0]; open(fff,"$filepath/list/$username1/$hastitle"); $fff=; close(fff); ($rtitles,$rthistime,$rusername,$nr,$rfrom,$rhasreply,$remote,$lastname,$rlasttime)=split(/\t/,$fff); if (length($rtitles) > 20) {$rtitles = substr($rtitles,0,20);$rtitles.="...";} if($lastname eq "--"){$lastname=$rusername}; $zhuihou="
$rtitles ($lastname)
$rlasttime
"; } print < EOF if ($secret =~/__/i){do "$cgipa/sub/check.cgi";$huiyuan="($dejiname1)";}else{$huiyuan="";} if (($secret ne "") && !($secret =~/__/i)){print "保密论坛";} elsif($rq < "1"){print "有新的贴子";}else{print "没有新贴子";} if ($add eq "1"){$jzfb="(禁止发表)";}else{$jzfb="";} if ($reply eq "1"){$jzhf="(禁止回复)";}else{$jzhf="";} if ($on eq "1"){$zsgb="(暂时关闭)";}else{$zsgb="";} print < $rtitle$huiyuan $jzfb $jzhf $zsgb
$jj $wzs $zhuihou $rname
$fbzmc
$fbzmc2 添加/删除 EOF }} } foreach $line (@LINES) { ($rip,$r1,$r2,$r3,$rname,$tuu,$namebbs,$rtitles,$act)=split(/\t/,$line); if($rtitles){$rtitless="\n当前动作:浏览“$rtitles”";} $particular="活动时间:$r1:$r2:$r3\n目前位置:$namebbs$rtitless"; if($rtitles){$rtitles=substr($rtitles,0,24);$rtitles.=".";$newl="";if($NO_c < 3 ){$NO_c ++;}else{$NO_c=1;}$newl=""if ($NO_c==3);$hottitle="$hottitle○ $rtitles$newl";} $rtitless=""; if($rname ne "" && $tuu ne "estate"){ $newline=""; if($NO_count <6){$NO_count ++;}else{$NO_count=1;} $newline=""if ($NO_count==6); $rname2="发送讯息$rname$newline";} else{$rname2="";} $rname1="$rname1$rname2";} print < 热点论题
$hottitle
EOF if($openlucida eq "on"){ $rqlucida=(-M "$filepath/data/lucida"); if(($rqlucida > $lucidatime)||(-z "$filepath/data/lucida")){&lucida;} open (FILE,"$filepath/data/lucida") || &lucida; $lucida=; close(FILE); ($lucida,$lucida2)=split(/\t/,$lucida); open(PSD,"$filepath/yhzl/$lucida.cgi"); $lines=; close(PSD); ($rpassword,$rname,$rmail,$rhome,$rlast,$rqm,$rsex,$rwork,$rcity,$rlove,$rfy,$rhf,$tuu,$jiao,$iewin,$QQ,$photo)=split(/\t/,$lines); if($jiao eq ""){$jiao="这家伙很懒,什么都没有留下。"}; if($photo eq ""){$photostar="$imagurl/photo.gif";}else{$photostar="$ImgurlDir/$photo.jpg";} if (length($jiao) > 100) {$jiao = substr($jiao,0,100);$jiao.="...";} open(PSD,"$filepath/yhzl/$lucida2.cgi"); $lines=; close(PSD); ($rpassword,$rname,$rmail,$rhome,$rlast,$rqm,$rsex2,$rwork,$rcity,$rlove,$rfy,$rhf,$tuu,$jiao2,$iewin,$QQ,$photo2)=split(/\t/,$lines); if($jiao2 eq ""){$jiao2="这家伙很懒,什么都没有留下。"}; if($photo2 eq ""){$photostar2="$imagurl/photo.gif";}else{$photostar2="$ImgurlDir/$photo2.jpg";} if (length($jiao2) > 100) {$jiao2 = substr($jiao2,0,100);$jiao2.="...";} print < 社区明星
$lucida
个人简介
$lucida2
个人简介
昵 称 :$lucida
性 别 :$rsex
介 绍 :$jiao
昵 称 :$lucida2
性 别 :$rsex2
介 绍 :$jiao2
EOF } if($username ne ""){ ($kkk)=split(/\)/,$ENV{'HTTP_USER_AGENT'}); ($bzd,$ie,$win,$me)=split(/;/,$kkk); if($me eq " Win 9x 4.90"){$win=" Windows Me"} elsif($win eq " Windows NT 5.0"){$win=" Windows 2000"} elsif($win eq " Windows NT 5.1"){$win=" Windows XP"}; open(NUMBER,"$filepath/guest/2$username.cgi"); $NUMBER=; close(NUMBER); ($lys,$tollys)=split(/\t/,$NUMBER); print < 您的个人状态
$username - 您现在有 $tollys 条留言 (有 $lys 条新留言)
您的 IP 是:$from  操作系统:$win  浏览器:$ie
EOF } print <; close(PSD2); if($lines2[0] ne ""){ print < 联盟论坛
EOF foreach $line (@lines2) { if ($line ne "") { ($linkname,$friendlink,$linktext)=split(/\t/,$line); if ($num_ == 6) { print "
"; $num_=0;} print " $linkname"; $num_++; }}}} print <
在线用户
看看现在谁在这个论坛($people)
$rname1
EOF $j=$size; while ($j>0) { print "" if ($page != $ii); print "[$ii]"; $j=$j-$listpage; $ii--; } print <Powered by Yuzi Studios © 2001
Yuzi Bulletin Board VersionTM $ver
EOF exit; } ########## sub index{ print "Content-type: text/html\n\n"; print <
3
EOF if($id ne ""){ open (CHAT,"$filepath/list/$id.cgi"); $line=; close(CHAT); ($bzmc,$rpass,$bzrmail,$outurl,$bbsname)=split(/\t/,$line); print <$bbsname
EOF }else{ print <$cityname EOF } exit; } sub many{ open (FILE,"$filepath/data/people.cgi"); @LINES=; close(FILE); $people=@LINES; open(PSD,"$filepath/temp/toponline.stat")||open(PSD,">$filepath/temp/toponline.stat"); $toponline=; close(PSD); if ( $people > $toponline){ $toponline = $people; open(PSD,">$filepath/temp/toponline.stat"); print PSD $toponline; close(PSD);} print "Content-type: text/html\n\n"; print < EOF }else{ $tol=$rfy+$rhf; open(NUMBER,"$filepath/guest/2$username.cgi"); $NUMBER=; close(NUMBER); ($lys,$oldlys,$money,$charm)=split(/\t/,$NUMBER); if($Cookies{estate} eq "1"){$estate="隐身";}else{$estate="在线";} print <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;}
$username
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); } ######################### END OF SCRIPT #########################
EOF if($username eq ""){ print <

$from

您目前是访客

--欢迎您的到来--

本社区不用注册就可以发帖子,但您只有注册之后,才能享受到本社区的赛马等精彩服务。

■ 登陆社区

■ 找回密码

■ 注册会员

■ 返回首页
----------------
在线用户:$people人
注册会员:$membertol人
在线峰值:$toponline人
----------------
Version $ver

EOF if($jump eq "1"){ open(ROOM,"$filepath/data/list.cgi"); @lines=; close(ROOM); $i=1; foreach $line (@lines){ ($id1,$sort)=split(/__/,$line); if($sort eq "" && $i eq 1){print " 社区论坛
";} if($sort ne ""){ print "
 $sort
"; }else{ ($id,$bbsname)=split(/\t/,$id1); print " ├ $bbsname
"; } $i++; } } print < 社区娱乐
EOF open (PEO,"$cgipa/fun.txt"); @fun=; close (PEO); foreach $fun (@fun){ chomp($fun); ($funname,$funurl)=split(/\t/,$fun); print " ├ $funname
"; } print <  社区设施
EOF open (PEO,"$cgipa/ss.txt"); @fun=; close (PEO); foreach $fun (@fun){ chomp($fun); ($funname,$funurl)=split(/\t/,$fun); print " ├ $funname
"; } print <  增值服务
EOF open (PEO,"$cgipa/up.txt"); @fun=; close (PEO); foreach $fun (@fun){ chomp($fun); ($funname,$funurl)=split(/\t/,$fun); print " ├ $funname
"; } print <  会员服务
EOF if ($username eq $admname){print " ├ 社区管理
";} print <我的日记
 ├ 我的宠物
 ├ 修改资料
 ├ 照片上传
 ├ 头像上传
 ├ 查询网友
 ├ 查看留言
 ├ 发贴记录
 ├ 贴子回收
 ├ 更改用户
 私人珍藏
EOF open (PEO,"$filepath/favorites/$username.cgi")||open (PEO,">$filepath/favorites/$username.cgi"); @lineszd=; close (PEO); foreach $lineszds (@lineszd) { chomp($lineszds); ($rnamezd,$bbsming)=split(/\t/,$lineszds); print " ├ $bbsming
"; } print <  改变状态
 ├ 上 线
 ├ 隐 身
 返回首页
 离开社区
----------------
 姓名: $username
 状态: $estate
 等级: $levelname
 发贴: $tol
 纹银: $money
 魅力: $charm
 在线: $people人
 峰值:$toponline人
----------------
Version $ver