📄 topic.cgi
字号:
}
}
$count++;
} #1
if (!(-e "$filetoopens.lck")) {
&winlock($filetoopen) if (($OS_USED eq "Unix")||($OS_USED eq "Nt"));
if (open(FILE, ">$filetoopen")) {
flock(FILE, 2) if ($OS_USED eq "Unix");
foreach (@allthreadtemp) {
chomp $_;
$_ =~ s/[\a\f\n\e\0\r]//isg;
print FILE "$_\n" if ($_ ne "");
}
close(FILE);
}
&winunlock($filetoopen) if (($OS_USED eq "Unix")||($OS_USED eq "Nt"));
if ((int(rand(3)) eq 2)||($threadviews < 30)||($#allthreadtemp < 6)) {
if (open(PLFILE, ">${lbdir}forum$inforum/$intopic.pl")) {
print PLFILE $linetokeep;
close(PLFILE);
}
}
}
undef @allthreadtemp;
undef $linetokeep;
}#a
}#0
if ($nextno eq "") { $nextlink=""; } else { $nextlink = qq~ <a href=topic.cgi?forum=$inforum&topic=$nextno&show=$inshow><img src=$imagesurl/images/nextthread.gif border=0 alt=浏览下一篇主题 width=52 height=12></a>~; }
if ($backno eq "") { $backlink=""; } else { $backlink = qq~<a href=topic.cgi?forum=$inforum&topic=$backno&show=$inshow><img src=$imagesurl/images/prethread.gif border=0 alt=浏览上一篇主题 width=52 height=12></a>~; }
$nexttopiclinks .= "$backlink" if $backlink;
if ($treeview eq "yes") { $viewstyle=" <a href=topic.cgi?forum=$inforum&topic=$intopic&changemode=1><img src=$imagesurl/images/flatview.gif width=40 height=12 border=0 alt=平板显示贴子></a>"; }
else { $viewstyle=" <a href=topic.cgi?forum=$inforum&topic=$intopic&changemode=1><img src=$imagesurl/images/treeview.gif width=40 height=12 border=0 alt=树形显示贴子></a>"; }
$nexttopiclinks .= qq~ <a href="javascript:this.location.reload()"><img src=$imagesurl/images/refresh.gif border=0 alt=刷新本主题 width=40 height=12></a> $viewstyle~;
$nexttopiclinks .= "$nextlink" if $nextlink;
if ($postopen eq "no") { $newthreadbutton = ""; } else { $newthreadbutton = qq~<a href=post.cgi?action=new&forum=$inforum><img src=$imagesurl/images/$newthreadlogo border=0 alt=发表一个新主题 width=99 height=25></a> ~; }
if ($pollopen eq "no") { $newpollbutton = ""; } else { $newpollbutton = qq~<a href=poll.cgi?action=new&forum=$inforum><img src=$imagesurl/images/$newpolllogo border=0 alt=开启一个新投票 width=99 height=25></a>~; }
if (($threadstate ne "closed")&&($threadstate ne "pollclosed")&&($postopen ne "no")) {
$newreplybutton = qq~<a href=post.cgi?action=reply&forum=$inforum&topic=$intopic><img src=$imagesurl/images/$newreplylogo border=0 alt=回复贴子 width=99 height=25></a> ~;
$replynow = qq~<a href=post.cgi?action=reply&forum=$inforum&topic=$intopic><img src=$imagesurl/images/replynow.gif border=0 alt=回复贴子 width=16>回复</a> ~;
}
else {
$replynow=""; $newreplybutton="";
}
&title;
$numberofpages = $numberofitems / 12;
if ($numberofitems > 12) {
$showmore = "yes";
if ((!$instart) or ($instart < 0)) { $instart = 0; }
if ($instart > 0) { $startarray = $instart; } else { $startarray = 0; }
$endarray = $instart + 12 - 1;
if ($endarray < ($numberofitems - 1)) { $more = "yes"; }
if (($endarray > (12 - 1)) && ($more ne "yes")) { $endarray = $numberofitems - 1; }
}
else {
$showmore = "no";
$startarray = 0;
$pages = qq~<font color=$menufontcolor>该主题只有一页</font>~;
$endarray = $numberofitems - 1;
}
if ($showmore eq "yes") {
if (12 < $numberofitems) {
(my $integer, my $decimal) = split(/\./,$numberofpages);
if ($decimal > 0) { $numberofpages = $integer + 1; }
#############
$mypages=$numberofpages;
#分页
if($replynum eq "last" && $treeview ne "yes"){
$instart=($mypages-1)*12;
$startarray=$instart;
$endarray = $numberofitems - 1;
}
$intshow=$instart/84;
($intshow,$mydecimal) = split(/\./,$intshow);
$intshow ++;
$preshow = ($intshow-1)*84-12;
$nextshow = $intshow*84;
$pages=qq~<a href=$thisprog?forum=$inforum&topic=$intopic&start=$preshow&show=$inshow class=hb>←</a> ~ if ($intshow > 1);
if ($numberofpages > ($intshow*7)){
$numberofpages = $intshow*7;
$isnext = qq~<a href=$thisprog?forum=$inforum&topic=$intopic&start=$nextshow&show=$inshow class=hb>→</a> ~;
}
$pagestart = ($intshow-1)*84;
$counter = ($intshow-1)*7;
while ($numberofpages > $counter) {
$counter++;
if ($instart ne $pagestart) { $pages .= qq~<a href=$thisprog?forum=$inforum&topic=$intopic&start=$pagestart&show=$inshow class=hb>$counter</a> ~; }
else { $pages .= qq~<font color=$fonthighlight><b>$counter</b></font> ~;
if ($counter ne "1") {
$pagenow = $counter - 1;
$pageup = $pagestart - 12;
$showup = qq~<a href=$thisprog?forum=$inforum&topic=$intopic&start=$pageup title=第$pagenow页><font face=webdings >7</font></a> ~;
} else {$showup = qq~<font color=$fonthighlight face=webdings >7</font>~;}
if ($mypages > $counter) {
$pagenow = $counter + 1;
$pagedown = $pagestart + 12;
$showdown = qq~<a href=$thisprog?forum=$inforum&topic=$intopic&start=$pagedown title=第$pagenow页><font face=webdings >8</font></a> ~;
} else { $showdown = qq~<font color=$fonthighlight face=webdings >8</font>~;}
}
$pagestart = $pagestart + 12;
}
$pages .= $isnext;
#分页end
}
if ($instart ne "0") {
$beginpage=qq~<a href=$thisprog?forum=$inforum&topic=$intopic&start=0 title="首 页"><font face=webdings>9</font></a> ~;
} else {
$beginpage=qq~<font color=$fonthighlight face=webdings>9</font>~;
}
$showend=($mypages-1)*12;
if ($instart ne $showend) {
$endpage=qq~<a href=$thisprog?forum=$inforum&topic=$intopic&start=$showend title="尾 页"><font face=webdings>:</font></a> ~;
} else {
$endpage=qq~<font color=$fonthighlight face=webdings>:</font>~;
}
$pages = qq~<font color=$menufontcolor><b>本主题共有 <font color=$fonthighlight>$mypages</font> 页</b> $beginpage $showup [ $pages ] $showdown $endpage~;
}
$printpageicon = qq~ <a href=printpage.cgi?forum=$inforum&topic=$intopic><img src=$imagesurl/images/printpage.gif border=0 width=16 alt=显示可打印的版本></a> ~;
$savefile = qq~ <a href=# onclick="javascript:WebBrowser.ExecWB(4,1)"><img src=$imagesurl/images/saveas.gif border=0 width=16 alt="保存该页为文件" align=absmiddle></a><object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object> ~;
$reporticon = qq~ <a href=report.cgi?forum=$inforum&topic=$intopic><img src=$imagesurl/images/report.gif border=0 width=16 height=15 alt=本贴有问题,发送短消息报告给版主></a> ~;
$favicon = qq~ <a href=fav.cgi?action=add&forum=$inforum&topic=$intopic><img src=$imagesurl/images/fav.gif border=0 width=13 height=15 alt=加入个人收藏&关注本贴></a> ~;
$pagpageicon = qq~ <img src=$imagesurl/images/pag.gif border=0 width=16 alt=把本贴打包邮递 style="cursor:hand" onClick="javascript:openScript('pag.cgi?forum=$inforum&topic=$intopic',500,400)"> ~ if ($emailfunctions eq "on");
$topictitletemp = $topictitle;
$topictitletemp =~s/\'/\`/isg;
$bookmarkpage = qq~ <span style="CURSOR: hand" onClick="window.external.AddFavorite('$boardurl/topic.cgi?forum=$inforum&topic=$intopic', ' $boardname - $topictitletemp')"><IMG SRC=$imagesurl/images/fav_add1.gif BORDER=0 width=15 height=15 alt=把本贴加入IE收藏夹></span> ~;
if (($privateforum ne "yes")&&($emailfunctions eq "on")) { $sendtofriendicon = qq~ <a href=lbfriend.cgi?forum=$inforum&topic=$intopic><img src=$imagesurl/images/emailtofriend.gif border=0 width=16 alt=发送本页面给朋友></a> ~; }
$replynum=0 if ($replynum eq "");
if ($replynum > $numberofitems-1) { $replynum = $numberofitems - 1;};
if($replynum eq "last" && $treeview ne "yes"){
$movetobottom=qq(document.location="#bottom";);
}
if ($treeview eq "yes") {
$replynum = $instart if (($instart ne "")&&($instart ne "0")&&($replynum ne "last"));
$replynum = $numberofitems - 1 if ($replynum eq "last");
$startarray = $replynum;
$endarray = $replynum;
}
$output .= qq~<table cellpadding=0 cellspacing=0 width=$tablewidth align=center><tr><td width=30% rowspan=2 valign=top>$forumgraphic</td><td align=top>~;
if ((-e "${lbdir}boarddata/jinghua$inforum.cgi")&&($usejhpoint eq "yes")) {
open(FILE, "${lbdir}boarddata/jinghua$inforum.cgi");
my @jhdatas = <FILE>;
close(FILE);
$jhdata = join("\_",@jhdatas);
$jhdata = "\_$jhdata\_";
$jhdata =~ s/\W//isg;
if($jhdata =~ /\_$topicid\_/) {
$jhimage = qq~ <img src="$imagesurl/images/$new_JH" align=absmiddle alt=本帖为精华帖子> ~;
}
}
(my $trash, $topictitle) = split(/\t/,$threads[0]);
$topictitletemp = $topictitle;
$topictitletemp =~ s/^*#!&*//;
$topictitletemp =~s/ \(无内容\)$//;
if (($dofilter eq "no")||($dofilter eq "all")) { $topictitletemp = &postwordfilter("$topictitletemp"); }
my $filetoopens = "$lbdir" . "data/onlinedata.cgi";
$filetoopens = &lockfilename($filetoopens);
if (!(-e "$filetoopens.lck")) {
if ($privateforum ne "yes") { &whosonline("$inmembername\t$forumname\tnone\t浏览<a href=\"topic.cgi?forum=$inforum&topic=$intopic\"><b>$topictitletemp</b></a>\t"); }
else { &whosonline("$inmembername\t$forumname(密)\tnone\t浏览保密贴子\t"); }
}
my $topictitletempshow = &lbhz($topictitletemp,34);
if($category=~/childforum-[0-9]+/){
$tempforumno=$category;
$tempforumno=~s/childforum-//;
$filetoopen = "${lbdir}forum$tempforumno/foruminfo.cgi";
open(FILE, "$filetoopen");
$forums = <FILE>;
close(FILE);
(undef, undef, undef, $tempforumname, undef) = split(/\t/,$forums);
$addlink=qq~<br><img src=$imagesurl/images/bar.gif width=15 height=15><img src=$imagesurl/images/closedfold.gif width=14 height=14> <a href="forums.cgi?forum=$tempforumno">$tempforumname</a>~;
$addspace=" ";
}
if ($indexforum ne "no"){
$output .= qq~<font color=$fontcolormisc><img src=$imagesurl/images/closedfold.gif width=14> <a href=leoboard.cgi>$boardname</a>$addlink<br>$addspace
<img src=$imagesurl/images/bar.gif width=15 height=15><img src=$imagesurl/images/closedfold.gif width=14 height=14> <a href=forums.cgi?forum=$inforum>$forumname</a> [<a href=forums.cgi?show=$inshow&forum=$inforum>返回</a>]<br>
$addspace <img src=$imagesurl/images/bar.gif width=15 height=15><img src=$imagesurl/images/openfold.gif width=14 height=14> $topictitletempshow $jhimage
~;
} else {
$output .= qq~<font color=$fontcolormisc><img src=$imagesurl/images/closedfold.gif> <a href=forums.cgi?forum=$inforum>$forumname</a><br>
<img src=$imagesurl/images/bar.gif width=15 height=15><img src=$imagesurl/images/openfold.gif width=14 height=14> $topictitletempshow
~;
}
$insidead = "" if (($forumimagead ne "1")&&($useimageadtopic ne "1"));
$insidead1 = "" if (($forumimagead1 ne "1")&&($useimageadtopic1 ne "1"));
$threadviewstemp = "◆您是本帖第 <b>$threadviews</b> 个阅读者◆" if ($threadviews > 0);
$output .= qq~<script language="JavaScript" type="text/javascript">
var setpostno=Array();
var start=($startarray==0)?$startarray+2:$startarray+1;
var end=$endarray+2;
start=("$treeview" == "yes")?2:start;
end=("$treeview" == "yes")?$numberofitems+1:end;
function DelReply(){
DReply.postno.value="";
for(i=start;i<end;i++){
var tempval=eval("document.all.postno"+i+".checked");
if(tempval == true){
DReply.postno.value+=i+" ";
}}
DReply.submit();
}
</script>
~ if(($mymembercode eq "ad")||($mymembercode eq 'smo')||($mymembercode eq 'cmo')||($myinmembmod eq "yes"));
$output .= qq~$insidead$insidead1
<a name="top"></a>
</td>$uservisitdata</tr></table><br>
<script language="JavaScript" type="text/javascript">
$movetobottom
</script>
<table cellpadding=1 cellspacing=0 width=$tablewidth align=center>
<tr><td align=center width=1></td>
<td width=322 valign=bottom>$newthreadbutton$newreplybutton$newpollbutton</td>
<td align=right valign=bottom width=* nowarp><font color=$forumfontcolor>$threadviewstemp $nexttopiclinks</td><td align=center width=2></td></tr></table>
<table cellpadding=0 cellspacing=0 width=$tablewidth bgcolor=$tablebordercolor align=center><tr><td height=1></td></tr></table>
<table cellpadding=0 cellspacing=0 width=$tablewidth align=center><tr><td bgcolor=$tablebordercolor width=1 height=24><img src=$imagesurl/images/none.gif width=1></td><td bgcolor=$titlecolor colspan=2>
<table cellpadding=0 cellspacing=1 width=100%><tr><td bgcolor=$titlecolor><font color=$titlefontcolor> <b>* 贴子主题</B>: $topictitletemp </font></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -