<!-- #include file=../../inc/BBSSetup.asp -->
<!-- #include file=../../inc/Board_Popfun.asp -->
<!-- #include file=../inc/bbsmanage_Fun.asp -->
<%
DEF_BBS_HomeUrl = "../../"
Dim GBL_ID
initDatabase
GBL_CHK_TempStr = ""
GBL_ID = checkSupervisorPass

SiteHead(DEF_SiteNameString & " - 管理员")
UserTopicTopInfo
DisplayUserNavigate("查看数据库表结构")
If GBL_CHK_Flag=1 Then
	LoginAccuessFul
Else%>
	<table width=96%>
	<tr>
	<td>
	<%
	If Request("submitflag")="" Then
		Response.Write "<br><b>请先登录</b>"
	Else
		Response.Write "<br><p align=left><font color=ff0000 class=RedFont><b>" & GBL_CHK_TempStr & "</b></font>"
	End If
	DisplayLoginForm
	Response.Write "</p>"%>
	</td>
	</tr>
	</table>
<%End If
UserTopicBottomInfo
closeDataBase
SiteBottom
If GBL_ShowBottomSure = 1 Then Response.Write GBL_SiteBottomString

Sub LoginAccuessFul

	If DEF_UsedDataBase = 1 Then
		GBL_CHK_TempStr = "<span style=""FONT-FAMILY: 宋体; FONT-SIZE: 12px;color:ff0000"">Access数据库不支持全文索引服务!</span>"
		Exit Sub
	End If
	Dim TBName
	TBName = Request("TB")

	If TBName = "" or Len(TBName) > 255 Then
		GBL_CHK_TempStr = "<span style=""FONT-FAMILY: 宋体; FONT-SIZE: 12px;color:ff0000"">此表不存在!</span>"
		Exit Sub
	End If
	DisplayTableColInfo(TBName)

End Sub

Function DisplayTableColInfo(Name)

	Response.Write "<br><p><b>数据库表" & Name & "结构</b></p>"
	Response.Write "<table width=100% border=0 cellspacing=1 cellpadding=5 bgcolor=" & DEF_BBS_Color & " class=TBtwo>"
	Dim Rs,SQL
	Dim N,Tmp,Tmp2
	N = 1
	Set Rs = Server.CreateObject("ADODB.RecordSet")
	SQL = "Select COL_NAME( OBJECT_ID('" & Replace(Name,"'","''") & "')," & N & "),COL_LENGTH('" & Replace(Name,"'","''") & "',COL_NAME( OBJECT_ID('" & Replace(Name,"'","''") & "') ," & N & "))"
	GBL_DBNum = GBL_DBNum + 1
	Rs.Open SQL,con,1,1
	Tmp = Rs(0)
	Tmp2 = Rs(1)
	Rs.Close
	Do While Not(IsNull(Tmp)) and Len(Tmp) > 0
		Response.Write "<tr valign=top bgcolor=" & DEF_BBS_LightestColor & " class=TBBG9><td width=200>" & htmlencode(Tmp) & "</td><td>" & Tmp2 & "</td>"
		N = N + 1
		SQL = "Select COL_NAME( OBJECT_ID('" & Replace(Name,"'","''") & "')," & N & "),COL_LENGTH('" & Replace(Name,"'","''") & "',COL_NAME( OBJECT_ID('" & Replace(Name,"'","''") & "') ," & N & "))"
		GBL_DBNum = GBL_DBNum + 1
		Rs.Open SQL,con,1,1
		Tmp = Rs(0)
		Tmp2 = Rs(1)
		Rs.Close
	Loop
	Set Rs = Nothing
	Response.Write "</table>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_Announce>点击这里查看表LeadBBS_Announce信息</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_Assort>点击这里查看表LeadBBS_Assort</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_Boards>点击这里查看表LeadBBS_Boards</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_CollectAnc>点击这里查看表LeadBBS_CollectAnc</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_ForbidIP>点击这里查看表LeadBBS_ForbidIP</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_FriendUser>点击这里查看表LeadBBS_FriendUser</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_GoodAssort>点击这里查看表LeadBBS_GoodAssort</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_InfoBox>点击这里查看表LeadBBS_InfoBox</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_IPAddress>点击这里查看表LeadBBS_IPAddress</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_Link>点击这里查看表LeadBBS_Link</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_onlineUser>点击这里查看表LeadBBS_onlineUser</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_Setup>点击这里查看表LeadBBS_Setup</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_SiteInfo>点击这里查看表LeadBBS_SiteInfo</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_SpecialUser>点击这里查看表LeadBBS_SpecialUser</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_TopAnnounce>点击这里查看表LeadBBS_TopAnnounce</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_Upload>点击这里查看表LeadBBS_Upload</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_User>点击这里查看表LeadBBS_User</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_UserFace>点击这里查看表LeadBBS_UserFace</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_VoteItem>点击这里查看表LeadBBS_VoteItem</a>"
	Response.Write "<br><a href=TableInfo.asp?tb=LeadBBS_VoteUser>点击这里查看表LeadBBS_VoteUser</a>"

End Function%>