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

📄 view.asp

📁 许愿望源码许愿树成长过程树苗树枝叶开发结果
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%
forjjid=replace(request("id")," ","")
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from forjj_tree where id="&forjjid
rs.open sql,conn,1,1
if rs.eof and rs.bof then
Response.Write "<script>window.alert('这棵树已经被砍掉了!');window.close();</script>"
response.end
else
password=rs("password")
if rs("sort")=1 then
sortname="爱情"
elseif rs("sort")=2 then
sortname="学业"
elseif rs("sort")=3 then
sortname="事业"
elseif rs("sort")=4 then
sortname="生活"
else
sortname="梦想"
end if
%>
<head>
<title><%=title%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="Author" content="Forjj" />
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a {
	font-size: 12px;
	color: #FFFFFF;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #FFFFFF;
}
a:hover {
	text-decoration: underline;
	color: #000000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
-->
</style>
</head>
<body>
<table width="400" height="300" border="0" cellpadding="0" cellspacing="0" background="images/yw.jpg">
  <tr>
    <td align="center"><table width="320" height="160" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="77" height="30" class="fonts3">树苗编号:</td>
        <td width="243" align="left" class="fonts5"><%=rs("id")%></td>
      </tr>
      <tr>
        <td height="30" class="fonts3">树的主人:</td>
        <td align="left" class="fonts5"><%=rs("name")%></td>
      </tr>
      <tr>
        <td height="30" class="fonts3">树  林:</td>
        <td align="left" class="fonts5"><%=sortname%>林区</td>
      </tr>
      <tr>
        <td height="30" class="fonts3">种树日期:</td>
        <td align="left" class="fonts5"><%=rs("time")%></td>
      </tr>
      <tr>
        <td height="30" class="fonts3">浇 水 量:</td>
        <td align="left" class="fonts5"><%=rs("hits")%></td>
      </tr>
      <tr>
        <td style="padding-top: 3px" class="fonts3" valign="top">愿  望:</td>
        <td style="padding-top: 3px" align="left" class="fonts5">
		<%
		content=replace(rs("content"),chr(13),"<br>")
		content=replace(content," ","&nbsp;&nbsp;")
		response.write content
		%>
		</td>
      </tr>
      <tr>
          <td style="padding-top: 10px" colspan="2" align="center">
		  <%if request("edit")="del" or request("edit")="password" then%>
		    <table width="100%" border="0" cellpadding="0" cellspacing="0">
			<form name="form" method="post" action="?edit=password&id=<%=forjjid%>">
              <tr> 
                  <td width="77" height="25" align="left"><strong><font color="#FFFFFF">密  
                    码:</font></strong> </td>
                  <td align="left"> 
                    <input name="password" type="text" id="password" size="20">
                    <input type="submit" name="Submit" value="确定">
                  </td>
              </tr>
			  </form>
            </table>
			<%else%>
            <table width="78%" border="0" cellpadding="0" cellspacing="0">
              <tr> 
                <td width="50%" align="center"><a href="?edit=add&id=<%=forjjid%>"><img src="images/xy3.jpg" width="110" height="36" border="0"></a></td>
                <td width="50%" align="center"><a href="?edit=del&id=<%=forjjid%>"><img src="images/xy4.jpg" width="110" height="36" border="0"></a></td>
              </tr>
            </table>
            <%end if%>
          </td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<%
end if
rs.close
if request("edit")="add" then
if DateDiff("s",Request.Cookies(""&forjjid&"")("vitistime"),Now())<600 Then
Response.Write "<script>window.alert('对不起,您已经帮这棵树浇过水,现在不用再浇了!');</script>"
else
Response.Cookies(""&forjjid&"")("vitistime")=Now()
rs.open "update forjj_tree set hits=hits+1 where id="&forjjid,conn,1,3
Response.Write "<script>window.alert('浇水成功,谢谢您的辛勤劳动!');</script>"
end if
elseif request("edit")="password" then
if request("password")=password or request("password")=forjj_pwd then
conn.execute"delete from forjj_tree where id="&forjjid
Response.Write "<script>window.alert('砍树成功!');window.close();</script>"
else
Response.Write "<script>window.alert('密码错误!');window.close();</script>"
end if
end if
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -