⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sheepsun.asp

📁 宁波娱乐在线城市,丰富的内容版块
💻 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
sundel=rs("sundel")
sunplushealth=rs("sunplushealth")
sunplusmilk=rs("sunplusmilk")
rs.close
set rs=nothing
sql="select JQ from HY where NC='"&Request.Cookies("NC")&"'"
set rs=conn.Execute(sql)
tempsplosh=rs("JQ")-sundel
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")
sheephealth=rs("sheephealth")+sunplushealth
if sheephealth>100 then
sheephealth=100
end if
milk=rs("milk")+sunplusmilk
rs.close
set rs=nothing
if datediff("d",feeddate,date)<>0 then 
tempdate=date
conn.execute"update [sheep] set milk='"&milk&"',sheephealth='"&sheephealth&"',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 milk='"&milk&"',sheephealth='"&sheephealth&"',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 + -