<!--#include file="zqplp.asp"-->
<!--#include file="inc/char.inc"-->
<!--#include file="live.txt"-->

<%
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'JR Wish Board Bottle
'(日式祈愿板或少女祈愿版) 之 祈愿漂流瓶
'程序作者 SLIGHTBOY
'版权所有 SLIGTHBOY
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'请勿修改本程序!
'如果确有特殊原因，需要修改 请联系 SLIGHTBOY webmaster@slightboy.com
'一旦发现有违反协议者，本站不会提供任何技术支持，并且不能得程序的后续版本和本站出品的其他程序。
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'声明变量
Dim PROName,PROEType,PROCNAME,VerNum,VerUpdate,PROVer,PROType,PROMaster,PROPublish,PROCopyRight,CopyRightInfo,JavaCopyRightInfo


PROName="JR Wish Board Bottle"
PROEType="Single-User Personnal"
PROCNAME="(日式祈愿板或少女祈愿版) 之 祈愿漂流瓶"
VerNum="2.0"
VerUpdate="020325"
PROVer=VerNum&" U "&VerUpdate
PROType="个人用户正式版 (简体中文)"
PROMaster="SLIGHTBOY"
PROPublish=" HTTP://WWW.SLIGHTBOY.COM"
PROCopyRight="CopyRight (c) 2000-2002 SLIGHTBOY.com.All Rights Reserved"
PROCopyRightInfo="请尊重著作者劳动 保留以上版权信息 谢谢合作"

CopyRightInfo = PROName&chr(13)&_
               "中文名字："&PROCNAME&chr(13)&_
               "版本号："&PROVer&chr(13)&_
               "版本类型："&PROType&chr(13)&_
               "程序制作："&PROMaster&chr(13)&_
               "程序唯一正式发布地址:"&PROPublish&chr(13)&_
               PROCopyRight&chr(13)&_
               PROCopyRightInfo

JavaCopyRightInfo = PROName&"\n"&_
               "中文名字："&PROCNAME&"\n"&_
               "版本号："&PROVer&"\n"&_
               "版本类型："&PROType&"\n"&_
               "程序制作："&PROMaster&"\n"&_
               "程序唯一正式发布地址:"&PROPublish&"\n"&_
               PROCopyRight&"\n"&_
               PROCopyRightInfo

IF err>0 Then
 Call HtmlStart
 Response.Write "<p align=Center><font color=red>发生错误!</font></p>"
 Call HtmlEnd
 Response.End
End IF

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%>">
<%
'建立数据库连接
Set Conn=server.CreateObject("adodb.connection")
Conn.Open "provider=microsoft.jet.oledb.4.0; data source="&DBpath
'建立活动游标
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
Do While not Rs.eof and i<=Show
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="&i&" delay=0>"&chr(13)&_
"<a href=""wish.asp?action=click&number="&Rs("id")&""" ONMOUSEOVER=""pop('今年"&Rs("age")&"岁住在"&Rs("live")&"的"&Rs("name")&sexpic&"许了一个愿...<br>有"&Rs("counter")&"人看过','"&trcolor&"')"";  ONMOUSEOUT=""kill()"">"&chr(13)&_
"<img src=""pic/c"&Rs("birth")&".gif"" border=0></a>"&chr(13)&_
"</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>
<%
'建立数据库连接
Set Conn=server.CreateObject("adodb.connection")
Conn.Open "provider=microsoft.jet.oledb.4.0; data source="&DBpath
'建立活动游标
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")&",于"&Rs("date")&" 留下此愿"
Else
info= Rs("age")&"岁的 "&Rs("name")&" "&sexpic&",来自"&Rs("live")&",于"&Rs("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 StrEmail<>"" Then
'   IF chkemail(StrEmail)=False Then Error("请输入正确信箱地址")
'End IF

Set Conn=server.CreateObject("adodb.connection")
Conn.Open "provider=microsoft.jet.oledb.4.0; data source="&DBpath
Sql = "Select TOP 1 * From wish Order BY id DESC"
Set Rs = Server.CreateObject("ADODB.Recordset")
Rs.Open Sql,conn,3,3
IF Rs.Eof Then
Rs.AddNew
Rs("name")=Trim(Replace(Request.Form("name"),"'",""))
Rs("sex")=Request.Form("sex")
Rs("age")=Request.Form("age")
Rs("birth")=Request.Form("birth")
Rs("email")=StrEmail
Rs("live")=Request.Form("live")
Rs("msg")=msg
Rs("date")=now+time_ctrl
Rs.Update
Else
 IF Rs("msg")=msg Then
 Error("请勿重覆登录")
 Else
 Rs.AddNew
 Rs("name")=Request.Form("name")
 Rs("sex")=Request.Form("sex")
 Rs("age")=Request.Form("age")
 Rs("birth")=Request.Form("birth")
 Rs("email")=StrEmail
 Rs("live")=Request.Form("live")
 Rs("msg")=msg
 Rs("date")=now+time_ctrl
 Rs.Update
 End IF 
End IF
Rs.Close
Set Rs=Nothing
conn=Close
Set conn=Nothing

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"),",")
Set Conn=server.CreateObject("adodb.connection")
Conn.Open "provider=microsoft.jet.oledb.4.0; data source="&DBpath
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="30"></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>&nbsp;</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>
</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">&nbsp;</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>
<p align="center"><IMG SRC="<%=titlegif%>" ALT="<%=title%>" BORDER=0></p>
<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><a href="wish.asp?action=super"><img src="pic/b3.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>
<%
Response.Write "<!-- 请勿删除 版权声明 -->"&chr(13)&_
"<div align=""center""><center>"&chr(13)&_
"<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""400"">"&chr(13)&_
"<tr>"&chr(13)&_
"<td align=""right"">"&chr(13)&_
""&chr(13)&_
"<script>"&chr(13)&_
"var id="""&PROName&""";"&chr(13)&_
"var type="""&PROEType&""";"&chr(13)&_
"var ver="""&VerNum&""";"&chr(13)&_
"var img=""slightboy"";"&chr(13)&_
"var referer=""http://"&Request.ServerVariables("HTTP_HOST")&Request.ServerVariables("Script_Name")&""";"&chr(13)&_
"var copyrightinfo="""&JavaCopyRightInfo&""";"&chr(13)&_
"</script>"&chr(13)&_
""&chr(13)&_
"</td>"&chr(13)&_
"</tr>"&chr(13)&_
"</table>"&chr(13)&_
"</center>"&chr(13)&_
"</div>"&chr(13)&_
"<!-- 请勿删除 版权声明 -->"&chr(13)
%>
</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
%>
<p align="center">
<font color="#FF0000">选择其他许愿方式：</font><a href="../wish1/wish.asp"><font color="#008000">漂流瓶</font></a> <a href="wish.asp"><font color="#008000">漂浮云</font></a>
<bgsound src=pic/music.mid>