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

📄 forums.cgi

📁 绿叶网络小学校园网-完全适合小学的网站
💻 CGI
📖 第 1 页 / 共 2 页
字号:
                </tr><td align=right>
                    <b>论坛版主</b>: $modoutput&nbsp;
                </td></tr>
            </table>
            <table cellpadding=0 cellspacing=0 border=0 width=$tablewidth bgcolor=$tablebordercolor align=center>
            <tr><td height=1>
		</td>
            </tr>
            </table>

              <table cellpadding=0 cellspacing=0 border=0 width=$tablewidth align=center>
                <tr>
                <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
		</td>
              <td bgcolor=$titlecolor width=32 align=center><font face="$font" color=$titlefontcolor><b>状态</b></td>
                <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
		</td>
              <td bgcolor=$titlecolor width=* align=center><font face="$font" color=$titlefontcolor><b>主&nbsp;&nbsp;题</b> (点心情符为开新窗浏览)</td>
                <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
		</td>
             <td bgcolor=$titlecolor align=center width=80><font face="$font" color=$titlefontcolor><b>作 者</b></td>
                <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
		</td>
              <td bgcolor=$titlecolor align=center width=32><font face="$font" color=$titlefontcolor><b>回复</b></td>
                <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
		</td>
              <td bgcolor=$titlecolor align=center width=32><font face="$font" color=$titlefontcolor><b>点击</b></td>
                <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
		</td>
              <td bgcolor=$titlecolor width=222 align=center><b>最后更新 | 回复人</b></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>
                ~;



        # Grab the threads to show

	$icon_num = int(rand(10));
	$totleposttemps;
        foreach $topic (@topics[$startarray ... $endarray]) { # start topic foreach
                chomp $topic;
                ($topicid, $topictitle, $topicdescription, $threadstate, $threadposts, $threadviews, $startedby, $startedpostdate, $lastposter, $lastpostdate, $posticon) = split(/\|/,$topic);
                    if ($posticon ne "") {$posticon = qq~<img src="$imagesurl/posticons/$posticon" width=13 height=13 border=0>~;}
    			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>~;}

        # Span time, yet again. Who needs sub-routes?
	$lastpostdatetemp=$lastpostdate;
	&getmember("$inmembername");
	if ($membercode eq "ad" || $inmembmod eq "yes") {
 	    $admini = qq~
 	    <BR><img src="$imagesurl/images/space.gif" height=0 border="0" width=255><font color=$titlecolor>|<a href="$postingsprog?action=lock&forum=$inforum&topic=$topicid&checked=yes"><font color=$titlecolor>锁</font></a>|<a href="$postingsprog?action=unlock&forum=$inforum&topic=$topicid&checked=yes"><font color=$titlecolor>解</font></a>|<a href="$postingsprog?action=delete&forum=$inforum&topic=$topicid&checked=yes"><font color=$titlecolor>删</font></a>|<a href="$postingsprog?action=movetopic&forum=$inforum&topic=$topicid&checked=yes"><font color=$titlecolor>移</font></a>|</font>
 	    ~;
        }
        else { undef $admini; }
	$lastpostdate=$lastpostdatetemp;

        $numberofitems = $threadposts + 1;
        $numberofpages = $numberofitems / $maxtopics;

        if ($numberofitems > $maxtopics) { #if
                
            if ($maxtopics < $numberofitems) { #2
                ($integer,$decimal) = split(/\./,$numberofpages);
                    if ($decimal > 0) { $numberofpages = $integer + 1; }
                        $pagestart = 0;
                        $counter = 0;
                        while ($numberofpages > $counter) { #3
                            $counter++;
                            $threadpages .= qq~<a href="$threadprog?forum=$inforum&topic=$topicid&start=$pagestart"><font face="$font" color=$fonthighlight><b>$counter</b></font></a> ~;
                            $pagestart = $pagestart + $maxtopics;
                            } #e3
                        } #e2
                    $pagestoshowtemp = $counter;
                    $pagestoshow = qq~<font face="$font" color=$forumfontcolor> &nbsp;&nbsp; [第 $threadpages 页]</font>~;
                    } #1
  
        if ($inthreadages) { $output =~ s/value=\"$inthreadages\"/value=\"$inthreadages\" selected/; }
        if ($inthreadages && ($inthreadages ne "all")) {
            $currenttime = time;
            $threadagelimit = $currenttime - ($inthreadages * 86400);
            if ($lastpostdate < $threadagelimit) { next; } else {$totleposttemps ++;}
        }

                                # Forum Post markers


                                if (!$forumlastvisit) { $forumlastvisit = "0"; }
                                
                                $topicicon = "<img src=\"$imagesurl\/images\/topicnonew.gif\" border=\"0\" width=14 alt=\"打开的主题\">";
                                
                                if (($threadposts >= $hottopicmark) && ($forumlastvisit < $lastpostdate) && ($inmembername ne "客人")) {
                                        $topicicon = "<img src=\"$imagesurl\/images\/topichot$icon_num.gif\" border=\"0\" width=14 alt=\"回复超过 $hottopicmark 次的热门贴\">";
                                }
                                
                                if (($threadposts >= $hottopicmark) && ($forumlastvisit > $lastpostdate) && ($inmembername ne "客人")) {
                                        $topicicon = "<img src=\"$imagesurl\/images\/topichotnonew.gif\" border=\"0\" width=14 alt=\"回复超过 $hottopicmark 次的热门贴\">";
                                        }
                                if (($threadposts < $hottopicmark) && ($forumlastvisit < $lastpostdate) && ($inmembername ne "客人")) {
                                        $topicicon = "<img src=\"$imagesurl\/images\/topicnew$icon_num.gif\" border=\"0\" width=14 alt=\"打开的主题,在您上次来之后发表\">";
                                        }
                                if (($threadposts < $hottopicmark) && ($forumlastvisit > $lastpostdate) && ($inmembername ne "客人")) {
                                        $topicicon = "<img src=\"$imagesurl\/images\/topicnonew.gif\" border=\"0\" width=14 alt=\"打开的主题\">";
                                        }
                                
                                unless ($threadstate ne "closed") {
                                        $topicicon = "<img src=\"$imagesurl\/images\/topiclocked$icon_num.gif\" border=\"0\" width=14 alt=\"已锁定主题,不能回复\">";
                                        }
                        
                        if ($lastpostdate ne "") {
                        $lastpostdate = $lastpostdate + ($timedifferencevalue*3600) + ($timezone*3600);
                        $longdate = &dateformatshort("$lastpostdate");
                        $lastpostdate = qq~<font face="$font" color="$fontcolormisc">$longdate</font>~;
                        }
                        else {
                                $lastpostdate = qq~<font face="$font" color="$fontcolormisc">没有~;
                                        $lastpoststamp = "";
                                }
                        $startedpostdate = $startedpostdate + ($timedifferencevalue*3600) + ($timezone*3600);
                        $startedlongdate = &shortdate("$startedpostdate");
                        $startedshorttime = &shorttime("$startedpostdate");
                        $startedpostdate = qq~<font face="$font" color="$fontcolormisc">$startedlongdate</font>~;
        
        if ($badwords) {
            @pairs = split(/\&/,$badwords);
            foreach (@pairs) {
                ($bad, $good) = split(/=/,$_);
                chop $good;
                $topictitle =~ s/$bad/$good/isg;
                }
            }
        
		        if (length($topictitle)>50) {
	             	    $topictitletemp = substr($topictitle,0,46)." ...";
                            $topictitle = qq~<a href="$threadprog?forum=$inforum&topic=$topicid"><ACRONYM TITLE="主题: $topictitle">$topictitletemp</ACRONYM></a>~;
            		}
            		else {
            		    $topictitletemp = $topictitle;
                            $topictitle = qq~<a href="$threadprog?forum=$inforum&topic=$topicid">$topictitle</a>~;
            		}

                        $startedbyfilename = $startedby;
                        $startedbyfilename =~ s/ /\_/isg;
                        
                        if ($lastposter) {
                           $lastposterfilename = $lastposter;
                           $lastposterfilename =~ s/ /\_/isg;
                           $lastposter = qq~<a href="$profileprog?action=show&member=$lastposterfilename">$lastposter</a>~;
                        }
                        else {$lastposter = qq~<font face="$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) >18) {
                	    $topicdescriptiontemp = substr($topicdescriptiontemp,0,14) . " ...";
  	  	  	    $topicdescription =~s/\<a \s*(.*?)\s*\>\s*(.*?)\s*\<\/a\>/\<a $1\>$topicdescriptiontemp\<\/a\>/isg;
  	  	  	}
                	
                        if ($topicdescription) { $topicdescription = qq~<br> &nbsp;&nbsp; -=> $topicdescription~; } 
			
			if ($pagestoshowtemp == 0) {
			    $pagestoshowtemp1 = 0;
			}
			else { $pagestoshowtemp1 =7;}
			$totlelength = $pagestoshowtemp*2.5 + $pagestoshowtemp1 + length($topictitletemp) + 6; #标题栏的总长度
			
			$topictitle=$topictitle."<BR>" if ($totlelength > 56);
			$pagestoshowtemp = 0; #清 0

                        $output .=qq~
		              <table cellpadding=0 cellspacing=0 border=0 width=$tablewidth align=center>
                              <tr>
		                <td bgcolor=$tablebordercolor valign=middle width=1 height=24>
				</td>
                              <td bgcolor=$forumcolorone align=center width=32><font face="$font" color=$forumfontcolor>$topicicon</td>
                		<td bgcolor=$tablebordercolor valign=middle width=1 height=24>
				</td>
                              <td bgcolor=$forumcolortwo width=*><font face="$font" color=$forumfontcolor><img src="" width=0 height=4><BR>
                              &nbsp;<a href="$threadprog?forum=$inforum&topic=$topicid" target=_blank><ACRONYM TITLE="开新窗口浏览此主题">$posticon</ACRONYM></a>&nbsp;$topictitle$pagestoshow$topicdescription</font>$admini<BR>
                              <img src="" width=0 height=4><BR></td>
                		<td bgcolor=$tablebordercolor valign=middle width=1 height=24>
				</td>
                              <td bgcolor=$forumcolorone align=center valign=middle width=80><font face="$font" color=$forumfontcolor><a href="$profileprog?action=show&member=$startedbyfilename">$startedby</a></font></td>
                		<td bgcolor=$tablebordercolor valign=middle width=1 height=24>
				</td>
                              <td bgcolor=$forumcolortwo align=center valign=middle width=32><font face="$font" color=$forumfontcolor>$threadposts</font></td>
                		<td bgcolor=$tablebordercolor valign=middle width=1 height=24>
				</td>
                              <td bgcolor=$forumcolortwo align=center valign=middle width=32><font face="$font" color=$forumfontcolor>$threadviews</a></font></td>
                		<td bgcolor=$tablebordercolor valign=middle width=1 height=24>
				</td>
                              <td bgcolor=$forumcolorone width=222><font face="$font" color=$fonthighlight>&nbsp;$lastpostdate&nbsp;|&nbsp;$lastposter<br></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>
                              
                                ~;
                        $pagestoshow = undef;
                        $threadpages = undef;
                
                } # end topic foreach
              
        $output .= qq~
        </tr></table></td>
        </tr></table><BR>
        <table cellpadding=0 cellspacing=1 border=0 width=$tablewidth bgcolor=$tablebordercolor align=center>
         <tr>
            <td>
            <table cellpadding=6 cellspacing=0 border=0 width=100%>
               <tr>
        <td align=left bgcolor="$menubackground">$topicpages</td>
        <td align=right bgcolor="$menubackground">$jumphtml</td></form></tr></table>
               </tr>
           </table>
           </tr>
          </td>
         </table>

        <table align=center width=$tablewidth>
        <tr>
        <td align=right><font face="$font" color=$menufontcolor>
        论坛选项: <a href="$forumoptionsprog?action=prune&forum=$inforum">批量删除文章</a>&nbsp;
        </td>
        </tr>
        </table>
        
        <table align=center width=$tablewidth>
        <tr>
        <td align=left><img src="$imagesurl/images/topiclocked$icon_num.gif" border="0" width=14 height=15 alt="已锁定主题,不能回复"></td>
        <td align=left><font face="$font" color=$fontcolormisc>已锁定主题,不能回复</font></td>
        </tr>
        <tr>
        <td align=left><img src="$imagesurl/images/topicnonew.gif" width=14 height=11 border="0" alt="打开的主题"></td>
        <td align=left><font face="$font" color=$fontcolormisc>打开的主题</font></td>
        </tr>
        ~;
        
        if ($inmembername ne "客人") {
        
                $output .= qq~
                <tr>
                <td align=left><img src="$imagesurl/images/topicnew$icon_num.gif" border="0" width=14 height=11 alt="打开的主题,在您上次来之后发表"></td>
                <td align=left><font face="$font" color=$fontcolormisc>打开的主题,在您上次来之后发表</font></td>
                </tr>
                <tr>
                <td align=left valign=middle><img src="$imagesurl/images/topichot$icon_num.gif" border="0" width=14 height=17 alt="回复超过 $hottopicmark 次的热门贴">&nbsp;<img src="$imagesurl/images/topichotnonew.gif" border="0" width=14 alt="回复超过 $hottopicmark 次的热门贴"></td>
                <td align=left><font face="$font" color=$fontcolormisc>回复超过 $hottopicmark 次的热门贴</font></td>
                </tr>
                ~;
                }
                
        $output .= qq~</table>~;
        
        $output =~ s/value=\"$inthreadages\"/value=\"$inthreadages\" selected/;
        
