<%call head()
call saycardd("每日工作")%>
<% wap=request.querystring("wap") %>
<%
dim rd,ids
rd=Cstr(request("rd"))
ids=session("id")
%>
<!--#INCLUDE file="conn1.asp"-->
<%
set rs=Server.CreateObject("ADODB.Recordset")
strSQL="select * from sx where cstr(ids)="&myid
rs.open strSQL,liao,1,1
%>
<%
  set objgbrs=Server.CreateObject("ADODB.Recordset")
   sql="Delete FROM gguan WHERE  DATEDIFF('s', time, now()) > 720*60"
liao.Execute sql
Set rec=Server.CreateObject("ADODB.Recordset")

SQL="SELECT * FROM gguan where cstr(ids)="&myid
rec.Open SQL,liao
    if not rec.eof then
       msg="今天您已工作过了，不用太辛苦的!!"
else
          SQL="insert into gguan(ids,topao)values("
          SQL=SQL & sqlstr(ids) & ","
          SQL=SQL & sqlstr(rd) & ")"
          Application.Lock
          liao.execute SQL

'第一级
if rs("jy")=1 then
sql="update sx set yz=yz+1000,jy=jy+10000 where cstr(ids)="&myid
liao.execute sql
Application.Unlock
msg="你今天任务完成,成功完成任务!获得金币1000,体力加10,魅力加10,智力加10,才华加10!!努力工作吧!"
end if
end if
response.write msg
function sqlstr(data)
   sqlstr="'" & Replace(data,"'","'") & "'"
  End function
liao.close
set rec=nothing
set liao=nothing
%>
<br/><a href="/bbs/job/sy.asp?wap=<%=wap%>">返回商场</a>
<br/><a href='/bbs/ztlb.asp?wap=<%=wap%>'>论坛</a>|
<a href='/bbs/sqtt.asp?wap=<%=wap%>'>家族</a>|
<a href='/bbs/tcjy/index.asp?wap=<%=wap%>'>同城</a>|
<a href='/bbs/room/from.asp?wap=<%=wap%>'>聊室</a>
<br/><a href='/bbs/public/gygl.asp?wap=<%=wap%>'>我的家园</a>
-<a href='/bbs/index.asp?wap=<%=wap%>'>社区首页</a>
<br/><%=now%>
<%call head1()%>