📄 sheeppei.asp
字号:
<!--#include file="../inc/conn2.asp"-->
<Script language="javascript">
window.resizeTo(screen.availWidth,screen.availHeight);
</script>
<%
if Request.Cookies("NC")="" or Request.Cookies("NC")="访客" then
Response.Write("对不起,您不是社区用户,请先注册!")
Response.End
end if%>
<body background="siba.gif">
<%
sheepname=request.form("sheepname")
if sheepname="" then
conn.close
set conn=nothing%>
<script language=vbscript>
MsgBox "抱歉,错误!"
history.back
</script>
<%else
sql="select * from [sheep] where sheepname='"&sheepname&"' and NC='"&Request.Cookies("NC")&"'"
set rs=conn.Execute(sql)
if rs.eof then
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<script language=vbscript>
MsgBox "抱歉,错误!"
history.back
</script>
<%
else
rs.close
set rs=nothing
sql="select * from [rules]"
set rs=conn.Execute(sql)
if rs.eof then
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<script language=vbscript>
MsgBox "抱歉,错误!"
history.back
</script>
<%
else
peidel=rs("peidel")
peiplushappy=rs("peiplushappy")
peipluslife=rs("peipluslife")
rs.close
set rs=nothing
sql="select JQ from HY where NC='"&Request.Cookies("NC")&"'"
set rs=conn.Execute(sql)
tempsplosh=rs("JQ")-peidel
if tempsplosh<0 then
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
<script language="vbscript">
msgbox"您没有足够的钱!先去赚点钱吧。",0,"FLUSH"
history.back
</script>
<%
else
rs.close
set rs=nothing
sql="select * from [sheep] where sheepname='"&sheepname&"' and NC='"&Request.Cookies("NC")&"'"
set rs=conn.Execute(sql)
feeddate=rs("feeddate")
workload=rs("workload")
sheephappy=rs("sheephappy")+peiplushappy
if sheephappy>100 then
sheephappy=100
end if
life=rs("life")+peipluslife
if life>100 then
life=100
end if
rs.close
set rs=nothing
if datediff("d",feeddate,date)<>0 then
tempdate=date
conn.execute"update [sheep] set life='"&life&"',sheephappy='"&sheephappy&"',feeddate='"&date&"',feedsheepday=feedsheepday+1,workload='1' where sheepname='"&sheepname&"' and NC='"&Request.Cookies("NC")&"'"
conn.execute"update HY set JQ='"&tempsplosh&"' where NC='"&Request.Cookies("NC")&"'"
conn.close
set conn=nothing%>
<script language="vbscript">
msgbox"陪伴完毕!",0,"FLUSH"
window.self.location.replace("checksheep.asp")
</script>
<%
else
if workload>=3 then
conn.close
set conn=nothing%>
<script language="vbscript">
msgbox"您已经维护三次!明天再来吧。:-)",0,"FLUSH"
history.back
</script>
<%
else
conn.execute"update [sheep] set life='"&life&"',sheephappy='"&sheephappy&"',workload=workload+1 where sheepname='"&sheepname&"' and NC='"&Request.Cookies("NC")&"'"
conn.execute"update HY set JQ='"&tempsplosh&"' where NC='"&Request.Cookies("NC")&"'"
conn.close
set conn=nothing
%>
<script language="vbscript">
msgbox"陪伴完毕!",0,"FLUSH"
window.self.location.replace("checksheep.asp")
</script>
<%
end if
end if
end if
end if
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -