<!--#include file="conn.asp" -->
<!--#include file="inc/config.asp" -->
<!--#include file="inc/mail_inc.asp" -->
<!--#include file="inc/usdl.asp" -->
<!--#include file="inc/gl1.asp" -->
<% user=session("us")
 id=Trim(Request.Form("id"))
 ftp=Trim(Request.Form("ftp"))
 sl=Trim(Request.Form("sl"))
 call gl(ftp)
 call gl(id)
 j=session("dl")
 
 application.Lock()
 sql="select * from host where id="&request("id")
 rs.open sql,conn,1,1
  if not rs.eof then
   host_title=rs("title")
   host_je=rs("je"&j)
   ftp_auto=rs("ftp_auto")
   ftp_host=rs("ftp_host")
   ftp_path=rs("ftp_path")
   web_ip=rs("web_ip")
   iis_Password=rs("iis_Password")
   iis_UserName=rs("iis_UserName")
  else
  Response.Write("对不起,你所传送的参数不正确..")
  Response.end
  end if
  rs.close
 '查询ftp是否以经存在
  sql="select * from host_shop where ftp='"&ftp&"'"
  rs.open sql,conn,1,1
   if not rs.eof then
    Response.Write("对不起!!ftp用户名以经存在")
	response.end
   end if
   rs.close
  
  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("userid")=user
   rs("bh")=id1
   rs("ll")="host"
   rs("mc")=host_title
   rs("jg")=host_je
   rs("sl")=sl
   rs("je")=host_je*sl
   rs("email")=session("us_email")
   rs.update
   rs.close
   
  sql="select * from host_shop "
  rs.open sql,conn,2,3
  rs.addnew
  rs("bh")=id1
  rs("mc")=host_title
  rs("userid")=session("us")
  rs("ftp")=ftp
  rs("ftp_password")=Request.Form("ftp_password")
  rs("dns")=Trim(Request.Form("dns"))
  rs("nx")=sl
  rs("ftp_auto")= ftp_auto
  rs("ftp_host")= ftp_host
  rs("ftp_path")= ftp_path
  rs("web_ip")  = web_ip
  rs("iis_Password")=iis_Password
  rs("iis_UserName")=iis_UserName
  rs.update 
  rs.close
 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'>"&title&"　</font></strong></p>"
html=html&"<p> 一共金额 <font color='#FF0000'>￥ "&host_je*sl&"</font></p><p>---------------------------------------------</p>"
html=html&page_shop_html
html=html&jmail_qname
call SendMail(session("us_email"),"您在"&jmail_Name&"提交的虚拟主机订单!!",html) 
end if
'----------转到购物车-----------------------------------------
Response.redirect "myshop.asp"
call CloseDatabase
%>





























