<% '************************************************************************************************** ' 程序名称: 七禧舞曲管理系统 ' 程序作者: 花心萝卜 ' 官方网站: http://www.cmsdj.com http://www.7xiwl.com ' 编写日期: 2009年8月26日 ' 版权所有: 本程序由七禧网络开发,未经同意请勿用于商业用途 '************************************************************************************************** '数据库操作基础类 Class JDBC_DB Public dbConn,dbRs,isConnect,fetchCount Private ConnStr,p_RunCount,p_dbType Private errid,errdes 'DBU类构造函数 Private Sub Class_Initialize isConnect=False:p_RunCount=0:fetchCount=0 End Sub '数据库运行次数get Public Property Get RunCount:RunCount = p_RunCount:End Property '数据库类型Set Public Property Let DbType(byval strType) IF strType = "sql" Then p_dbType=strType else p_dbType = "acc":End IF End Property '获得数据库连接基本信息 Private Sub GetConnStr() IF CD_DBtype = "sql" Then ConnStr = "Provider=Sqloledb;Data Source=" & CD_SqlHostIP & ";Initial Catalog=" & CD_SqlDatabaseName & ";User ID=" & CD_SqlUsername & ";Password=" & CD_SqlPassword & ";" End IF IF CD_DBtype = "acc" Then ConnStr = "Provider=Microsoft.Jet.OLEdb.4.0;Data Source=" & Server.mappath(CD_DataPath) End IF End Sub '数据库连接 Public Sub Connect() GetConnStr IF isObject(dbConn) = False or isConnect = False Then On Error Resume Next Set dbConn=Server.CreateObject("ADODB.Connection") dbConn.open ConnStr isConnect = True IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False:ShowErr errid,errdes:End IF End IF End Sub '获得Conn对象 Public Function GetConnObj IF Not isConnect = True Then Connect:End IF Set GetConnObj = dbConn End Function '数据库操作函数 Public Function DB(byval SqlStr,byval sqlType) IF Not isConnect = True Then Connect:End IF On Error Resume Next Select Case sqlType Case "exe" Set DB = dbConn.execute(SqlStr) Case "rst1" Set DB=Server.CreateObject("ADODB.RecordSet") DB.open SqlStr,dbConn,1,3 Case "rst3" Set DB=Server.CreateObject("ADODB.RecordSet") DB.open SqlStr,dbConn,3,3 Case "arr" Set dbRs=Server.CreateObject("ADODB.RecordSet") dbRs.open SqlStr,dbConn,1,1 IF Not dbRs.Eof Then IF fetchCount = 0 Then DB = dbRs.getRows() else DB = dbRs.getRows(fetchCount):End IF End IF dbRs.close:Set dbRs=Nothing End Select p_RunCount = p_RunCount + 1 IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function Public Sub Class_Terminate() IF isObject(dbRs) Then Set dbRs = Nothing:End IF IF isConnect Then dbConn.close:Set dbConn = Nothing:End IF End Sub End Class Dim Conn '创建Conn对象 Set Conn = New JDBC_DB '设置对象的数据库类型 Conn.dbType = CD_DBtype Class DAL_DB Private strTable:Private Sub Class_Initialize:End Sub '************************************ '数据库类型Set '************************************ Public Property Let Table(byval strT):strTable = strT:End Property '************************************ '判断数据是否存在 '************************************ Public Function Exist(byval FieldName ,byval ID) Dim i,sqlstrFN,sqlstrV,SqlStr,Rs SqlStr="select * from "&strTable&" where "&FieldName&"="&ID On Error Resume Next Set Rs=Conn.DB(SqlStr,"rst1") IF Rs.Eof Then:Exist = False:Else:Exist = True:End IF Rs.close:Set Rs = nothing IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function '************************************ '添加一条数据 '************************************ Public Function Add(byval arrFieldName , byval arrValue) Dim i,sqlstrFN,sqlstrV,SqlStr,Rs sqlstrFN = "":sqlstrV = "" IF CheckArray(arrFieldName,arrValue) = False Then put "Fun Add()数组参数错误":End IF SqlStr="select * from "&strTable On Error Resume Next Set Rs=Conn.DB(SqlStr,"rst3") Rs.addnew For i = 0 to ubound(arrFieldName) Rs(arrFieldName(i)) = arrValue(i) Next Rs.Update:Rs.Close:Set Rs = nothing IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function '************************************ '更新数据 '************************************ Public Function Update(byval arrFieldName , byval arrValue ,byval KeyStr) Dim i,sqlstrFN,sqlstrV,SqlStr,Rs sqlstrFN = "":sqlstrV = "" IF CheckArray(arrFieldName,arrValue) = False Then put "Fun Add()数组参数错误":End IF SqlStr = "select * from "&strTable&" where "&KeyStr On Error Resume Next Set Rs = Conn.DB(SqlStr,"rst3") For i = 0 to ubound(arrFieldName) Rs(arrFieldName(i))=arrValue(i) Next Rs.Update:Rs.close:Set Rs = nothing IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function '************************************ '删除数据 '************************************ Public Function Del(byval KeyStr) Dim SqlStr On Error Resume Next SqlStr = "delete from "&strTable&" where "&KeyStr:Conn.DB SqlStr,"exe" IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function '************************************ '获得数据:单一数据,或者数据列表 '************************************ Public Function GetRs(byval FieldName , byval TopNum ,byval KeyStr) Dim SqlStr IF FieldName = "" Then FieldName = "*":End IF IF TopNum = 0 Then TopNum = "" Else TopNum = "top "&TopNum:End IF IF KeyStr <> "" Then KeyStr = Trim(KeyStr) IF Lcase(Left(KeyStr,5)) = "order" And Trim(mid(KeyStr,6,1)) = "" Then KeyStr = " "&KeyStr Else KeyStr = " where "&KeyStr End IF End IF On Error Resume Next SqlStr = "select "&TopNum&" "&FieldName&" from "&strTable&KeyStr Set GetRs = Conn.DB(SqlStr,"rst1") IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function '************************************ '获得数据(数组):单一数据,或者数据列表 '************************************ Public Function GetArr(byval FieldName , byval TopNum ,byval KeyStr) Dim SqlStr IF FieldName = "" Then FieldName = "*":End IF IF TopNum = 0 Then TopNum = "" Else TopNum = "top "&TopNum:End IF IF KeyStr <> "" Then KeyStr = Trim(KeyStr) IF Lcase(Left(KeyStr,5)) = "order" And Trim(mid(KeyStr,6,1)) = "" Then KeyStr = " "&KeyStr Else KeyStr = " where "&KeyStr End IF End IF On Error Resume Next SqlStr = "select "&TopNum&" "&FieldName&" from "&strTable&KeyStr GetArr = Conn.DB(SqlStr,"arr") IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function '************************************ '获得分页后的数据对象列表 '************************************ Public Function GetRsPage(byval FieldName , byval TopNum ,byval KeyStr ,byval iPageSize) Dim Mypage Set Mypage = New Xdownpage '得到数据库连接 Mypage.getconn = Conn.GetConnObj IF FieldName = "" Then FieldName = "*":End IF IF TopNum = 0 Then TopNum = "" Else TopNum = "top "&TopNum:End IF IF KeyStr <> "" Then KeyStr = Trim(KeyStr) IF Lcase(Left(KeyStr,5)) = "order" And Trim(mid(KeyStr,6,1)) = "" Then KeyStr = " "&KeyStr Else KeyStr = " where "&KeyStr End IF End IF On Error Resume Next Mypage.getsql = "select "&TopNum&" "&FieldName&" from "&strTable&KeyStr '设置每一页的记录条数据为5条 Mypage.pagesize = iPageSize '返回Recordset Set GetRsPage = Mypage IF Err Then errid=Err.number:errdes=Err.description:Err.Clear:dbConn.close:Set dbConn=Nothing:isConnect = False ShowErr errid,errdes End IF End Function End Class '************************ '数据库操作类开始 '************************ Class CmsDj_Com_Server Private Dal Private Sub Class_Initialize Set Dal = New DAL_DB Dal.Table="CmsDj_Server" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetList(Byval backType) IF Lcase(backType) = "arr" Then GetList = Dal.GetArr("",0,"") Else Set GetList = Dal.GetRs("",0,"") End IF End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Admin Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Admin" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Special Private Dal Private Sub Class_Initialize Set Dal = New DAL_DB Dal.Table="CmsDj_Special" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetList(Byval backType) IF Lcase(backType) = "arr" Then GetList = Dal.GetArr("",0,"order by CD_ID asc") Else Set GetList = Dal.GetRs("",0,"order by CD_ID asc") End IF End Function Public Function GetListOnCache() Dim bllcache Set bllcache = New CmsDj_Com_Cache IF CD_IsCache=1 Then IF bllcache.CheckCache("Special") = True Then bllcache.SetCache "Special" , Dal.GetArr("",0,"order by CD_ID asc") End IF GetListOnCache = bllcache.GetCache("Special") Else GetListOnCache = GetList("arr") End IF End Function Public Function GetNameOnCache(id) GetNameOnCache = GetClassName(GetListOnCache(),id) End Function Sub CacheUpdate() Dim bllcache Set bllcache = New CmsDj_Com_Cache bllcache.SetCache "Special" , Dal.GetArr("",0,"order by CD_ID asc") End Sub Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Dj Private Dal Private Sub Class_Initialize Set Dal = New DAL_DB Dal.Table="CmsDj_Dj" End Sub Public Function Exist(Byval ID) Exist = Dal.Exist("DjID",ID) End Function Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function Update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.Update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Function GetYearList(Byval backType) IF Lcase(backType) = "arr" Then GetList = Dal.GetArr("distinct on(CD_Singer)",0," order by CD_ID desc") Else Set GetList = Dal.GetRs("distinct on(CD_Singer)",0," order by CD_ID desc") End IF End Function Public Function GetYearListOnCache() Dim bllcache Set bllcache = New CmsDj_Com_Cache IF bllcache.CheckCache("CD_Singer") = True Then bllcache.SetCache "CD_Singer" , Dal.GetArr("distinct on(CD_Singer)",0," order by CD_ID desc") End IF GetListOnCache = bllcache.GetCache("CD_Singer") End Function Sub CacheUpdate() Dim bllcache Set bllcache = New CmsDj_Com_Cache bllcache.SetCache "CD_Singer" , Dal.GetArr("distinct on(CD_Singer)",0," order by CD_ID desc") End Sub Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_DjClass Private Dal Private Sub Class_Initialize Set Dal = New DAL_DB Dal.Table="CmsDj_Class" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetList(Byval backType) IF Lcase(backType) = "arr" Then GetList = Dal.GetArr("",0,"CD_SystemID=1 order by CD_ID asc") Else Set GetList = Dal.GetRs("",0,"CD_SystemID=1 order by CD_ID asc") End IF End Function Public Function GetListOnCache() Dim bllcache Set bllcache = New CmsDj_Com_Cache IF CD_IsCache=1 Then IF bllcache.CheckCache("DjClass") = True Then bllcache.SetCache "DjClass" , Dal.GetArr("",0,"CD_SystemID=1 order by CD_ID asc") End IF GetListOnCache = bllcache.GetCache("DjClass") Else GetListOnCache = GetList("arr") End IF End Function Public Function CheckClassTie(ServerClassID) Dim arr,i,mark mark=0 arr = GetListOnCache() For i = 0 To ubound(arr,2) IF instr(arr(6,i),","&ServerClassID&",") >= 0 Then CheckClassTie = arr(0,i) mark = 1 Exit Function End IF Next IF mark = 0 Then CheckClassTie = 0 End Function Public Function GetNameOnCache(id) GetNameOnCache = GetClassName(GetListOnCache(),id) End Function Sub CacheUpdate() Dim bllcache Set bllcache = New CmsDj_Com_Cache bllcache.SetCache "DjClass" , Dal.GetArr("",0,"CD_SystemID=1 order by CD_ID asc") End Sub Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Mold Private Dal Private Sub Class_Initialize Set Dal = New DAL_DB Dal.Table="CmsDj_Mold" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Pic Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Pic" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Message Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Message" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Upload Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Upload" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_View Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_View" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Feed Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Feed" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Art Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Art" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Public Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Public" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Share Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Share" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Pay Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Pay" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Session Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Session" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Web Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Web" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_WebMold Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_WebMold" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Shop Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Shop" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Link Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Link" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Label Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Label" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_News Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_News" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_NewsClass Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_NewsClass" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Page Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Page" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_AdData Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_AdData" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class Class CmsDj_Com_Supply Private Dal Private Sub Class_Initialize Set Dal = New Dal_DB Dal.Table="CmsDj_Supply" End Sub Public Function Add(Byval arrFieldName , Byval arrValue) Call Dal.Add(arrFieldName,arrValue) End Function Public Function update(Byval arrFieldName , Byval arrValue ,Byval keystr) Call Dal.update(arrFieldName,arrValue,keystr) End Function Public Function Del(Byval keystr) Call Dal.Del(keystr) End Function Public Function GetRs(Byval FieldName , Byval topNum ,Byval keystr) Set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function Public Function GetRsPage(Byval FieldName , Byval topNum ,Byval keystr ,Byval iPageSize) Set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() IF isObject(Dal) Then Set Dal = Nothing:End IF End Sub End Class '数据库操作基础类 Class CmsDj_Com_User private Dal 'DBU类构造函数 Private Sub Class_Initialize set Dal = New DAL_DB Dal.Table="CmsDj_User" End Sub '添加一条数据 Public Function add(byval arrFieldName , byval arrValue) call Dal.add(arrFieldName,arrValue) End Function '更新数据 Public Function update(byval arrFieldName , byval arrValue ,byval keystr) call Dal.update(arrFieldName,arrValue,keystr) End Function '删除数据 Public Function del(byval keystr) call Dal.del(keystr) End Function '获得数据:单一数据,或者数据列表 Public Function GetRs(byval FieldName , byval topNum ,byval keystr) set GetRs = Dal.GetRs(FieldName,topNum,keystr) End Function '获得分页数据 Public Function GetRsPage(byval FieldName , byval topNum ,byval keystr ,byval iPageSize) set GetRsPage = Dal.GetRsPage(FieldName,topNum,keystr,iPageSize) End Function Public Sub Class_Terminate() if isObject(Dal) then set Dal = nothing:end if End Sub End Class %>