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

📄 topic.cgi

📁 绿叶网络小学校园网-完全适合小学的网站
💻 CGI
📖 第 1 页 / 共 2 页
字号:
           else { $online = qq~<IMG SRC="$imagesurl/images/offline1.gif" width=15 height=15 alt="该用户目前不在线">~; }
       }
        
        $postdate = $postdate + ($timedifferencevalue*3600) + ($timezone*3600);
        $postdate = &dateformat("$postdate");
    
        &getmember("$membername");
       
        if ($joineddate) {
            $joineddate = $joineddate + ($timedifferencevalue*3600) + ($timezone*3600);
            $joineddate = &joineddate("$joineddate");
            }
            else { $joineddate = "未知"; }

        if (!$numberofposts) { $numberofposts = "0"; }
    
        if (($post =~ /#Moderation Mode/i) and ($membercode eq 'mo' || $membercode eq 'ad')) {
            $post =~ s/#Moderation Mode/***** 版主模式 *****\<BR\>/g;
            $post =~ s/&lt;/</g; $post =~ s/&gt;/>/g; $post =~ s/&quot;/\"/g;
            }

         if ($htmlstate eq 'on') {
            $post =~ s/&lt;/</g; $post =~ s/&gt;/>/g; $post =~ s/&quot;/\"/g;
            }
            
        if ($idmbcodestate eq 'on') {
            $post = &ikoncode("$post");
            }
        
        if ($count eq 1) {
                $postbackcolor = "$postcolorone"; $postfontcolor = "$postfontcolorone"; $count++;
                }
                else {
                    $postbackcolor = "$postcolortwo"; $postfontcolor = "$postfontcolortwo"; $count = 1;
                    }
    
        if (($emoticons eq 'on') and ($showemoticons eq 'yes') and ($post =~ /:(.+?):/)) {
            $post = &doemoticons("$post");
            }
    
        if (($emoticons eq 'on') && ($showemoticons eq 'yes')) {
	    $post = &smilecode("$post");
            }
            
        
        if (($signature) and ($showsignature eq 'yes') and ($idmbcodestate eq 'on')) {
	  $signature = &signikoncode($signature);
          $post = qq($post<br>&nbsp;<br>$signature);
        
        if ($badwords) {
            @pairs = split(/\&/,$badwords);
            foreach (@pairs) {
                ($bad, $good) = split(/=/,$_);
                chop $good;
                $post =~ s/$bad/$good/isg;
                }
            }
        }
            
        if ($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\" border=\"0\" width=100 height=16>"; }

        if ($avatars eq "on") {
	    if (($personalavatar)&&($personalwidth)&&($personalheight)) { #自定义头像存在
	        $useravatar = qq(<br>&nbsp; <img src="$personalavatar" border=0 width=$personalwidth height=$personalheight>);
	    }
            elsif (($useravatar ne "noavatar") && ($useravatar)) {
                $useravatar = qq(<br>&nbsp; <img src="$imagesurl/avatars/$useravatar.gif" border=0 width=32 height=32>);
            }
            else { undef $useravatar; }
        }
 
        $memberfilename = $membername;
        $memberfilename =~ y/ /_/;
        
        if ($threadstate ne "closed") { 
            $replygraphic = qq~<a href="$postprog?action=replyquote&forum=$inforum&topic=$intopic&postno=$editpostnumber"><img src="$imagesurl/images/reply.gif" border=0 width=16 height=16 alt="引用回复这个贴子">引用回复</a>&nbsp;&nbsp;~;
            }
            else {
                 undef $replygraphic;
                }
        $copygfx = qq~<a href="$postprog?action=copy1&forum=$inforum&topic=$intopic&postno=$editpostnumber"><img src="$imagesurl/images/copy.gif" border=0 width=16 height=16 alt="复制这个贴子">复制</a>&nbsp;&nbsp;&nbsp;~;
        $privatemessagegraphic = qq~<a href="javascript:openScript('$messangerprog?action=new&touser=$memberfilename',600,400)"><img src="$imagesurl/images/message.gif" border=0 width=16 height=16 alt="给$membername发送一个短消息">短消息</a>~;
        
        $profilegraphic = qq~<a href="$profileprog?action=show&member=$memberfilename"><img src="$imagesurl/images/profile.gif" border=0 width=16 height=16 alt="查看$membername的个人资料">查看</a>~;
        $editgraphic    = qq~<a href="$postingsprog?action=edit&forum=$inforum&topic=$intopic&postno=$editpostnumber"><img src="$imagesurl/images/edit.gif" border=0 width=16 height=16 alt="编辑这个贴子">编辑</a>~;
        $partition      = qq~|~;

        if($showemail eq "yes") { $emailgraphic = qq~<a href="mailto:$emailaddress"><img src="$imagesurl/images/email.gif" border=0 width=16 height=16 alt="电子邮件地址">邮件</a>&nbsp;&nbsp;&nbsp;~; }
            else { undef $emailgraphic; }
    
        $homepage =~ s/http\:\/\///sg;
        if($homepage) { $homepagegraphic = qq~<a href="http://$homepage" target="_blank"><img src="$imagesurl/images/homepage.gif" border=0 width=16 height=16 alt="访问$membername的主页">主页</a>&nbsp;&nbsp;&nbsp;~; }
            else { undef $homepagegraphic; }
        
        if ($aolname) { $aolgraphic = qq~<a href=http://search.tencent.com/cgi-bin/friend/user_show_info?ln=$aolname target=_blank><img src="http://icon.tencent.com/$aolname/s/00/00/" alt="查看 OICQ:$aolname 的资料" border=0 width=16 height=16>OICQ</a>&nbsp;&nbsp;&nbsp;~; }
            else { undef $aolgraphic; }
    
        if (($icqnumber) && ($icqnumber =~ /[0-9]/)) { $icqgraphic = qq~<a href="javascript:openScript('$miscprog?action=icq&UIN=$icqnumber',450,300)"><img src="http://wwp.icq.com/scripts/online.dll?icq=$icqnumber&img=5" alt="给 ICQ:$icqnumber 发个消息" border=0 width=16 height=16>ICQ</a>&nbsp;&nbsp;&nbsp;~; }
            else { undef $icqgraphic; }
    
        if ($membercode eq "ad") {
            $posterfontcolor = "$adminnamecolor";
            $membername = "$membername  <img src=\"$imagesurl/images/teamad.gif\" border=0 alt=此人为坛主 width=16 height=14>";
            $membergraphic = "<img src=\"$imagesurl/images/$admingraphic\" border=\"0\" width=100 height=16>" if ($admingraphic ne "");
            $mtitle = $adtitle if ($adtitle ne "");
            if (($membertitle eq "Member")||($membertitle eq "member")) { $membertitle = "论坛坛主"; }
            }
            elsif ($membercode eq "mo") {
                   $posterfontcolor = "$teamnamecolor";
                   $membername = "$membername  <img src=\"$imagesurl/images/teammo.gif\" border=0 alt=此人为版主 width=16 height=14>";
                   $membergraphic = "<img src=\"$imagesurl/images/$modgraphic\" border=\"0\" width=100 height=16>" if ($modgraphic ne "");
	           $mtitle = $motitle if ($motitle ne "");
                if (($membertitle eq "Member")||($membertitle eq "member")) { $membertitle = "论坛版主"; }
                }
                elsif ($membercode eq "banned") {
                    $posterfontcolor = "$posternamecolor";
                    $membergraphic = "";
                    $membertitle = "<b>已被禁止发言</b>";
                    }
                    else { $posterfontcolor = "$posternamecolor"; }
                    
                    
    if ($membertitle eq "member" || $membertitle eq "Member") { undef $membertitle; }
    else {$membertitle="头衔: $membertitle<br>" if ($membercode ne "banned");}
        
    $membertitle =~ s/&lt;/</g; $membertitle =~ s/&gt;/>/g; $membertitle =~ s/&quot;/"/g;

    $post =~ s/\[这个贴子最后由(.+?)编辑\]/\<font color=$posternamecolor>\[这个贴子最后由$1编辑\]\<\/font\>/isg;
    $location = "保密" if($location eq "");
#------- HTML

    if ($posticon ne "") {$posticon = qq~<img src="$imagesurl/posticons/$posticon" width=13 height=13 border=0 align=left alt="发贴心情">~;}
    			else {
    			    	$posticon = int(rand(79));
    			    	$posticon = "0$posticon" if ($posticon<10);
				$posticon = qq~<img src="$imagesurl/posticons/$posticon.gif" width=13 height=13 border=0 alt="发贴心情">~;}

    $fromwhere = &ipwhere("$postipaddress");

   ($ip1,$ip2,$ip3,$ip4) = split(/\./,$postipaddress);
   if ($membercodetemp eq "ad") {
        $postipaddress="$ip1.$ip2.$ip3.$ip4";
   }
   elsif ($membercodetemp eq "mo") {
       $postipaddress="$ip1.$ip2.$ip3.*";
   }
   else {
       $postipaddress="$ip1.$ip2.*.*";
   }

    $filetoopen = "$ikondir" . "data/badwords.cgi";
    open (FILE, "$filetoopen");
    $badwords = <FILE>;
    close (FILE);
    if ($badwords) {
        @pairs = split(/\&/,$badwords);
        foreach (@pairs) {
            ($bad, $good) = split(/=/,$_);
            chop $good;
            $location =~ s/$bad/$good/isg;
            $post =~ s/$bad/$good/isg;
        }
    }

    $output .= qq~
    <!--Begin Msg Number $postcountnumber-->

	        <table cellpadding=0 cellspacing=0 border=0 width=$tablewidth align=center>
        	    <tr>
                    <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
		    </td>
		    <td bgcolor="$postbackcolor">
		    <table width=100% cellpadding=4 cellspacing=0 bgcolor="$postbackcolor">
			<tr>
        		<td bgcolor="$postbackcolor" valign="top" width=20%  rowspan=2><img src="" width=0 height=4><BR>
            		<table style="filter:glow(color=$titlecolor,strength=2)">$online <font face="$posternamefont" color="$posterfontcolor"><b>$membername</b></font>
            		</table>
            		&nbsp;<font face="$font" color=$postfontcolortwo>$membertitle</font>
            		$useravatar
            		<br>&nbsp;$membergraphic
                        <br>&nbsp;<font face="$font" color=$postfontcolorone>级别: $mtitle</font>
                        <br>&nbsp;<font face="$font" color=$postfontcolortwo>来自: $location</font>
                        <br>&nbsp;<font face="$font" color=$postfontcolorone>鉴定: $fromwhere</font>
                        <br>&nbsp;<font face="$font" color=$postfontcolortwo>发贴总数: <b>$numberofposts</b> 篇</font>
                        <br>&nbsp;<font face="$font" color=$postfontcolorone>注册日期: $joineddate</font><BR>
                        <img src="" width=0 height=4><BR>
        		</td>
        		<td bgcolor="$postbackcolor" width=1 height=100% rowspan=2>
        		<table width=1 height=100% cellpadding=0 cellspacing=0 bgcolor="$titlecolor">
        		    <tr><td width=1></td></tr>
        		</table>
        		</td>
        		<td bgcolor="$postbackcolor" valign=top width=* height=100%><img src="" width=0 height=4><BR>
            		&nbsp;$privatemessagegraphic&nbsp;&nbsp;&nbsp;$profilegraphic&nbsp;&nbsp;&nbsp;$emailgraphic$homepagegraphic$aolgraphic$icqgraphic$copygfx$replygraphic$replynow<BR>
    			<hr width=100% size=1 color=$tablebordercolor>
    			<table cellpadding=0 cellspacing=0 width=100%>
    			    <tr><td width=32 align=left valign=top>$posticon&nbsp;</td>
    			    <td>
            		    <font face="$font" color=$postfontcolor>
           		    $post
           		    </font>
           		    </td>
    			    <td width=16>
           		    </td></tr>
           		</table>
			</td>
			</tr>
			<tr>
			<td class="bottomline" bgcolor="$postbackcolor" valign=bottom>
			<hr width=100% size=1 color=$tablebordercolor>
                        <font face="$font" color=$postfontcolor>&nbsp;$editgraphic&nbsp;&nbsp;&nbsp;发贴时间: $postdate &nbsp;   $partition &nbsp; <img src="$imagesurl/images/ip.gif" border=0 width=13 height=15>IP: $postipaddress</font><BR>
                        <img src="" width=0 height=4><BR>
    		        </td>
             		</tr>
		    </table>
		    </td>
                    <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
   		    </td>
		    </tr>
		</table>
            <table cellpadding=0 cellspacing=0 border=0 width=$tablewidth bgcolor=$tablebordercolor align=center>
            <tr><td height=1>
		</td>
            </tr>
            </table>

    <!-- end Message -->
    ~;

#------- END HTML

    $editpostnumber++; $postcountnumber++;

    }

#------- HTML

    $output .= qq~
    <!-- Cgi-bot Bottom of page -->


    <p>
    <table cellpadding=0 cellspacing=0 border=0 width=$tablewidth bgcolor=$tablebordercolor align=center>
    <tr>
        <td>
        <table cellpadding=6 cellspacing=1 border=0 width=100%>
            <tr bgcolor="$menubackground">
            <td valign=middle align=left nowrap width=70%>
            <font face="$font" color=$menufontcolor>&nbsp;$pages</td>
            <td align=right valign=middle bgcolor=$menubackground nowrap>$jumphtml</td>
        </tr>
        </table>
        </td></tr></table>
        <br>
        <table cellspacing=0 cellpadding=0 width=$tablewidth align=center>
        <tr><td>
        <td valign=middle nowrap align=right><font face="$font" color=$menufontcolor>
            <b>主题管理</B>: <a href="$postingsprog?action=lock&forum=$inforum&topic=$intopic">锁定</a> | 
            <a href="$postingsprog?action=unlock&forum=$inforum&topic=$intopic">解锁</a> | 
            <a href="$postingsprog?action=delete&forum=$inforum&topic=$intopic">删除</a> | 
            <a href="$postingsprog?action=movetopic&forum=$inforum&topic=$intopic">移动</a>&nbsp;
        </td>
    </tr>
    </table>
    <p>
    <p>
    <!-- Cgi-bot End bottom page -->
    ~;

#------- END HTML
    
        if ($badwords) {
            @pairs = split(/\&/,$badwords);
            foreach (@pairs) {
                ($bad, $good) = split(/=/,$_);
                chop $good;
                $topictitle =~ s/$bad/$good/isg;
                }
            }

    &output(
        -Title   => "$forumname - $topictitle", 
        -ToPrint => $output, 
        -Version => $versionnumber 
        );


sub postings {

$newthreadbutton = qq~<a href="$postprog?action=new&forum=$inforum"><img src="$imagesurl/images/newthread.gif" border="0" width=106 height=23></a>~;

if ($threadstate ne "closed") {
        $replybutton = qq~<a href="$postprog?action=reply&forum=$inforum&topic=$intopic"><img src="$imagesurl/images/replytothread.gif" border="0" alt="回复贴子" height=13></a>~;
        $replynow = qq~<a href="$postprog?action=reply&forum=$inforum&topic=$intopic"><img src="$imagesurl/images/replynow.gif" border="0" alt="回复贴子" width=16 height=16>直接回复</a>~;
    }
    else {
        $replybutton = qq~<img src="$imagesurl/images/closed.gif" border="0" alt="贴子被锁定,不能回复" height=13>~;
        undef $replynow;
    }
}


#------- END OF SCRIPT

⌨️ 快捷键说明

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