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

📄 mailpay.asp

📁 一个非常优秀的自动建站程序
💻 ASP
字号:
<%
MailID = Request("MailID")
if (MailID="") then Response.Redirect ("error.asp?id=001")
%>
<!--#include file="top.asp"-->
<!--#include file="checkpost.asp"-->
<table width="100%" align="center" bgcolor="#cccccc" border="0" cellpadding="5" cellspacing="1">
<tr>
<td align=center bgcolor="#FFFFFF"><br>
<%
if Request("Action")="Buy" then
'此模块是进行站点的续费操作
if Request.form("Years")<0 then Response.Redirect("error.asp?id=007")
if Money+1<Request.form("Years")*Request.form("Price") then Response.Redirect("error.asp?id=007")
set rs=server.createobject("adodb.recordset")
sql="select Money from [Agent_User] where ID=" & session("ID")
rs.open sql,conn,1,3
if rs.bof and rs.eof then
Response.Redirect("error.asp?id=006")
else
rs("Money")=(rs("Money"))-(Request.form("Years")*Request.form("Price"))
rs.update
end if
rs.close
set rs=server.createobject("adodb.recordset")
sql="select * from [Mail_OK] where MailID=" & MailID & " and UserID=" & session("ID")
rs.open sql,conn,1,3
if rs.bof and rs.eof then Response.Redirect("error.asp?id=003")
MailName=rs("MailName")
rs("EndDate")=rs("EndDate")+(Request.form("Years")*365)
rs.update
rs.close
sql="select * from [BuyLog_List] where (BuyLogID is null)"
rs.open sql,conn,1,3
rs.addnew
rs("UserID")=session("ID")
rs("BuyLogSum")=-(Request.form("Years")*Request.form("Price"))
rs("BuyLogMoney")=Money-(Request.form("Years")*Request.form("Price"))
rs("BuyLogDate")=now
rs("BuyLogOther")="自助续费 " & MailName &" 邮件系统, " & Request.form("Years") & " 年。"
rs.update
rs.close
Response.Redirect("Maillist.asp")
else
set rs=server.createobject("adodb.recordset")
sql="select MailId,UserID,MailName,MailSize,MailNum from [Mail_OK] where MailID=" & MailID & " and UserID=" & session("ID")
rs.open sql,conn,1,3
if rs.bof and rs.eof then Response.Redirect("error.asp?id=003")
set rs1=server.createobject("adodb.recordset")
sql1="select * from [Mail_List] where MailName='" & rs("mailName")&"'"
rs1.open sql1,conn,1,3
%>
<form method="POST" action="MailPay.asp?Action=Buy&MailId=<%=MailID%>">
<table align=center width=150>
<tr>
 <td>商品名称</td>
 <td><%=rs("mailName")%></td>
</tr>
<tr>
 <td>商品价格</td>
 <td><%=rs1("Price" & Grade)%> 元/年</td>
</tr>
<tr>
 <td>购买年限</td>
 <td><select size="1" name="Years">
<option value="1" selected>1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>年</td>
</tr>
<tr>
<input type="hidden" name="Price" value="<%=rs1("Price" & Grade)%>">
<td colspan="2" >&nbsp;&nbsp;<input type="submit" value=" 下 一 步 " name="B1" style="font-size: 9pt; COLOR: #ffffff; height:20px;background-color:#568ac2;" onMouseOver ="this.style.backgroundColor='#77A3D2'" onMouseOut ="this.style.backgroundColor='#568ac2'"></td>
</tr>
</table>
</form>
<%
rs.close
Set rs = Nothing
end if
%>
</td>
</tr>
</table>

</TD></TR></TABLE>
<!--#include file="foot.asp"-->

⌨️ 快捷键说明

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