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

📄 savegoods.asp

📁 一个简单的ASP做的定单提交程序,有后台管理,可在后台查看相观提交信息
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT"%>
<!-- #include file=include/setup.inc -->
<html>
<head>
<meta HTTP-EQUIV="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="html/guest.css">
<style type="text/css">
<!--
body {
	background-color: #fffff0;
}
-->
</style><title><%=guestTitle%></title></head>
<body text=000000 leftmargin="20" style="background-color: #ffffff">
<div align="center">
  <table border="1" cellpadding="3" cellspacing="0" style="border-collapse: collapse" bordercolor="#6699FF" width="40%" id="AutoNumber2" height="96">
    <tr>
      <td width="100%" height="15" background="dh.gif">
        <p align="center"><font size="2"><strong>在线订单</strong></font></td>
    </tr>
    <tr>
      <td width="100%" height="16" bgcolor="#FFFFFF"><p>
          <%
rem -----------------------
rem ---显示留言成功函数----
rem -----------------------
function guestAccussful
  if Goods=1 then
  	response.write "<strong><font size=4>发表成功!</font></strong><br>"
	response.write "<br>你只是在本站留了言,没有订货.<br>"
  else
      	response.write "<br>你订购是"&chooseGoods(Goods-1)
      	response.write "<br>订货成功!请等待本站的回复.<br>"
  end if
  if len(title)>0 then
  	response.write "<br>公司:<strong>"&server.htmlencode(replace(title,"''","'"))&"</strong>"
  end if
  if len(guest)>0 then
        guest=replace(guest,"<","&lt;")
        guest=replace(guest,">","&gt;")
        guest=replace(guest,chr(34),"&quot;")
  	response.write "<hr size=1>留言内容:<pre>"&replace(guest,"''","'")&"<hr size=1></pre>"
  end if
  if len(name)>0 then
  	response.write "<br>您的姓名:"&server.htmlencode(replace(name,"''","'"))
  end if
  if len(homepage)>0 then
  	response.write "<br>您的电话:"&server.htmlencode(replace(homepage,"''","'"))&"</a>"
  end if
  if len(mail)>0 then
  	response.write "<br>您是地址:"&server.htmlencode(replace(mail,"''","'"))&"</a>"
  end if
  if len(address)>0 then
  	response.write "<br>电子邮箱:"&server.htmlencode(replace(address,"''","'"))
  end if
  
  response.write "<br>时间:"&ndatetime
end function

rem -----------------------
rem ---显示成功函数结束----
rem -----------------------

name=request("name")
if len(name)>50 then
   response.write "你的名字这么长呀?我记不住啦!!"
   response.end
end if

title=request("title")
if len(title)>200 then
   response.write "你的主题好长呀?我撑不下了!!"
   response.end
end if

if title="" then
   response.write "错误!你要为提供您的公司地址才对呀!!"
   response.end
end if

homepage=request("homepage")
if len(homepage)>400 then
   response.write "你的主页太长了,填不下了!!申请个二级域名之类的吧!!"
   response.end
end if

Goods=request("Goods")
if isNumeric(Goods)>=0 then
   Goods=0
else
   Goods=Cint(Goods)
end if
if Goods<1 or Goods>chooseNum then Goods=1

mail=request("mail")
if len(mail)>100 then
   response.write "你的邮箱地址太长了,填不下了!!"
   response.end
end if

address=request("address")
if len(address)>200 then
   response.write "你的地址太长了,填不下了!!"
   response.end
end if

guest=request("guest")
if len(address)>3200 then
   response.write "你的留言内容太长了,截掉一些内容或分成多次留言吧!"
   response.end
end if
%>
          <!-- #include file=database.asp -->
          <%
ndatetime=now()
if name<>"" then name=replace(name,"'","''")
if title<>"" then title=replace(title,"'","''")
if homepage<>"" then homepage=replace(homepage,"'","''")
if mail<>"" then mail=replace(mail,"'","''")
if address<>"" then address=replace(address,"'","''")
if guest<>"" then guest=replace(guest,"'","''")
con.Execute " INSERT INTO guest " _
        & "(guesttime,name,title,homepage,product,mail,address,guest) VALUES " _
	& "('"&ndatetime&"', '" & name &"','" & title & "','"& homepage &"'," & Goods &",'" & mail &"','" & address &"','" & guest &"');"
con.close
set con=nothing
guestAccussful()
%>
        </p>
          <p align="center"><span class="p9"></span></p></td>
    </tr>
    <tr>
      <td height="16" bgcolor="#FFFFFF"><div align="center"><span class="p9"><font color="#000000">【</font><a href="Goods.asp"><font color="#000000">返回订单</font></a><font color="#000000">】</font></span></div></td>
    </tr>
  </table>
</div>
<div align="center"><span class="p9"> </span></div>
</body>
</html>

⌨️ 快捷键说明

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