毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第7页

更新时间:2010-4-4:  来源:毕业论文
企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第7页
4.2、系统业务逻辑处理公共文件核心代码:
<%
'定义数据库连接的语句
dim db
dim Connstr
dim Conn
dim fout
Dim VbStr
VbStr = Chr(13) & Chr(10)
Sub DBConnBegin()
  db="/qmsz/yyy/basedata/#szqm.mdb"
  'Connstr="Driver={Microsoft Access Driver (*.mdb)};uid=admin;pwd=200000;dbq=" & Server.MapPath(db)
  Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)&";Jet Oledb:Database Password=Atllh1987" 
  Set Conn = Server.CreateObject("ADODB.Connection")
  Conn.open connstr
  If Err.Number > 0 Then
        response.write("数据库连接出错,请仔细检查您的数据库连接文件")
  Response.End
  End If
 dim  timeoutsession
 timeoutsession=20
 session.timeout=timeoutsession
End Sub
Sub DBConnEnd()
 Conn.Close
 Set Conn = Nothing
End Sub
' ============================================
' 把字符串进行HTML解码,替换server.htmlencode
' 去除Html格式,用于显示输出
' ============================================
Function outHTML(str)
 Dim sTemp
 sTemp = str
 outHTML = ""
 If IsNull(sTemp) = True Then
  Exit Function
 End If
 sTemp = Replace(sTemp, "&", "&amp;")
 sTemp = Replace(sTemp, "<", "&lt;")
 sTemp = Replace(sTemp, ">", "&gt;")
 sTemp = Replace(sTemp, Chr(34), "&quot;")
 sTemp = Replace(sTemp, Chr(10), "<br>")
 outHTML = sTemp
End Function
Function inHTML(str)
 Dim sTemp
 sTemp = str
 inHTML = ""
 If IsNull(sTemp) = True Then
  Exit Function
 End If
 sTemp = Replace(sTemp, "&", "&amp;")
 sTemp = Replace(sTemp, "<", "&lt;")
 sTemp = Replace(sTemp, ">", "&gt;")
 sTemp = Replace(sTemp, Chr(34), "&quot;")
 inHTML = sTemp
End Function
Function IsSelfRefer()
 Dim sHttp_Referer, sServer_Name
 sHttp_Referer = CStr(Request.ServerVariables("HTTP_REFERER"))
 sServer_Name = CStr(Request.ServerVariables("SERVER_NAME"))
 If Mid(sHttp_Referer, 8, Len(sServer_Name)) = sServer_Name Then
  IsSelfRefer = True
 Else
  IsSelfRefer = False
 End If
End Function
Function Get_SafeStr(str)
 Get_SafeStr = Replace(Replace(Replace(Trim(str), "'", ""), Chr(34), ""), ";", "")
End Function
www.751com.cn
 For i = 1 To l
  c = Asc(Mid(str, i, 1))
  If c < 0 Then c = c + 65536
  If c > 255 Then t = t + 1
 Next
 Get_TrueLen = t
End Function
' ============================================
' 判断是否安全字符串,在注册登录等特殊字段中使用
' ============================================
Function IsSafeStr(str)
 Dim s_BadStr, n, i
 s_BadStr = "'  &<>?%,;:()`~!@#$^*{}[]|+-=" & Chr(34) & Chr(9) & Chr(32)
 n = Len(s_BadStr)
 IsSafeStr = True
 For i = 1 To n
  If Instr(str, Mid(s_BadStr, i, 1)) > 0 Then
   IsSafeStr = False
   Exit Function  End If Next
End Function
'==============================================
'一个加密的函数
'==============================================
Function EnPas(CodeStr)
 Dim CodeLen,CodeSpace,NewCode,cecr,cecb,cec
 CodeLen = 30
 CodeSpace = CodeLen - Len(CodeStr)
 If Not CodeSpace < 1 Then
  For cecr = 1 To CodeSpace
   CodeStr = CodeStr & Chr(21)
  Next End If

上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页

企业网站建设毕业论文(致谢+开题报告+中期报告+源程序) 第7页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©751com.cn 辣文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。