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

<%
chk_log_usr()
conn.open constr
module=trim(SafeRequestform("module"))
dbname=trim(SafeRequestform("dbname"))
sqnme=dbname
if module="" or dbname="" then
call errorpage(-2,"对不起，请选择您需要升级的数据库！")
end if
query="select * from v_sqllst where sq_nme='"&dbname&"' and sq_unme='"&session("usrname")&"'"

rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，您所选择的数据库不存在或者您无权执行此操作！")
end if

if rs("sq_regtpe")<>1 then
call errorpage(-2,"对不起，试用数据库无法使用升级功能！")
end if
if rs("sq_regstt")<>1 then
call errorpage(-2,"对不起，您所选择的数据库不处在正常状态，无法操作！")
end if
if rs("sq_exptme")<=now() then
call errorpage(-2,"对不起，您的数据库已过期，请先续费！")
end if
buyid=rs("sq_id")
rs.close
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''具体操作
select case module
case "prd"

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''表单处理 
   substrContent = "entryclass:sql_odr"&Vend
   substrContent =substrContent& "entrytype:prd"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "dbname:" &dbname& Vend
   substrContent = substrContent & "newprd:"& trim(SafeRequestform("newprd")) & Vend
   substrContent = substrContent & "." & Vend

end select

   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/sql_mng/sql_upd.asp?sqnme=" & sqnme)
   Else
      call errorpage(-2,doresult)
   end if

''''''''''''''''''''''''
%>
