<!--#include file="articleconn.asp"-->
<!--#include file=inc/Jmail.asp -->
<%
t_id=request("id")

sql="select * from learning where articleid="&t_id
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
picture=rs("images1")
rs.close
set rs=nothing
conn.close
set conn=nothing



titletext=request.form("titletext")
'picture=request.form("picture")
midifile=request.form("midifile")
bgcolor=request.form("bgcolor")
textcolor=request.form("textcolor")
background=request.form("background")
toname=request.form("toname")
mail=request.form("mail")
myname=request.form("myname")
replyto=request.form("replyto")
message=request.form("message")
message = Replace(message, CHR(10), "<BR>")
method=request.form("method")


if toname="" or mail="" or myname="" or replyto="" then
response.write("<script>alert('信息没有填写全');history.go(-1)</script>")
end if
%>
<%
RANDOMIZE
tt=INT((99999999+10000001)*RND)
%>
<%password=tt%>


<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=gb_2312-80">
<meta name="GENERATOR" content="Namo WebEditor v4.0(Trial)">
<title>凭歌寄情</title>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body bgcolor=#9E9E9E text=<%=textcolor%>>
<%
if method="preview_card" then
'方法为预览时
%>
<table border="0"  align="center" 　cellpadding="10" bgcolor="#FFFFFF" cellpadding="10" cellspacing="1">
  <tr> 

    <td width="368" rowspan="2" bgcolor="#9AA46A"> 
      <p> 
        <%if right(   trim(picture),3  )="swf" then%>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
 id=Movie1 width=400 height=300 vspace="0" hspace="0" border="0" align="middle">
          <param name=movie value=<%=picture%>>
          <param name=quality value=high>
          <param name=bgcolor value=#FFFFFF>
          <embed src=<%=picture%> quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash">
          </embed> 
        </object> 
        <%else%>
        <object id=video1 classid=" clasid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" 
      width=400 height=300 align="middle">
          <param name="_ExtentX" value="7938">
          <param name="_ExtentY" value="2646">
          <param name="AUTOSTART" value="1">
          <param name="SHUFFLE" value="0">
          <param name="PREFETCH" value="0">
          <param name="NOLABELS" value="0">
          <param name="LOOP" value="0">
          <param name="NUMLOOP" value="0">
          <param name="CENTER" value="0">
          <param name="MAINTAINASPECT" value="0">
          <param name="BACKGROUNDCOLOR" value="#000000">
          <param name="CONTROLS" value="ControlPanel,StatusPanel">
          <param name="SetWantErrors" value="true">
          <param name=movie value=<%=picture%>>
          <embed        
                 src=<%=picture%>         
               type="audio/x-pn-realaudio-plugin" console="chip1"                
         controls="imagewindow" width=400 height=300 autostart=true align="middle">
          </embed> 
        </object><br>
        <%end if%>
        <b><font color="#CC0000"><%=titletext%></font></b> <b><%=toname%></b>：您好，这是<a href="mailto:<%=replyto%>"><%=myname%></a>送给你的一首歌，愿你喜欢。<br>
        <b>＝＝　情感寄语　＝＝</b><br>
        <%=message%><br>
      </td>
  </tr>
  <tr> </tr>
</table>
  <center><basefont class="font"><br>


  <form action="addcard.asp?id=<%=t_id%>" method="post">
  <basefont class="font"><input type="hidden" size="15" name="titletext" value="<%=titletext%>">
  <input type="hidden" size="15" name="picture" value="<%=picture%>">
  <input type="hidden" size="15" name="midifile" value="<%=midifile%>">
  <input type="hidden" size="15" name="bgcolor" value="<%=bgcolor%>">
  <input type="hidden" size="15" name="textcolor" value="<%=textcolor%>">
  <input type="hidden" size="15" name="background" value="<%=background%>">
  <input type="hidden" size="15" name="toname" value="<%=toname%>">
  <input type="hidden" size="15" name="mail" value="<%=mail%>">
  <input type="hidden" size="15" name="myname" value="<%=myname%>">
  <input type="hidden" size="15" name="replyto" value="<%=replyto%>">
  <input type="hidden" size="15" name="message" value="<%=message%>">
  <input type="hidden" size="15" name="method" value="send_card">
    <INPUT  TYPE="button"  VALUE="修改"  OnClick="history.go( -1 );return true;">
    <input  type="submit" value="送出">
</form>


<basefont class="font"></center>
<%end if%>
<%
if method="send_card" then

