conn.asp
上传用户:led20009
上传日期:2021-02-03
资源大小:517k
文件大小:6k
- <%
- '程序:王星亮 网名:血饮狂刀 国外的叫我LANBOO
- 'OICQ:40001
- 'EMAIL:webmaster@xytime.com
- '我是什么都有,您想要我开发什么程序,尽管说。只要价格合理就行。
- '我电话:13308715776 0871-3394913
- UrlName=request.servervariables("SCRIPT_NAME")
- dim conn,LoginName,OperId
- '开始数据库连接
- connstr="DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.mappath("data.mdb")
- ' connstr="DSN=kmtv"
- ' set conn=server.createobject("ADODB.CONNECTION")
- ' conn.Open "Provider=SQLOLEDB.1;Password=ppopp;Persist Security Info=True;User ID=netoapp;Initial Catalog=superoa;Data Source=(local);Connect Timeout=15"
- set conn=server.createobject("ADODB.CONNECTION")
- conn.open connstr
- sub Back(mesg)
- %><script language='javascript'>alert('<%=mesg%>');setTimeout('history.go(-1)',1);</script><%
- response.end
- end sub
- function html(str)
- on error resume next
- dim result
- dim l
- if isnull(str) then
- html=""
- exit function
- end if
- l=len(str)
- result=""
- dim i
- for i = 1 to l
- select case mid(str,i,1)
- ' case chr(34)
- ' result=result+"""
- ' case "&"
- ' result=result+"&"
- ' case "<"
- ' result=result+"<"
- ' case ">"
- ' result=result+">"
- case "'"
- result=result+"''"
- ' case chr(13)
- result=result+"<br>"
- ' case chr(9)
- ' result=result+" "
- ' case chr(32)
- ' if i+1<=l and i-1>0 then
- ' if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9) then
- ' result=result+" "
- ' else
- ' result=result+" "
- ' end if
- ' else
- ' result=result+" "
- ' end if
- case else
- result=result+mid(str,i,1)
- end select
- next
- if err.number<>0 then err.clear
- html=result
- end function
- function UnHtml(strInput)
- dim sstrResult
- sstrResult = strInput
- sstrResult = Replace(sstrResult,"<br>",chr(13))
- sstrResult = Replace(sstrResult," "," ")
- sstrResult = Replace(sstrResult,"''","'")
- sstrResult = Replace(sstrResult,""",chr(34))
- sstrResult = Replace(sstrResult,"&","&")
- UnHtml = sstrResult
- end function
- sub Mesg(tmp,tmpkind,aa)
- %>
- <form method="post" action="">
- <table border="1" bordercolorlight="000000" bordercolordark="FFFFFF" cellspacing="0" bgcolor="#C0C0C0" align=center>
- <tr>
- <td>
- <table border="0" bgcolor="#0099FF" cellspacing="0" cellpadding="2" width="350">
- <tr style="background-color: rgb(0,0,128); color: rgb(255,255,255)">
- <td width="342" style="background-color: rgb(0,0,128); color: rgb(255,255,255)"><font color="FFFFFF">¤提示信息</font></td>
- <td width="18" >
- <table border="1" bordercolorlight="666666" bordercolordark="FFFFFF" cellpadding="0" bgcolor="E0E0E0" cellspacing="0" width="18">
- <tr>
- <td width="16"><b><a href="javascript:history.go(-1)" onMouseOver="window.status='';return true" onMouseOut="window.status='';return true" title="关闭"><font color="000000">×</font></a></b></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table border="0" width="350" cellpadding="4">
- <tr>
- <td width="59" align="center" valign="top"><font face="Wingdings" color="#0099FF" style="font-size:32pt"><%=tmpkind%></font></td>
- <td width="269">
- <p><%=tmp%></p>
- </td>
- </tr>
- <tr>
- <td colspan="2" align="center" valign="top">
- <input type="button" name="ok" value=" 确 定 " onclick="<%=aa%>">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </form>
- <%
- response.end
- end sub
- sub HtmlHead(Title)
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <link rel="stylesheet" href="style.css" type="text/css">
- <SCRIPT language=JavaScript>
- <!--
- function click() {
- if (event.button == 2 | event.button == 3) {
- alert('[WEB网站管理系统]')
- }
- }
- //document.onmousedown=click oncontextmenu="return false" onkeydown="if(event.keyCode==78&&event.ctrlKey || event.keyCode==68&&event.ctrlKey)return false;" scroll="no"
- //-->
- </SCRIPT>
- </head>
- <body bgcolor="#FFFFFF" leftmargin="2" topmargin="0" >
- <CENTER>
- <table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" align=center>
- <tr>
- <td>
- <table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" width="100%" style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
- <tr bgcolor=#adbee7>
- <td background="./images/public_top_bg.gif"><font color=#FFFFFF><%=Title%></font></td>
- <td bgcolor=#adbee7 width=10 valign=center><a href=# onClick="window.location.href ='workmng.asp'"><img src="./images/close.gif" border=0 ></a>
- </td>
- </tr>
- </table>
- <table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
- <tr>
- <td valign="top"> </td>
- <td align="center" >
- <%end sub
- sub HtmlEnd()
- %>
- </td>
- <td valign="top"> </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </CENTER>
- </BODY>
- </HTML>
- <%
- end sub
- function GetID(strSQL)
- set tmpSql1=conn.execute(strSQL)
- if tmpSql1(0)<>"" then
- GetID=tmpSql1(0)
- else
- GetID=1
- end if
- end function
- function GetName(strSQL)
- set tmpSql1=conn.execute(strSQL)
- if not tmpSql1.eof then
- GetName=tmpSql1(0)
- else
- GetName=""
- end if
- end function
- '/////////加密/解密字符
- Function Encrypt(strSource)
- Dim Key1
- Dim Key2
- Dim bLowData
- Dim bHigData
- Dim i
- Dim strEncrypt
- Dim strChar
- Key1 = 65
- Key2 = 135
- For i = 1 To Len(strSource)
- strChar = Mid(strSource, i, 1)
- bLowData = AscB(MidB(strChar, 1, 1)) Xor Key1
- bHigData = AscB(MidB(strChar, 2, 1)) Xor Key2
- strEncrypt = strEncrypt & ChrB(bLowData) & ChrB(bHigData)
- Next
- Encrypt = strEncrypt
- End Function
- '程序:王星亮 网名:血饮狂刀 国外的叫我LANBOO
- 'OICQ:40001
- 'EMAIL:webmaster@xytime.com
- '我是什么都有,您想要我开发什么程序,尽管说。只要价格合理就行。
- '我电话:13308715776 0871-3394913
- %>