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

📄 forums.cgi

📁 一个linux论坛
💻 CGI
📖 第 1 页 / 共 5 页
字号:
    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="$thisprog?forum=$tempforumno">$tempforumname</a>~;
    $addspace=" ";
}
 $output .= qq~<font color=$fontcolormisc> <img src=$imagesurl/images/closedfold.gif width=14 height=14> <a href=leoboard.cgi>$boardname</a>$addlink<br>$addspace <img src=$imagesurl/images/bar.gif width=15 height=15><img src=$imagesurl/images/openfold.gif width=14 height=14> $forumname~; }

$output .= qq~</td></tr>$uservisitdata</tr></table><br>~;

if ($privateforum eq "yes"){
    if ($inmembername eq "客人") {
	print "<script language='javascript'>document.location = 'loginout.cgi?forum=$inforum'</script>";
	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 { &accessneeded; }
}
if (($startnewthreads eq "cert")&&(($membercode ne "ad" && $membercode ne "smo" && $membercode ne "cmo" && $membercode ne "mo" && $membercode ne "rz")||($inmembername eq "客人"))&&($userincert eq "no")) { &error("进入论坛&一般会员不允许进入此论坛!"); }

if ($catbacks ne "")  { $catbacks = "background=$imagesurl/myimages/$catbacks"; }

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 {
    $memberoutput = "";
    $membertongji = " <B>由于服务器繁忙,所以本分论坛的在线数据暂时不提供显示。</B>";
    $onlinetitle = "";
}

if (($membercode eq "ad")||($membercode eq 'smo')||($inmembmod eq "yes")){
    $multimanage  = qq~<td bgcolor=$titlecolor width=27 align=center $catbacks><font color=$titlefontcolor><b>选</b></td>~;
    $multideletebutton = qq~<input type="submit" name="delete" value="删除" onClick="SetAction('delete')">~;
    $multimanageitem = qq~<td align=center><input type="button" name="chkall" value="全选" onclick="CheckAll(this.form)"><input type="button" name="clear2" value="反选" onclick="FanAll(this.form)"><input type="reset" name="Reset" value="重置"><BR>$multideletebutton<input type="submit" name="move" value="移动" onClick="SetAction('movetopic')"><input type="button" name="jinghua" value="精华" onClick="AddToJingHua(this.form)"></td>~;
    $multimanagejs   = qq~<script language="JavaScript">
function CheckAll(form){for (var i=0;i<form.elements.length;i++){var e = form.elements[i];e.checked = true;}}
function FanAll(form){for (var i=0;i<form.elements.length;i++){var e = form.elements[i];if (e.checked == true){ e.checked = false; }else { e.checked = true;}}}
function SetAction(A){Action.action.value=A;}
function AddToJingHua(form){JingHua.topic.value='';for (var i=0;i<form.elements.length;i++){var e = form.elements[i];if (e.checked == true){JingHua.topic.value+=e.value+" "; }}JingHua.submit();}
</script>
~;
} else { $multimanageitem=""; $multimanagejs =""; $multimanage= "";}

$modoutput = "<B>本论坛版主暂时空缺&nbsp;</B>" if (!$modoutput);
if ($announcements eq 'yes') {
    if (open(FILE, "${lbdir}data/news$inforum.cgi")) {
        @announcementdata = <FILE>;
        close(FILE);
    }
    $totalannouncements = @announcementdata;
    if ($totalannouncements eq 0) { $dateposted = $currenttime; $title = "当前没有公告"; $announcetemp1 = qq~<img src=$imagesurl/images/announce.gif border=0 alt=分论坛暂时无公告! width=18>~; }
                             else { ($title, $dateposted, my $trash) = split(/\t/, $announcementdata[0]); $announcetemp1 = qq~<img src=$imagesurl/images/announce.gif border=0 alt="分论坛公告!共 $totalannouncements 条!" width=18>~; }
    $dateposted = $dateposted + $timeadd;
    $dateposted = &longdate("$dateposted");
    if ($announcemove eq "on") {
        if ($title ne "当前没有公告") {
            $title = "";
            $newstitleid = "";
            foreach (@announcementdata) {
                chomp  $_;
                (my $newstitle,my $dateposted) = split(/\t/,$_);
	        next if ($newstitle eq "");
                $dateposted = $dateposted + $timeadd;
                $dateposted = &longdate("$dateposted");
                $newstitleid++;
                $title .= qq~ <font color=$forumfontcolor><B>$newstitleid. <a href=announcements.cgi?forum=$inforum#title$newstitleid target=_blank><font color=$fonthighlight>$newstitle</font></a></B> [$dateposted]</font>   ~;
            }
        }
        else { $title = "<a href=announcements.cgi?forum=$inforum target=_blank><B>$title</B></a> [$dateposted]"; }
        $announcedisp=qq~<marquee scrollamount=3 onmouseover=this.stop(); onmouseout=this.start();>$title</marquee>~;
    }
    else {
        $titletemp = &lbhz($title,38); 
        $announcedisp=qq~&nbsp;<a href=announcements.cgi?forum=$inforum target=_blank title="$title"><b>$titletemp</b></a> [$dateposted]~;
    }
    undef $titletemp; undef $title; undef $newstitleid;
}
    
$output .= qq~<SCRIPT FOR=forum EVENT=onclick>a();</SCRIPT>
<table cellpadding=1 cellspacing=0 width=$tablewidth align=center>
<tr><td align=center width=2></td><td align=center width=34>$announcetemp1</td><td width=* align=left>$announcedisp</td><td align=right width=400><p>
<SCRIPT LANGUAGE="JavaScript">
function threadmenu(){var URL = document.jump1.threadages.options[document.jump1.threadages.selectedIndex].value;top.location.href = "forums.cgi?forum=$inforum&order=orderlastpostd&threadages=" + URL; target = '_self';}
</SCRIPT>
<form action="forums.cgi" method=post name="jump1"><A href=javascript:JM_setTarget() value='' id=globalTarget><img src=$imagesurl/images/$wlogo width=74 height=21 border=0 alt=查看帖子使用的模式? align=absmiddle></a> 
<select name="threadages" onchange="threadmenu()"><option value="all">查看所有的主题</option><option value="1">查看一天内的主题</option><option value="2">查看两天内的主题</option><option value="7">查看一星期内的主题</option><option value="15">查看半个月内的主题</option><option value="30">查看一个月内的主题</option><option value="61">查看两个月内的主题</option><option value="182">查看半年内的主题</option><option value="365">查看一年内的主题</option>
</select></form></p></td><td align=center width=4></td></tr></table>
<SCRIPT LANGUAGE="JavaScript">
function a(){el=event.srcElement;if (el.tagName=='A' && el.target!="_blank") el.target=(globalTarget.value);}
function setVMcookie(vtype){var expDays = 30;var exp = new Date();exp.setTime(exp.getTime() + (expDays*24*60*60*1000));SetCookie('viewMode',vtype,exp);}
function JM_setTarget(){globalTarget.value=(globalTarget.value=='_blank')?'':'_blank';globalTarget.children[0].src=(globalTarget.value=='')?'$imagesurl/images/$wlogo':'$imagesurl/images/$nwlogo';setVMcookie(globalTarget.value);}
function initViewMode(){viewMode=GetCookie('viewMode');globalTarget.value=(!viewMode)?'':'_blank';globalTarget.children[0].src=(!viewMode)?'$imagesurl/images/$wlogo':'$imagesurl/images/$nwlogo';}
initViewMode()
</script>
<table cellpadding=0 cellspacing=0 width=$tablewidth bgcolor=$tablebordercolor align=center><tr><td><table cellpadding=6 cellspacing=1 width=100%>
<tr><td bgcolor=$titlecolor width=92%><font color=$titlefontcolor>$membertongji  $onlinetitle</td>
<td bgcolor=$titlecolor width=8% align=center><a href="javascript:this.location.reload()"><img src=$imagesurl/images/refresh.gif border=0 width=40 height=12></a></td>
</tr>
~;

if ($otherbackpic ne "")  { $otherbackpic = "background=$imagesurl/myimages/$otherbackpic"; }
if ($otherbackpic1 ne "") { $otherbackpic1 = "background=$imagesurl/myimages/$otherbackpic1"; }

if ($onlineview == 1){ $output .= qq~<tr><td colspan=2 bgcolor=$forumcolorone $otherbackpic><table cellpadding=1 cellspacing=0 border=0>$memberoutput</table></td></tr>~; }
$output .= qq~</table></td></tr></table><br>~;

if (($inmembername ne "")&&($inmembername ne "客人")){ $fav=qq~<img src=$imagesurl/images/icon.gif width=14 height=12> <a href=fav.cgi?action=show&member=$inmembername>个人收藏</a>&nbsp;~; }
if ($startnewthreads ne "no") { $jinghua    =qq~<img src=$imagesurl/images/icon.gif width=14 height=12> <a href=jinghua.cgi?action=list&forum=$inforum><font color=$fonthighlight>本版精华</font></a>&nbsp;~; }
unless ($look eq "off")       { $lookstyles =qq~<img src=$imagesurl/images/icon.gif width=14 height=12> <a href=lookstyles.cgi?forum=$inforum>本版配色</a>&nbsp;~; }

my $freshtime= $query->cookie("freshtime");
if ($freshtime ne "") {
    $autofreshtime = $freshtime*60-1;
    $autofreshtime = 300 if ($autofreshtime < 59);
    $refreshnow = qq~<meta http-equiv="refresh" content="$autofreshtime;">~;
}
elsif ($refreshforum eq "on") {
    $autofreshtime = 300 if ($autofreshtime < 59);
    $refreshnow = qq~<meta http-equiv="refresh" content="$autofreshtime;">~;
}

$output .= qq~$multimanagejs
$refreshnow
~;

if (($inshow eq 0)||($inshow eq "")) {

@childforum=grep(/^[0-9]+\tchildforum-$inforum\t/,@forums);
if($#childforum >= 0){
$a = 0;
@rearrangedforums=();
foreach $forum (@childforum) {
    $a  = sprintf("%09d",$a);
    chomp $forum;
    next if ($forum eq "");
    ($cforumid, $ccategory, $ccategoryplace, $cforumname, $cforumdescription, $cforummoderator ,$chtmlstate ,$cidmbcodestate ,$cprivateforum, $cstartnewthreads ,$clastposter ,$clastposttime, $cthreads, $cposts, $cforumgraphic,$ctmp,$ctmp,$cforumpass,$chiddenforum,$cindexforum,$cteamlogo,$cteamurl, $cfgwidth, $cfgheight, $cmiscadd3, $cmiscadd4, $cmiscad5) = split(/\t/,$forum);
    next if ($cforumid !~ /^[0-9]+$/);
    $ccategoryplace  = sprintf("%09d",$ccategoryplace);
    $rearrange = ("$ccategoryplace\t$a\t$ccategory\t$cforumname\t$cforumdescription\t$cforummoderator\t$chtmlstate\t$cidmbcodestate\t$cprivateforum\t$cstartnewthreads\t$clastposter\t$clastposttime\t$cthreads\t$cposts\t$cforumgraphic\t$ratings\t$misc\t$cforumpass\t$chiddenforum\t$cindexforum\t$cforumid\t$cteamlogo\t$cteamurl\t$cfgwidth\t$cfgheight\t$cmiscadd3\t$cmiscadd4\t$cmiscad5\t");
    push (@rearrangedforums, $rearrange) if (($chiddenforum eq "no")||($membercode eq "ad")||($membercode eq "smo"));
    $a++;
}
$output .= qq~<table cellspacing=0 width=$tablewidth bgcolor=$tablebordercolor align=center><tr><td height=1></td></tr></table><center>~;

@rearrangedforums = sort(@rearrangedforums);

foreach (@rearrangedforums) {
    chomp $_;
   ($ccategoryplace,my $a, $ccategory, $cforumname, $cforumdescription, $cforummoderator, $chtmlstate, $cidmbcodestate, $cprivateforum, $cstartnewthreads, $clastposter, $clastposttime1, $cthreads, $cposts, $cforumgraphic, $ratings, $misc,$cforumpass,$chiddenforum,$cindexforum,$cforumid,$cteamlogo,$cteamurl, $cfgwidth, $cfgheight, $cmiscadd3, $cmiscadd4, $cmiscad5) = split(/\t/,$_);
    $ccategoryplace  = sprintf("%01d",$ccategoryplace);
    $cforumdescription  = &HTML("$cforumdescription");
    $modnumber = 0;
    $modout="";
    if ($cforummoderator) {
	$cforummoderator =~ s/\, /\,/gi;
	$cforummoderator =~ s/ \,/\,/gi;
	$cforummoderator =~ s/\,\,/\,/gi;
	$cforummoderator =~ s/\,$//gi;
	$cforummoderator =~ s/^\,//gi;
	my @mods = split(/\,/,$cforummoderator);
	$modnumber = @mods;
	my $modprintnum = 1;
	foreach (@mods) {
	    my $modname = $_;
            $modname =~ y/ /_/;
            $modname =~ tr/A-Z/a-z/;
  	    last if ($modprintnum > 3 );
            if ($modprintnum != $modnumber) {
                if(($_ =~m/管理员/isg)||($_ =~m/诚聘中/isg)||($_ =~m/暂时空缺/isg)||($_ =~m/版主/isg)||($_ =~m/斑竹/isg)||($_ =~m/坛主/isg)){ $modout .= qq~<font color=$fontcolormisc2>$_</font><BR>~; } else { $modout .= qq~<span style="cursor:hand" onClick="javascript:O9('~ . ($uri_escape eq "no" ? $modname : uri_escape($modname)) . qq~')">$_</span><BR>~; }
            }
	    else {
		if(($_ =~m/管理员/isg)||($_ =~m/诚聘中/isg)||($_ =~m/暂时空缺/isg)||($_ =~m/版主/isg)||($_ =~m/斑竹/isg)||($_ =~m/坛主/isg)){ $modout .= qq~<font color=$fontcolormisc2>$_</font>~; } else { $modout .= qq~<span style="cursor:hand" onClick="javascript:O9('~ . ($uri_escape eq "no" ? $modname : uri_escape($modname)) . qq~')">$_</span>~; }
	    }
	    $modprintnum++;
	}
    }
    $modout .= qq~<font color=$fontcolormisc2>More...~ if ($modnumber > 3 );
    $modout  ="<font color=$fontcolormisc2>暂时空缺<BR>诚聘中" if ($modout eq "");
    if (((($query->cookie("$te") ne "no")&&($catlog2 ne $ccategoryplace))||(($query->cookie("$te") eq "no")&&($catlog2 eq $ccategoryplace))||($catlog eq "expand"))&&!($catlog eq "depand")) {
    	    $cforumnameadd = $cforumname;
    	    $cforumnameadd1 = $cforumnameadd;
	    $cforumnameadd1 =~ s/\'/\\'/g;
    	    $cforumname = qq~<a href=forums.cgi?forum=$cforumid$titleinfos><font color=$fontcolormisc2>$cforumname</a>~;
	    my $forumlastvisit = $lastvisitinfo{$cforumid};
    	    $folderpicture = qq( );

    	    ($clastposttime,$threadnumber,$topictitle)=split(/\%\%\%/,$clastposttime1);
       	    $topictitle =~ s/^*#!&*//;
	    if (($dofilter eq "no")||($dofilter eq "all")) {
		$topictitle = &postwordfilter("$topictitle");
	    }

    	    if (($clastposttime > $forumlastvisit)&&($inmembername ne "客人")&&($action ne "resetall")) {
		if (($cforumpass)||($cprivateforum eq "yes")){ $folderpicture = qq~<img src=$imagesurl/images/lock_l.gif width=13 height=16 border=0 style="cursor:hand" onClick="javascript:O4($cforumid)">~; }
		      elsif ($cstartnewthreads eq "follow") { $folderpicture = qq~<img src=$imagesurl/images/follownew.gif width=13 height=16 border=0 style="cursor:hand" onClick="javascript:O4($cforumid)">~; }
		      elsif ($cstartnewthreads eq "yes")    { $folderpicture = qq~<img src=$imagesurl/images/foldernew.gif width=13 height=16 border=0 style="cursor:hand" onClick="javascript:O4($cforumid)">~; }

⌨️ 快捷键说明

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