'connstr="DBQ="+server.mappath("tu.asp")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
sql="Insert into data(titletext,picture,midifile,bgcolor,textcolor,background,toname,mail,youname,replyto,addtime,pass,message,myname) values ('"&titletext&"','"&picture&"','"&midifile&"','"&bgcolor&"','"&textcolor&"','"&background&"','"&toname&"','"&mail&"','"&myname&"','"&replyto&"','"&now()&"','"&password&"','"&message&"','"&myname&"')"
conn.execute (sql)
set rs=server.createobject("adodb.recordset")
sql = "select * from data"
rs.Open SQL,conn,1,2



strBody=strBody & "<html>"
strBody=strBody & "<head>"
strBody=strBody & "<title>点歌通知</title>"
strBody=strBody & "<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>"
strBody=strBody & "</head>"
strBody=strBody & "<body bgcolor='#FFFFFF'>"
strBody=strBody & "<table width='80%' border='0' align='center'>"
strBody=strBody & "<tr><td>"
strBody=strBody & "<div align='center'>在51center.com凭歌寄情栏目有人为您点了一首歌</div>"
strBody=strBody & "</td></tr>"
strBody=strBody & "<tr><td>"
strBody=strBody & "<b>"&toname&"</b> 您好! </td></tr>"
strBody=strBody & "<tr><td><b>"&myname&"</b> 在 "&now()&" 为您点了一首歌!</td></tr>"
strBody=strBody & "<tr><td> <a href=http://51center.com/musics/getcard.asp?id="&password&" target=_blank>点击这里播放歌曲</a></td></tr>"
strBody=strBody & "</td></tr>"
strBody=strBody & "<tr><td>您的歌曲无忧中心只保留30天，请及时收听！</td></tr>"
strBody=strBody & "</table>"
strBody=strBody & "</body>"
strBody=strBody & "</html>"

Call SendMail(mail,"凭歌寄情栏目有人为您点了一首歌",strBody)
%>

<table border="0" align="center" cellpadding="10" cellspacing="1" bgcolor="#FFFFFF">
  <tr> 
    <td width="368" rowspan="2" bgcolor="#9AA46A"> 
      <p align="left"> 
        <%if right(   trim(picture),3  )="swf" then%>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
 id=Movie1 width=400 height=300 vspace="0" hspace="0" border="0" align="middle">
          <param name=movie value=<%=picture%>>
          <param name=quality value=high>
          <param name=bgcolor value=#FFFFFF>
          <embed src=<%=picture%> quality="high" bgcolor="#FFFFFF" type="application/x-shockwave-flash">
          </embed> 
        </object> 
        <%else%>
        <object id=video1 classid=" clasid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA" 
      width=400 height=300 align="middle">
          <param name="_ExtentX" value="7938">
          <param name="_ExtentY" value="2646">
          <param name="AUTOSTART" value="1">
          <param name="SHUFFLE" value="0">
          <param name="PREFETCH" value="0">
          <param name="NOLABELS" value="0">
          <param name="LOOP" value="0">
          <param name="NUMLOOP" value="0">
          <param name="CENTER" value="0">
          <param name="MAINTAINASPECT" value="0">
          <param name="BACKGROUNDCOLOR" value="#000000">
          <param name="CONTROLS" value="ControlPanel,StatusPanel">
          <param name="SetWantErrors" value="true">
          <param name=movie value=<%=picture%>>
          <embed        
                 src=<%=picture%>         
               type="audio/x-pn-realaudio-plugin" console="chip1"                
         controls="imagewindow" width=400 height=300 autostart=true align="middle">
          </embed> 
        </object><br>
        <%end if%>
        <b><font color="#CC0000"><%=titletext%> </font></b> <b><%=toname%></b>：您好，这是<a href="mailto:<%=replyto%>"><%=myname%></a>送给你的一首歌，愿你喜欢。<br>
        <b>＝＝　情感寄语　＝＝</b><br>
        <%=message%> <br>
      </td>
  </tr>
  <tr> </tr>
</table>
  
<br>
<basefont class="font"> 
<table width="420" align="center" border=0 cellpadding="0" cellspacing="1" height="20" bgcolor=#FFFFFF>
    <td bgcolor="#FF9900" height="25"> 
      <p align="center">您点送的歌曲已经通知<%=toname%>的<%=mail%>邮箱,谢谢使用。 
    </td></table>
<br>
<br>
</body>
</html>

<%End if
   set rs=nothing
'   conn.close
   set conn=nothing%>