📄 wish.asp
字号:
<!--#include file="../../config/sys.asp" -->
<!--#include file="config.asp"-->
<!--#include file="inc/char.asp"-->
<!--#include file="live.txt"-->
<%
'声明变量
Dim PROName,PROEType,PROCNAME,VerNum,VerUpdate,PROVer,PROType,PROMaster,PROPublish,PROCopyRight,CopyRightInfo,JavaCopyRightInfo
Select Case Request("action")
Case "click"
Call SLIGHTBOY_Click
Case "add"
Call SLIGHTBOY_Add
Case "post"
Call SLIGHTBOY_Post
Case "super"
Call SLIGHTBOY_Super
Case "admin"
Call SLIGHTBOY_Admin
Case "del"
Call SLIGHTBOY_Del
Case Else
Call SLIGHTBOY_Look
End Select
Sub SLIGHTBOY_Look
Call HtmlStart
%>
<td align="right" valign="top"><select name="SLIGHTBOY" style="font-size:7pt;font-family:arial" onChange="location.href=this.options[this.selectedIndex].value;" STYLE="BACKGROUND:<%=tdcolor%>;COLOR:<%=trcolor%>">
<%
'建立活动游标
Sql = "Select id,name,sex,age,birth,live,counter From wish Order BY id DESC"
' 0 1 2 3 4 5
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open Sql,conn,1,1
TotalRecord=Rs.RecordCount
Rs.PageSize=Show
MaxPage=Rs.pagecount
OrderPage=Clng(Request("page"))
IF OrderPage="" or OrderPage=0 then
OrderPage=1
ElseIF OrderPage > MaxPage Then
OrderPage=MaxPage
End IF
Response.Write "<option value='wish.asp?page="&OrderPage&"' selected Style=""background:"&trcolor&";color:"&tdcolor&""">PAGE"&OrderPage&"</option>"
For i= 1 TO MaxPage
Response.Write "<option value='wish.asp?page="&i&"'>PAGE"&i&"</option>"
Next
%>
</select>共 <font color="<%=tdcolor%>"><b><%=TotalRecord%></b></font> 瓶 | 语法: <font color="<%=tdcolor%>"><b><%=use_html%></b></font> | 每页<font color="<%=tdcolor%>"><b><%=show%></b></font> 瓶
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="400" background="pic/bg.jpg" height="300" style="border:1 solid black">
<tr>
<td height="230">
<%
IF Session("BottleAdmin")=True Then
Response.Write "<form method=""post"" action=""wish.asp?action=del"">"
End IF
IF not Rs.eof Then
IF OrderPage <> 1 Then
Rs.Move (OrderPage-1)*Show
End IF
i=1
randomize
Do While not Rs.eof and i<=Show
randnum = Int(8*rnd+1)
IF Rs("sex")="m" Then
sexpic="♂"
Else
sexpic="♀"
End IF
IF Session("BottleAdmin")=True Then
Response.Write "<input type=""checkbox"" name=""Del"" value="""&Rs("id")&""">"
End IF
Response.Write "<marquee scrollamount="""&randnum&""" delay=""0"">"&_
"<a href=""wish.asp?action=click&number="&Rs("id")&""" ONMOUSEOVER=""pop('今年"&Rs("age")&"岁住在"&Rs("live")&"的"&Rs("name")&sexpic&"许了一个愿...<br>有"&Rs("counter")&"人看过','"&trcolor&"')""; ONMOUSEOUT=""kill()"">"&_
"<img src=""pic/c"&Rs("birth")&".gif"" border=""0""></a>"&_
"</marquee>"&chr(13)
i=i+1
Rs.MoveNext
Loop
End IF
Rs.Close
Set Rs=Nothing
conn.Close
Set conn=Nothing
%>
<%
IF Session("BottleAdmin")=True Then
Response.Write "<p align=center>"
Response.Write "<input type=""submit"" value="" 删除 "" style=""HEIGHT:22PX;BACKGROUND-COLOR:"&trcolor&";BORDER:1 SOLID BLACK"">"&chr(13)
Response.Write "</form>"
End IF
Call HtmlEnd
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SLIGHTBOY_Click
Call HtmlStart
%>
<td align="right" valign="top">
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="400" background="pic/bg.jpg" height="300" style="border:1 solid black">
<tr>
<td height=230>
<%
'建立数据库连接
'建立活动游标
Sql = "Select * From wish Where id="&Clng(Request.Querystring("number"))
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open Sql,conn,1,3
birth=Rs("birth")
msg=Rs("msg")
IF Rs("sex")="m" Then
sexpic="先生"
Else
sexpic="小姐"
End IF
IF Rs("email")<>"" Then
info= Rs("age")&"岁的 <a href=""mailto:"&Rs("email")&""">"&Rs("name")&"</a> "&sexpic&",来自"&Rs("live")&"<br>于"&Rs("input_date")&" 留下此愿<br>他的手机(邮箱)是:"&Rs("email")&"<hr>愿望内容:"
Else
info= Rs("age")&"岁的 "&Rs("name")&" "&sexpic&",来自"&Rs("live")&",于"&Rs("input_date")&" 留下此愿"
End IF
Rs("counter")=Rs("counter")+1
Rs.Update
Rs.Close
Set Rs=Nothing
conn.Close
Set conn=Nothing
%>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height=180>
<tr>
<td width="400" style="background-color:white;Filter:Alpha(opacity=40)">
<table border=0 align=center>
<tr>
<td rowspan=2 valign=top>
<img src="pic/c<%=birth%>.gif" align=absmiddle></td>
<td><%=info%></td>
</tr>
<tr>
<td><%=msg%></td>
</tr>
</table>
</td>
</tr>
</table>
<%
Call HtmlEnd
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SLIGHTBOY_Admin
'IF Request.Form("id")="" Then Error("您忘了填写名字")
'IF Request.Form("passid")="" Then Error("您忘了填写密码")
IF Request.Form("id")<>userid or Request.Form("passid")<>userpass Then
Error("密码错误")
Else
Session("BottleAdmin")=True
Response.Redirect "wish.asp"
End IF
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SLIGHTBOY_Post
IF Request.Form("name")="" Then Error("您忘了填写名字")
IF Instr("'",Request.Form("name")) or Instr("""",Request.Form("name")) Then Error("您名字带有非法字符<br>PS:名字中不能带有 ' 或者 """)
IF Request.Form("sex")="" Then Error("您忘了选择性别")
IF CkAge(Request.Form("age")) = False Then Error("年龄栏只能输入数字")
IF Request.Form("live")="" Then Error("您忘了选择居住地")
IF Request.Form("birth")="" Then Error("您忘了选择愿望类别")
IF Request.Form("msg")="" Then Error("您忘了填写愿望")
IF maxmessage = "" or maxmessage > 255 Then maxmessage=255
IF Len(Request.Form("msg"))> maxmessage Then Error("您的愿望太长了")
IF use_html="ON" Then
msg=HTMLcode(Request.Form("msg"))
Else
msg=HTMLEncode(Request.Form("msg"))
End IF
IF usr_fltbadword="ON" Then msg=CkBadWords(msg)
StrEmail=Request.Form("email")
'IF usr_emailcheck="ON" and StrEmail<>"" Then
' IF IsValidEmail(StrEmail)=False Then Error("请输入正确信箱地址")
'End IF
name=Trim(Replace(Request.Form("name"),"'",""))
sex=Request.Form("sex")
age=Request.Form("age")
birth=Request.Form("birth")
email=StrEmail
live=Request.Form("live")
msg=msg
input_date=cstr(now())
sqlpp = "insert into wish (name,sex,age,birth,email,live,msg,input_date,input_user) values('"&name&"','"&sex&"','"&age&"','"&birth&"','"&email&"','"&live&"','"&msg&"','"&input_date&"','"&session("user_name")&"')"
conn.Execute(sqlpp)
Call HtmlStart
Response.Write "<td align=""right"" valign=""top"">"&chr(13)&_
"</td>"&chr(13)&_
"</tr>"&chr(13)&_
"</table>"&chr(13)&_
"</center>"&chr(13)&_
"</div>"&chr(13)&_
"<div align=""center"">"&chr(13)&_
"<center>"&chr(13)&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""400"" background=""pic/bg.jpg"" height=""300"" style=""border:1 solid black"">"&chr(13)&_
"<tr>"&chr(13)&_
"<td height=230>"&chr(13)&_
"<p align=center><a href=""wish.asp""><img src=""pic/wishing.gif"" width=""95"" height=""90"" border=""0""></a></p>"
Call HtmlEnd
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SLIGHTBOY_Del
IF Session("BottleAdmin")<>True Then Error("不要捣乱奥")
IF Request("del")<>"" Then
DeleteID=Split(Request("del"),",")
For i = 0 to Ubound(DeleteID)
Sql="delete from wish where id="&DeleteID(i)
conn.execute(Sql)
Next
conn.close
Set conn=Nothing
End IF
Response.Redirect"wish.asp"
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SLIGHTBOY_Add
Call HtmlStart
%>
<td align="right" valign="top">
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="400" background="pic/bg.jpg" height="300" style="border:1 solid black">
<tr>
<td height=230>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="200">
<tr>
<td align="center" width="400" style="background-color:white;Filter:Alpha(opacity=40)">
<form method="post" action="wish.asp?action=post">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="1">
<tr>
<td align="right">名字 :</td>
<td><input type="text" size="12" maxlength="12" name="name" style="COLOR: blue"></td>
<td align="right">性别 :</td>
<td>
<select name="sex" size="1">
<option selected value="">-请选择-</option>
<option value="m">男 生</option>
<option value="w">女 生</option>
</select>
</td>
</tr>
<tr>
<td align="right">年龄 :</td>
<td><input type="text" size="12" name="age" style="COLOR: red"></td>
<td align="right">类别 :</td>
<td>
<select name="birth" size="1">
<option selected value="">-请选择-</option>
<option value="love">恋 爱</option>
<option value="study">学 业</option>
<option value="health">健 康</option>
<option value="family">家 庭</option>
<option value="work">事 业</option>
<option value="future">将 来</option>
<option value="wealth">财 富</option>
<option value="life">生 活</option>
</select>
</td>
</tr>
<tr>
<td align="right">信箱或手机 :</td>
<td><input type="text" size="12" name="email" style="COLOR: blue"></td>
<td align="right">地区 :</td>
<td>
<SELECT NAME="live">
<option value="" selected>-请选择-</option>
<%
Location=Split(Location,"|")
For i = 0 to Ubound(Location)
Response.Write "<option value="&Location(i)&">"&Location(i)&"</option>"&chr(13)
Next
%>
</select>
</td>
</tr>
<td colspan="4"><textarea name="msg" rows="4" cols="34"></textarea><font face="新细明体"><input type="submit" value="祈愿" style="BORDER: 1 solid black; COLOR: ffffff; BACKGROUND-COLOR: 808080"></font></td>
</tr>
</table>
</center>
</div>
</form>
</td>
</tr>
</table>
<%
Call HtmlEnd
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SLIGHTBOY_Super%>
<html>
<head>
<title>线上管理</title>
<%Call HtmlStart%>
<td align="right" valign="top">
</td>
</tr>
</table>
</center>
</div>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="400" background="pic/bg.jpg" height="300" style="border:1 solid black">
<tr>
<td height=230>
<table border="0" cellpadding="0" cellspacing="0" width="100%" height="180">
<tr>
<td align="center" width="400" style="Filter:alpha(opacity=40);background-color:white">
<form action="wish.asp?action=admin" method="POST">
<div align="center">
<center>
<table border="0" cellspacing="0">
<tr>
<td align="center" colspan="3">管理专区 若非管理员请离开本页</td>
</tr>
<tr>
<td>管理员名称</td>
<td><input type="text" size="15" name="id"></td>
<td> </td>
</tr>
<tr>
<td>管理用密码</td>
<td><input type="password" size="15" name="passid"></td>
<td><input type="submit" value="确定" style="HEIGHT:22PX;BACKGROUND-COLOR:<%=trcolor%>;BORDER:1 SOLID BLACK"></td>
</tr>
</table><%=Session("BottleAdmin")%><%=Session("admin")%>
</center>
</div>
</form>
</td>
</tr>
</table>
<%
HtmlEnd
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub HtmlStart%>
<html>
<head>
<title><%=title%></title>
<%Call HtmlStyle%>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
</head>
<body bgcolor="<%=trcolor1%>" text="<%=trcolor2%>" background="<%=bggif%>">
<DIV ID="topdeck" CLASS="popper"> </DIV>
<SCRIPT>
var nav = (document.layers);
var iex = (document.all);
var skn = (nav) ? document.topdeck : topdeck.style;
if (nav) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = get_mouse;
function pop(msg,bak)
{
var content ="<TABLE WIDTH=130 BORDER=0 CELLPADDING=2 CELLSPACING=2 BGCOLOR=#808080><TR><TD><FONT COLOR=#FFFFFF>"+msg+"</CENTER></FONT></TD></TR></TABLE>";
if (nav)
{
skn.document.write(content);
skn.document.close();
skn.visibility = "visible";
}
else if (iex)
{
document.all("topdeck").innerHTML = content;
skn.visibility = "visible";
}
}
function get_mouse(e)
{
var x = (nav) ? e.pageX : event.x+document.body.scrollLeft;
var y = (nav) ? e.pageY : event.y+document.body.scrollTop;
skn.left = x - 60;
skn.top = y+20;
}
function kill()
{
skn.visibility = "hidden";
}
</SCRIPT>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" width="400">
<tr>
<td><a href="wish.asp"><img src="pic/b1.gif" width="50" height="20" border=0></a><a href="javascript:history.back()"><img src="pic/b2.gif" width="50" height="20" border=0></a></td>
<%End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub HtmlEnd
%>
</td>
</tr>
<tr>
<td valign="bottom" height=70><a href="wish.asp?action=add"><img src="pic/wish.gif" alt="祈愿" width="72" height="64" border=0></a></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</form>
</body>
</html>
<%
End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub HtmlStyle%>
<STYLE TYPE="text/css">
<!--
body,td,input,select {font-family:新细明体;font-size:9pt;}
textarea,input,button {font-family:新细明体;font-size:9pt;border:1 solid <%=tdcolor%>;background-color:<%=trcolor%>;color:<%=tdcolor%>}
a:hover { font-family:新细明体;text-decoration:underline; color:<%=trcolor%>;}
a { font-family:新细明体;text-decoration:none; color:<%=tdcolor%>;}
body{overflow:scroll;overflow-x:hidden}
.popper{position : absolute;visibility : hidden;}
//-->
</style>
<%End Sub
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Sub Error(msg)
Call HtmlStart
Response.Write "<td align=""right"" valign=""top"">"&chr(13)&_
"</td>"&chr(13)&_
"</tr>"&chr(13)&_
"</table>"&chr(13)&_
"</center>"&chr(13)&_
"</div>"&chr(13)&_
"<div align=""center"">"&chr(13)&_
"<center>"&chr(13)&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""400"" background=""pic/bg.jpg"" height=""300"" style=""border:1 solid black"">"&chr(13)&_
"<tr>"&chr(13)&_
"<td height=230>"&chr(13)&_
"<p align=center><br><br><font color=D00000>"&msg&"</font></p>"
Call HtmlEnd
Response.End
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -