<!--#include file="conn.asp" -->
<!--#include file="inc/config.asp" -->
<!--#include file="inc/mail_inc.asp" -->
<!--#include file="inc/usdl.asp" -->
<% user=session("us")
application.lock


'----------购物车资料-----------------------------------------
sql="select * from shop order by id desc"
rs.open  sql,conn,2,3
if not rs.eof then 
id1=rs("id")+100000
else
id1=100000
end if
rs.addnew
rs("bh")=id1
rs("userid")=session("us")
rs("ll")=Request.Form("ll")
hostje1=""
hostje2=""

  if Request.Form("ll")="dns" then
   s=instr(request("dns1"),"#")
   hostje1=left(request("dns1"),s-1)
   hostje2=mid(request("dns1"),s+1,len(request("dns1"))-s)
   rs("jg")=hostje2
   rs("je")=hostje2*Request.Form("sl")
   u_je=hostje2*Request.Form("sl")
   title2="域名/"& Request.Form("dns2")&"."&hostje1
  else
   rs("je")=Request.Form("hostje")*Request.Form("sl")
   rs("jg")=Request.Form("hostje")
   u_je=Request.Form("hostje")*Request.Form("sl")
   title2=request("title")
  end if

rs("sl")=Request.Form("sl")
rs("mc")=title2
rs("email")=session("us_email")
rs.update
rs.close
'----------主机资料-----------------------------------------

if Request.Form("ll")="host" then
  sql="select * from host_shop "
  rs.open sql,conn,2,3
  rs.addnew
  rs("bh")=id1
  rs("mc")=Request.Form("title")
  rs("userid")=session("us")
  rs("ftp")=Trim(Request.Form("ftp"))
  rs("ftp_password")=Request.Form("ftp_password")
  rs("dns")=Trim(Request.Form("dns1"))&"."&Trim(Request.Form("dns2"))
  rs("nx")=Request.Form("sl")
  rs.update 
end if

'----------域名资料-----------------------------------------
if Request.Form("ll")="dns" then
sql="select * from dns_shop "
  rs.open sql,conn,2,3
  rs.addnew
  rs("bh")=id1
  rs("userid")=session("us")
  rs("sl")=Request("sl")
  rs("title")=title2
  rs("dns")=Request.Form("dns2")&"."&hostje1
  rs("name")=Request.Form("name")
  rs("ename")=Request.Form("ename")
  rs("tel")=Request.Form("tel")
  rs("email")=Request.Form("email")
  'rs("tel1")=Request.Form("tel1")
  rs("eunit")=Request.Form("eunit")
  rs("unit")=Request.Form("unit")
  rs("address")=Request.Form("address")
  rs("eaddress")=Request.Form("eaddress")
  rs("cs")=Request.Form("cs")
  rs("cz")=Request.Form("cz")
  rs("sf")=Request.Form("sf")
  rs.update
  rs.close
end if

'----------邮局资料-----------------------------------------
if Request.Form("ll")="mail" then
sql="select * from mail_shop "
  rs.open sql,conn,2,3
  rs.addnew
  rs("bh")=id1
  rs("sl")=Request.Form("sl")
  rs("userid")=session("us")
  rs("title")=Trim(Request.Form("title"))
  rs("dns")="www."&Request.Form("dns")
  rs.update
end if

'----------网站推广-----------------------------------------
if Request.Form("ll")="paget" then
sql="select * from paget_shop "
  rs.open sql,conn,2,3
  rs.addnew
  rs("bh")=id1
  rs("sl")=Request.Form("sl")
  rs("userid")=session("us")
  rs("title")=Trim(Request.Form("title"))
  rs("dlwz")=request("dlwz")
  rs("url")=request("url")
  rs("us")=request("us")
  rs("ps")=request("ps")
  rs("gjz")=request("gjz")
  rs("wzmc")=request("wzmc")
  rs("wzbak")=request("wzbak")
  rs("mail")=request("email")
  rs("name")=request("name")
  rs("address")=request("address")
  rs("tel")=request("tel")
  rs.update
end if

'----------其它产品-----------------------------------------
if Request.Form("ll")="other" then
sql="select * from other_shop "
  rs.open sql,conn,2,3
    rs.addnew
  rs("bh")=id1
  rs("userid")=session("us")
  rs("title")=Trim(Request.Form("title"))
  rs("name")=Trim(Request.Form("name"))
  rs("Company")=Trim(Request.Form("Company"))
  rs("Kind")=Trim(Request.Form("Kind"))
  rs("Scale")=Trim(Request.Form("Scale"))
  rs("address")=Trim(Request.Form("address"))
  rs("tel")=Trim(Request.Form("tel"))
  rs("email")=Trim(Request.Form("email"))
  rs("otherlx")=Trim(Request.Form("otherlx"))
  rs("bak")=Trim(Request.Form("bak"))
 rs.update
end if
application.UnLock()

'----------发送email-----------------------------------------
if jmail_info then
html="<p>"&session("us")&"你好：</p>"
html=html&"<ul><li> 　您在<a href='"&page_url&"' target='_blank'>"&page_name&"</a>订购了以下产品：</li>"
html=html&"</ul><p>　<strong><font color='#006600'>"&request("title")&"　</font></strong></p>"
html=html&"<p> 一共金额 <font color='#FF0000'>￥ "&u_je&"</font></p><p>---------------------------------------------</p>"
html=html&page_shop_html
call SendMail(session("us_email"),"您在"&jmail_Name&"提交的订单!!",html) 
end if

'----------转到购物车-----------------------------------------
Response.redirect "myshop.asp"
%>
