&output(
-Title   => "$forumname", 
-ToPrint => $output, 
-Version => $versionnumber 
);

#-Title   => "$boardname &gt; $category &gt; $forumname", 
        

#### Access needed form

sub accessneeded {

        $output .= qq~
        <form action="$thisprog" 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 valign=middle colspan=4 align=center><font face="$font" color=$fontcolormisc><b>请输入您的名称、密码登陆私有论坛</b></font></td></tr>
        <tr>
        <td bgcolor=$miscbackone valign=middle colspan=4><font face="$font" color=$fontcolormisc>
        <br>每个浏览器只需要登陆一次,同时请确认你已经打开了浏览器的 Cookies 选项!<br>
        只有经过管理员许可的用户才可以访问该论坛,如果你不能登陆,请联系管理员!<p></td>
        </tr>
        <tr>
        <td bgcolor=$miscbackone valign=middle colspan=2><font face="$font" color=$fontcolormisc>请输入您的用户名</font></td>
        <td bgcolor=$miscbackone valign=middle colspan=2><input type=text name="membername" value="$inmembername"0> &nbsp; <a href="$registerprog"><font face="$font" color=$fontcolormisc>您是否注册?</font></a></td></tr>
        <tr>
        <td bgcolor=$miscbackone valign=middle colspan=2><font face="$font" color=$fontcolormisc>请输入您的密码</font></td>
        <td bgcolor=$miscbackone valign=middle colspan=2><input type=password name="password" value="$inpassword"0> &nbsp; <font face="$font" color=$fontcolormisc><a href="$profileprog?action=lostpass">忘记密码?</a></font></td></tr>
        <tr>
        <td bgcolor=$miscbacktwo valign=middle colspan=4 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 + -