⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 forums.cgi

📁 一个linux论坛
💻 CGI
📖 第 1 页 / 共 5 页
字号:

    $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:$fonthighlight; font-weight:600"~ : "";
    $topictitle = qq~<a href=topic.cgi?forum=$forumid&topic=$topicid&show=$inshow title="$topictitle \n发布时间: $startedpostdate \n最后回复: $posttemp "$highlightstyle>$topictitletemp</a>~;

    $startedbyfilename = $startedby;
    $startedbyfilename =~ s/ /\_/isg;
    $startedbyfilename =~ tr/A-Z/a-z/;

    if ($lastposter) {
	$lastposterfilename = $lastposter;
	$lastposterfilename =~ s/ /\_/isg;
	if ($lastposter=~/\(客\)/) {
       	    $lastposter=~s/\(客\)//isg;
	    $lastposter = qq~<font color=$postfontcolorone title="此为未注册用户">$lastposter</font>~;
	}
	else {
	    $lastposter = qq~<span style="cursor:hand" onClick="javascript:O9('~ . ($uri_escape eq "no" ? $lastposterfilename : uri_escape($lastposterfilename)) . qq~')">$lastposter</span>~;
	}
    }
    else {$lastposter = qq~--------~;}

    $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);
	$topicdescription =~s/\<a \s*(.*?)\s*\>\s*(.*?)\s*\<\/a\>/\<a $1\>$topicdescriptiontemp\<\/a\>/isg;
    }

    if ($topicdescription) { $topicdescription = qq~<br>  -=> $topicdescription~; }

    $addonlength=0;

    if ($multimanage eq "") { $multimanagebutton = ""; }
	              else  { $multimanagebutton = qq~<td bgcolor=$forumcolortwo align=center width=25><input type=checkbox name=topic value=$topicid></td>~; $addonlength += 2.5; }

    if (($topiccount >= $abstopcount + $cattopcount)||($startarray ne 0)||($forumid eq $inforum)) {
        my @files = grep(/^$inforum\_$topicid\./,@usruploadfile);
        if ($#files >= 0) {
	    my $usrfilename = $files[0]; chomp $usrfilename;
	    ($up_name, $up_ext) = split(/\./,$usrfilename);
	    $up_ext =~ tr/A-Z/a-z/;
            $filetype = "unknow";
            $filetype = $up_ext if (-e "${imagesdir}icon/$up_ext.gif");
             
	    if ($dispshow eq "yes") { $addmelink=qq~<a href=$imagesurl/usr/$inforum/$inforum\_$topicid\.$up_ext target=_blank>~; } else { $addmelink=qq~<a href=#>~; }
            if (($up_ext eq 'jpg')||($up_ext eq 'gif')||($up_ext eq 'bmp')||($up_ext eq 'png')) { $topictitle ="$addmelink<img src=$imagesurl/icon/$filetype.gif width=16 height=16 alt=\"该主题有一张 $filetype 格式图片\" border=0 align=absmiddle></a> ".$topictitle; }
	        elsif ($up_ext eq "swf") { $topictitle ="$addmelink<img src=$imagesurl/icon/$filetype.gif width=16 height=16 alt=\"该主题有一张 $filetype 格式动画\" border=0 align=absmiddle></a> ".$topictitle; }
	    else {
	        $topictitle ="$addmelink<img src=$imagesurl/icon/$filetype.gif width=16 height=16 align=absmiddle alt=\"该主题有一个“$filetype”类型附件\" border=0></a> ".$topictitle;
	    }
            $addonlength += 4;
        }
            
        my @files = grep(/^$inforum\_$topicid\_/,@usruploadfile);
        if ($#files >= 0) {
            $topictitle=$topictitle." <img src=$imagesurl/icon/replyattachment.gif width=16 height=16 align=absmiddle alt=\"该主题内的回复中含有图形或附件\">";
            $addonlength += 3;
        }
    }
    $addonlength += 3 if ($canusetreeview ne "no");
    if ($counter == 0) { $pagestoshowtemp1 = 0; } elsif ($counter > 11) { $counter = 11; } else { $pagestoshowtemp1 = 7; }
    $totlelength = $counter*3.3 + $pagestoshowtemp1 + length($topictitletemp) + 3 + $addonlength; #标题栏的总长度
    undef $pagestoshowtemp1;

    if (($membercode eq "ad") || ($membercode eq 'smo') || ($inmembmod eq "yes")) {
        $admini = qq~<DIV ALIGN=Right><font color=$titlecolor>|$jhbuttom$abslockbuttom$catlockbuttom<a href=postings.cgi?action=locktop&forum=$inforum&topic=$topicid><font color=$titlecolor>固</font></a>|<a href=postings.cgi?action=puttop&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>提</font></a>|<a href=postings.cgi?action=lock&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>锁</font></a>|<a href=postings.cgi?action=unlock&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>解</font></a>|<a href=delpost.cgi?action=delete&forum=$inforum&topic=$topicid><font color=$titlecolor>删</font></a>|<a href=delpost.cgi?action=movetopic&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>移</font></a>|</font>&nbsp;</DIV>~;
    }
    elsif ((lc($inmembername) eq lc($startedby)) && ($inpassword eq $password) && ($inmembername !~ /^客人/)) {
	if ($arrowuserdel eq "on") {
           $admini = qq~<DIV ALIGN=Right><font color=$titlecolor>~;
           $admini .= qq~| <a href=postings.cgi?action=lock&forum=$inforum&topic=$topicid><font color=$titlecolor>锁定此帖,不允许别人回复</font></a> ~ unless ($threadstate eq "closed");
           $admini .= qq~| <a href=delpost.cgi?action=delete&forum=$inforum&topic=$topicid><font color=$titlecolor>删除此帖</font></a> |</font>  </DIV>~;
	}
	else { undef $admini; }
    }
    else { undef $admini; }
    $topictitleadd = "";
    if ($startarray eq 0) {
        if ($topiccount < $abstopcount) {
    	    if ($membercode eq "ad") {
                $admini = qq~<DIV ALIGN=Right><font color=$titlecolor>|<a href=postings.cgi?action=absunlocktop&forum=$forumid&topic=$topicid&checked=yes><font color=$titlecolor>取消总固顶</font></a>|<a href=postings.cgi?action=abslocktop&forum=$forumid&topic=$topicid><font color=$titlecolor>顶</font></a>|$jhbuttom<a href=postings.cgi?action=lock&forum=$forumid&topic=$topicid&checked=yes><font color=$titlecolor>锁</font></a>|<a href=postings.cgi?action=unlock&forum=$forumid&topic=$topicid&checked=yes><font color=$titlecolor>解</font></a>|<a href=delpost.cgi?action=delete&forum=$forumid&topic=$topicid><font color=$titlecolor>删</font></a>|</font>&nbsp;</DIV>~;
            } else { undef $admini; }
            $topicicon = "<img src=$imagesurl/images/abstop.gif width=17 border=0>";
            $topictitle =~ s/\&nbsp\;\"\>/\&nbsp\;\" target=\_blank\>/isg;
            $pagestoshow =~ s/ class=ha\>/ target=\_blank class=ha\>/isg;
            $topictitleadd = "<font color=$fonthighlight><B>[公告]</B></font> ";
            $totlelength = $totlelength + 5;
            
            $multimanagebutton = "<td bgcolor=$forumcolortwo align=center width=25>&nbsp;</td>" if ($multimanagebutton ne "");
        }
        elsif ($topiccount < $cattopcount + $abstopcount) {
            if ($membercode eq "ad" || $membercode eq "smo" || ",$catemods," =~ /\,$inmembername\,/i) {
                $admini = qq~<div align=right><font color=$titlecolor>|<a href=postings.cgi?action=catunlocktop&forum=$forumid&topic=$topicid&checked=yes><font color=$titlecolor>取消区固顶</font></a>|$abslockbuttom<a href=postings.cgi?action=catlocktop&forum=$forumid&topic=$topicid&checked=yes><font color=$titlecolor>顶</font></a>|$jhbuttom<a href=postings.cgi?action=lock&forum=$forumid&topic=$topicid&checked=yes><font color=$titlecolor>锁</font></a>|<a href=postings.cgi?action=unlock&forum=$forumid&topic=$topicid&checked=yes><font color=$titlecolor>解</font></a>|<a href=delpost.cgi?action=delete&forum=$forumid&topic=$topicid><font color=$titlecolor>删</font></a>|</font> </div>~;
            } else {
		$admini = "";
	    }
            $topicicon = "<img src=$imagesurl/images/lockcattop.gif width=15 border=0>";
            $topictitle =~ s/\ \;\"\>/\ \;\" target=\_blank\>/isg;
            $pagestoshow =~ s/ class=ha\>/ target=\_blank class=ha\>/isg;
            $multimanagebutton = "<td bgColor=$forumcolortwo align=center width=25>&nbsp;</td>" if ($multimanagebutton ne "");
        }
        elsif ($topiccount < $topcount + $abstopcount + $cattopcount) {
    	    if (($membercode eq "ad") || ($inmembmod eq "yes") || ($membercode eq 'smo')) {
                $admini = qq~<DIV ALIGN=Right><font color=$titlecolor>|<a href=postings.cgi?action=unlocktop&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>取消固顶</font></a>|$abslockbuttom$catlockbuttom<a href=postings.cgi?action=locktop&forum=$inforum&topic=$topicid><font color=$titlecolor>顶</font></a>|$jhbuttom<a href=postings.cgi?action=lock&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>锁</font></a>|<a href=postings.cgi?action=unlock&forum=$inforum&topic=$topicid&checked=yes><font color=$titlecolor>解</font></a>|<a href=delpost.cgi?action=delete&forum=$inforum&topic=$topicid><font color=$titlecolor>删</font></a>|</font>&nbsp;</DIV>~;
      	    } else { undef $admini; }
            $topicicon = "<img src=$imagesurl/images/locktop.gif width=15 border=0>";
            $multimanagebutton = "<td bgcolor=$forumcolortwo align=center width=25>&nbsp;</td>" if ($multimanagebutton ne "");
        }
    }
    $topictitle = "$mypost$topictitleadd$topictitle";
    $topictitle .= $topnew;
    $topictitle .= $jhimage;
    $topictitle=$topictitle."<BR>" if ($totlelength > $topictitlemax+7);

    if ($threadviews > 9999) { $threadviewstemp = "<font color=$forumfontcolor title=点击数:$threadviews>>Max</font>"; } else { $threadviewstemp = "<font color=$forumfontcolor>$threadviews</font>"; }

    if (($threadstate eq "poll")||($threadstate eq "pollclosed")) { $outputtemp = qq~<td bgcolor=$forumcolortwo align=center width=63 rowspan=2 TITLE="回复数:$threadposts, 点击数:$threadviews"><font color=$forumfontcolor>共 $size 票</font></td>~; } else { $outputtemp = qq~<td bgcolor=$forumcolortwo align=center width=30><font color=$forumfontcolor>$threadposts</font></td><td bgcolor=$forumcolortwo align=center width=30>$threadviewstemp</td>~; }
    if ($startedby=~/\(客\)/) { $startedby=~s/\(客\)//isg; $startedby=qq~<font color=$postfontcolorone title="此为未注册用户">$startedby</font>~; } else { $startedby=qq~<span style="cursor:hand" onClick=javascript:O9('~ . ($uri_escape eq "no" ? $startedbyfilename : uri_escape($startedbyfilename)) . qq~')>$startedby</span>~; }
    if (($startarray eq 0)&&($topiccount < $abstopcount + $cattopcount)) {
	$topicicontemp = qq~<span style="cursor:hand" onClick=javascript:O5($forumid,$topicid)>$topicicon</span>~;
	$posticontemp  = qq~<span style="cursor:hand" onClick=javascript:O6($forumid,$topicid)>$posticon</span>~;
    }
    else {
	$topicicontemp = qq~<span style="cursor:hand" onClick=javascript:O1($topicid)>$topicicon</span>~;
	$posticontemp  = qq~<span style="cursor:hand" onClick=javascript:O2($topicid)>$posticon</span>~;
    }
    #文章树
    if ($canusetreeview ne "no") {
        $nofollow = ($threadposts)?"cat.gif":"cat1.gif";
        $id_of_this_topid = sprintf("%04d%05d",$forumid,$topicid);
        $followImg=qq(<img id="followImg$id_of_this_topid" title="展开文章树" style="CURSOR: hand" onclick="loadThreadFollow($forumid,$topicid,'$id_of_this_topid')" src="$imagesurl/images/$nofollow" loaded="no" nofollow="$threadposts">&nbsp;);
    }
    else { undef $followImg; }

    $output .=qq~<table cellspacing=0 width=$tablewidth bordercolor=$tablebordercolor border=1><tr><td align=center width=30 bgcolor=$forumcolorone>$topicicontemp</td>
<td width=* class=dp bgColor=$forumcolortwo onmouseover="this.bgColor='$forumcolorone';" onmouseout="this.bgColor='$forumcolortwo';">&nbsp;$posticontemp&nbsp;$followImg<span id=forum>$topictitle$pagestoshow$topicdescription$admini</span></td>
<td align=center width=78 bgcolor=$forumcolorone>$startedby</td>$outputtemp<td width=193 bgcolor=$forumcolorone>&nbsp;<span style="cursor:hand" onClick="javascript:O3($forumid,$topicid,$gotoendpost)">$lastpostdate</span><font color=$fonthighlight> | </font>$lastposter</td>$multimanagebutton</tr></table>
~;
$output .=qq~<!--文章树-->
<table cellspacing=0 width=$tablewidth bordercolor=$tablebordercolor border=1 id="follow$id_of_this_topid" style="DISPLAY: none">
<tr>
<td id="followTd$id_of_this_topid">
<DIV style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT: 2px; BORDER-TOP: black 1px solid; PADDING-LEFT: 2px; PADDING-BOTTOM: 2px; MARGIN-LEFT: 18px; BORDER-LEFT: black 1px solid; WIDTH: 240px; COLOR: black; PADDING-TOP: 2px; BORDER-BOTTOM: black 1px solid; BACKGROUND-COLOR: lightyellow;cursor:hand" onclick="loadThreadFollow($forumid,$topicid,'$id_of_this_topid')">
正在读取关于本主题的回复,请稍候。。。
</DIV></td>
</tr>
</table>
~ if ($canusetreeview ne "no");
    $topiccount++;
}
$output .= qq~</tr></table></td></tr></table><table cellpadding=0 cellspacing=2 width=$tablewidth align=center><tr height=4></tr><tr><td>$topicpages &nbsp;[主题<B>$threads</B>篇,回复<b>$posts</b>篇]</td>$multimanageitem</form>~;

####################htc

if (($indexforum ne "no")&&($dispjump ne "no")) { $output .= qq~<td align=right>$jumphtml</td></form>~; }
$output .= qq~</tr></table></tr></table><br>~;

if ($membercode eq "ad" || $inmembmod eq "yes" || $membercode eq 'smo') {
    $deltopicmore1 = qq~论坛选项~;
    $deltopicmore2 = qq~<img src=$imagesurl/images/adminlock.gif width=12 height=15> <a href=forumoptions.cgi?action=prune&forum=$inforum>批量管理文章</a>~;
    $deltopicmore3 = qq~<img src=$imagesurl/images/adminlock.gif width=12 height=15> <a href=postings.cgi?action=repireforum&forum=$inforum>修复这个论坛</a>~;
} else { undef $deltopicmore1; undef $deltopicmore2; undef $deltopicmore3; }

if ($usefastpost ne "no") {
    if ($startnewthreads eq "no")        { $startthreads = "在此论坛中新的主题和帖子回复只能由坛主、版主发表!"; }
    elsif ($startnewthreads eq "follow") { $startthreads = "在此论坛中新的主题只能由坛主、版主发表!普通会员只可以跟帖!"; }
    elsif ($startnewthreads eq "all")    { $startthreads = "任何人均可以发表和回复主题,未注册用户发帖密码请留空!"; }
    elsif ($startnewthreads eq "cert")   { $startthreads = "在此论坛中新的主题只能由坛主、版主、认证的会员发表!"; }
    else { $startthreads = "所有注册会员均可以发表和回复主题!"; }

    if ($emailfunctions eq "on") {
	if ($innotify eq "yes") { $requestnotify = " checked"; } else { $requestnotify = ""; }
	$requestnotify = qq~&nbsp;<input type=checkbox name="notify" value="yes"$requestnotify>有回复时使用邮件通知您?<br>~;
    }
    if ($emoticons eq "on") {
       $emoticonslink = qq~<li><span style="cursor:hand" onClick="javascript:openScript('$miscprog?action=showsmilies',300,350)">允许<B>使用</B>表情字符转换</span>~;
       $emoticonsbutton =qq~&nbsp;<input type=checkbox name="inshowemoticons" value="yes" checked>使用表情字符转换?<br>~;
    }
    $maxpoststr = "(帖子中最多包含 <B>$maxpoststr</B> 个字符)" if ($maxpoststr ne "");

    $output .= qq~<script>
function HighlightAll(theField) {
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
therange=tempval.createTextRange()
therange.execCommand("Copy")}
function DoTitle(addTitle) { var revisedTitle;var currentTitle = document.FORM.intopictitle.value;revisedTitle = addTitle+currentTitle;document.FORM.intopictitle.value=revisedTitle;document.FORM.intopictitle.focus();return;}
</script><form action="post.cgi" method=post name="FORM" enctype="multipart/form-data">
<input type=hidden name="action" value="addnew">
<input type=hidden name="forum" value="$inforum">
<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=$titlecolor colspan=2>&nbsp;<font color=$titlefontcolor><b>快速发表新主题</b></font> -- $startthreads</td></tr>
<tr><td bgcolor=$miscbacktwo width=220>&nbsp;<font color=$fontcolormisc><b>输入用户名和密码:</b></font></td><td bgcolor=$miscbacktwo> <font color=$fontcolormisc><b>用户名</b>: <input type=text name="membername" value="$inmembername" onmouseover=this.focus() onfocus=this.select()> <span onclick="javascript:locat

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -