conn.asp
上传用户:feitengda
上传日期:2022-07-20
资源大小:73k
文件大小:3k
- <%@ codepage=936%>
- <%
- session.codepage=936
- Dim Conn,Db
- Db = "../database/56770.set"
- Dim ConnStr
- ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Database Password="&Pass&";Data Source = " & Server.MapPath(MyDbPath & db)
- Set conn = Server.CreateObject("ADODB.Connection")
- conn.open ConnStr
- ////////////////////////////////////////////////////////////////////////////////////////////////
- admin_Name=Session("admin_Name")
- flag=Session("flag")
- Response.Cookies("admin_Name")=admin_Name
- Response.Cookies("flag")=flag
- if admin_Name="" or flag="" then
- admin_Name=Request.Cookies("admin_Name")
- flag=Request.Cookies("flag")
- end if
- sub safeurl
- server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
- server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
- if mid(server_v1,8,len(server_v2))<>server_v2 then
- response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
- response.write "<tr><td style='font:9pt Verdana' align='center'>"
- response.write "提交的路径有误,禁止从站点外部提交数据!"
- response.write "</td></tr></table></center>"
- response.end
- end if
- end sub
- sub adminflag
- response.write"<table border=0 cellspacing=1 cellpadding=0 height=0 align=center width=98% bgcolor=#183789><tr><td>"
- response.write"<table width=100% border=0 align=center cellpadding=1 cellspacing=1 bgcolor=#FFFFFF>"
- response.write"<tr><td height=27 class=classtop align=center>出错啦!</td></tr>"
- response.write"<tr><td height=50 class=classtd><li>管理员没有给您此权限!<li>您已经超时退出,请<a href=default.asp target=main><strong>重新登陆</strong></a>!</td></tr>"
- response.write"</table></td></tr></table>"
- end sub
- %>
- <%sub admintop()%>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link href=css.css rel=STYLESHEET type=text/css>
- </head>
- <body bgcolor="#FFFFCC" text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
- <table width="100%" border="0" cellspacing="0" cellpadding="0">
- <td height="5"></td>
- </tr>
- </table>
- <script language="JavaScript" type="text/JavaScript">
- var checkflag = "false";
- function check(field) {
- if (checkflag == "false") {
- for (i = 0; i < field.length; i++) {
- field[i].checked = true;}
- checkflag = "true";
- return "全部选定"; }
- else {
- for (i = 0; i < field.length; i++) {
- field[i].checked = false; }
- checkflag = "false";
- return "取消全选"; }
- }
- function ConfirmDel()
- {
- if(confirm("确定要删除吗?删除将不能恢复!"))
- return true;
- else
- return false;
-
- }
- function killErrors() {
- return true;
- }
- window.onerror = killErrors;
- dd
- </script>
- <%end sub%>