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

📄 addcard.asp

📁 不错的ASP整站源代码。在IIS环境下运行都没有问题
💻 ASP
字号:
<!--#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="css/style.css">

  <BGSOUND SRC=<%=midifile%> LOOP=-1>
</head>
<body bgcolor=<%=bgcolor%> text=<%=textcolor%>>
<%
if method="preview_card" then
'方法为预览时
%>
<table border="0"  width="618"  background="<%=background%>" align="center" style="border-style: solid; border-width: 2">
  <tr><td width="23" rowspan="2">
  <center>
  <table align="left"><tr></tr></table>
  </center></td><td width="368" rowspan="2">
  <p align="left"><br>
  <br>
  <%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">
</OBJECT>
  <%else%>
  <img src=<%=picture%> ><br>
  <%end if%>
  <br><center>
  <%=titletext%></center><br>

    </td><td width="207" valign="top">
  <img border="0" src="images/long2000.gif" width="74" height="98" align="right">
    </td></tr>
  <tr>
    <td width="207" valign="top">
  收件人:<%=toname%><br>
  <br>
  <font style='FONT-SIZE: 10.5pt'><%=message%></font><br>
  <br>
  <br>
  <br>
  发件人:<a href="mailto:<%=replyto%>"><B><%=myname%></b></a>
    </td>
  </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'>您有一张贺卡</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://www.love2net.com/love/card/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,"您有一张来自X情网的贺卡!",strBody)
%>

<table border="0"  width="618"  background="<%=background%>" align="center" style="border-style: solid; border-width: 2">
  <tr><td width="23" rowspan="2">
  <center>
  <table align="left"><tr></tr></table>
  </center></td><td width="368" rowspan="2">
  <p align="left"><br>
  <br>
  <%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">
</OBJECT>
  <%else%>
  <img src=<%=picture%> ><br>
  <%end if%>
  <br><center>
  <%=titletext%></center><br>

    </td><td width="207" valign="top">
  <img border="0" src="images/long2000.gif" width="74" height="98" align="right">
    </td></tr>
  <tr>
    <td width="207" valign="top">
  收件人:<%=toname%><br>
  <br>
  <font style='FONT-SIZE: 10.5pt'><%=message%></font><br>
  <br>
  <br>
  <br>
  发件人:<a href="mailto:<%=replyto%>"><B><%=myname%></b></a>
    </td>
  </tr>
  </table>
  <basefont class="font"><br>
  <table width="400" align="center" bgcolor=<%=bgcolor%> border=0><td>
	<p align="center">贺卡已经寄往&nbsp;<%=toname%>&nbsp;的&nbsp;<%=mail%>&nbsp;信箱,<br>此贺卡只保留30天。</td></table>
</body>
</html>

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

⌨️ 快捷键说明

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