<%
'on error resume  next
%>
<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/top.asp" -->
<!--#include virtual="/incs/present.asp" -->
<% chk_log()%>

<%

chk_newpwr 4,0,0
conn.open constr
dbname=trim(SafeRequestform("dbname"))
module=trim(SafeRequestform("module"))
sqnme=dbname
if dbname="" then
call errorpage(-2,"对不起，请选择需要操作的数据库！")
end if
if module="" or  isnull(module) then
call errorpage(-2,"对不起，请选择需要操作的类型！")
end if
module=lcase(module)
query="select * from v_sqllst where sq_nme='"&dbname&"'"
rs.open query,conn,1,1
if rs.recordcount<>1 then
call errorpage(-2,"对不起，该数据库不存在！")
end if
sqid=rs("sq_id")
rs.close

turnurl="/master/pdtmng/sql_mng/sql_adm.asp?sqnme="&sqnme
select case module
case "sql_ctt"
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_ctt"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrContent = substrContent & "sq_copnme_cn:" & trim(SafeRequestform("sq_copnme_cn")) & VEnd
   substrContent = substrContent & "sq_ctt_cn:" & trim(SafeRequestform("sq_ctt_cn")) & VEnd
   substrContent = substrContent & "sq_prv_cn:" & trim(SafeRequestform("sq_prv_cn")) & VEnd
   substrContent = substrContent & "sq_adr_cn:" & trim(SafeRequestform("sq_adr_cn")) & VEnd
   substrContent = substrContent & "sq_cde:" & trim(SafeRequestform("sq_cde")) & VEnd
   substrContent = substrContent & "sq_tel:" & trim(SafeRequestform("sq_tel")) & VEnd
   substrContent = substrContent & "sq_fax:" & trim(SafeRequestform("sq_fax")) & VEnd
   substrContent = substrContent & "sq_eml:" & trim(SafeRequestform("sq_eml")) & VEnd
   substrContent = substrContent & "." & VEnd
case "sql_edta"
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_edta"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrContent = substrContent & "sq_prd:" & trim(SafeRequestform("sq_prd")) & VEnd
   substrContent = substrContent & "sq_regtpe:" & trim(SafeRequestform("sq_regtpe")) & VEnd
   substrContent = substrContent & "sq_sst:" & trim(SafeRequestform("sq_sst")) & VEnd
   substrContent = substrContent & "sq_sze:" & trim(SafeRequestform("sq_sze")) & VEnd
   substrContent = substrContent & "sq_dskqta:" & trim(SafeRequestform("sq_dskqta")) & VEnd
   substrContent = substrContent & "sq_regstt:" & trim(SafeRequestform("sq_regstt")) & VEnd
   substrContent = substrContent & "sq_ftpstt:" & trim(SafeRequestform("sq_ftpstt")) & VEnd
   substrContent = substrContent & "years:" & trim(SafeRequestform("years")) & VEnd
   substrContent = substrContent & "sq_prcstr:" & trim(SafeRequestform("sq_prcstr")) & VEnd
   substrContent = substrContent & "sq_yarcnt:" & trim(SafeRequestform("sq_yarcnt")) & VEnd
   substrContent = substrContent & "sq_addtme:" & trim(SafeRequestform("sq_addtme")) & VEnd
   substrContent = substrContent & "sq_exptme:" & trim(SafeRequestform("sq_exptme")) & VEnd
   substrContent = substrContent & "sq_nme:" & trim(SafeRequestform("sq_nme")) & VEnd
   substrContent = substrContent & "sq_ftpusr:" & trim(SafeRequestform("sq_ftpusr")) & VEnd
   substrContent = substrContent & "sq_nme:" & trim(SafeRequestform("sq_nme")) & VEnd
   substrContent = substrContent & "sq_svrip:" & trim(SafeRequestform("sq_svrip")) & VEnd
   substrContent = substrContent & "sq_ifpay:" & trim(SafeRequestform("sq_ifpay")) & VEnd
   substrContent = substrContent & "sq_cprnme:" & trim(SafeRequestform("sq_cprnme")) & VEnd
   substrContent = substrContent & "content:" & trim(SafeRequestform("content")) & VEnd
   substrContent = substrContent & "." & VEnd
