<%@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">
</head>
<body text=000000 bgcolor=000000 leftmargin="20" style="background-color: #ffffff">
<%
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(QQ)>0 then
  	response.write "<br>您的qq："&server.htmlencode(replace(QQ,"''","'"))
  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

QQ=request("QQ")
if len(name)>20 then
   response.write "你的QQ这么长呀?我记不住啦!!"
   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 QQ<>"" then QQ=replace(QQ,"'","''")
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,QQ,title,homepage,product,mail,address,guest) VALUES " _
	& "('"&ndatetime&"', '" & name &"','" & QQ &"','" & title & "','"& homepage &"'," & Goods &",'" & mail &"','" & address &"','" & guest &"');"
con.close
set con=nothing
guestAccussful()
%>
<p>
 <span class="p9">
 <font color="#000000">【</font><a href="Goods.asp"><font color="#000000">返回订购单</font></a><font color="#000000">】 </font>
</span>
</body>
</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>