📄 fav.cgi
字号:
<td bgcolor=$titlecolor align=center width=32><font color=$titlefontcolor><b>点击</b></td>
<td bgcolor=$tablebordercolor width=1></td>
<td bgcolor=$titlecolor width=195 align=center><b> 最后更新 | 最后回复人</b></td>
<td bgcolor=$tablebordercolor width=1></td>
</tr>
</table>
<table cellspacing=0 border=0 width=$tablewidth bgcolor=$tablebordercolor align=center>
<tr><td height=1></td></tr>
</table>
~;
$icon_num = int(rand(10));
$topcount = 0;
$filetoopen = "$lbdir" . "memfav/$member.cgi";
$filetoopen = &stripMETA($filetoopen);
if (-e $filetoopen) {
&winlock($filetoopen) if (($OS_USED eq "Unix")||($OS_USED eq "Nt"));
open(FILE, "$filetoopen");
flock(FILE, 2) if ($OS_USED eq "Unix");
@ontop = <FILE>;
close(FILE);
&winunlock($filetoopen) if (($OS_USED eq "Unix")||($OS_USED eq "Nt"));
}
else { undef @ontop; }
$topcount = @ontop;
$numberofpages = $topcount / 25;
if ($topcount > 25) {
$showmore = "yes";
if ($inshow eq "" || $inshow < 0) { $inshow = 0; }
if ($inshow > 0) { $startarray = $inshow; }
else { $startarray = 0; }
$endarray = $inshow + 25 - 1;
if ($endarray < ($topcount - 1)) { $more = "yes"; }
elsif (($endarray > (25 - 1)) && ($more ne "yes")) { $endarray = $topcount -1; }
}
else {
$showmore = "no";
$startarray = 0;
$topicpages = qq~<font color=$menufontcolor>本收藏区只有一页</font>~;
$endarray = $topcount -1;
}
if ($showmore eq "yes") {
if (25 < $topcount) {
($integer,$decimal) = split(/\./,$numberofpages);
if ($decimal > 0) { $numberofpages = $integer + 1; }
$mypages=$numberofpages;
#分页
$intshow=$inshow/(12*25);
($intshow,$mydecimal) = split(/\./,$intshow);
$intshow = $intshow + 1;
$preshow=($intshow-1)*12*25-25;
$nextshow=$intshow*12*25;
$pages=qq~<a href="$thisprog?action=show&member=$member&show=$preshow"><font color=$menufontcolor><b>←</b></font></a> ~ if ($intshow > 1);
if ($numberofpages > ($intshow*12)){
$numberofpages=($intshow*12);
$isnext=qq~<a href="$thisprog?action=show&member=$member&show=$nextshow"><font color=$menufontcolor><b>→</b></font></a> ~;
}
$pagestart = ($intshow-1)*12*25;
$counter = ($intshow-1)*12;
while ($numberofpages > $counter) {
$counter++;
if ($inshow ne $pagestart) { $pages .= qq~<a href="$thisprog?action=show&member=$member&show=$pagestart"><font color=$menufontcolor><b>$counter</b></font></a> ~; }
else { $pages .= qq~<font color=$fonthighlight><b>$counter</b></font> ~; }
$pagestart = $pagestart + 25;
}
$pages .= $isnext;
#分页end
}
$topicpages = qq~<font color=$menufontcolor><b>本收藏区共有 <font color=$fonthighlight>$mypages</font> 页</b> [ $pages ]~;
}
if ($topcount > 0) {
for ($i=$startarray;$i<=$endarray;$i++) {
$id=$ontop[$i];
chop $id;
($id,$inforum)=split(/\t/,$id);
my $file = "$lbdir" . "forum$inforum/$id.pl";
open (TMP, "$file");
(my $topicid, my $topictitle, my $topicdescription, my $threadstate, my $threadposts, my $threadviews, my $startedby, my $startedpostdate, my $lastposter, my $lastpostdate, my $posticon1, my $inposttemp) = split (/\t/,<TMP>);
close (TMP);
$topictitle =~ s/^*#!&*//;
my $file1 = "$lbdir" . "forum$inforum/$id.thd.cgi";
if (($topictitle eq "")||($startedby eq "")||($startedpostdate eq "")||($threadposts eq "")){
open (TMP1, "$file1");
my @tmp = <TMP1>;
close (TMP);
my $tmp = @tmp;
$tmp --;
my $tmp1 = $tmp[-1];
$tmp1 =~ s/[\n\r]//isg;
my $tmp2 = $tmp[0];
$tmp2 =~ s/[\n\r]//isg;
(my $membername, $topictitle, my $postipaddress, my $showemoticons, my $showsignature, my $postdate, my $post, my $posticon) = split(/\t/,$tmp2);
(my $membername1, my $topictitle1, my $postipaddress1, my $showemoticons1, my $showsignature1, my $postdate1, my $post1, $posticon1) = split(/\t/,$tmp1);
$topictitle =~ s/^*#!&*//;
$membername1 = "" if ($tmp eq 0);
$threadviews =$tmp * 8 if (($threadviews eq "")||($threadviews > 10000));
$postdate1 = $lastpostdate if ($lastpostdate ne "");
$inposttemp = $post1;
$inposttemp =~ s/\[这个贴子最后由(.+?)编辑\]\n//isg;
$inposttemp =~ s/\[quote\](.*)\[quote\](.*)\[\/quote](.*)\[\/quote\]//isg;
$inposttemp =~ s/\[quote\]\s*(.*?)\s*\[\/quote\]//isg;
$inposttemp =~ s/\[\s*(.*?)\s*\]\s*(.*?)\s*\[\s*(.*?)\s*\]/$2\n/isg;
$inposttemp = &doemoticons("$inposttemp");
$inposttemp =~ s/ \<img\s*(.*?)\s*\>//isg;
$inposttemp =~ s/(http|https|ftp):\/\/(.*?)\.(png|jpg|jpeg|bmp|gif|swf)//isg;
$inposttemp =~ s/( )+$//isg;
$inposttemp =~ s/^( )+//isg;
$inposttemp =~ s/<(.|\n)+?>//g;
$inposttemp =~ s/\[.+?\]//g;
$inposttemp =~ s/[\a\f\n\e\0\r\t]//g;
$posticon =~ s/\s//isg;
if ($posticon =~/<br>/i) {
$posticon=~s/<br>/\t/ig;
@temppoll = split(/\t/, $posticon);
$temppoll = @temppoll;
if ($temppoll >1) {
$posticon1 = "<br>";
}
else {
$posticon1 = "";
}
}
$inposttemp = &lbhz($inposttemp,28);
$posticon = "<br>" if ($posticon =~/<br>/i);
$rr = ("$inforum\t$id\t$topictitle\t$topicdescription\t$threadstate\t$tmp\t$threadviews\t$membername\t$postdate\t$membername1\t$postdate1\t$posticon1\t$inposttemp\t\n");
}else{
$threadviews = ($tmp+1) * 8 if ($threadviews eq "");
$threadviews = 9999 if ($threadviews > 9999);
$posticon1 = "<br>" if ($posticon1 =~/<br>/i);
$topictitle =~ s/^*#!&*//;
$rr = ("$inforum\t$id\t$topictitle\t$topicdescription\t$threadstate\t$threadposts\t$threadviews\t$startedby\t$startedpostdate\t$lastposter\t$lastpostdate\t$posticon1\t$inposttemp\t\n");
}
if ($topictitle ne "") {push (@toptopic, $rr);}
}
}
else { undef @toptopic; }
$topiccount = 0;
foreach $topic (@toptopic) {
chomp $topic;
($inforum,$topicid, $topictitle, $topicdescription, $threadstate, $threadposts, $threadviews, $startedby, $startedpostdate, $lastposter, $lastpostdate, $posticon, $posttemp) = split(/\t/,$topic);
next if ($topicid eq "");
if ($posticon ne "") {
$poll=0;
if ($posticon =~/<br>/i){
$posticon = int(rand(23));
$posticon = "0$posticon" if ($posticon<10);
$posticon = qq~<img src=$imagesurl/posticons/$posticon.gif border=0 alt="新闻方式浏览">~;
}
else{
$posticon = qq~<img src=$imagesurl/posticons/$posticon border=0 alt="新闻方式浏览">~;
}
}
else {
$posticon = int(rand(23));
$posticon = "0$posticon" if ($posticon<10);
$posticon = qq~<img src=$imagesurl/posticons/$posticon.gif border=0 alt="新闻方式浏览">~;
}
if (($dofilter eq "no")||($dofilter eq "all")) {
$topictitle = &postwordfilter("$topictitle");
}
$lastpostdatetemp=$lastpostdate;
$lastpostdate=$lastpostdatetemp;
$topcount = $threadposts + 1;
$topcount = $topcount / 12;
$counter = 0;
if ($topcount > 12) {
if (12 < $topcount) {
($integer,$decimal) = split(/\./,$topcount);
if ($decimal > 0) { $topcount = $integer + 1; }
$pagestart = 0;
while ($topcount > $counter) {
$counter++;
$threadpages .= qq~<a href=topic.cgi?forum=$inforum&topic=$topicid&start=$pagestart><font color=$fonthighlight><b>$counter</b></font></a> ~;
$pagestart = $pagestart + 12;
}
}
$pagestoshow = qq~<font color=$forumfontcolor> [第 $threadpages 页]</font>~;
}
if ($lastpostdate ne "") {
$lastpostdate = $lastpostdate + ($timedifferencevalue*3600) + ($timezone*3600);
$longdate = &dateformatshort("$lastpostdate");
$lastpostdate = qq~<font color=$fontcolormisc>$longdate</font>~;
}
else {
$lastpostdate = qq~<font color=$fontcolormisc>没有~;
$lastpoststamp = "";
}
$startedpostdate = $startedpostdate + ($timedifferencevalue*3600) + ($timezone*3600);
$startedlongdate = &shortdate("$startedpostdate");
$startedshorttime = &shorttime("$startedpostdate");
$startedpostdate = qq~<font color=$fontcolormisc>$startedlongdate</font>~;
$screenmode = $query->cookie("screenmode");
$topictitlemax = 54;
$topictitlemax = 84 if (($screenmode >=8)||($tablewidth > 770));
$posttemp = "(无内容)" if ($posttemp eq "");
$topictitletemp=&lbhz("$topictitle",$topictitlemax);
$topictitle = qq~<ACRONYM TITLE="最后回复摘要:\n\n$posttemp"><a href=topic.cgi?forum=$inforum&topic=$topicid target=_blank>$topictitletemp</a></ACRONYM>~;
$startedbyfilename = $startedby;
$startedbyfilename =~ s/ /\_/isg;
$startedbyfilename =~ tr/A-Z/a-z/;
if ($lastposter) {
$lastposterfilename = $lastposter;
$lastposterfilename =~ s/ /\_/isg;
$lastposter = qq~<a href=profile.cgi?action=show&member=~ . ($uri_escape eq "no" ? $lastposterfilename : uri_escape($lastposterfilename)) . qq~>$lastposter</a>~;
}
else {$lastposter = qq~<font color=$fontcolormisc>--------</a>~;}
$topicdescriptiontemp = $topicdescription;
$topicdescriptiontemp =~s/\s*(.*?)\s*\<a \s*(.*?)\s*\>\s*(.*?)\s*\<\/a\>/$3/isg;
$topicdescriptiontemp =~s/\<\/a\>//isg;
if (length($topicdescriptiontemp) > ($topictitlemax-4)) {
$topicdescriptiontemp=&lbhz("$topicdescriptiontemp",$topictitlemax-4);
$topicdescription =~s/\<a \s*(.*?)\s*\>\s*(.*?)\s*\<\/a\>/\<a $1\>$topicdescriptiontemp\<\/a\>/isg;
}
if ($topicdescription) { $topicdescription = qq~<br> -=> $topicdescription~; }
if ($counter == 0) { $pagestoshowtemp1 = 0; }
else { $pagestoshowtemp1 =7;}
$totlelength = $counter*3.3 + $pagestoshowtemp1 + length($topictitletemp) + 4; #标题栏的总长度
undef $pagestoshowtemp1;
$admini = qq~
<tr><td align=right><font color=$titlecolor>|<a href=forums.cgi?forum=$inforum target=_blank><font color=$titlecolor>访问该贴所在分论坛</font></a>|<a href=fav.cgi?action=del&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>删除</font></a>|<a href=fav.cgi?action=add&forum=$inforum&topic=$topicid><font color=$titlecolor>提升</font></a>|</font> </td></tr>
~;
$topicicon = "<img src=$imagesurl/images/topicnonew.gif width=14 border=0>";
if ($threadstate eq "closed") {
$topicicon = "<img src=$imagesurl/images/topiclocked$icon_num.gif width=14 border=0>";
}
elsif ($threadstate eq "poll") {
$topicicon = "<img src=$imagesurl/images/closedb.gif width=13 border=0>";
}
elsif ($threadstate eq "pollclosed") {
$topicicon = "<img src=$imagesurl/images/closedb1.gif width=13 border=0>";
}
$topictitle=$topictitle."<BR>" if ($totlelength > $topictitlemax+5);
$output .=qq~
<table cellpadding=0 cellspacing=0 width=$tablewidth align=center>
<tr>
<td bgcolor=$tablebordercolor width=1 height=24></td>
<td bgcolor=$forumcolorone align=center width=32 class=drb><font color=$forumfontcolor><a href=topic.cgi?forum=$inforum&topic=$topicid target=_blank>$topicicon</a></td>
<td bgcolor=$forumcolortwo width=* class=drb><font color=$forumfontcolor><img src="" width=0 height=4><BR>
<table cellpadding=0 cellspacing=0 width=100%><tr><td> <a href=view.cgi?forum=$inforum&topic=$topicid target=_blank>$posticon</a> $topictitle$pagestoshow$topicdescription</font></td></tr>$admini</table>
<img src="" width=0 height=4><BR></td>
<td bgcolor=$forumcolorone align=center width=80 class=drb><font color=$forumfontcolor><a href=profile.cgi?action=show&member=~ . ($uri_escape eq "no" ? $startedbyfilename : uri_escape($startedbyfilename)) . qq~>$startedby</a></font></td>
<td bgcolor=$forumcolortwo align=center width=32 class=drb><font color=$forumfontcolor>$threadposts</font></td>
<td bgcolor=$forumcolortwo align=center width=32 class=drb><font color=$forumfontcolor>$threadviews</a></font></td>
<td bgcolor=$forumcolorone width=195 class=drb><font color=$fonthighlight> $lastpostdate | $lastposter<br></td>
</tr>
</table>
~;
$pagestoshow = undef;
$threadpages = undef;
$topiccount++;
}
$output .= qq~
</tr></table></td>
</tr></table></span>
<table cellpadding=0 cellspacing=2 border=0 width=$tablewidth align=center>
<tr height=4></tr>
<tr>
<td>$topicpages</td>
</tr></table>
</tr>
</table>
<br>
~;
}
sub accessneeded {
$output .= qq~
<form action="forums.cgi" method=post>
<input type=hidden name="forum" value="$inforum">
<input type=hidden name="action" value="accessrequired">
<table cellpadding=0 cellspacing=0 border=0 width=$tablewidth bgcolor=$tablebordercolor align=center>
<tr><td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr><td bgcolor=$miscbacktwo colspan=2 align=center><font color=$fontcolormisc><b>请输入您的名称、密码登录私有论坛</b></font></td></tr>
<tr><td bgcolor=$miscbackone colspan=2><font color=$fontcolormisc><br>每个浏览器只需要登录一次,同时请确认你已经打开了浏览器的 Cookies 选项!<br>只有经过管理员许可的用户才可以访问该论坛,如果你不能登录,请联系管理员!<br><br></td></tr>
<tr>
<td bgcolor=$miscbackone><font color=$fontcolormisc>请输入您的用户名</font></td>
<td bgcolor=$miscbackone><input type=text name="membername" value="$inmembername"> <font color=$fontcolormisc><span onclick="javascript:location.href='register.cgi?forum=$inforum'" style="cursor:hand">您没有注册?</span></td></tr>
<tr>
<td bgcolor=$miscbackone><font color=$fontcolormisc>请输入您的密码</font></td>
<td bgcolor=$miscbackone><input type=password name="password" value="$inpassword"> <font color=$fontcolormisc><a href="profile.cgi?action=lostpass" style="cursor:help">忘记密码 ?</a></font></td></tr>
<tr>
<td bgcolor=$miscbackone><font color=$fontcolormisc>请输入论坛访问密码</font></td>
<td bgcolor=$miscbackone><input type=password name="forumpassword" value="$forumpassword"> <font color=$fontcolormisc>如果你已经授权允许进入,则不必输入密码.</font></td></tr>
<tr height=28><td bgcolor=$miscbackone colspan=2 align=center><font color=$fontcolormisc>如果你确认输入了正确的密码,但还是无法登录的话,请刷新此页面(或者再次按登录键一次)。</td></tr>
<tr>
<td bgcolor=$miscbacktwo colspan=2 align=center><input type=submit name="submit" value="登 陆"></td></tr></table></td></tr></table>
</form>
~;
&output(
-Title => "$forumname",
-ToPrint => $output,
-Version => $versionnumber
);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -