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

📄 showdb.asp

📁 asp与MYSQL的源码
💻 ASP
字号:
<!--#include file="top.asp"-->
<TABLE WIDTH=750 bgcolor=#E7F1EC cellspacing=1 cellpadding=0 border=0>
	<TR>
		<TD width=200 valign=top><!--#include file="left.asp"--></TD>
		<TD width=550 valign=top>
			<TABLE WIDTH=100% cellpadding=5 cellspacing=0>
				<TR>
					<TD bgcolor="#339999" align=center class=celltitle><%=Request("db")%></TD>
				</TR>
				<TR>
					<TD>
						<TABLE cellpadding=2 cellspacing=1 style="border:solid black 1pt;">
							<TR>
								<TD class=cellsmalltitle align=center></TD>
								<TD bgcolor=#339999 colspan=7 class=cellsmalltitle align=center>Actions</TD>
								<TD class=cellsmalltitle align=center></TD>
							</TR>
							<TR>
								<TD class=cellsmalltitle align=center bgcolor=#339999>Table</TD>
								<TD bgcolor=#339999 class=tinytitle valign=bottom>Browse</TD>
								<TD bgcolor=#339999 class=tinytitle valign=bottom>Query</TD>
								<TD bgcolor=#339999 class=tinytitle valign=bottom>Insert</TD>
								<TD bgcolor=#339999 class=tinytitle valign=bottom>Properties</TD>
								<TD bgcolor=#339999 Class=tinytitle valign=bottom>Drop</TD>
								<TD bgcolor=#339999 class=tinytitle valign=bottom>Empty</TD>
								<TD bgcolor=#339999 class=tinytitle valign=bottom>Optimize</TD>
								<TD bgcolor=#339999 class=cellsmalltitle align=center>Records</TD>
								<TD bgcolor=#339999 class=cellsmalltitle align=center>Size</TD>
								<TD bgcolor=#339999 class=cellsmalltitle align=center>Overhead</TD>
							</TR>
							
								<%
								set rsTables = server.CreateObject("ADODB.Recordset")
								rsTables.CursorLocation = 3
								set cn = server.CreateObject("ADODB.Connection")
								cn.Open dsn 
								cn.Execute "use " & request("db")
								sql = "show table status"
								
								rsTables.Open sql, cn, 2, 3
								
								for i = 1 to rsTables.RecordCount 
								%>
								<TR>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> class=cellsmallcontent><%=rsTables("Name")%></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center><A href="runquery.asp?db=<%=request("db")%>&tb=<%=rsTables("name")%>&vquery=select+*+from+<%=rsTables("name")%>" class=celllink title="Browse This Table"><IMG SRC=images/browse.gif border=0></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center><A href="buildquery.asp?action=select&db=<%=request("db")%>&tb=<%=rsTables("Name")%>" class=celllink><IMG SRC=images/query.gif alt="Run Query on this Table" border=0></A></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center><A href="mod.asp?action=insert&db=<%=request("db")%>&table=<%=rsTables("Name")%>" class=celllink><IMG SRC=images/insert.gif alt="Insert Row Into This Table" border=0></A></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center><A href="mod.asp?action=properties&db=<%=request("db")%>&table=<%=rsTables("Name")%>" class=celllink><IMG SRC=images/properties.gif alt="View Properties of This Table" Border=0></A></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center><A href="mod.asp?action=drop&db=<%=request("db")%>&table=<%=rsTables("Name")%>" class=celllink title="Drop This Table"><IMG SRC=images/deleteX.gif border=0></A></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center><A href="mod.asp?action=truncate&db=<%=request("db")%>&table=<%=rsTables("Name")%>" class=celllink><IMG SRC=images/truncate.gif alt="Empty This Table" border=0></A></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center><A href="runquery.asp?vQuery=<%=server.URLEncode("Optimize Table " & rsTables("name"))%>&db=<%=request("db")%>&tb=<%=rsTables("Name")%>" class=celllink><IMG SRC=images/Optimize.gif alt="Optimize This Table" border=0></A></TD>
									<TD align=right<%if i mod 2 = 0 then%> bgcolor=white<%end if%> class=cellsmallcontent><%=rsTables("Rows")%></TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center nowrap class=cellsmallcontent><%=formatnumber(cdbl(rsTables("data_Length")) / 1024, 1)%> Kb</TD>
									<TD<%if i mod 2 = 0 then%> bgcolor=white<%end if%> align=center nowrap class=cellsmallcontent><%if formatnumber(cdbl(rsTables("data_free")) / 1024, 1) > 0.0 then%><FONT COLOR=RED><B><%end if%><%=formatnumber(cdbl(rsTables("data_free")) / 1024, 1)%> Kb</TD>
								</TR>
								<%
									rsTables.MoveNext
								next
								rsTables.Close 
								set rsTables = nothing
								set cn = nothing
								%>
						</TABLE>
						<BR>
						<TABLE cellpadding=2 cellspacing=1 style="border:solid black 1pt;">
							<TR>
								<TD bgcolor=#339999 class=cellsmalltitle align=center>SQL Query</TD>
							</TR>
							<TR>
								<TD class=cellsmallcontent>
									Enter SQL Query to run here:
								</TD>
							</TR>
							<FORM ACTION="runquery.asp?db=<%=request("db")%>" METHOD=post>
							<TR>
								<TD>
									<TEXTAREA name=vquery ROWS=9 COLS=40><%if len(request("q")) > 0 then:Response.Write request("q"):end if%></TEXTAREA>
								</TD>
							</TR>
							<TR>
								<TD><INPUT TYPE=SUBMIT VALUE="Run Query">&nbsp;&nbsp;&nbsp;<INPUT TYPE=RESET VALUE="Reset"></TD>
							</TR>
							</FORM>
						</TABLE>
						<BR>
						<TABLE cellpadding=2 cellspacing=1 style="border:solid black 1pt;">
							<FORM action="createtable.asp?db=<%=request("db")%>" METHOD=POST>
							<TR>
								<TD bgcolor=#339999 class=cellsmalltitle align=center>Create New Table on <%=request("db")%></TD>
							</TR>
							<TR>
								<TD class=cellsmallcontent>
									Table Name:<BR>
									<INPUT TYPE=TEXT NAME=TableName><BR>
									Number of Fields:<BR>
									<INPUT TYPE=TEXT NAME=Fields>
								</TD>
							</TR>
							<TR>
								<TD><INPUT TYPE=SUBMIT VALUE="Create Table"></TD>
							</TR>
							</FORM>
						</TABLE>
					</TD>
				</TR>
			</TABLE>
		</TD>
	</TR>
</TABLE>
<!--#include file="bottom.asp"-->

⌨️ 快捷键说明

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