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

📄 topic.cgi

📁 一个linux论坛
💻 CGI
📖 第 1 页 / 共 5 页
字号:
<td bgcolor=$titlecolor align=right>$savefile$reporticon$favicon$printpageicon$pagpageicon$bookmarkpage$sendtofriendicon&nbsp;</td></tr></table></td><td bgcolor=$tablebordercolor width=1 height=24></td></tr></table>
<table cellpadding=0 cellspacing=0 width=$tablewidth bgcolor=$tablebordercolor align=center><tr><td height=1></td></tr></table>
~;

opendir (USRDIR, "${imagesdir}usr/$inforum");
my @usruploaddata = readdir(USRDIR);
closedir (USRDIR);
my @usruploaddata      = grep(/^$inforum\_$intopic/,@usruploaddata);
my @usruploaddatareply = grep(/^$inforum\_$intopic\_/,@usruploaddata);
$usruploaddatareply = @usruploaddatareply;

$editpostnumber = $startarray + 1;
$postcountnumber = 0;
$endarraytemp = $endarray + 1;
$rn=$startarray;
$postcopyright = "<font color=$fonthighlight>$postcopyright</font><br>" if ($postcopyright ne "");

$sxall = "子鼠丑牛寅虎卯兔辰龙巳蛇午马未羊申猴酉鸡戌狗亥猪";
$xzall = "白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯水瓶双鱼";

