当前位置: 首页 > 图文教程 > 网络编程 > ASP > 一个比较实用的asp函数集合类(1)

ASP
亲密接触ASP.Net(16)
NT 下虚拟域名的实现
介绍一种效率极高的分类算法
asp+发送email
用 ASP 技术开发 WEB 调查(投票)系统 (1)
用ASP技术开发 WEB 调查(投票)系统 (2)
用ASP技术开发WEB调查(投票)系统 (3)
ASP+全新接触
ASP+上载例子
从ASP迁移至ASP+--最初的考虑(一)
从ASP迁移至ASP+--进入DataSet
将HTML表格转换为ASP+数据列表(DataList)
急不可耐了?转换其他的页面吧!
用ASP解决域名登记查询
从ASP迁移至ASP+--处理会话变量
从ASP迁移至ASP+--CustomValidator控件
从ASP迁移至ASP+--从用户那儿收集数据
展现C#(1):C#简介
展现C#(2):NGWS Runtime 基础
展现C#(3):第一个C#应用程序

ASP 中的 一个比较实用的asp函数集合类(1)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 49 ::
收藏到网摘: n/a

      
  最近迷恋上作网站了,使用asp开发,发现asp有好多的漏洞,而且在一个网站中有好多的代码是重复使用的,所以就查询了一些资料发现在asp中可以使用类的思想,所以就写了这个类,写的不好,但是比较实用。
  
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  <%
  Const Btn_First="<font face='webdings'>9</font>" '定义第一页按钮显示样式
  Const Btn_Prev="<font face='webdings'>3</font>" '定义前一页按钮显示样式
  Const Btn_Next="<font face='webdings'>4</font>" '定义下一页按钮显示样式
  Const Btn_Last="<font face='webdings'>:</font>" '定义最后一页按钮显示样式
  
  Class clsDSJ
   Private p_Error,p_IpAdd,p_Debug,Errs
   Private p_InvaildWords
   Private tmpStr
   Private objConnDivPage,rsDivPage,p_GetSQL,p_nPage
   Private p_rsPageSize,p_intCurPage,p_strURL,p_intTotalPage,p_intTotalRecords
   Private p_dbType,p_dbFolder,p_DataBase,dbPath,p_dbUserID,p_dbPassword,p_sqlDataSource
   Private param_DataBase,param_dbUserID,param_dbPassword,param_dbType
   'Property
   Public objConn,ConnStr,SQLQueryNum
   Public logDB,WebURL
   Public SaveLog
   Public ErrCodes,ErrCode,ErrMsg
   Public ScriptFolder,ScriptName
  
   Private Sub Class_Initialize
   p_Debug=True
   ClientConnected
   SaveLog=True
   ErrMsg=""
   p_Error=0
   SQLQueryNum=0
   Rem 数据库连接初始化
   dbType=12 '取1x——Access,2x——SQL;x1——OLEDB,x2——ODBC
   dbFolder="Data"
   DataBase="zhubizidatabase.MDB"
   dbUserID=""
   dbPassword=""
   sqlDataSource=""
   p_rsPageSize=10
   'p_nPage=2
   If request("page")="" Then
   p_intCurPage=1
   ElseIf NOT IsNumeric(request("page")) Then
   p_intCurPage=1
   ElseIf CInt(Trim(request("page")))<1 Then
   p_intCurPage=1
   Else
   p_intCurPage=CInt(Trim(request("page")))
   End If
   WebURL="http://blog.csdn.net/alonesword/"
   tmpStr=Request.ServerVariables("PATH_INFO")
   tmpStr=Split(tmpStr,"/",-1)
   ScriptName=Lcase(tmpStr(UBound(tmpStr)))
   ScriptFolder=LCase(tmpStr(UBound(tmpStr)-1)) & "/"
   p_InvaildWords="selectupdatedeleteinsert@--;'#%xpcmdshell"
   End Sub
  
   Private Sub Class_terminate()
   If IsObject(rsDivPage) Then rsDivPage.Close:Set rsDivPage=Nothing
   If IsObject(objConn) Then objConn.Close:Set objConn=Nothing
   End Sub
  
   Public Property Get Version
   Version="DSJ 1.1.0 Beta"
   End Property
  
   Public Property Get Error
   Error=p_Error
   End Property
  
   Public Property Get Debug
   Debug=p_Debug
   End Property
   Public Property Let Debug(BoolDebug)
   If BoolDebug Then
   p_Debug=True
   Else
   p_Debug=False
   End If
   End Property
  
   Public Property Get dbType
   dbType=p_dbType
   End Property
   Public Property Let dbType(lngdbType)
   If IsNumeric(lngdbType) Then
   p_dbType=lngdbType
   Else
   p_dbType=12
   End If
   End Property
  
 &nb