Linux中国  设为主页
 收藏本站
 
当前位置: > 首页 ->编程语言 ->ASP ->ASP函数库
  相关分类: 
ASP
ViualBasic
UML / Rational Rose
PHP4/PHP5
Perl
JAVA/JSP教程
Delphi
ColdFusion
CGI
C/C++
ASP.NET
XML
  站内搜索: 
热门文章排行
热门文章排行 ADO连接数据库字符串大全(04-23)
Asp教程:Response对象(04-23)
网站安全之ASP程序加密/解密方法大揭(04-23)
ASP函数库(05-31)
基于ASP的站内多值搜索(04-24)
精采文章排行
精采文章排行 从本质上看网页(asp,jsp)的编写(06-01)
学以致用 驳“ASP低能论” (06-01)
用VB构建Internet的应用(06-01)
Asp的安全管理(12)(06-01)
Windows 2000 安全性技术概述--3(06-01)
  ·学以致用 驳“ASP低能论” ·用VB构建Internet的应用·Asp的安全管理(12)·Windows 2000 安全性技术概述--3·Windows 2000 安全性技术概述--2·Windows 2000 安全性技术概述--1·ActiveX技术综述(二) ·ActiveX技术综述(一) ·动态网页技术--CGI:ASP:JSP:PHP(4)

ASP函数库

作者:Webmaster   来源:Linuxdby.com   点击:   日期:2007-05-31 [收藏] [投稿]

  IE是否经常中毒?推荐您


'参 数:TCumm       ---- 用户密码字段名称
'参 数:Cumm        ---- 用户密码
'参 数:TUid        ---- 用户ID(标识)字段名称
'返回值:检测成功返回 用户ID 否则 空字符串
'示 例:
'**************************************************
Public Function CKUSMCMM(ByVal ConnStrs,ByVal Tabnamestr,ByVal Tumc,ByVal Cumc,ByVal Tumm,ByVal Cumm,ByVal TUid)
  CKUSMCMM=""
  On Error GoTo 0
  On Error Resume Next
  Set sfu_Conn=server.createobject("ADODB.Connection")
  Set sfu_Rs  =server.createobject("ADODB.Recordset")
  sfu_Conn.open ConnStrs
  sfu_sql_str="select " & TUid & "," & Tumc & "," & Tumm & " from " & Tabnamestr
  sfu_Rs.open sfu_sql_str,sfu_Conn,1,1
  If sfu_Rs.RecordCount >0 Then
     Do While Not sfu_Rs.Eof
        If (sfu_Rs(Tumc)=Cumc) AND (exmw(sfu_Rs(Tumm))=Cumm) Then
           CKUSMCMM=sfu_Rs(TUid)
           Exit Do
        End If
        sfu_Rs.MoveNext
     Loop
  End If
  sfu_Rs.Close
  sfu_Conn.Close
  Set sfu_Rs = Nothing
  Set sfu_Conn=Nothing
  On Error GoTo 0
End Function
'**************************************************
'函数ID:0049[生成时间的整数]
'函数名:GetMyTimeNumber()
'作 用:生成时间的整数
'参 数:lx  ---- 时间整数的类型
' lx=0 到分钟 lx=1 到小时 lx=2 到天 lx=3 到月
'返回值:生成时间的整数值(最小到分钟)
'示 例:
'**************************************************
Public Function GetMyTimeNumber(lx)
  If lx=0 Then GetMyTimeNumber=Year(Date)*12*30*24*60+Month(Date)*30*24*60+Day(Date)*24*60+Hour(Time)*60+Minute(Time)
  If lx=1 Then GetMyTimeNumber=Year(Date)*12*30*24+Month(Date)*30*24+Day(Date)*24+Hour(Time)
  If lx=2 Then GetMyTimeNumber=Year(Date)*12*30+Month(Date)*30+Day(Date)
  If lx=3 Then GetMyTimeNumber=Year(Date)*12+Month(Date)
End Function
'**************************************************
'函数ID:0050[获得栏目的所有子栏目字符串并用","隔开]
'函数名:GTLMfunLM
'作 用:获得栏目的所有子栏目字符串并用","隔开
'参 数:LMid          ---- 栏目代码
'参 数:ConnStrArray  ---- 栏目数据链接串
'返回值:子栏目字符串并用","隔开
'示 例:hh="数据表链接字串|父栏目字段名|栏目字段名|表名"
'示 例:GTLMfunLM(22,basicDB(3) & "|FTitId|TitId|TITS")
'**************************************************
Public Function GTLMfunLM(ByVal LMid,ByVal ConnStrArray)
  Dim LMstrxx,zdbz,Nlm
  zdbz=False
  LMstrxx=""
  aTempstr=GTLMfunLM_whil(LMid,ConnStrArray)
  LMstrxx=LMstrxx & aTempstr
  If InStrRev(aTempstr,",") > 0 Then
     Do While Not zdbz
        bTempstr=GTLMfunLM_Fj(aTempstr,ConnStrArray)
        LMstrxx=LMstrxx & bTempstr
        If bTempstr="" Then zdbz=True
        aTempstr=bTempstr
     Loop
  Else
     LMstrxx=aTempstr
  End If
  LMstrxx=Trim(LMstrxx)
  If LMstrxx<>"" Then If Mid(LMstrxx,Len(LMstrxx),1) = ","  Then LMstrxx=Mid(LMstrxx,1,Len(LMstrxx)-1)
  GTLMfunLM=LMstrxx
End Function
Public Function GTLMfunLM_whil(ByVal LMidstr,ByVal ConnStrArray)
  ppTemp=Split(ConnStrArray,"|")
  GTLMfunLM_whil=""
  Set telm_Conn=server.createobject("ADODB.Connection")
  Set telm_Rs  =server.createobject("ADODB.Recordset")
  telm_Conn.open ppTemp(0)
  telm_sql_str="SELECT " & ppTemp(1) & "," & ppTemp(2) & " FROM " & ppTemp(3) & " WHERE (" & ppTemp(1) & "='" & LMidstr & "')"
  telm_Rs.open telm_sql_str,telm_Conn,1,1
  If telm_Rs.RecordCount >0 Then
     Do While Not telm_Rs.Eof
        GTLMfunLM_whil=GTLMfunLM_whil & Trim(telm_Rs(ppTemp(2))) & ","
        telm_Rs.MoveNext
     Loop
  End If
  telm_Rs.Close
  telm_Conn.Close
  Set telm_Rs = Nothing
  Set telm_Conn=Nothing
End Function
Public Function GTLMfunLM_Fj(ByVal str,ByVal ConnStrArray)
  Dim templjid
  templjid=""
  If Trim(str)<>"" Then
     fjTemp=Split(str,",")
     For i = LBound(fjTemp) To UBound(fjTemp)
         If Trim(fjTemp(i))<>"" Then
            templjid=templjid & GTLMfunLM_whil(fjTemp(i),ConnStrArray)

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<

上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2526 下一页

上一篇:SubSonic 的字段名未转义问题修正   下一篇:关于分页查询和性能问题
文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论

   相关文章:
·从本质上看网页(asp,jsp)的编写

   文章评论:(1条)
  
 请留名: 匿名评论   点击查看所有评论 论坛讨论
 

 声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。