'''''''''''''''''''''''''''''''
case "sql_edtb"
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_edtb"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrContent = substrContent & "sq_bkptme1:" & trim(SafeRequestform("sq_bkptme1")) & VEnd
   substrContent = substrContent & "sq_bkptme2:" & trim(SafeRequestform("sq_bkptme2")) & VEnd
   substrContent = substrContent & "sq_bkptme3:" & trim(SafeRequestform("sq_bkptme3")) & VEnd
   substrContent = substrContent & "sq_bkptme4:" & trim(SafeRequestform("sq_bkptme4")) & VEnd
   substrContent = substrContent & "sq_bkptme5:" & trim(SafeRequestform("sq_bkptme5")) & VEnd
   substrContent = substrContent & "." & VEnd
case "sql_edtc"
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_edtc"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrContent = substrContent & "pstprd1:" & trim(SafeRequestform("pstprd1")) & Vend
   substrContent = substrContent & "pstprd2:" & trim(SafeRequestform("pstprd2")) & Vend
   substrContent = substrContent & "pstprd3:" & trim(SafeRequestform("pstprd3")) & Vend
   substrContent = substrContent & "pstnme1:" & trim(SafeRequestform("pstnme1")) & Vend
   substrContent = substrContent & "pstnme2:" & trim(SafeRequestform("pstnme2")) & Vend
   substrContent = substrContent & "pstnme3:" & trim(SafeRequestform("pstnme3")) & Vend
   substrContent = substrContent & "setnme:" & trim(SafeRequestform("setnme")) & Vend
   substrContent = substrContent & "pstrotprd:" & trim(SafeRequestform("pstrotprd")) & Vend
   substrContent = substrContent & "pstrotnme:" & trim(SafeRequestform("pstrotnme")) & Vend
   substrContent = substrContent & "." & VEnd
'''''''''''''''''''''''''''''''
case "sql_sze"

'''''''''''''''''''''''''''''
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_sze"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrContent = substrContent & "newsze:" & trim(SafeRequestform("newsze")) & VEnd
   substrContent = substrContent & "." & VEnd
case "sql_dela"
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_dela"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrContent = substrContent & "." & VEnd
case "sql_delc"
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_delc"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrContent = substrContent & "." & VEnd
    turnurl="/master/pdtmng/sql_mng/sql_lst.asp"
case "sql_buyfree"
   substrContent = "entryclass:sql_mng"&VEnd
   substrContent =substrContent& "entrytype:sql_buyfree"&VEnd
   substrContent =substrContent& "entryuser:"&entryuser&VEnd
   substrContent =substrContent& "entrypass:"&entrypass&VEnd
   substrContent =substrContent& "agentname:"&agentname&VEnd
   substrContent = substrContent & "dbname:" & dbname & VEnd
   substrcontent = substrcontent & "sq_svrip:" & SafeRequest("sq_svrip") & Vend
   substrcontent = substrcontent & "sq_pss:" & SafeRequest("sq_pss") & Vend
   substrcontent = substrcontent & "sq_sze:" & SafeRequest("sq_sze") & Vend
   substrContent = substrContent & "." & VEnd
    turnurl="/master/pdtmng/sql_mng/sql_idx.asp?sqnme="&sqnme
   case "own"
          substrcontent = "entryclass:sys2_mng" & Vend
          substrcontent = substrcontent & "entrytype:own" & Vend
          substrcontent = substrcontent & "entryuser:" & entryuser & Vend
          substrcontent = substrcontent & "entrypass:" & entrypass & Vend
          substrcontent = substrcontent & "agentname:" & agentname & Vend
          substrcontent = substrcontent & "g_prd:" & SafeRequest("g_prd") & Vend
          substrcontent = substrcontent & "g_pnme:" & SafeRequest("g_pnme") & Vend
          substrcontent = substrcontent & "ifall:" & SafeRequest("ifall") & Vend
          substrcontent = substrcontent & "oldunme:" & SafeRequest("oldunme") & Vend
          substrcontent = substrcontent & "newunme:" & trim(SafeRequest("newunme")) & Vend
          substrcontent = substrcontent & "." & Vend
   turnurl="/master/pdtmng/sql_mng/sql_own.asp?sqnme="&sqnme
end select



  
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( turnurl)
   Else
      call errorpage(-2,doresult)
   end if

 ''''''''''''''''''''''''''''''''''''''''''''''''''''

%>

