| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2070 人关注过本帖
标题:求助!日期的语法错误!
只看楼主 加入收藏
conquerl
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-2-23
收藏
 问题点数:0 回复次数:6 
求助!日期的语法错误!
  • 错误类型:
    Microsoft JET Database Engine (0x80040E07)
    日期的语法错误 在查询表达式 '#2006-2-23 下午 06:12:17#' 中。
    /news/lib/npwapi.asp, 第 354 行

  • 浏览器类型:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)

  • 网页:
    GET /news/index.asp




    以下是npwapi.asp的代码:(第 354 行使用绿色注名
    <%
    rem ----------------------------------
    rem ------函数定义页 npwapi.asp-------
    rem -----------------Nowa 030819------
  • '过滤表单、URL参数中的单引号开始
    Function CheckRequestStr(Str)
    If Isnull(Str) Then
    CheckRequestStr = ""
    Exit Function
    End If
    CheckRequestStr=Replace(Str,"'","''")
    End Function
    '过滤表单、URL参数中的单引号结束
  • '重定义 HTMLEncode 开始
    Function HTMLEncode(Str)
    If Not IsNull(Str) Then
    Dim s_BadWords,s_i
    Str = replace(Str, ">", "&gt;")
    Str = replace(Str, "<", "&lt;")
  • Str = Replace(Str, CHR(32), "&nbsp;")
    Str = Replace(Str, CHR(9), "&nbsp;")
    Str = Replace(Str, CHR(34), "&quot;")
    Str = Replace(Str, CHR(39), "&#39;")
    Str = Replace(Str, CHR(13), "")
    Str = Replace(Str, CHR(10) & CHR(10), "</P><P> ")
    Str = Replace(Str, CHR(10), "<BR> ")

    HTMLEncode = Str
    End If
    End Function
    '重定义 HTMLEncode 结束
  • Function HTMLJSEncode(Str)
    If Not IsNull(Str) Then
    Str = ChkBadWords(Str,strContentSplit)
    Str = replace(Str, ">", "&gt;")
    Str = replace(Str, "<", "&lt;")
  • Str = Replace(Str, CHR(32), "&nbsp;")
    Str = Replace(Str, CHR(9), "&nbsp;")
    Str = Replace(Str, CHR(34), "&quot;")
    Str = Replace(Str, CHR(39), "&#39;")
    Str = Replace(Str, CHR(13), "")
    Str = Replace(Str, CHR(10) & CHR(10), "</P><P> ")
    Str = Replace(Str, CHR(10), "<BR> ")

    Str = Replace(str,"javascript","<I>&#106avascript</I>")
    Str = Replace(str,"jscript:","<I>&#106script:</I>")
    Str = Replace(str,"js:","<I>&#106s:</I>")
    Str = Replace(str,"value","<I>&#118alue</I>")
    Str = Replace(str,"about:","<I>about&#58</I>")
    Str = Replace(str,"file:","<I>file&#58</I>")
    Str = Replace(str,"document.cookie","<I>documents&#46cookie</I>")
    Str = Replace(str,"vbscript:","<I>&#118bscript:</I>")
    Str = Replace(str,"vbs:","<I>&#118bs:</I>")
    Str = Replace(str,"on","<I>&#111n</I>")

    HTMLJSEncode = Str
    End If
    End Function
  • Function JSEncode(Str)
    If Not IsNull(Str) Then
    Dim s_BadWords,s_i
    'Str = replace(Str, "%", "&#37")
    'Str = replace(Str, "%", "&#37")

    Str = Replace(str,"javascript","<I>&#106avascript</I>")
    Str = Replace(str,"jscript:","<I>&#106script:</I>")
    Str = Replace(str,"js:","<I>&#106s:</I>")
    Str = Replace(str,"value","<I>&#118alue</I>")
    Str = Replace(str,"about:","<I>about&#58</I>")
    Str = Replace(str,"file:","<I>file&#58</I>")
    Str = Replace(str,"document.cookie","<I>documents&#46cookie</I>")
    Str = Replace(str,"vbscript:","<I>&#118bscript:</I>")
    Str = Replace(str,"vbs:","<I>&#118bs:</I>")
    Str = Replace(str,"on","<I>&#111nmouse</I>")

    JSEncode = Str
    End If
    End Function
  • Function UbbCode(strContent)
    strContent = HTMLEncode(strContent)
    StrContent = ChkBadWords(StrContent,strContentSplit)
  • dim re
    dim reContent
    Set re=new RegExp
    re.IgnoreCase =True
    re.Global=True
  • re.Pattern="(javascript)"
    strContent=re.Replace(strContent,"<I>&#106avascript</I>")
    re.Pattern="(jscript:)"
    strContent=re.Replace(strContent,"<I>&#106script:</I>")
    re.Pattern="(js:)"
    strContent=re.Replace(strContent,"<I>&#106s:</I>")
    re.Pattern="(value)"
    strContent=re.Replace(strContent,"<I>&#118alue</I>")
    re.Pattern="(about:)"
    strContent=re.Replace(strContent,"<I>about&#58</I>")
    re.Pattern="(file:)"
    strContent=re.Replace(strContent,"<I>file&#58</I>")
    re.Pattern="(document.cookie)"
    strContent=re.Replace(strContent,"<I>documents&#46cookie</I>")
    re.Pattern="(vbscript:)"
    strContent=re.Replace(strContent,"<I>&#118bscript:</I>")
    re.Pattern="(vbs:)"
    strContent=re.Replace(strContent,"<I>&#118bs:</I>")
    re.Pattern="(on(mouse|exit|error|click|key))"
    strContent=re.Replace(strContent,"<I>&#111n$2</I>")
  • 'Img Code
    re.Pattern="\[IMG\](http|https|ftp):\/\/(.[^\[]*)\[\/IMG\]"
    strContent=re.Replace(strContent,"<a onfocus=this.blur() href=""$1://$2"" target=_blank><IMG SRC=""$1://$2"" border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></a>")
    re.Pattern="\[UPLOAD=(gif|jpg|jpeg|bmp|png)\](.[^\[]*)(gif|jpg|jpeg|bmp|png)\[\/UPLOAD\]"
    strContent= re.Replace(strContent,"<br><IMG SRC=""images/filetype/$1.gif"" border=0>此主题相关图片如下:<br><A HREF=""$2$1"" TARGET=_blank><IMG SRC=""$2$1"" border=0 alt=按此在新窗口浏览图片 onload=""javascript:if(this.width>screen.width-333)this.width=screen.width-333""></A>")
  • re.Pattern="\[DIR=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/DIR]"
    strContent=re.Replace(strContent,"<object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0 width=$1 height=$2><param name=src value=$3><embed src=$3 pluginspage=http://www.macromedia.com/shockwave/download/ width=$1 height=$2></embed></object>")
    re.Pattern="\[QT=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/QT]"
    strContent=re.Replace(strContent,"<embed src=$3 width=$1 height=$2 autoplay=true loop=false controller=true playeveryframe=false cache=false scale=TOFIT bgcolor=#000000 kioskmode=false targetcache=false pluginspage=http://www.apple.com/quicktime/>")
    re.Pattern="\[MP=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/MP]"
    strContent=re.Replace(strContent,"<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=$1 height=$2 ><param name=ShowStatusBar value=-1><param name=Filename value=$3><embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=$3 width=$1 height=$2></embed></object>")
    re.Pattern="\[RM=*([0-9]*),*([0-9]*)\](.[^\[]*)\[\/RM]"
    strContent=re.Replace(strContent,"<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=$1 height=$2><PARAM NAME=SRC VALUE=$3><PARAM NAME=CONSOLE VALUE=Clip1><PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=true></OBJECT><br><OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=$1><PARAM NAME=SRC VALUE=$3><PARAM NAME=AUTOSTART VALUE=-1><PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1></OBJECT>")
  • re.Pattern="(\[FLASH\])(.[^\[]*)(\[\/FLASH\])"
    strContent= re.Replace(strContent,"<a href=""$2"" TARGET=_blank><IMG SRC=pic/swf.gif border=0 alt=点击开新窗口欣赏该FLASH动画! height=16 width=16>[全屏欣赏]</a><br><OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=500 height=400><PARAM NAME=movie VALUE=""$2""><PARAM NAME=quality VALUE=high><embed src=""$2"" quality=high pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash"" width=500 height=400>$2</embed></OBJECT>")
  • re.Pattern="(\[FLASH=*([0-9]*),*([0-9]*)\])(.[^\[]*)(\[\/FLASH\])"
    strContent= re.Replace(strContent,"<a href=""$4"" TARGET=_blank><IMG SRC=pic/swf.gif border=0 alt=点击开新窗口欣赏该FLASH动画! height=16 width=16>[全屏欣赏]</a><br><OBJECT codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 width=$2 height=$3><PARAM NAME=movie VALUE=""$4""><PARAM NAME=quality VALUE=high><embed src=""$4"" quality=high pluginspage=""http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"" type=""application/x-shockwave-flash"" width=$2 height=$3>$4</embed></OBJECT>")
  • re.Pattern="(\[sound\])(.[^\[]*)(\[\/sound\])"
    strContent=re.Replace(strContent,"<a href=""$2"" target=_blank><IMG SRC=pic/mid.gif border=0 alt=""背景音乐""></a><bgsound src=""$2"" loop=""-1"">")

  • re.Pattern="(\[URL\])(.[^\[]*)(\[\/URL\])"
    strContent= re.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$2</A>")
    re.Pattern="(\[URL=(.[^\[]*)\])(.[^\[]*)(\[\/URL\])"
    strContent= re.Replace(strContent,"<A HREF=""$2"" TARGET=_blank>$3</A>")
  • re.Pattern="(\[EMAIL\])(\S+\@.[^\[]*)(\[\/EMAIL\])"
    strContent= re.Replace(strContent,"<A HREF=""mailto:$2"">$2</A>")
    re.Pattern="(\[EMAIL=(\S+\@.[^\[]*)\])(.[^\[]*)(\[\/EMAIL\])"
    strContent= re.Replace(strContent,"<A HREF=""mailto:$2"" TARGET=_blank>$3</A>")
  • '自动识别网址
    re.Pattern = "^((http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9\./=\?%\-&_~`@[\]\':+!]+)"
    strContent = re.Replace(strContent,"<img align=absmiddle src=images/url.gif border=0> <a target=_blank href=$1>$1</a>")
    re.Pattern = "((http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9\./=\?%\-&_~`@[\]\':+!]+)$"
    strContent = re.Replace(strContent,"<img align=absmiddle src=images/url.gif border=0> <a target=_blank href=$1>$1</a>")
    re.Pattern = "([^>=""])((http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9\./=\?%\-&_~`@[\]\':+!]+)"
    strContent = re.Replace(strContent,"$1<img align=absmiddle src=images/url.gif border=0> <a target=_blank href=$2>$2</a>")
  • '自动识别www等开头的网址
    re.Pattern = "([^(http://|http:\\)])((www|cn)[.](\w)+[.]{1,}(net|com|cn|org|cc)(((\/[\~]*|\\[\~]*)(\w)+)|[.](\w)+)*(((([?](\w)+){1}[=]*))*((\w)+){1}([\&](\w)+[\=](\w)+)*)*)"
    strContent = re.Replace(strContent,"<img align=absmiddle src=images/url.gif border=0> <a target=_blank href=http://$2>$2</a>")
  • '自动识别Email地址,如打开本功能在浏览内容很多的帖子会引起服务器停顿
    're.Pattern = "([^(=)])((\w)+[@]{1}((\w)+[.]){1,3}(\w)+)"
    'strContent = re.Replace(strContent,"<img align=absmiddle src=pic/url.gif border=0><a target=_blank href=""mailto:$2"">$2</a>")
  • re.Pattern="\[HTML\](.[^\[]*)\[\/HTML\]"
    strContent=re.Replace(strContent,"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""6""><td><b>以下内容为程序代码:</b><br>$1</td></table>")
    re.Pattern="\[code\](.[^\[]*)\[\/code\]"
    strContent=re.Replace(strContent,"<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""6""><td><b>以下内容为程序代码:</b><br>$1</td></table>")
  • re.Pattern="\[color=(.[^\[]*)\](.[^\[]*)\[\/color\]"
    strContent=re.Replace(strContent,"<font color=$1>$2</font>")
    re.Pattern="\[font=(.[^\[]*)\](.[^\[]*)\[\/face\]"
    strContent=re.Replace(strContent,"<font face=$1>$2</font>")
    re.Pattern="\[align=(center|left|right)\](.*)\[\/align\]"
    strContent=re.Replace(strContent,"<div align=$1>$2</div>")
  • re.Pattern="\[QUOTE\](.*)\[\/QUOTE\]"
    strContent=re.Replace(strContent,"<table style=""width:100%"" cellpadding=5 cellspacing=1 class=tableborder1><TR><TD width=""100%"">$1</td></tr></table><br>")
    re.Pattern="\[fly\](.*)\[\/fly\]"
    strContent=re.Replace(strContent,"<marquee width=90% behavior=alternate scrollamount=3>$1</marquee>")
    re.Pattern="\[move\](.*)\[\/move\]"
    strContent=re.Replace(strContent,"<MARQUEE scrollamount=3>$1</marquee>")
    re.Pattern="\[SHADOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/SHADOW]"
    strContent=re.Replace(strContent,"<table width=$1 ><tr><td style=""filter:shadow(color=$2, strength=$3)"">$4</td></tr></table>")
    re.Pattern="\[GLOW=*([0-9]*),*(#*[a-z0-9]*),*([0-9]*)\](.[^\[]*)\[\/GLOW]"
    strContent=re.Replace(strContent,"<table width=$1 ><tr><td style=""filter:glow(color=$2, strength=$3)"">$4</td></tr></table>")
  • re.Pattern="\[i\](.[^\[]*)\[\/i\]"
    strContent=re.Replace(strContent,"<i>$1</i>")
    re.Pattern="\[u\](.[^\[]*)(\[\/u\])"
    strContent=re.Replace(strContent,"<u>$1</u>")
    re.Pattern="\[b\](.[^\[]*)(\[\/b\])"
    strContent=re.Replace(strContent,"<b>$1</b>")
    re.Pattern="\[size=([1-4])\](.[^\[]*)\[\/size\]"
    strContent=re.Replace(strContent,"<font size=$1>$2</font>")
    strContent=replace(strContent,"<I></I>","")
    set re=Nothing
    UbbCode=strContent
    End Function
  • '判断发言是否来自外部开始
    Function ChkPost()
    Dim ServerName(1)
    Chkpost=False
    ServerName(0)=Cstr(Request.ServerVariables("HTTP_REFERER"))
    ServerName(1)=Cstr(Request.ServerVariables("SERVER_NAME"))
    If Mid(ServerName(0),8,len(ServerName(1)))=ServerName(1) Then
    Chkpost=True
    End If
    End Function
    '判断发言是否来自外部结束
  • '判断数字是否整形开始
    Function IsInteger(Var)
    IsInteger=False
    If Not (IsNull(Var) Or Trim(Var)="" Or Not IsNumeric(Var)) Then
    If Instr(Cstr(Var),".")=0 Then
    IsInteger=True
    End If
    End If
    End Function
    '判断数字是否整形结束
  • '获得字符长度开始
    Function StrLength(Str)
    If IsNull(Str) or Str = "" Then
    StrLength = 0
    Exit Function
    End If

    Dim s_WINNT_CHINESE
    s_WINNT_CHINESE=(len("网络")=2)
    If s_WINNT_CHINESE Then
    Dim s_l,s_t,s_c
    Dim s_i
    s_l=len(Str)
    s_t=s_l
    For s_i=1 to s_l
    s_c=Asc(Mid(Str,s_i,1))
    If s_c<0 Then s_c=s_c+65536
    If s_c>255 Then s_t=s_t+1
    Next
    StrLength=s_t
    Else
    StrLength=Len(Str)
    End If
    End Function
    '获得字符长度结束
  • '截取字符串开始
    Function CutStr(Str,StrLen)
    Dim s_l,s_t,s_c,s_i
    s_l=Len(Str)
    s_t=0
    For s_i=1 to s_l
    s_c=Abs(Asc(Mid(Str,s_i,1)))
    If s_c>255 Then
    s_t=s_t+2
    Else
    s_t=s_t+1
    End If
    If s_t>=StrLen Then
    CutStr=left(Str,s_i)&"..."
    Exit For
    Else
    CutStr=Str
    End If
    Next
    CutStr=replace(CutStr,chr(10),"")
    End Function
    '截取字符串结束
  • '错误检查开始
    Function ChkError()
    If bolFoundErr Then
    Call ShowError()
    'Call Footer()
    Response.End()
    End If
    End Function
  • '过滤字符开始
    Function ChkBadWords(Str,bStr)
    Dim s_BadWords,s_i

    If Not(IsNull(bStr) or Isnull(Str)) Then
    s_BadWords = split(bStr, "|")
    For s_i = 0 to UBound(s_BadWords)
    Str = Replace(Str, s_BadWords(s_i), string(len(s_BadWords(s_i)),"*"))
    Next
    ChkBadWords = Str
    End If
    End Function
    '过滤字符结束
  • '检查浏览客户端开始
    Function ChkAgent()
    Dim s_UserAgent
    s_UserAgent=Trim(Lcase(Request.Servervariables("HTTP_USER_AGENT")))
    If InStr(s_UserAgent,"teleport")>0 or InStr(s_UserAgent,"webzip")>0 or InStr(s_UserAgent,"flashget")>0 or InStr(s_UserAgent,"offline")>0 Then
    Response.Redirect("ErrorAgent.html")
    End If
    End Function
    '检查浏览客户端结束
  • '检查客户端Cookie支持开始
    Function ChkCookieSupport()
    If Request.Cookies("CookiesSupport") ="" Then
    bolFoundErr = True
    strErrMsg = strErrMsg & "<li>您的浏览器不支持Cookie,请将浏览器中的Cookie选项打开以便访问本站</li><br>"
    End If
    End Function
    '检查客户端Cookie支持结束
  • '检查FSO支持开始
    Function ChkFSOSupport()
    Dim s_fsobj
    ChkFSOSupport=False
    Err=0
    Set s_fsobj=Server.CreateObject("Scripting.FileSystemObject")
    If 0=Err Then ChkFSOSupport=True
    End Function
    '检查FSO支持结束
  • 'Active Visitor Online Start
    Function ActiveUserOnline()
    arrUserInfo(6)=Replace(arrUserInfo(4),".","")
    arrUserInfo(7)=Request.Cookies("SessionID")("SID")
    If IsNumeric(arrUserInfo(7))=0 or arrUserInfo(7)="" Then
    arrUserInfo(7)=Ccur(Session.SessionID)
    Response.Cookies("SessionID").expires= date+1
    Response.Cookies("SessionID")("SID")=Ccur(Session.SessionID)
    Else
    arrUserInfo(7)=Ccur(arrUserInfo(7))
    End If
    If IsNumeric(arrUserInfo(6))=0 or arrUserInfo(6)="" Then arrUserInfo(6)=0
    arrUserInfo(6)=Ccur(arrUserInfo(6)) + arrUserInfo(7)
  • If arrUserInfo(3)=0 Then
    Session("UserID")=arrUserInfo(6)
    strSql="Select onlineid,boardid From Online Where onlineid="&Ccur(Session("UserID"))
    Set oRs=oConn.Execute(strSql)
    If oRs.Eof And oRs.Bof Then
    strSql="Insert Into Online(onlineid,Username,stats,Ip,Starttime,Lasttime,Boardid,Browser,Usergroupid,userid,Userhidden) Values ("&arrUserInfo(6)&",'游客','"&HtmlEncode(CheckRequestStr(strStats))&"','"&arrUserInfo(4)&"',#"&Now()&"#,#"&Now()&"#,"&arrUserInfo(5)&",'"&Request.Servervariables("Http_user_agent")&"',7,"&arrUserInfo(3)&","&arrUserInfo(2)&")"
    Else
    strSql="Update Online Set Lasttime=#"&Now()&"#,Boardid="&arrUserInfo(5)&",Stats='"&HtmlEncode(CheckRequestStr(strStats))&"' Where onlineid="&Cstr(Session("UserID"))
    End If

    'Set RS=Server.CreateObject("ADODB.RECORDSET")
    'RS.Open strSql,oConn,1
    oConn.Execute(strSql)
    Else
    If bolFoundErr Then
    arrUserInfo(5)=0
    strStats="错误信息"
    End If
    If Session("Userid")<>"" Then
    oConn.Execute("Delete From Online Where onlineid="&Session("Userid"))
    Session("UserID")=Empty
    End If
    strSql="Select onlineid,boardid From Online Where Userid="&arrUserInfo(3)
    Set oRs=oConn.Execute(strSql)
    If oRs.Eof And oRs.Bof Then
    strSql="Insert Into Online(onlineid,username,stats,Ip,Starttime,Lasttime,boardid,browser,Usergroupid,Userhidden,Userid) Values ("&arrUserInfo(6)&",'"&arrUserInfo(0)&"','"&HtmlEncode(CheckRequestStr(strStats))&"','"&arrUserInfo(4)&"',#"&Now()&"#,#"&Now()&"#,"&arrUserInfo(5)&",'"&Request.Servervariables("Http_user_agent")&"',"&arrUserInfo(1)&","&arrUserInfo(2)&","&arrUserInfo(3)&")"
    Else
    strSql="Update Online Set Lasttime=#"&Now()&"#,boardid="&arrUserInfo(5)&",Stats='"&HtmlEncode(CheckRequestStr(strStats))&"' Where UserID="&arrUserInfo(3)
    End If
    oRs.Close
    Set oRs=Nothing
    oConn.Execute(strSql)
    End If
  • '删除超时用户
    strSql="Delete From Online Where Datediff('s', Lasttime, #"&Now()&"#) > 10*60"
    oConn.Execute strSql
    End Function
    'Active User Online End
  • 'Get All Online Start
    Function GetAllOnline()
    Dim s_TmpRS
    s_TmpRS=oConn.execute("SELECT Count(*) FROM online")
    GetAllOnline=s_TmpRS(0)
    If Isnull(GetAllOnline) Then GetAllOnline=0
    If IsNumeric(intMaxonline) And IsNumeric(GetAllOnline) Then
    If GetAllonline > intMaxonline Then
    oConn.Execute("update sconfig Set Maxonline="&GetAllonline&",MaxonlineDate=#"&Now()&"#")
    End If
    End If
    End Function
    'Get All Online End
  • 'Get Member Online Start
    Function GetMemberOnline()
    Dim s_TmpRS
    s_TmpRS=oConn.execute("SELECT Count(*) FROM online Where userid>0")
    GetMemberOnline=s_TmpRS(0)
    If Isnull(GetMemberOnline) Then GetMemberOnline=0
    End Function
    'Get Memeber Online End
  • 'Get Member Online Start
    Function GetGuestOnline()
    Dim s_TmpRS
    s_TmpRS=oConn.execute("SELECT Count(*) FROM online Where userid=0")
    GetGuestOnline=s_TmpRS(0)
    If Isnull(GetGuestOnline) Then GetGuestOnline=0
    End Function
    'Get Memeber Online End
    %>
    <%
    sub Ok(var)
    If var=1 Then Response.Write("<meta http-equiv=""refresh"" content=""2; url="&strGoUrl&""">")
    %>
    <br>
    <table width=250 border=0 align="center" cellpadding=0 cellspacing=1>
    <tr>
    <td height="50" align="center"><BR><BR><font color="#993300" style="font-size:14px"><strong><%=strMsg%></strong></font><br><br><br></td>
    </tr>
    </table>
    <%end sub%>
    <%sub DisError()%>
    <div align="center">
    <TABLE width=760 border=0 cellPadding=0
    cellSpacing=0 height="300">
    <TBODY>
    <TR align=middle>
    <TD><br>
    <table width=631 border=0 align="center" cellpadding=0 cellspacing=1 class="borderon">
    <tr>
    <td width="105" height="50" align="center" valign="top" bgcolor=#FFFFFF>
    <img src="images/warning.gif" width="107" height="39"><BR> </td>
    <td width="298" align="center" bgcolor=#FFFFFF> <br>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="10%" align="center"> </td>
    <td><font style="font-size:12px"><%=strErrMsg%></font></td>
    </tr>
    <tr align=center>
    <td colspan="2"><br> <a href=javascript:history.go(-1)><font style="font-size:12px">返回上一页</font></a></td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    <br>
    </TD>
    </TR></TBODY></Table>
    </div>
    <%
    end sub
  • Sub QuickLogin()
    %>
    <TABLE cellSpacing=1 cellPadding=0 width="100%"
    bgColor=#ffffff border=0>
    <TBODY>
    <TR id=nav_tr_1>
    <TD align="center">
    <TABLE cellSpacing=1 cellPadding=0 width="300" border=0>
    <form name="form1" method="post" action="Login.asp?action=login">
    <TBODY>
    <%If CheckRequestStr(Request.Cookies(strSiteCURL)("UserName"))="" Then%>
    <TR id=cat>
    <TD align="center" rowspan="3" width="20">  </TD>
    <TD colspan="2"> 用 名:
    <input name="UserName" type="text" id="UserName" size="20" maxlength="50" style="border:1px solid #CCCCCC; width:150;height:18; color:#444444; font-size:9pt; background-color:#F4F4F4" onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F4F4F4'"> </TD>
    </TR>
    <TR id=cat>
    <TD colspan="2">密 码:
    <input name="PWD" type="password" id="PassWord" size="20" maxlength="20" style="border:1px solid #CCCCCC; width:150;height:18; color:#444444; font-size:9pt; background-color:#F4F4F4" onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F4F4F4'"></TD>
    </TR>
    <TR id=cat>
    <TD height="5" width="25"></TD>
    <TD height="25"><input name="CookieDate" type="hidden" id="CookieDate" value="0">
    <input type="submit" name="Submit" value="登录" style="border:1px solid #CCCCCC; width:60;height:18; color:#666666; font-size:9pt; background-color:#F1F1F1" onmouseover="style.backgroundColor='#F5F5F5'" onmouseout="style.backgroundColor='#F1F1F1'">
    &nbsp;<input type="button" onClick="window.open('Register.asp','vgg')" value="注 册" style="border:1px solid #CCCCCC; width:60;height:18; color:#666666; font-size:9pt; background-color:#F1F1F1" onmouseover="style.backgroundColor='#F5F5F5'" onmouseout="style.backgroundColor='#F1F1F1'" name="reset"></TD>
    </TR>
    <%Else%>
    <TR id=cat>
    <TD align="center" colspan="3"><br>欢迎您,<%=HTMLJSEncode(Request.Cookies(strSiteCURL)("UserName"))%>!<br>
    [ <a href="Login.asp?action=logout">退出登录</a> ] [ <a href="UserCP.asp">控制面板</a> ]<br><br></TD>
    </TR>
    <%End If%>
    </TBODY>
    </form>
    </TABLE></TD>
    </TR>
    </TBODY></TABLE>
    <%
    End Sub
    %>

  • 搜索更多相关主题的帖子: 语法 
    2006-02-23 18:31
    conquerl
    Rank: 1
    等 级:新手上路
    帖 子:3
    专家分:0
    注 册:2006-2-23
    收藏
    得分:0 
    354行是:
    oConn.Execute(strSql)

    紧急 请高手指点 我的QQ:84086710

    2006-02-23 18:33
    conquerl
    Rank: 1
    等 级:新手上路
    帖 子:3
    专家分:0
    注 册:2006-2-23
    收藏
    得分:0 

    求助呀!怎么没人帮助我哦!

    2006-02-24 22:49
    griefforyou
    Rank: 6Rank: 6
    等 级:贵宾
    威 望:27
    帖 子:3336
    专家分:0
    注 册:2004-4-15
    收藏
    得分:0 
    日期的语法错误 在查询表达式 '#2006-2-23 下午 06:12:17#' 中。


    这样也行吗?

    天津网站建设 http://www./
    2006-02-24 22:59
    阳光白雪
    Rank: 7Rank: 7Rank: 7
    等 级:贵宾
    威 望:39
    帖 子:2220
    专家分:0
    注 册:2005-11-18
    收藏
    得分:0 

    这样的帖子根本就不想看,眼痛头也痛!!


    专注于WEB前端交互平台开发:[url=http://blog./]blog.[/url](富客户端技术(RIA)交流平台)
    2006-02-25 09:07
    ldzlh
    Rank: 1
    等 级:新手上路
    帖 子:82
    专家分:0
    注 册:2005-12-26
    收藏
    得分:0 
    以下是引用griefforyou在2006-2-24 22:59:00的发言:
    日期的语法错误 在查询表达式 '#2006-2-23 下午 06:12:17#' 中。


    这样也行吗?

    cdate(time),這樣得到的是強制性的日期格式啊,祂會自生成這樣的,那如果是這樣的問題剛怎么解決?


    2006-02-25 09:53
    rainic
    Rank: 6Rank: 6
    等 级:贵宾
    威 望:27
    帖 子:2367
    专家分:0
    注 册:2005-8-9
    收藏
    得分:0 
    可以用空格、“,”、“/”、“-”分格日期,用“:”分格时间

    #2006 2 25 9:53:00# 年月日时分秒

    #2 1 2006 9:53:00# 月日年时分秒(默认)
    #13 2 2006 9:53:00# 日月年时分秒

    #2,25,2006 9:53:00# 月日年时分秒
    #2-25-2006 9:53:00# 月日年时分秒
    #2/25/2006 9:53:00# 月日年时分秒
    #2,25 2006 9:53:00# 月日年时分秒
    #2-25/2006 9:53:00# 月日年时分秒
    这些都是可以的

    有些可以省
    #2-25 9:53# 当前年,0秒
    #2-3-6 9:53# 2月3日2006年,0秒
    #2-3-6# 0时0分0秒

    2006-02-25 10:07
    快速回复:求助!日期的语法错误!
    数据加载中...
     
       



    关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

    编程中国 版权所有,并保留所有权利。
    Powered by Discuz, Processed in 0.025492 second(s), 10 queries.
    Copyright©2004-2024, BCCN.NET, All Rights Reserved