<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/function.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<%
response.Charset="GB2312"
'''''''''''''''''''''''''''''''''''''''''''''''
call checkPrevilege(Session("Name"),"p09")
'''''''''''''''''''''''''''''''''''''''''''''''
dim table,db_conn,rs
table=request.querystring("table")
if(table<>"") then
	db_conn=application("totcms_importdb_conn")
	if isnull(db_conn) then
		response.Write("数据库连接错误!")
		response.End()
	else
		set rs=server.createobject("adodb.recordset")
		rs.open "select top 1 * from "&table,db_conn,3,1
    	response.Write("<table width=""100%""  border=""0"" cellpadding=""0"" cellspacing=""0""><tr><td width=""34%""><div align=""right"">选择主键：</div></td>"&Chr(10))
    	response.Write("<td width=""66%""><div align=""left"">"&Chr(10))
      	response.Write("<select name=""db_key"" id=""db_key"">"&Chr(10))
		for i=0 to rs.fields.count-1
			response.Write("<option value="""&rs(i).name&""">"&rs(i).name&"</option>"&Chr(10))
		next
        response.Write("</select>"&Chr(10))
   	 	response.Write("</div></td></tr></table>"&Chr(10))
		rs.close
		set rs=nothing
	end if
end if

call connclose()
%>
