#!/usr/bin/perl -
#####################################################
# LEO SuperCool BBS / LeoBBS X / 雷傲极酷超级论坛 #
#####################################################
# 基于山鹰(糊)、花无缺制作的 LB5000 XP 2.30 免费版 #
# 新版程序制作 & 版权所有: 雷傲科技 (C)(R)2004 #
#####################################################
# 主页地址: http://www.LeoBBS.com/ #
# 论坛地址: http://bbs.LeoBBS.com/ #
#####################################################
BEGIN {
$startingtime=(times)[0]+(times)[1];
foreach ($0,$ENV{'PATH_TRANSLATED'},$ENV{'SCRIPT_FILENAME'}){
my $LBPATH = $_;
next if ($LBPATH eq '');
$LBPATH =~ s/\\/\//g; $LBPATH =~ s/\/[^\/]+$//o;
unshift(@INC,$LBPATH);
}
}
use LBCGI;
$LBCGI::POST_MAX=500000;
$LBCGI::DISABLE_UPLOADS = 1;
$LBCGI::HEADERS_ONCE = 1;
use VISITFORUM qw(getlastvisit setlastvisit);
require "data/boardinfo.cgi";
require "data/styles.cgi";
require "data/mpic.cgi";
require "bbs.lib.pl";
require "rebuildlist.pl";
$|++;
$thisprog = "forums.cgi";
eval ('$complevel = 9 if ($complevel eq ""); use WebGzip($complevel);') if ($usegzip eq "yes");
$query = new LBCGI;
if ($COOKIE_USED eq 2 && $mycookiepath ne "") { $cookiepath = $mycookiepath; } elsif ($COOKIE_USED eq 1) { $cookiepath =""; }
else {
$boardurltemp =$boardurl;
$boardurltemp =~ s/http\:\/\/(\S+?)\/(.*)/\/$2/;
$cookiepath = $boardurltemp;
$cookiepath =~ s/\/$//;
# $cookiepath =~ tr/A-Z/a-z/;
}
&ipbanned; #封杀一些 ip
$jumpto = $query -> param('jumpto'); if ($jumpto) { print redirect(-location=>"$jumpto"); exit; }
$inforum = $query -> param('forum');
&error("打开论坛&老大,别乱黑我的程序呀!") if ($inforum !~ /^[0-9]+$/);
if (-e "${lbdir}data/style${inforum}.cgi") { require "${lbdir}data/style${inforum}.cgi"; }
$action = $query -> param('action');
$action = &stripMETA("$action");
$inshow = $query -> param('show');
$inshow = 0 if (($inshow !~ /^[0-9]+$/)||($inshow eq ""));
$deshow = $query -> param('dshow');
$deshow = "" if ($deshow !~ /^[0-9]+$/);
$startarray = $inshow;
$inthreadages = $query -> param('threadages');
$inthreadages = $defaulttopicshow if ($inthreadages eq "" && $defaulttopicshow ne "");
$inselectstyle = $query->cookie("selectstyle");
&error("普通错误&老大,别乱黑我的程序呀!") if (($inselectstyle =~ m/\//)||($inselectstyle =~ m/\\/)||($inselectstyle =~ m/\.\./));
if (($inselectstyle ne "")&&(-e "${lbdir}data/skin/${inselectstyle}.cgi")) {require "${lbdir}data/skin/${inselectstyle}.cgi";}
$currenttime = time;
&error("打开论坛&对不起,这个论坛不存在!如果确定分论坛号码没错,那么请进入管理区修复论坛一次!") if (!(-e "${lbdir}boarddata/listno$inforum.cgi"));
$inshow = int($inshow/$maxthreads+0.5)*$maxthreads;
$inshow = ($deshow-1) * $maxthreads if ($deshow ne "");
$inmembername = $query -> param('membername');
$inpassword = $query -> param('password');
if ($inpassword ne "") {
eval {$inpassword = md5_hex($inpassword);};
if ($@) {eval('use Digest::MD5 qw(md5_hex);$inpassword = md5_hex($inpassword);');}
unless ($@) {$inpassword = "lEO$inpassword";}
}
$forumpassword = $query -> param('forumpassword');
if (! $inmembername) { $inmembername = $query->cookie("amembernamecookie"); }
if (! $inpassword) { $inpassword = $query->cookie("apasswordcookie"); }
$inmembername =~ s/[\a\f\n\e\0\r\t\`\~\!\@\#\$\%\^\&\*\(\)\+\=\\\{\}\;\'\:\"\,\.\/\<\>\?]//isg;
$inpassword =~ s/[\a\f\n\e\0\r\t\|\@\;\#\{\}\$]//isg;
if ((!$inmembername) or ($inmembername eq "客人")) { $inmembername = "客人"; }
else {
# &getmember("$inmembername");
&getmember("$inmembername","no");
&error("普通错误&此用户根本不存在!") if ($userregistered eq "no");
if ($inpassword ne $password) {
$namecookie = cookie(-name => "amembernamecookie", -value => "", -path => "$cookiepath/");
$passcookie = cookie(-name => "apasswordcookie", -value => "", -path => "$cookiepath/");
print header(-cookie=>[$namecookie, $passcookie] , -expires=>"$EXP_MODE" , -cache=>"$CACHE_MODES");
&error("普通错误&密码与用户名不相符,请重新登录!");
}
&getlastvisit;
$forumlastvisit = $lastvisitinfo{$inforum};
&setlastvisit("$inforum,$currenttime");
}
require "${lbdir}imagead.cgi" if (($forumimagead eq "1")||($useimageadforum eq "1")||($forumimagead1 eq "1")||($useimageadforum1 eq "1"));
$defaultsmilewidth = "width=$defaultsmilewidth" if ($defaultsmilewidth ne "" );
$defaultsmileheight = "height=$defaultsmileheight" if ($defaultsmileheight ne "");
$addtimes = $timedifferencevalue*3600 + $timezone*3600;
$screenmode = $query->cookie("screenmode");
$screenmode = 8 if ($screenmode eq "");
my $onlineview1 = $query->cookie("onlineview");
$onlineview = $onlineview1 if ($onlineview1 ne "");
$onlineview = 0 if ($onlineview eq "");
$onlineview = $onlineview == 1 ? 0 : 1 if ($action eq "onlineview");
$onlineviewcookie = cookie(-name => "onlineview", -value => "$onlineview", -path => "$cookiepath/", -expires => "+30d");
if ($onlineview == 1) { $onlinetitle="[关闭详细列表]"; }
else { $onlinetitle="[显示详细列表]"; }
&moderator("$inforum");
require "doaccessrequire.pl" if ($action eq "accessrequired");
require "resetposts.pl" if ($action eq "resetposts");
if ($catbackpic ne "") { $catbackpic = "background=$imagesurl/images/$skin/$catbackpic"; }
$insidead = "" if (($forumimagead ne "1")&&($useimageadforum eq "0")); $insidead1 = "" if (($forumimagead1 ne "1")&&($useimageadforum1 eq "0"));
print header(-cookie=>[$allowforumcookie, $onlineviewcookie, $tempvisitcookie, $permvisitcookie] , -expires=>"$EXP_MODE" , -cache=>"$CACHE_MODES");
&error("进入论坛&一般会员不允许进入此论坛!") if (($startnewthreads eq "cert")&&(($membercode ne "ad" && $membercode ne "smo" && $membercode ne "cmo" && $membercode ne "mo" && $membercode ne "amo" && $membercode !~ /^rz/)||($inmembername eq "客人"))&&($userincert eq "no"));
if ($allowusers ne ''){
&error('进入论坛&你不允许进入该论坛!') if (",$allowusers," !~ /,$inmembername,/i && $membercode ne 'ad');
}
if ($membercode ne 'ad' && $membercode ne 'smo' && $inmembmod ne 'yes') {
&error("进入论坛&你不允许进入该论坛,你的威望为 $rating,而本论坛只有威望大于等于 $enterminweiwang 的才能进入!") if ($enterminweiwang > 0 && $rating < $enterminweiwang);
if ($enterminmony > 0 || $enterminml > 0 || $enterminjy > 0 ) {
require "data/cityinfo.cgi" if ($addmoney eq "" || $replymoney eq "" || $moneyname eq "");
$mymoney1 = $numberofposts * $addmoney + $numberofreplys * $replymoney + $visitno * $loginmoney + $mymoney - $postdel * $delmoney + $jhcount * $addjhhb;
$meili1 = $numberofposts * $addml + $numberofreplys * $replyml + $visitno * $loginml + $meili - $postdel * $delml + $jhcount * $addjhml;
$jingyan1 = $numberofposts * $ttojy + $numberofreplys * $rtojy + $visitno * $ltojy + $addjy - $postdel * $deljingyan + $jhcount * $addjhjy;
&error("进入论坛&你不允许进入该论坛,你的金钱为 $mymoney1,而本论坛只有金钱大于等于 $enterminmony 的才能进入!") if ($enterminmony > 0 && $mymoney1 < $enterminmony);
&error("进入论坛&你不允许进入该论坛,你的魅力为 $meili1,而本论坛只有魅力大于等于 $enterminml 的才能进入!") if ($enterminml > 0 && $meili1 < $enterminml);
&error("进入论坛&你不允许进入该论坛,你的经验为 $jingyan1,而本论坛只有经验大于等于 $enterminjy 的才能进入!") if ($enterminjy > 0 && $jingyan1 < $enterminjy);
}
}
if ($adlinks ne "") {
$adlinks = &HTML("$adlinks");
$adlinks =~ s/\$imagesurl/$imagesurl/isg;
$adlinks =~ s/\$tablebordercolor/$tablebordercolor/isg;
$adlinks =~ s/\$forumcolorone/$forumcolorone/isg;
$adlinks =~ s/\$forumcolortwo/$forumcolortwo/isg;
$adlinks =~ s/\[br\]/\n/isg;
$adlinks = "
";
}
&title;
if (-e "${lbdir}cache/forumshead$inforum.pl") {
eval{ require "${lbdir}cache/forumshead$inforum.pl";};
if ($@) { unlink ("${lbdir}cache/forumshead$inforum.pl"); require "doforumhead.pl"; }
} else { require "doforumhead.pl"; }
$output .= qq~$adlinks
$titleoutput
~;
if (-e "$lbdir"."3plug/3plug.pl"){require "3plug/3plug.pl";$output .= qq~$barinfo~;} # 3plugs
$output .= qq~~ if ((-e "${imagesdir}midi/$midiaddr")&&($midiaddr ne ""));
if ($canusetreeview ne "no") {
$output .= qq~
~;
}
$output .= qq~
$insidead$insidead1
~;
if ($privateforum eq "yes") {
if ($inmembername eq "客人") {
print "";
exit;
}
$testentry = cookie("forumsallowed$inforum");
if ((($testentry eq $forumpass)&&($testentry ne ""))||(($userregistered ne "no")&&($allowedentry{$inforum} eq "yes"))||($membercode eq "ad")||($membercode eq 'smo')||($inmembmod eq "yes")) {
if ($inpassword ne $password) { &error("进入论坛&密码错误,你不允许进入该论坛!"); }
} else { require "accessform.pl"; }
}
my $filetoopens = "$lbdir" . "data/onlinedata.cgi";
$filetoopens = &lockfilename($filetoopens);
if (!(-e "$filetoopens.lck")) {
if ($privateforum ne "yes") {
&whosonline("$inmembername\t$forumname\t$forumname\t查看论坛上的主题");
} else {
&whosonline("$inmembername\t$forumname(密)\t$forumname\t查看保密论坛上的主题");
}
undef $memberoutput if ($onlineview != 1);
} else {
unlink ("$filetoopens.lck") if ((-M "$filetoopens.lck") *86400 > 30);
$memberoutput = "";
$membertongji = " 由于服务器繁忙,所以本分论坛的在线数据暂时不提供显示。";
$onlinetitle = "";
}
$nowtime = &shortdate($currenttime + $timeadd);
if ($startnewthreads ne "onlysub") {
my ($todayforumpost, $todayforumposttime) = split(/\|/,$todayforumpost);
$todayforumpost = 0 if (($nowtime ne $todayforumposttime)||($todayforumpost eq ""));
$membertongji .= " 今日新贴有 $todayforumpost 篇";
$modoutput = "本论坛版主暂时空缺 " if (!$modoutput);
}
if ($announcements eq 'yes') {
if (-e "${lbdir}data/announce$inforum.pl") {
require "${lbdir}data/announce$inforum.pl";
$announcedisp =~ s/\$forumfontcolor/$forumfontcolor/isg;
$announcedisp =~ s/\$fonthighlight/$fonthighlight/isg;
} else {
$announcedisp=qq~ 当前没有公告~;
$announcetemp1 = qq~~;
}
}
$output .= qq~
| $announcetemp1 | $announcedisp |
| |
$membertongji $onlinetitle |
|
~;
$output =~ s/option value=\"$inthreadages\"/option value=\"$inthreadages\" selected/;
if ($onlineview == 1) { $output .= qq~ | ~; }
$output .= qq~ |
~;
if (($inshow eq 0)&&($#childforum >= 0)) { require "getcforms.pl"; }
if ($startnewthreads ne "onlysub") { #是纯子论坛,就不做显示
if (($xzbopen ne "no")&&($startnewthreads ne "no")&&($privateforum ne "yes")) { require "forumxzb.pl";}
if (($membercode eq "ad")||($membercode eq 'smo')||($inmembmod eq "yes")) {
$admindisp = $query->cookie('admindisp');
$admini = $admindisp eq '' ? '隐藏' : '显示';
$admini = qq~ $admini版主操作 ~;
$multimanage = qq~选 | ~;
$multimanageitem = qq~
| ~;
$output .= qq~
~;
}
my $freshtime= $query->cookie("freshtime");
if ($freshtime ne "") {
$autofreshtime = $freshtime*60-1;
$autofreshtime = 300 if ($autofreshtime < 59);
$output .= qq~\n~;
}
elsif ($refreshforum eq "on") {
$autofreshtime = 300 if ($autofreshtime < 59);
$output .= qq~\n~;
}
if (($privateforum eq "yes")||($xzbopen eq "no")||($startnewthreads eq "no")||($startnewthreads eq "cert")) { $newthreadbutton3 = ""; }
else { $newthreadbutton3 = qq~ ~; }
if ($pollopen eq "no") { $newthreadbutton2 = ""; }
else { $newthreadbutton2 = qq~ ~; }
if ($postopen eq "no") { $newthreadbutton1 = ""; }
else { $newthreadbutton1 = qq~ ~; }
$newthreadbutton = "$newthreadbutton1$newthreadbutton2$newthreadbutton3";
if ($startnewthreads ne "no") { $jinghua =qq~ 本版精华 ~; }
unless ($look eq "off") { $lookstyles =qq~ 本版配色 ~; }
$forumlog = qq~ 版务日志 ~;
$output.=qq~
| $newthreadbutton | $modoutput |
$admini$xzb | $jinghua$forumlog$lookstyles | |
状态 |
主 题 (点心情符为新闻方式阅读) |
作 者 |
回复/点击 |
最后更新 | 最后回复人 |
$multimanage
~;
if (-e "${lbdir}cache/forumstop$inforum.pl") {
eval{ require "${lbdir}cache/forumstop$inforum.pl";};
if ($@) { unlink ("${lbdir}cache/forumstop$inforum.pl"); unlink ("${lbdir}cache/plcache$inforum\_0.pl"); require "dotop.pl"; unlink ("${lbdir}cache/forumstoptopic$inforum.pl"); }
$jhdata = "" if ($usejhpoint ne "yes");
} else { require "dotop.pl"; unlink ("${lbdir}cache/forumstoptopic$inforum.pl"); unlink ("${lbdir}cache/plcache$inforum\_0.pl"); }
if ($dispabstop ne "0") {
@absontop = split(/\_/,$absontopdata);
$abstopcount = @absontop;
$absontopdata = "\_$absontopdata\_";
} else {
$abstopcount = 0;
$absontopdata = "";
}
if ($dispcattop ne "0") {
@catontop = split(/\_/,$catontopdata);
$cattopcount = @catontop;
$catontopdata = "\_$catontopdata\_";
} else {
$cattopcount = 0;
$catontopdata = "";
}
if ($ontopdata ne "") {
@ontop = split(/\_/,$ontopdata);
$topcount = @ontop;
$ontopdata = "\_$ontopdata\_";
}
if (($inthreadages)&&($inthreadages ne "all")) { $threadagesstart = "&threadages=$inthreadages"; } else { undef $threadagesstart; }
if ((-e "${lbdir}cache/plcache$inforum\_$inshow.pl")&&((-M "${lbdir}cache/plcache$inforum\_$inshow.pl") *86400 < 120)&&($threadagesstart eq "")) {
open (FILE, "${lbdir}cache/plcache$inforum\_$inshow.pl");
$topicpages = ;
chomp $topicpages;
($abstopcount,$cattopcount,$topcount) = split(/\t/,);
@toptopic = ;
close(FILE);
my $topicnum = @toptopic;
if ($topicnum < 7) { undef @toptopic; undef $topicpages; unlink ("${lbdir}cache/plcache$inforum\_$inshow.pl"); require "doplcache.pl"; }
} else {
require "doplcache.pl";
}
$output .= qq~
~;
opendir (DIR, "${imagesdir}$usrdir/$inforum");
@usruploadfile = readdir(DIR);
closedir (DIR);
$topiccount = 0;
$jnum = 0;
$fnum = 0;
if ($tablewidth > 100) {
if ($tablewidth > 1000) { $topictitlemax = 84; } elsif ($tablewidth > 770) { $topictitlemax = 71; } else { $topictitlemax = 40; }
} else {
if ($screenmode >=10) { $topictitlemax = 84; } elsif ($screenmode >=8) { $topictitlemax = 71; } else { $topictitlemax = 40; }
}
$threadagelimit = $currenttime - $inthreadages * 86400;
foreach $topic (@toptopic) {
$addonlength = $canusetreeview ne "no" ? 3 : 0;
chomp $topic;
($topicid, $forumid, $topictitle, $topicdescription, $threadstate, $threadposts, $threadviews, $startedby, $startedpostdate, $lastposter, $lastpostdate, $posticon, $posttemp, $addmetype) = split(/\t/,$topic);
if ($multimanage eq "") { $multimanagebutton = ""; }
else { $multimanagebutton = qq~ | ~; $addonlength += 2.5; }
if ($forumid eq $inforum) {
if ($jhdata =~ /\_$topicid\_/) {
$jhimage = qq~ ~;
$jhbuttom = qq~取消精华|~;
} else { $jhimage=""; $jhbuttom = qq~精|~; }
}
else { $jhimage=""; $jhbuttom=""; }
$abslockbuttom = $membercode eq "ad" ? "总固|" : "";
$catlockbuttom = $membercode eq "ad" || $membercode eq "smo" || ",$catemods," =~ /\,$inmembername\,/i ? "区固|" : "";
$hllink=($highlight=~m/\_$forumid-$topicid\_/i)?"取消加重":"加重";
if (($posticon eq "")||($posticon =~/
/i)) {
$posticon = int(myrand(23));
$posticon = "0$posticon" if ($posticon<10);
$posticon = qq~~;
} else{
$posticon = qq~~;
}
$numberofitems = $threadposts + 1;
$numberofpages = $numberofitems / $maxtopics;
$threadpages = "";
if ($numberofitems > $maxtopics) {
if ($numberofpages>int($numberofpages)){ $numberofpages = int($numberofpages)+1 ;}
$gotoendpost = ($numberofpages-1)*$maxtopics;
$pagestoshow = qq~ [第 页]~;
} else {
$gotoendpost = "0";
$pagestoshow = "";
}
if ($inthreadages && ($inthreadages ne "all")&&(($topiccount >= $topcount + $abstopcount + $cattopcount)||($startarray ne 0))) {
if ($lastpostdate < $threadagelimit) { last; }
}
if (!$forumlastvisit) { $forumlastvisit = "0"; }
if ($startedpostdate > $currenttime - 3600 * $newmarktime) { $topnew = " ";$addonlength +=2; } else { $topnew = ""; }
if ((lc($inmembername) eq lc($startedby))&&($nodispown eq "yes")){ $mypost=" "; $addonlength +=2; } else { $mypost=""; }
$topicicon = "";
if ($inmembername ne "客人") {
if (($threadposts >= $hottopicmark) && ($forumlastvisit < $lastpostdate)) { $topicicon = ""; }
elsif (($threadposts >= $hottopicmark) && ($forumlastvisit > $lastpostdate)) { $topicicon = ""; }
elsif (($threadposts < $hottopicmark) && ($forumlastvisit < $lastpostdate)) { $topicicon = ""; }
elsif (($threadposts < $hottopicmark) && ($forumlastvisit > $lastpostdate)) { $topicicon = ""; }
}
$threadstate = "poll" if (($posticon =~/
/i)&&($threadstate eq ""));
if (($threadstate eq "poll")||($threadstate eq "pollclosed")) {
if (open(FILE, "${lbdir}forum$forumid/$topicid.poll.cgi")) {
my @allpoll = ;
close(FILE);
$size = @allpoll;
} else {
$size = 0;
}
}
if ($threadstate eq "closed") { $topicicon = ""; }
elsif ($threadstate eq "poll") {
if ($size >= $hotpollmark) { $topicicon = ""; }
else { $topicicon = ""; }
}
elsif ($threadstate eq "pollclosed") { $topicicon = ""; }
if ($lastpostdate ne "") {
$lastpostdate = $lastpostdate + $addtimes;
$lastpostdate = &dateformatshort("$lastpostdate");
}
else { $lastpostdate = qq~没有~; }
$startedpostdate = $startedpostdate + $addtimes;
$startedlongdate = &dateformat("$startedpostdate");
$startedpostdate = qq~$startedlongdate~;
$posttemp = "(无内容)" if ($posttemp eq "");
$topictitletemp = &lbhz($topictitle,$topictitlemax-6);
$highlightstyle = $topiccount < $abstopcount && $startarray == 0 ? qq~style="color:$color_of_absontop; font-weight:900"~ : $topiccount < $abstopcount + $cattopcount && $startarray == 0 ? qq~style="color:$color_of_quontop; font-weight:900"~ : $topiccount < $abstopcount + $cattopcount + $topcount && $startarray == 0 ? qq~style="color:$color_of_ontop; font-weight:900"~ : $highlight =~ m/\_$forumid-$topicid\_/ ? qq~style="color:$color_of_hightopic; font-weight:600"~ : "";
$topictitle = qq~$topictitletemp~;
if ($lastposter) {
if ($lastposter=~/\(客\)/) {
$lastposter=~s/\(客\)//isg;
$lastposter = qq~$lastposter~;
}
else {
my $lastposterfilename = $lastposter;
$lastposterfilename =~ s/ /\_/isg;
$lastposterfilename =~ tr/A-Z/a-z/;
$lastposter = qq~$lastposter~;
}
}
else {$lastposter = qq~--------~;}
if ($topicdescription) {
my $topicdescriptiontemp = $topicdescription;
$topicdescriptiontemp =~s/\s*(.*?)\s*\\s*(.*?)\s*\<\/a\>/$3/isg;
$topicdescriptiontemp =~s/\<\/a\>//isg;
if (length($topicdescriptiontemp) > ($topictitlemax-4)) {
$topicdescriptiontemp=&lbhz("$topicdescriptiontemp",$topictitlemax);
$topicdescription =~s/\\s*(.*?)\s*\<\/a\>/\$topicdescriptiontemp\<\/a\>/isg;
}
$topicdescription = qq~
-=> $topicdescription~;
}
if (($topiccount >= $abstopcount + $cattopcount)||($startarray ne 0)||($forumid eq $inforum)) {
my @usruploadfile = grep(/^$inforum\_$topicid(\.|\_)/,@usruploadfile);
if ($#usruploadfile >= 0 || $addmetype ne "") {
my @files = grep(/^$inforum\_$topicid\./,@usruploadfile);
if ($#files >= 0 || $addmetype ne "") {
if ($addmetype eq "") {
my $usrfilename = $files[0]; chomp $usrfilename;
($up_name, $up_ext) = split(/\./,$usrfilename);
} else {
$up_ext = $addmetype;
}
$up_ext =~ tr/A-Z/a-z/;
$filetype = "unknow";
$filetype = $up_ext if (-e "${imagesdir}icon/$up_ext.gif");
if (($up_ext eq 'jpg')||($up_ext eq 'gif')||($up_ext eq 'bmp')||($up_ext eq 'png')) { $topictitle =" ".$topictitle; }
elsif ($up_ext eq "swf") { $topictitle =" ".$topictitle; }
else {
$topictitle =" ".$topictitle;
}
$addonlength += 4;
}
}
}
if ($numberofpages == 0) { $pagestoshowtemp1 = 0; } elsif ($numberofpages > 11) { $pagestoshowtemp1 = 41; } else { $pagestoshowtemp1 = int($numberofpages)*3.3+7; }
$totlelength = $pagestoshowtemp1 + length($topictitletemp) + 3 + $addonlength; #标题栏的总长度
if (($membercode eq "ad") || ($membercode eq 'smo') || ($inmembmod eq "yes")) {
if ($membercode ne "amo") {
$admini = qq~|$hllink|$jhbuttom$abslockbuttom$catlockbuttom固|提|锁|解|删|移| ~;
} else {
$admini = qq~~;
}
}
elsif ((lc($inmembername) eq lc($startedby)) && ($inmembername !~ /^客人/)) {
if ($arrowuserdel eq "on") {
$admini = qq~快速操作: ~;
$admini .= qq~| 锁定此帖,不允许别人回复 ~ unless ($threadstate eq "closed");
$admini .= qq~| 删除此帖 | ~;
}
else { undef $admini; }
}
else { undef $admini; }
if (($startarray eq 0)&&($topiccount < $topcount + $abstopcount + $cattopcount)) {
if ($topiccount < $abstopcount) {
if ($membercode eq "ad") {
$admini = qq~~;
} else { undef $admini; }
$topicicon = "";
$topictitle =~ s/\ \;\"\>/\ \;\" target=\_blank\>/isg;
$pagestoshow =~ s/ class=ha\>/ target=\_blank class=ha\>/isg;
$topictitle = "[公告] $topictitle";
if ($abstopshake eq "1") { $topictitle = "$topictitle";$jnum++;}
elsif ($abstopshake eq "2") { $topictitle =~ s/\ t\>/ id=flashlink$fnum flashtype=0 flashcolor=$color_of_absontop>/s;$fnum++;}
elsif ($abstopshake eq "3") { $topictitle =~ s/\ t\>/ id=flashlink$fnum flashtype=1 flashcolor=#cccccc>/s;$fnum++;}
$totlelength = $totlelength + 5;
$multimanagebutton = " | " if ($multimanagebutton ne "");
}
elsif ($topiccount < $cattopcount + $abstopcount) {
if ($membercode eq "ad" || $membercode eq "smo" || ",$catemods," =~ /\,$inmembername\,/i) {
$admini = qq~~;
} else { $admini = ""; }
$topicicon = "";
$topictitle =~ s/\ \;\"\>/\ \;\" target=\_blank\>/isg;
if ($cattopshake eq "1") { $topictitle = "$topictitle";$jnum++;}
elsif ($cattopshake eq "2") { $topictitle =~ s/\ t\>/ id=flashlink$fnum flashtype=0 flashcolor=$color_of_quontop>/s;$fnum++;}
elsif ($cattopshake eq "3") { $topictitle =~ s/\ t\>/ id=flashlink$fnum flashtype=1 flashcolor=#cccccc>/s;$fnum++;}
$pagestoshow =~ s/ class=ha\>/ target=\_blank class=ha\>/isg;
$multimanagebutton = " | " if ($multimanagebutton ne "");
}
elsif ($topiccount < $topcount + $abstopcount + $cattopcount) {
if (($membercode eq "ad") || ($inmembmod eq "yes") || ($membercode eq 'smo')) {
$admini = qq~|取消固顶|$abslockbuttom$catlockbuttom顶|$jhbuttom锁|解| ~;
} else { undef $admini; }
$topicicon = "";
$multimanagebutton = " | " if ($multimanagebutton ne "");
if ($topshake eq "1") { $topictitle = "$topictitle";$jnum++;}
elsif ($topshake eq "2") { $topictitle =~ s/\ t\>/ id=flashlink$fnum flashtype=0 flashcolor=$color_of_ontop>/s;$fnum++;}
elsif ($topshake eq "3") { $topictitle =~ s/\ t\>/ id=flashlink$fnum flashtype=1 flashcolor=#cccccc>/s;$fnum++;}
}
}
$topictitle = "$mypost$topictitle";
$topictitle .= $topnew;
$topictitle .= $jhimage;
$topictitle=$topictitle."
" if ($totlelength > $topictitlemax+7);
# if ($threadviews > 9999) { $threadviewstemp = ">Max"; } else { $threadviewstemp = "$threadviews"; }
# if ($threadposts > 9999) { $threadpoststemp = ">Max"; } else { $threadpoststemp = "$threadposts"; }
if ($threadposts < 1000 && $threadviews < 1000) { $threadposts = "$threadposts "; $threadviews = " $threadviews"; }
$startedbyfilename = $startedby;
$startedbyfilename =~ s/ /\_/isg;
$startedbyfilename =~ tr/A-Z/a-z/;
if (($threadstate eq "poll")||($threadstate eq "pollclosed")) { $outputtemp = qq~共 $size 票 | ~; } else { $outputtemp = qq~$threadposts/$threadviews | ~; }
if ($startedby=~/\(客\)/) { $startedby=~s/\(客\)//isg; $startedby=qq~$startedby~; } else { $startedby=qq~$startedby~; }
if (($startarray eq 0)&&($topiccount < $abstopcount + $cattopcount)) {
$topicicontemp = qq~$topicicon~;
$posticontemp = qq~$posticon~;
}
else {
$topicicontemp = qq~$topicicon~;
$posticontemp = qq~$posticon~;
}
#文章树
if ($canusetreeview ne "no") {
if ($threadposts > 0) { $nofollow = "cat.gif"; } else { $nofollow = "cat1.gif"; }
$id_of_this_topid = sprintf("%04d%05d",$forumid,$topicid);
$followImg=qq( );
}
else { undef $followImg; }
$output .=qq~$topicicontemp |
$posticontemp $followImg$topictitle$pagestoshow$topicdescription$admini |
$startedby | $outputtemp $lastpostdate | $lastposter | $multimanagebutton
~;
$output .=qq~~ if ($canusetreeview ne "no");
$topiccount++;
}
$pn = ($inshow/$maxthreads)+1;
$output .= qq~
~;
if ($usefastpost ne "no") { require "forumfastpost.pl"; }
}
else {
if (($indexforum ne "no")&&($dispjump ne "no")) {
require "${lbdir}data/forumjump.pl" if (-e "${lbdir}data/forumjump.pl");
$jumphtml =~ s/\<\!\-\-h (.+?) \-\-\>/$1/isg if (($disphideboard eq "yes")||($membercode eq "ad")||($membercode eq "smo")||($membercode eq "cmo")||($membercode eq "mo")||($membercode eq "amo"));
$jumphtml =~ s/\<\!\-\-c (.+?) \-\-\>/$1/isg if ($dispchildjump ne "no");
$jumphtml = "$jumphtml | ";
} else { $jumphtml = ""; }
$output .= qq~~;
$output .= "
这里是纯子论坛板块,请选择进入相应子论坛
";
}
if (($dispview eq "yes")||(($membercode eq "ad" || $inmembmod eq "yes" || $membercode eq 'smo')&&($membercode ne 'amo'))) { require "dodispviewforum.pl"; }
&output("$forumname",\$output);
exit;