foreach (@threads[$startarray .. $endarray]) {
    chomp $_;
#    next if ($_ eq "");
    my $addmefile =0;
    if ($rn>0) {
	if ($usruploaddatareply > 0) {
            $rrn = $rn;
            my @usruploaddata1 = grep(/^$inforum\_$intopic\_$rrn\./,@usruploaddatareply);
            if ($#usruploaddata1 >= 0) {
               my $usruploadfile = $usruploaddata1[0]; chomp $usruploadfile;
               ($up_name, $up_ext) = split(/\./,$usruploadfile);
                $up_ext =~ tr/A-Z/a-z/;
          	$addmefile =1;
          	$usruploaddatareply --;
            }
	}
    }
    else {
        my @usruploaddata2 = grep(/^$inforum\_$intopic\./,@usruploaddata);
        if ($#usruploaddata2 >= 0) {
	    my $usruploadfile = $usruploaddata2[0]; chomp $usruploadfile;
            ($up_name, $up_ext) = split(/\./,$usruploadfile);
            $up_ext =~ tr/A-Z/a-z/;
            $addmefile =1;
        }
    }
    $rn = $rn + 1;

    if ($addmefile == 1) {
   	@fileinfo = stat("${imagesdir}usr/$inforum/$up_name.$up_ext");
	$filetype = "unknow";
	$filetype = $up_ext if (-e "${imagesdir}icon/$up_ext.gif");
	if (($up_ext eq "gif")||($up_ext eq "jpg")||($up_ext eq "png")||($up_ext eq "bmp")){
            if (($nodispphoto eq 'yes')||($arrawpostpic eq 'off')) {
	    	$addme=qq(<a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank><img src=$imagesurl/icon/$filetype.gif border=0 width=16></a> <a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank>点击显示此主题相关图片</a><br><br>);
	    } else{
	    	$addme = qq(<img src=$imagesurl/icon/$filetype.gif border=0 width=16> 此主题相关图片如下:<br><a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank><img src=$imagesurl/usr/$inforum/$up_name.$up_ext border=0 alt=按此在新窗口浏览图片 onload="javascript:if(this.width>screen.width-333)this.width=screen.width-333"></a><br><br>);
	    }
	}
	elsif ($up_ext eq "swf") {
	    if ($arrawpostflash eq "on") {
	        $addme = qq(<img src=$imagesurl/icon/$filetype.gif border=0 width=16> 该主题有一个 $up_ext 格式 Flash 动画 (共 $fileinfo[7] 字节)<br><br><PARAM NAME=PLAY VALUE=TRUE><PARAM NAME=LOOP VALUE=TRUE><PARAM NAME=QUALITY VALUE=HIGH><embed src=$imagesurl/usr/$inforum/$up_name.$up_ext quality=high width=410 height=280 pluginspage="http:\/\/www.macromedia.com\/shockwave\/download\/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application\/x-shockwave-flash"><\/embed><br>&nbsp;<img src=$imagesurl/images/fav.gif width=16> <a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank>全屏观看</a> (按右键下载)<br><br>)
	    } else {
	        $addme=qq(<a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank><img src=$imagesurl/icon/$filetype.gif border=0 width=16 height=16>点击欣赏 Flash 动画</a>);
	    }
	} else {
       	    $addme = qq(<font color=$fonthighlight>相关附件</font>:<a href=$imagesurl/usr/$inforum/$up_name.$up_ext target=_blank><img src=$imagesurl/icon/$filetype.gif border=0 width=16 alt="该主题有一个“$filetype”类型附件,点击下载"></a> (共 $fileinfo[7] 字节)<br><br>);		
	}
    } else { $addme = ""; }

####################################################################3
    ($membername, $topictitle, $postipaddresstemp, $showemoticons, $showsignature, $postdate, $post, $posticon) = split(/\t/,$_);
#    next if ($membername eq "");
    $topictitle =~ s/^*#!&*//;
    ($postipaddress,$truepostipaddress) = split(/\=/,$postipaddresstemp);

    if ($truepostipaddress eq "") {
	$truepostipaddress = $postipaddress;
	$proxyip = 1;
    }
    else { $proxyip = 0; }

    my $membernametemp = "\_$membername\_";
    if ($onlineuserlist =~ /$membernametemp/i) { $onlineinfo = "该用户目前在线";$onlinepic="online1.gif"; } else { $onlineinfo = "该用户目前不在线";$onlinepic="offline1.gif"; }
    if (($mymembercode eq "ad")&&($onlineuserlisthidden =~ /$membernametemp/i)) { $onlineinfo = "该用户目前处于隐身状态";$onlinepic="onlinehidden.gif"; }
    $online = qq~<IMG SRC=$imagesurl/images/$onlinepic width=15 alt=$onlineinfo align=absmiddle>~;

    $postdate = &dateformat($postdate+$addtimes);
    $mynodispsign=$nodispsign;

    &getmembernolock("$membername");
    $membercode = "no" if ($userregistered eq "no");
    my $tempinmembername = "\,$membername\,";
    if ($forummodnamestemp =~ /$tempinmembername/i) { $inmembmod = "yes"; } else { $inmembmod = "no"; }

    $mynodispsign="no" if ($membercode eq 'ad' || $membercode eq 'smo'|| $inmembmod eq "yes");
    if ($joineddate) { $joineddate = &shortdate($joineddate+$addtimes); } else { $joineddate = "未知"; }

    $numberofposts += $numberofreplys;
    if (!$numberofposts) { $numberofposts = 0; }
    
    if ($post =~m/\[hidepoll\]/isg) { $PollHidden='yes'; } else { $PollHidden='no'; }
    $post =~ s/\[hidepoll\]//isg;

    if ($count eq 1) { $postbackcolor = "$postcolorone"; $postfontcolor = "$postfontcolorone"; $count++; } else { $postbackcolor = "$postcolortwo"; $postfontcolor = "$postfontcolortwo"; $count = 1; }

    if ((($post =~ /#Moderation Mode/i) and ($membercode eq 'mo' || $membercode eq 'ad' || $membercode eq 'smo'))||($htmlstate eq 'on')) {
        $post =~ s/#Moderation Mode/***** 版主模式 *****\<BR\>/g;
        $post =~ s/&lt;/</g; $post =~ s/&gt;/>/g; $post =~ s/&quot;/\"/g;
    }
    else { $post =~ s/style/\&\#115\;tyle/isg; }

    if (($emoticons eq 'on') and ($showemoticons eq 'yes')) {
        $post = &doemoticons("$post");
	$post = &smilecode("$post");
    }
         
    if ($idmbcodestate eq 'on') {
	$post = &lbcode("$post");
        if ($post =~/<blockquote><font face=$font>代码/isg){
            $post =~ s/\&amp\;/\&/ig ;
            $post =~ s/\&lt\;br\&gt\;/<br>/ig;
	}
    }
    $post = "$post</td></tr></table>";
    
    if ($membercode eq "masked") {
    	$addme = "";
	$signature ="";
        $post = qq(<br>------------------------<br><font color=$posternamecolor>此用户的发言已经被屏蔽!<br>如有疑问,请联系坛主!</font><br>------------------------</td></tr></table><br>);
    }
    if (($signature) and ($showsignature eq 'yes') and ($nodispsign eq "no"||$mynodispsign eq "no") and ($posticon !~/<br>/i) and ($userregistered ne "no")) {
	if ($signaturehtml) {$signature = $signaturehtml ;} 
	else { $signature = &signlbcode($signatureorigin) if ($idmbcodestate eq 'on'); } 
        if ($signature ne "") { $post = qq($post<table width=100% cellpadding=0 cellspacing=0 style="TABLE-LAYOUT: fixed"><tr><td style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word;"><br><br>$postcopyright<img src=$imagesurl/images/none.gif width=1 height=3><BR><img src=$imagesurl/images/signature.gif height=12><br><img src=$imagesurl/images/none.gif width=1 height=5><BR>$signature</td></tr></table>); }
	                 else { $post = qq($post<table width=100% cellpadding=0 cellspacing=0 style="TABLE-LAYOUT: fixed"><tr><td style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word;"><BR><BR>$postcopyright<BR></td></tr></table>) if (($post ne "\n</td></tr></table>")&&($posticon !~/<br>/i)); }
    }
    else {$post = qq($post<table width=100% cellpadding=0 cellspacing=0><tr><td><BR><BR>$postcopyright<BR></td></tr></table>) if (($post ne "\n</td></tr></table>")&&($posticon !~/<br>/i));}
    
    if   ($numberofposts >= $mpostmarkmax) { $mtitle =  $mtitlemax;  $membergraphic = $mgraphicmax; }
    elsif ($numberofposts >= $mpostmark19) { $mtitle =  $mtitle19;  $membergraphic = $mgraphic19; }
    elsif ($numberofposts >= $mpostmark18) { $mtitle =  $mtitle18;  $membergraphic = $mgraphic18; }
    elsif ($numberofposts >= $mpostmark17) { $mtitle =  $mtitle17;  $membergraphic = $mgraphic17; }
    elsif ($numberofposts >= $mpostmark16) { $mtitle =  $mtitle16;  $membergraphic = $mgraphic16; }
    elsif ($numberofposts >= $mpostmark15) { $mtitle =  $mtitle15;  $membergraphic = $mgraphic15; }
    elsif ($numberofposts >= $mpostmark14) { $mtitle =  $mtitle14;  $membergraphic = $mgraphic14; }
    elsif ($numberofposts >= $mpostmark13) { $mtitle =  $mtitle13;  $membergraphic = $mgraphic13; }
    elsif ($numberofposts >= $mpostmark12) { $mtitle =  $mtitle12;  $membergraphic = $mgraphic12; }
    elsif ($numberofposts >= $mpostmark11) { $mtitle =  $mtitle11;  $membergraphic = $mgraphic11; }
    elsif ($numberofposts >= $mpostmark10) { $mtitle =  $mtitle10;  $membergraphic = $mgraphic10; }
    elsif ($numberofposts >= $mpostmark9)  { $mtitle =  $mtitle9;   $membergraphic = $mgraphic9; }
    elsif ($numberofposts >= $mpostmark8)  { $mtitle =  $mtitle8;   $membergraphic = $mgraphic8; }
    elsif ($numberofposts >= $mpostmark7)  { $mtitle =  $mtitle7;   $membergraphic = $mgraphic7; }
    elsif ($numberofposts >= $mpostmark6)  { $mtitle =  $mtitle6;   $membergraphic = $mgraphic6; }
    elsif ($numberofposts >= $mpostmark5)  { $mtitle =  $mtitle5;   $membergraphic = $mgraphic5; }
    elsif ($numberofposts >= $mpostmark4)  { $mtitle =  $mtitle4;   $membergraphic = $mgraphic4; }
    elsif ($numberofposts >= $mpostmark3)  { $mtitle =  $mtitle3;   $membergraphic = $mgraphic3; }
    elsif ($numberofposts >= $mpostmark2)  { $mtitle =  $mtitle2;   $membergraphic = $mgraphic2; }
    elsif ($numberofposts >= $mpostmark1)  { $mtitle =  $mtitle1;   $membergraphic = $mgraphic1; }
    else { $mtitle = $mtitle0; $membergraphic = ""; }  #显示默认等级

    if ($membergraphic) { $membergraphic = "<img src=$imagesurl/images/$membergraphic width=100 border=0>"; }

    if ($avatars eq "on") {
	if (($personalavatar)&&($personalwidth)&&($personalheight)) { #自定义头像存在
	    $personalavatar =~ s/\$imagesurl/${imagesurl}/o;
	    if (($personalavatar =~ /\.swf$/i)&&($flashavatar eq "yes")) {
		$personalavatar=uri_escape($personalavatar) if ($uri_escape ne "no");
	        $useravatar = qq(<br>&nbsp; <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH=$personalwidth HEIGHT=$personalheight><PARAM NAME=MOVIE VALUE=$personalavatar><PARAM NAME=PLAY VALUE=TRUE><PARAM NAME=LOOP VALUE=TRUE><PARAM NAME=QUALITY VALUE=HIGH><EMBED SRC=$personalavatar WIDTH=$personalwidth HEIGHT=$personalheight PLAY=TRUE LOOP=TRUE QUALITY=HIGH></EMBED></OBJECT>);
	    }
	    else {
	        $personalavatar=uri_escape($personalavatar) if ($uri_escape ne "no");
		$useravatar = qq(<br>&nbsp; <img src=$personalavatar border=0 width=$personalwidth height=$personalheight>);
	    }
	}
        elsif (($useravatar ne "noavatar") && ($useravatar)) {
            $useravatar=uri_escape($useravatar) if ($uri_escape ne "no");
	    $useravatar = qq(<br>&nbsp; <img src=$imagesurl/avatars/$useravatar.gif>);
        }
        else { $useravatar=""; }
    }

    $memberfilename = $membername;
    $memberfilename =~ y/ /_/;
    $memberfilename =~ tr/A-Z/a-z/;

    if (($threadstate ne "closed")&&($threadstate ne "pollclosed")&&($postopen ne "no")) {
        $replygraphic = qq~<a href=post.cgi?action=replyquote&forum=$inforum&topic=$intopic&postno=$editpostnumber title=引用回复这个贴子><img src=$imagesurl/images/reply.gif border=0 width=16 align=absmiddle>引用</a> ~;
    }
    else { $replygraphic="";}

    $tempname = $uri_escape eq "no" ? $memberfilename : uri_escape($memberfilename);
    $copygfx        = qq~<a href=post.cgi?action=copy1&forum=$inforum&topic=$intopic&postno=$editpostnumber title=复制这个贴子><img src=$imagesurl/images/copy.gif border=0 width=16 align=absmiddle>复制</a> ~;
    $pvmsggraphic   = qq~<span style="cursor:hand" onClick="javascript:openScript('messanger.cgi?action=new&touser=$tempname',420,320)" title="发送一个短消息给$membername"><img src=$imagesurl/images/message.gif border=0 width=16 align=absmiddle>消息</span> ~;
    $searchgraphic  = qq~<a href="search.cgi?action=startsearch&TYPE_OF_SEARCH=username_search&NAME_SEARCH=topictitle_search&FORUMS_TO_SEARCH=$inforum&SEARCH_STRING=$tempname" target=_blank title="搜索$membername在本分论坛的全部贴子"><img src=$imagesurl/images/find.gif border=0 width=16 align=absmiddle>搜索</a> ~;
    $profilegraphic = qq~<a href=profile.cgi?action=show&member=$tempname title="查看$membername的个人资料"><img src=$imagesurl/images/profile.gif border=0 width=16 align=absmiddle>查看</a> ~;
    $friendgraphic  = qq~<span style="cursor:hand" onClick="javascript:openScript('friendlist.cgi?action=adduser&adduser=$tempname',420,320)" title="加$membername为我的好友"><img src=$imagesurl/images/friend.gif border=0 width=16 align=absmiddle>好友</span> ~;
    if (($mymembercode eq "ad")||($mymembercode eq 'smo')||($myinmembmod eq "yes")||(($usereditpost ne "no")&&(lc($inmembername) eq lc($membername)))) { $editgraphic    = qq~<a href=editpost.cgi?action=edit&forum=$inforum&topic=$intopic&postno=$editpostnumber title=编辑这个贴子><img src=$imagesurl/images/edit.gif border=0 width=16 align=absmiddle>编辑</a>~; } else { $editgraphic =""; }
    if (($mymembercode eq "ad")||($mymembercode eq 'smo')||($myinmembmod eq "yes")||(($arrowuserdel ne "off")&&(lc($inmembername) eq lc($membername)))) { $delgraphic = qq~<a href=delpost.cgi?action=directdel&forum=$inforum&topic=$intopic&postno=$editpostnumber title=删除这个回复><img src=$imagesurl/images/del.gif border=0 width=16>删除</a>~; } else { $delgraphic = ""; }
    $delgraphic .=qq(<input type="checkbox" name="postno$editpostnumber" value="yes">) if((($mymembercode eq "ad")||($mymembercode eq 'smo')||($mymembercode eq 'cmo')||($myinmembmod eq "yes"))&&($treeview ne "yes"));

    if ($showemail eq "yes")      { $emailgraphic = "<a href=mailto:$emailaddress title=电子邮件地址><img src=$imagesurl/images/email.gif border=0 width=16 align=absmiddle>邮件</a> "; }
      elsif ($showemail eq "msn") { $emailgraphic = "<a href=mailto:$emailaddress title=\"MSN 地址\"><img src=$imagesurl/images/msn.gif border=0 width=16 align=absmiddle>MSN</a> "; }
                             else { $emailgraphic=""; }

    $homepage =~ s/http\:\/\///sg;
    if ($homepage) { $homepagegraphic = qq~<a href=http://$homepage target=_blank title="访问 $membername 的主页"><img src=$imagesurl/images/homepage.gif border=0 width=16 align=absmiddle>主页</a> ~; }
              else { $homepagegraphic=""; }

    if (($oicqnumber) && ($oicqnumber =~ /[0-9]/)) {
       	$oicqgraphic = qq~<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln=$oicqnumber target=_blank title="查看 QQ:$oicqnumber的资料"><img src=$imagesurl/images/oicq.gif border=0 width=16 align=absmiddle>QQ</a> ~;
    }
    else { $oicqgraphic=""; }

    if (($icqnumber) && ($icqnumber =~ /[0-9]/)) { $icqgraphic = qq~<span style="cursor:hand" onClick="javascript:openScript('misc.cgi?action=icq&UIN=$icqnumber',450,300)" title="给 ICQ:$icqnumber 发个消息"><img src=$imagesurl/images/icq.gif border=0 width=16 align=absmiddle>ICQ</span> ~; } else { $icqgraphic=""; }

    if ($userregistered ne "no") {
	if ($membercode eq "mo"|| $membercode eq "cmo"|| $membercode eq "smo"|| $membercode eq "ad") { 
	    $novisitdate = int(($currenttime-$lastgone)/86400);
	    $novisitdate = $novisitdate ? "\n失踪 $novisitdate 天" : "";
	}
	else { $novisitdate = ""; }
        if ($membercode eq "ad") {
            $posterfontcolor = "$adminnamecolor";
            $glowing = $adminglow;
            $membernameimg = "<img src=$imagesurl/images/teamad.gif alt=\"此人为坛主$novisitdate\" width=16 align=absmiddle>";

⌨️ 快捷键说明

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