<%
response.buffer=false
on error resume next
%>
<!--#include virtual="/incs/config.asp"-->


<%
conn.open constr
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''检验是否登录 
chk_log()
chk_newpwr 1,2,2

%>
<!--#include virtual="/incs/top.asp"-->
   <table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>数据库申请</strong></span></b></font></td>
          <td valign=bottom noWrap align=right 
                        width="75%">&nbsp;</td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5> </td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2 class=menuline></td>
        </tr>
        </tbody> 
      </table>
    </td>
  </tr>
    <tr> 
      <td  colspan=2 valign="top" height="28"> 
        <div align="center"><br>
          <br>
        <br>
        <br>
        <br>
        <table  cellspacing='0' cellpadding='0'><tr><td align='center' valign='middle'><table cellspacing='0' cellpadding='2' style='font-size:9pt;'><tr><td style='border-width:1px; border-style: groove;'><img id='subokk' src="/imgs/submitimg.gif" border='0' width='398' height='4'></td></tr><tr><td style='border-width:0px;' align='center' height='10'></td></tr><tr>
                  <td style='border-width:0px; font-family:宋体; font-size: 9pt;' align='center' height="25"><b>进程处理中，请勿关闭浏览器……</b></td>
                </tr></table></td></tr></table>
        <br>
        <br>
        <br>
        <br>
        <br>
      </div>
      </td>
    </tr>
  </tbody> 
</table>

      <!--#include virtual="/incs/bottom.asp"-->

<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理
sqnme=SafeRequestform("sqnme")
if sqnme="" then
call errorpage(-2,"对不起，参数错误！")
end if
if session("sysclass")>=4 then
query="select * from v_sqllst where sq_nme='"&sqnme&"'"
else
query="select * from v_sqllst where sq_nme='"&sqnme&"' and sq_unme='"& session("usrname")&"'"
end if
rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，该购买不存在或者您无权操作！")
end if
dbname=trim(rs("sq_nme"))
if trim(lcase(rs("sq_unme")))<>trim(lcase(session("usrname"))) then
query="select * from memlst where u_nme='"&rs("sq_unme")&"'"
rs1.open query,conn,1,1
entryuser=rs("sq_unme")
entrypass=trim(rs1("u_pss"))
agentname=session("usrname")
agentpass=session("usrpass")
rs1.close
end if
rs.close

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
   substrContent = "entryclass:sql_odr"&Vend
   substrContent =substrContent& "entrytype:pay"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "proid:"& trim(SafeRequest("proid")) & Vend
   substrContent = substrContent & "ftpuser:"& dbname& Vend
   substrContent = substrContent & "ftppass:"& trim(SafeRequest("ftppass")) & Vend
   substrContent = substrContent & "years:" & trim(SafeRequest("years")) & Vend
   substrContent = substrContent & "sq_prcstr:" & trim(SafeRequest("sq_prcstr")) & Vend
   substrContent = substrContent & "sq_plc:" & trim(SafeRequest("sq_plc")) & Vend
   substrContent = substrContent & "bmode:3"& Vend
   substrContent = substrContent & "sq_copnme_cn:" & trim(SafeRequest("sq_copnme_cn")) & Vend
   substrContent = substrContent & "sq_ctt_cn:" & trim(SafeRequest("sq_ctt_cn")) & Vend
   substrContent = substrContent & "sq_prv_cn:" & trim(SafeRequest("sq_prv_cn")) & Vend
   substrContent = substrContent & "sq_adr_cn:" & trim(SafeRequest("sq_adr_cn")) & Vend
   substrContent = substrContent & "sq_cde:" & trim(SafeRequest("sq_cde")) & Vend
   substrContent = substrContent & "sq_tel:" & trim(SafeRequest("sq_tel")) & Vend
   substrContent = substrContent & "sq_fax:" & trim(SafeRequest("sq_fax")) & Vend
   substrContent = substrContent & "sq_eml:" & trim(SafeRequest("sq_eml")) & Vend
   substrContent = substrContent & "newprice:"& SafeRequestform("newprice") & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
      If left5= "10000" Then
   session("sql_doresult")=doresult
    ''''''''''''''''''''''''''''邮件发送		
%>
<!--#include file="sql_snd.asp"-->
<%
''''''''''''''''''''''''''''''''''''''''''''
   
   	Response.Write "<script language='javascript'>"&vbcrlf
	Response.Write "location='sql_rez_ok.asp';"&vbcrlf
	Response.Write "</script>"&vbcrlf

   Else
      call errorpage(-2,doresult)
   end if
				
%>