<!--#include file="inc/conn.asp"-->
<!--#include file="inc/set.asp"-->
<!--#include file="inc/dll.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="sqlx.asp"-->
<html><head><title>点歌祝福面版</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="STYLESHEET" type="text/css" href="img/admin.css">
</head>
<body oncontextmenu="return false">
<table width="98%" align=center border="0" cellpadding="0" cellspacing="0" rules=none class=3d>
<tr class="title"  height="22"><td><b> <img src=img/ie.gif border=0 width=15 height=15 align=absMiddle> 祝福点播面版</b></td></tr>
<% 
if userlogin<>sys then
response.write"<tr><td><br>&nbsp;&nbsp;&nbsp;&nbsp;对不起，您还未登陆，无法使用该会员功能！<br><br><br><br></td></tr></table></body></html>"
response.end
end if
if  request.form("new")<>"" then
lsender=trim(Request.Form("sender"))
lincept=trim(Request.Form("incept"))
lcontent=trim(Request.Form("content"))
lmusicname=trim(Request.Form("musicname"))
lurl=Request.Form("url")
if lincept=""then
	response.write "<script language='javascript'>" & VbCRlf
	response.write "alert('您要送给谁？！');" & VbCrlf
	response.write "history.go(-1);" & vbCrlf
	response.write "</script>" & VbCRLF
    Response.End
end if
if lmusicname=""then
	response.write "<script language='javascript'>" & VbCRlf
	response.write "alert('请输入歌曲名称！');" & VbCrlf
	response.write "history.go(-1);" & vbCrlf
	response.write "</script>" & VbCRLF	
	Response.End
end if
if lurl="" or lurl="http://" then
	response.write "<script language='javascript'>" & VbCRlf
	response.write "alert('请正确输入音乐地址！');" & VbCrlf
	response.write "history.go(-1);" & vbCrlf
	response.write "</script>" & VbCRLF
	Response.End
end if
if lcontent="" then
	response.write "<script language='javascript'>" & VbCRlf
	response.write "alert('请输入祝福语！');" & VbCrlf
	response.write "history.go(-1);" & vbCrlf
	response.write "</script>" & VbCRLF	
	Response.End
end if
if len(lmusicname)>50 then
	response.write "<script language='javascript'>" & VbCRlf
	response.write "alert('歌曲名不能多于50字！');" & VbCrlf
	response.write "history.go(-1);" & vbCrlf
	response.write "</script>" & VbCRLF
	Response.End	
end if
if len(lcontent)>200 then
	response.write "<script language='javascript'>" & VbCRlf
	response.write "alert('祝福语不能多于200字！');" & VbCrlf
	response.write "history.go(-1);" & vbCrlf
	response.write "</script>" & VbCRLF
	Response.End	
end if
set rs=server.CreateObject("adodb.recordset")
rs.open "YC_dg",conn,1,3
rs.addnew
rs("sender")=request.Form("sender")
rs("incept")=request.Form("incept")
rs("url")=request.Form("url")
rs("musicname")=request.Form("musicname")
rs("content")=request.Form("content")
rs("sendtime")=now()
rs.update
rs.close
set rs=nothing
response.write"<script>location.href='?action=end';</script>"
response.end
end if
if request("action")="end" then
response.write"<tr><td><br><br><br>祝福已经送出，请关闭本页！<br><br><br></td></tr></table></body></html>"
response.end
end if
%>
<form method="post" name="form" id="form" onsubmit="return chk();">
<input name="sender" type="hidden"  id="sender"  value="<%=username%>">
<%if request.querystring("id")="" then%>
<tr class=bg height="25"><td>被祝福人：<input name="incept" type="text" id="incept"  class=yecao size=15  <%if request.querystring("user")<>"" then%>value="<%=request.querystring("user")%>" <%end if%>></td></tr>
<tr class=bg height="25"><td>音乐名称：<input name="musicname" type="text" id="musicname" class=yecao size=15></td></tr>
<tr class=bg height="25"><td>音乐地址：<input name="url" type="text" id="url"  class=yecao size=15></td></tr>
<%else%>
<tr class=bg height="25"><td>被祝福人：<input name="incept" type="text" id="incept"  class=yecao size=15></td></tr>
<%
sql="select * from YC_dj where id="&request.querystring("id")
set rs=conn.execute(sql)
title=rs("title")
if title="" then%>
非法参数,警告：请勿尝试！
<%else%>
<input name="musicname" type="hidden"  id="musicname" size=1 maxlength=50 class="box"  value="<%=rs("title")%>"> 
<input name="url" type="hidden" id="url" value="<%=rs("url")%>" size="1" maxlength="100" class="box"> 
<%
end if
rs.close
set rs=nothing
end if%>
<tr class=bg height="25"><td>祝福内容：<input name="content" type="text" id="content"  class=yecao size=15></td></tr>
<tr class=bg height="35"><td>
<input name="new" type="submit" class="adminbutton" id="new" value="发 布">　　　<input name="Submit2" type="reset" class="adminbutton" value="清 空" ></td></tr>
</table> 
</form>
</body></htmL>