<!--#include file="../inc.asp"-->
<!--#include file="../ydzq.asp"-->

<%Call head()
Call saycarda("每天课程")%>


<%
dim rd,ids
rd=Cstr(request("rd"))
ids=Session("id")
  set objgbrs=Server.CreateObject("ADODB.Recordset")
  ssql="select qs,love,mytl,myml,mych,myzl,xf,xl,id,myjb,nianji from users where [id] ="&myid
  objgbrs.open ssql,conn
  if objgbrs("xf")<0 then
  Response.write "已经退学了，不用学习了~哈哈！"
  end if
if objgbrs("nianji")=0 then
Response.write "你没有读书,不用上学了!"
end if
if objgbrs("nianji")>0 and objgbrs("xf")>=0 then
sql="Delete FROM gxx WHERE  DATEDIFF('s', time, now()) > 60*60"
conn.Execute sql
Set rec=Server.CreateObject("ADODB.Recordset")
SQL="SELECT * FROM gxx where [useid]="&id
rec.Open SQL,conn
    if not rec.eof then
       msg="看来你很喜欢学习!不过不用这么辛苦,还没有到时候学习!!"
else
          SQL="insert into gxx(useid,topao)values("
          SQL=SQL & sqlstr(ids) & ","
          SQL=SQL & sqlstr(rd) & ")"
          Application.Lock
          conn.execute SQL

'第一级
if objgbrs("nianji")=1 then
sql="update users set myzl=myzl+10,mych=mych+10,xf=xf+5,qs=qs+10,love=love+10  where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加10,才华加10!情商加10,爱心+10,加你5个学分!继续努力!"
end if
if objgbrs("nianji")=2 then
sql="update users set myzl=myzl+20,caihua=caihua+20,xf=xf+10,qs=qs+20,love=love+20 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加20,才华加20!情商加20,爱心加20,今天加你学分10!继续努力!"
end if
if objgbrs("nianji")=3 then
sql="update users set myzl=myzl+30,caihua=caihua+30,xf=xf+15,qs=qs+30,love=love+30 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加30,才华加30!情商加30,爱心加30,今天加你学分15!继续努力!"
end if
if objgbrs("nianji")=4 then
sql="update users set myzl=myzl+40,caihua=caihua+40,xf=xf+20,qs=qs+40,love=love+40 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加40,才华加40!情商加40,爱心加40,今天加你学分20!继续努力!"
end if
if objgbrs("nianji")=5 then
sql="update users set myzl=myzl+50,caihua=caihua+50,xf=xf+25,qs=qs+50,love=love+50 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加50,才华加50!情商加50,爱心加50,今天加你学分25!继续努力!"
end if
if objgbrs("nianji")=6 then
sql="update users set myzl=myzl+60,caihua=caihua+60,xf=xf+30,qs=qs+60,love=love+60 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加60,才华加60!情商加60,爱心加60,今天加你学分30!继续努力!"
end if
if objgbrs("nianji")=7 then
sql="update users set myzl=myzl+70,caihua=caihua+70,xf=xf+35,qs=qs+70,love=love+70 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加70,才华加70!情商加70,爱心加70,今天加你学分35!继续努力!"
end if
if objgbrs("nianji")=8 then
sql="update users set myzl=myzl+80,caihua=caihua+80,xf=xf+40,qs=qs+80,love=love+80 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加80,才华加80!情商加80,爱心加80,今天加你学分40!继续努力!"
end if
if objgbrs("nianji")=9 then
sql="update users set myzl=myzl+90,caihua=caihua+90,xf=xf+45,qs=qs+90,love=love+90 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加90,才华加90!情商加90,爱心加90,今天加你学分45!继续努力!"
end if
if objgbrs("nianji")=10 then
sql="update users set myzl=myzl+100,caihua=caihua+100,xf=xf+50,qs=qs+100,love=love+100 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加100,才华加100!情商加100,爱心加100,今天加你学分50!继续努力!"
end if
if objgbrs("nianji")=11 then
sql="update users set myzl=myzl+110,caihua=caihua+110,xf=xf+55,qs=qs+110,love=love+110 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加110,才华加110!情商加110,爱心加110,今天加你学分55!继续努力!"
end if
if objgbrs("nianji")=12 then
sql="update users set myzl=myzl+120,caihua=caihua+120,xf=xf+60,qs=qs+120,love=love+120 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加120,才华加120!情商加120,爱心加120,今天加你学分60!继续努力!"
end if
if objgbrs("nianji")=13 then
sql="update users set myzl=myzl+130,caihua=caihua+130,xf=xf+65,qs=qs+130,love=love+130 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加70,才华加70!情商加130,爱心加130,今天加你学分35!继续努力!"
end if
if objgbrs("nianji")=14 then
sql="update users set myzl=myzl+140,caihua=caihua+140,xf=xf+70,qs=qs+140,love=love+140 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加140,才华加140!情商加140,爱心加140,今天加你学分70!继续努力!"
end if
if objgbrs("nianji")=15 then
sql="update users set myzl=myzl+150,caihua=caihua+150,xf=xf+75,qs=qs+150,love=love+150 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加150,才华加150!情商加150,爱心加150,今天加你学分75!继续努力!"
end if
if objgbrs("nianji")=16 then
sql="update users set myzl=myzl+160,caihua=caihua+160,xf=xf+80,qs=qs+160,love=love+160 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加160,才华加160!情商加160,爱心加160,今天加你学分80!继续努力!"
end if
if objgbrs("nianji")=17 then
sql="update users set myzl=myzl+170,caihua=caihua+170,xf=xf+85,qs=qs+170,love=love+170 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加170,才华加170!情商加170,爱心加170,今天加你学分85!继续努力!"
end if
if objgbrs("nianji")=18 then
sql="update users set myzl=myzl+180,caihua=caihua+180,xf=xf+90,qs=qs+180,love=love+180 where [id] ="&myid
conn.execute sql
Application.Unlock
msg="今天学习完!智力加180,才华加180!情商加180,爱心加180,今天加你学分90!继续努力!"
end if
end if
response.write msg
function sqlstr(data)
   sqlstr="'" & Replace(data,"'","'") & "'"
  End function
conn.close
set rec=nothing
set conn=nothing
end if
%>
<br/><a href="/bbs/school/school.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>">高等学府</a>
<br/>--------
<br/><a href='/bbs/show.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>我的家园</a>-<a href='/bbs/index.asp?sid=<%=sid%>&amp;saytk=<%=saytk%>'>社区首页</a>
<br/><%=now%>
<%Call headsay()%>