'date' 不是可以识别的 函数名
错误类型:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
'date ' 不是可以识别的 函数名。
/office/tpjs.asp, 第 12 行
<!--#include file = admin_conn.asp -->
<%
xuastp=trim(request( "xuastp "))
id=trim(request( "id "))
if id= " " then id=0
vtp=trim(request( "vtp "))
action=trim(request( "action "))
userip = Request.ServerVariables( "HTTP_X_FORWARDED_FOR ")
If userip = " " Then userip = Request.ServerVariables( "REMOTE_ADDR ")
if xuastp <> " " and action= "tp " then
Set rs = Server.CreateObject( "ADODB.RecordSet ")
rs.Open "select * from [tpip] where ip= ' "&userip& " ' and addtime=date() and tpid= "&clng(id)& " order by id desc ",conn,1,1
if rs.recordcount=0 then
Set rs = Server.CreateObject( "ADODB.RecordSet ")
rs.Open "select * from [tp] where id= "&id,conn,1,3
if rs.recordcount <> 0 then
rs(xuastp)=rs(xuastp)+1
rs.update
vtp=rs( "vtp ")
id=rs( "id ")
end if
rs.close
set rs=nothing
Response.Write " <BR> <BR> <BR> <Center> <font style= 'font-size:10.5pt '> 投票成功!感谢你的支持! </font> "
conn.Execute "insert into [tpip] ([ip],[addtime],[tpid]) values( ' "&userip& " ',date(), "&id& ") "
Else
Response.Write " <BR> <BR> <BR> <Center> <font style= 'font-size:10.5pt '> 对不起,你已经投过票了! </font> "
end if
elseif action= " " and vtp= " " then
path= "/news/ "
Set rs = Server.CreateObject( "ADODB.RecordSet ")
rs.Open "select * from [config] ",conn,1,1
if rs.recordcount <> 0 then
path=rs( "path ")
end if
rs.close
set rs=nothing
id=trim(request( "id "))
if id= " " then id=0
%>
document.write( " <head> <meta http-equiv= 'Content-Language ' content= 'zh-cn '> <meta http-equiv= 'Content-Type ' content= 'text/html; charset=gb2312 '> </head> ");
document.write( " <table border=0 cellpadding=0 cellspacing=0> <form method= 'POST ' action= ' <%=path%> tpjs.asp?id= <%=id%> &action=tp ' Target=_blank> <tr> <td> ");
<%
Set rs = Server.CreateObject( "ADODB.RecordSet ")
rs.Open "select * from [tp] where id= "&id,conn,1,1
if rs.recordcount <> 0 then
title=rs( "title ")
%>
document.write( " <%=title%> <br> ");
<%
for i=1 to 15
if rs( "tp "&i& " ")= " " then exit for
tttt=rs( "tp "&i& " ")
%>
document.write( " <input type= 'radio ' value= 'tp <%=i%> h ' name= 'xuastp ' id= ' <%=i%> '> <label for= <%=i%> > <%=tttt%> </label> <br> ");
<%
next
end if
%>
document.write( " <center> <input type= 'image ' src= ' <%=path%> images/botton-3.jpg ' value= '投票 ' name= 'B1 '> ");
<%
if rs( "vtp ")= "1 " then
%>
document.write( " <a href= <%=path%> tpjs.asp?vtp=1&id= <%=id%> target=_blank> <img src= ' <%=path%> images/botton-4.jpg ' border=0> </a> ");
document.write( " </td> </tr> </form> </table> </center> ");
<%
end if
elseif vtp= " " then
Response.Write " <BR> <BR> <BR> <center> <font style= 'font-size:10.5pt '> 你还没有选择! </font> "
end if
if vtp= "1 " then
Set rs = Server.CreateObject( "ADODB.RecordSet ")
rs.Open "select * from [tp] where id= "&id,conn,1,1
if rs.recordcount <> 0 then
Response.Write " <BR> <div align=center> <table border= '0 ' cellpadding= '3 ' cellspacing= '0 ' width= '760 ' id= 'table333 '> <tr> "
Response.Write " <td colspan=2 background= 'images/bj5.jpg ' height= '25 ' width= '100% '> <font color= '#FFFFFF ' style= 'font-size:10.5pt '> "&rs( "title ")& " </font> </td> </tr> "
bbb=0
for i=1 to 15
if rs( "tp "&i& " ")= " " then exit for
ccc= " "
if bbb=1 then ccc= "style= 'background-color: #F2F2F2 ' "
Response.Write " <tr "&ccc& "> <td style= 'font-size:10.5pt '> "&rs( "tp "&i& " ")& " </td> "
Response.Write " <td align=center style= 'font-size:10.5pt '> "&rs( "tp "&i& "h ")& " </td> </tr> "
bbb=bbb+1
if bbb=2 then bbb=0
next
Response.Write " </table> "
end if
rs.close
set rs=nothing
end if
%>
怎么办啊?
[解决办法]
getdate()//返回当前系统日期和时间