t;a href=''?key=sql&sql=select * from " & names & "&table_name="& names & "&primarykey="&keys&"''>表浏览</a> "
echo "<a href=''?''>主界面</a> "
echo "</form></td></tr></table>"
end sub
''==================================================================显示存储过程
sub showproc()
dim sTableName,adox
on error resume next
echo "存储过程:<font color=red>" & Request("table_name") & "<font><br>"
sTableName = Request("table_name")
Set adox = Server.CreateObject("ADOX.Catalog")
adox.ActiveConnection = Conn
echo "<textarea cols=70 rows=8>" & adox.Procedures(sTableName).Command.CommandText & "</textarea><br>"
if err <> 0 then
echo err.description
exit sub
end if
end sub
''==================================================================分页导航
''分页导航
sub showNavBar (rs,page,pageUrl,pageSize)
page = cint(page)
%>
<table width="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<% if request("primarykey") <> "" and request("table_name") <> "" then %>
<td align="left">当前表:<font color=red><%=request("table_name")%></font>
<a href="?key=edit&table_name=<%=request("table_name")%>&primarykey=<%=request("primarykey")%>&action=add">插入新记录</a>
</td>
<% end if %>
<td align="right">
<%
echo "共有" & rs.recordCount & "条纪录 当前" & page & "/" & rs.PageCount & "页"
if page > 1 then
echo "<a href=''" & pageUrl & "&page=1&pageSize="&pageSize&"''>首页</a> "
echo "<a href=''" & pageUrl & "&page=" & page - 1 & "&pageSize="&pageSize&"''>上页</a> "
end if
if (rs.PageCount > 1 and page < rs.PageCount) then
echo "<a href=''" & pageUrl & "&page=" & page + 1 & "&pageSize="&pageSize&"''>下页</a> "
echo "<a href=''" & pageUrl & "&page=" & rs.pageCount & "&pageSize="&pageSize&"''>末页</a> "
end if
echo "转到:第"
echo "<select name=''select2'' onChange=''location.href=this.value;''>"
dim i
for i = 1 to rs.PageCount
echo "<option value=''"& pageUrl &"&pageSize="&pageSize&"&page="& i & "'' "
if i = cint(page) then echo "selected"
echo ">"& i &"</option>"
next
echo "</select>页"
%>
</td>
</tr>
</table>
<%
end sub
''==================================================================显示
查询 sub showselect(sql)
dim page,pageUrl,strdel,geturl
pageSize = request("pageSize") ''设置每页显示的记录数
if pageSize = "" or not isNumeric(pageSize) then pageSize = 50
''判断是否删除
if request("keylog")