[求助]关于考勤登录问题,究竟是什么原因??
我作的一个考勤登录网页,原意是检查字段Iswork=1则显示用户已登录,如果,Iswork=0则登录,并将登录时的年、月、日、时、及Iswork=1记入。但调试时,总是显示:未结束的字符串常量/MyHome/index.asp, line 89, column 142
sql="select * from kaoqing_table where user="&Session("user")&"and recordYear=Year(Now())and recordMonth=Month(Now())and recordDay=Day(Now())
想请教各们高手,究竟是什么原因。详细代码如下:
<%
if Request.Form("action")="true" then
username=trim(Request.Form("username")) '登录用户名
password=trim(Request.Form("password")) '登录密码
otherpwd = Trim(Request.form("otherpwd")) '附加码
reotherpwd = Trim(Request.form("reotherpwd"))'生成的附加码
legalTag=checkenter()
If legalTag=TRUE then '如果没有非法输入,则进行用户验证
if otherpwd = reotherpwd then '附加码比较
legalUserTag=checksysUser() '系统用户验证
if legalUserTag=true then
If Session("level")=1 and Session("admin")="True" Then
Response.Redirect("manage.asp")
Response.End
End If
sql="select * from kaoqing_table where user="&Session("user")&"and recordYear=Year(Now())and recordMonth=Month(Now())and recordDay=Day(Now())
set rs1=Conn.execute(Sql)
If not rs1.Eof then
sql="Update kaoqing_table Set Iswork=1 Where id="&CInt(rs1("id"))
Else
Response 你已经登录
End If
If Session("level")=2 Then
End If
set rs=server.createobject("adodb.recordset")
insertsql="select * from kaoqing_table"
rs.open insertsql,db,1,3
rs.addnew
rs("user")=username
rs("recordYear")=Year(Now())
rs("recordMonth")=Month(Now())
rs("recordDay")=Day(Now())
rs("recordTime")=Time
rs("Iswork")=1
rs("note")=note
rs.update
rs.close
set rs=nothing
Response.Redirect("normal.asp")
Response.End
End If