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

📄 showboard.pl

📁 这个社区是虚拟社区使用的程序
💻 PL
📖 第 1 页 / 共 2 页
字号:
###############################################################################
# check is it more page.
    $NumOfPage=&ceil(($#SortedList+1)/$NumPage);
    $Position.= &Tr("","",$MenuBGColor).
					&Td("","",$ColSpan,"","","","","","").
                        &Table("100%","CENTER","0","0","","").
                            &Tr("","","").
                                &Td("20%","","","","","","","","");
    if ($in{'Page'}+1>1) {
        $Position.=                 &Link("UltraBoard.$Ext?Action=ShowBoard&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=".($in{'Page'}-1)."&Session=$SessionID","","").
                                        $imgPrevious.
                                    "</a>";
        $MorePage=1;
    }
    $Position.=                 "</td>".&Td("60%","","","","CENTER","","","","").&Font($FontFace,$MenuTextSize,$MenuTextRed);
    $FirstNumPage=int($in{'Page'}/10)*10;
    $LastNumPage=$FirstNumPage+10;
    if ($LastNumPage>$NumOfPage) {
        $LastNumPage=$NumOfPage;
    }
    if ($FirstNumPage>=10) {
        $Position.= &Link("UltraBoard.$Ext?Action=ShowBoard&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=".($FirstNumPage-1)."&Session=$SessionID","","").
                        "..".
                    "</a>"." ";
    }
    for (my ($p)=$FirstNumPage;$p<$LastNumPage;$p++) {
        if ($p != $in{'Page'}) {
            $Position.= &Link("UltraBoard.$Ext?Action=ShowBoard&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=".$p."&Session=$SessionID","","").
                            ($p+1).
                        "</a>"." ";
        }else{
            $Position.= "<b>".($p+1)."</b> ";
        }
    }
    if ($LastNumPage<$NumOfPage) {
        $Position.= &Link("UltraBoard.$Ext?Action=ShowBoard&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=".$LastNumPage."&Session=$SessionID","","").
                        "..".
                    "</a>";
    }
    $Position.=                 "</font>"."</td>".&Td("20%","","","","RIGHT","","","","");
    if ($in{'Page'}+1<$NumOfPage) {
        $Position.=                 &Link("UltraBoard.$Ext?Action=ShowBoard&Board=$in{'Board'}&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=".($in{'Page'}+1)."&Session=$SessionID","","").
                                        $imgNext.
                                    "</a>";
        $MorePage=1;
    }
    $Position.=                 "</td>".
                            "</tr>".
                        "</table>".
                 	"</td>".
				"</tr>";
###############################################################################
    if ($Group ne "Guest") {
        $Greeting="<font color=800000>[</font> <font color=navy>"."$StatusUser"."   经验值:"."$MemberData[18]"."</font><font color=red>*</font><font color=green>".$MemberData[1]."</font> <font color=800000>]</font>";
    }
	open(CATEGORY,"$DBPath/$BoardInfo[3].cat")||&CGIError("Couldn't open/read the $BoardInfo[3].cat file<br>\nPath: $DBPath<br>\nReason : $!");
		flock(CATEGORY,1) if ($FLock);
		$CATEGORY_DATA=<CATEGORY>;
		@CategoryInfo=&DecodeDBOutput($CATEGORY_DATA);
	close(CATEGORY);
	$HTML.=	"<p>".&BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"","").
				&Tr("","",$CategoryBGColor).
					&Td("","","","","","","","","").
						"<span style=font:9pt>你现在的位置:</span>".
						&Font($FontFace,$CategoryNameTextSize,$CategoryTextColor).
							&Link("UltraBoard.$Ext?Session=$SessionID","","",
								"返回 $UBName").
								"<font color=black><u>江湖入口</u>".
							"</a>";
	if ($UseCategory) {
		$HTML.=				" -=> ".
							&Link("UltraBoard.$Ext?Action=ShowCategory&Category=$CategoryInfo[0]&Idle=$in{'Idle'}&Sort=$in{'Sort'}&Order=$in{'Order'}&Page=$in{'Page'}&Session=$SessionID","","",
								"显示 ($CategoryInfo[1]) 讨论区域").
								"<font color=black><u>$CategoryInfo[1]</u>".
							"</a>";
	}			
	$HTML.=					" -=> ".
							"<font color=blue>".$BoardInfo[1].
						"</font>".
					"</td>".
				"</tr>";
    $HTML.=     &Tr("","",$RowOddBGColor).
			        &Td("","","","","","","","","");
#########################################################################################################################################################
					if ($BoardInfo[6] eq "Protected" ){
						$BoardInfo_CHINESE="<font color=FF8000>非公共区域</font>";
					}else{
						$BoardInfo_CHINESE="<font color=FF8000>公共区域</font>";
					}
#########################################################################################################################################################    
    if ($BoardInfo[2] ne "") {
        $HTML.=         &Font($FontFace,$BoardDesTextSize,$TextColor).
					    	$BoardInfo[2].
					    "</font>";
    }
	$HTML.= 		    "<p>".
                        &Table("100%","CENTER","0","0","","").
                            &Tr("","","").
                                &Td("","","","","","","","","").
                                    &Font($FontFace,$BoardDesTextSize,$TextColor).
                                        $BoardInfo_CHINESE.
                                    "</font>".
                                "</td>".
                                &Td("","","","","RIGHT","","","","").
                                    &Font($FontFace,$BoardDesTextSize,$TextColor);
    if ($Group eq "administrator") {
        $HTML.="<font color=red>可读、写、编辑</font>";
    }elsif ($Group eq "Guest") {
        if ($BoardInfo[6] ne "Public") {
            $HTML.="<font color=red>目前你只能浏览!</font> 必须先通过<font color=red>新人报道</font>方可开启所有功能。";
        }else{
            $HTML.="<font color=red>可读、写、编辑</font>";
        }
    }else{
        if (($BoardInfo[6] eq "Protected")||($BoardInfo[6] eq "Public")) {
            $HTML.="<font color=red>可读、写、编辑</font>";
        }else{
            if ($Access{$MemberData[3]}) {
                if ($Access{$MemberData[3]} eq "FullAccess") {
                    $HTML.="<font color=red>可读、写、编辑</font>";
                }else{
                    $HTML.="<font color=red>只能浏览</font>";
                }
            }
        }
    }
    $HTML.=	     					"</font>".
                                "</td>".
                            "</tr>".
                        "</table>".
                      "</td>".
                "</tr>".
			"</table></td></tr></table>";
	$HTML.= "<p>".&Table($TableWidth,$TableAlign,"1","","",$TableCellPadding);
	$HTML.= &Tr("","",$CategoryBGColor).
				&Td("","","","","","","","","").
					&Font($FontFace,$BoardNameTextSize,$TextColor)."<center>本区域在线玩家</center>".
				"</td>".
			"</tr>";
	open(ONLINE,"$Online_DIRECTORY/Online.Data")||&CGIError("Couldn't open/read the $Online_DIRECTORY/Online.Data file<br>\nPath: $DBPath/UserData<br>\nReason : $!");
		flock(ONLINE,1) if ($FLock);
			@ONLINE_DATA=<ONLINE>;
	close(ONLINE);
	for($i=0;$i<=$#ONLINE_DATA;$i++){
		@OnlineInfo=&DecodeDBOutput($ONLINE_DATA[$i]);
		if ($in{'Board'} eq $OnlineInfo[2]) {
			if (-e "$MembersPath/$OnlineInfo[0].info") {
			@MemberInfo=&GetMemberData($OnlineInfo[0]);
			open(GROUP,"$MembersPath/Groups.db")||&CGIError("Couldn't open/read the Groups.db file<br>\nPath: $MembersPath<br>\nReason : $!");
				flock(GROUP,1) if ($FLock);
				while (<GROUP>) {
					@Group=&DecodeDBOutput($_);
					if ($MemberInfo[3] eq $Group[0]) {
						$Status=$Group[1];
		       			last;
					}
				}
			close(GROUP);
			$Rank="一般";
			$ChatLevel=10;
			@MemberInfo23 = &DecodeDBOutput($MemberInfo[23]);
			open(GROUP,"$MembersPath/$MemberInfo[3].rank")||&CGIError("Couldn't open/read the $MemberInfo[3].rank file<br>\nPath: $MembersPath<br>\nReason : $!");
				flock(GROUP,1) if ($FLock);
					while (<GROUP>) {
						@Group=&DecodeDBOutput($_);
						if ($MemberInfo23[0] eq $Group[0]) {
						   	$Rank=$Group[1];
							$ChatLevel=10 - $Group[2];
			              	last;
						}
					}
			close(GROUP);
			$GenderColor="<font color=blue>";
			if ($MemberInfo[22] eq "male"){
				$GenderColor="<font color=smalt>";
			}
			elsif ($MemberInfo[22] eq "female"){
				$GenderColor="<font color=claret>";
			}
			$HTML.= &Tr("","",$RowOddBGColor).
						&Td("","","","","","","",$ColumnOddBGColor,"").
							&Font($FontFace,$BoardNameTextSize,$TextColor).
								"<font color=navy>".$Status."</font>".$Rank."<font color=red>*</font>".
								&Link("UltraBoard.$Ext?Action=ShowProfile&ID=$MemberInfo[0]&Category=$in{'Category'}&Session=$SessionID","Profile","",
									"显示人物详细资料").
									$GenderColor.$MemberInfo[1].
								"</a>".
							"</font>".
								" (".
								&Link("UltraBoard.pl?Action=SendMessage&ReName=$MemberInfo[0]&Ref=$in{'Action'}&Category=$in{'Category'}&Board=$in{'Board'}&Post=$in{'Post'}&ID=$in{'ID'}&Session=$SessionID","","",
									"即刻联系 $MemberInfo[1]").
									$MemberInfo[0].
								"</a>".
								")".
						"</td>".
					"</tr>";
			}
		}
	}

	if (substr($MemberData[7],-1) eq "0") {
		open(BOX,">$Shop_DIRECTORY/$MemberData[0].Box")||&CGIError("Couldn't create/write the $MemberData[0].Box file<br>\nPath: $Shop_DIRECTORY<br>\nReason : $!");
			flock(BOX,2) if ($FLock);
				print BOX substr($MemberData[7],-2);
			flock(BOX,8) if ($FLock);
		close(BOX);
		chmod 0666,"$Shop_DIRECTORY/$MemberData[0].Box";
	}
	
	if (-e "$Shop_DIRECTORY/$MemberData[0].Box") {
		$HTML.= &Tr("","",$RowOddBGColor).
					&Td("","","","","","","",$ColumnOddBGColor,"").
						&Font($FontFace,$BoardNameTextSize,$TextColor).
							"<center>".$Shop_Image." ".
							&Link("UltraBoard.$Ext?Action=GetItem&ID=$MemberInfo[0]&Category=$in{'Category'}&Board=$in{'Board'}&Post=$in{'Post'}&ID=$in{'ID'}&Session=$SessionID","","",
								"打开并搜索宝箱").
								"藏有一些虚拟货币的"."<font color=orange>宝箱</font>".
							"</a>"." ".$Shop_Image."</center>".
						"</font>".
					"</td>".
				"</tr>";
	}

	$HTML.=	"</table>";
	$HTML.=	&Table($TableWidth,$TableAlign,"","6","","").
                &Tr("","","").
					&Td("","","","","","","nowrap","","").
						&Form("UltraBoard.$Ext","GET","","").
                        &HiddenBox("Action","ShowBoard").
                        &HiddenBox("Board",$in{'Board'}).
                        &HiddenBox("Page",$in{'Page'}).
                        &HiddenBox("Session",$SessionID).
			       "</td>".
				"</tr>".
				&Tr("","","").
					&Td("","","","","","","","","").
						"<center>".
                        &Select("Idle","","","",$in{'Idle'},
                                "昨     天的帖子","1",
                                "前  2 天的帖子","2",
                                "前  3 天的帖子","3",
                                "前  7 天的帖子","7",
                                "前 10 天的帖子","10",
                                "前 20 天的帖子","20",
                                "前 30 天的帖子","30",
                                "前 45 天的帖子","45",
                                "前 60 天的帖子","60",
                                "前 90 天的帖子","90",
                                "前一年  的帖子","365",
                                "显示所有的帖子","0",
                               ).
                        &Select("Order","","","",$in{'Order'},
                                "按升序排列","Ascend",
                                "按降序排列","Descend",
                               ).
                        &Select("Sort","","","",$in{'Sort'},
                                "按讨论主题排列","3",
                                "按作者排列","5",
                                "按回复帖子数排列","2",
                                "按最后回复时间排列","0",
                               ).
                        &Submit("","显示","","").
                        "</center>".
					"</td>".
				"</tr>".
                &Tr("","","").
					&Td("","","","","","","nowrap","","").
						"</form>".
					"</td>".
				"</tr>".
			&BTable($TableWidth,$TableAlign,"0","0",$TableCellSpacing,$TableCellPadding,$TableBorderColor,"","").
				&Tr("","",$HeaderBGColor).
					$Title.
				"</tr>".
				$List.
                $Position.
				&Tr("","",$MenuBGColor).
					&Td("","",$ColSpan,"","","","","","").
						&PrintVersion("YES").
					"</td>".
				"</tr>".
			"</table></td></tr></table>".
            &GetBoardList();
###############################################################################
    if ($Cookies{"B_".$in{'Board'}."_TIME"}+3600<$NowTime) {
        open(COUNT,"$DBPath/$in{'Board'}/board.count")||&CGIError("Couldn't open/read the board.count file<br>\nPath: $DBPath/$in{'Board'}<br>\nReason : $!");
            flock(COUNT,1) if ($FLock);
            @COUNT_DATA=&DecodeDBOutput(<COUNT>);
        close(COUNT);
        print &CookiesHeader($NowTime+31536000,"B_".$in{'Board'}."_TIME",$NowTime,"B_".$in{'Board'}."_POST",$COUNT_DATA[2]);
    }
###############################################################################
	&PrintTheme("$UBName",$HTML);
	exit;
}
###############################################################################
1;# End of ShowBoard Function
###############################################################################

⌨️ 快捷键说明

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