<!--#include virtual="/incs/config.asp" -->
<%
chk_log()
chk_newpwr 4,0,0
conn.open constr
module=trim(SafeRequest("module"))
pid=SafeRequest("pid")

select case module
case "prc_edt_all" '产品类型添加

   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_edt_all"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "p_cls:" &trim(SafeRequest("p_cls"))& Vend
   substrContent = substrContent & "ptid:" &trim(SafeRequest("ptid"))& Vend
ptid=SafeRequest("ptid")
if not chk_int(ptid) then
      call errorpage(-2,"对不起，产品类型编号不正确！ptid="&ptid)
end if
if ptid<>0 then
query="select * from v_pdtlst  where pt_id="&ptid&"  order by g_odr"
else
query="select * from v_pdtlst    order by g_odr"
end if
rs.open query,conn,1,1
while not rs.eof 
for i=1 to 8
   substrContent = substrContent & ""&rs("g_prd")&"_"&cstr(i)&":" &SafeRequest(rs("g_prd")&"_"&cstr(i))& Vend
   substrContent = substrContent & "t"&rs("g_prd")&"_"&cstr(i)&":" &SafeRequest("t"&rs("g_prd")&"_"&cstr(i))& Vend
next   
rs.movenext
wend
rs.close
   substrContent = substrContent & "." & Vend
   pageturn="/master/sysmng/prc_mng/prc_edt.asp?c_cls="&SafeRequest("p_cls")&"&ptid="&ptid
case "prc_edt_single"

   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_edt_single"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "p_cls:" &trim(SafeRequest("p_cls"))& Vend
   substrContent = substrContent & "p_prd:" &trim(SafeRequest("p_prd"))& Vend
   substrContent = substrContent & "p_prc_1:" &trim(SafeRequest("p_prc_1"))& Vend
   substrContent = substrContent & "p_prc_2:" &trim(SafeRequest("p_prc_2"))& Vend
   substrContent = substrContent & "p_prc_3:" &trim(SafeRequest("p_prc_3"))& Vend
   substrContent = substrContent & "p_prc_4:" &trim(SafeRequest("p_prc_4"))& Vend
   substrContent = substrContent & "p_prc_5:" &trim(SafeRequest("p_prc_5"))& Vend
   substrContent = substrContent & "p_prc_6:" &trim(SafeRequest("p_prc_6"))& Vend
   substrContent = substrContent & "p_prc_7:" &trim(SafeRequest("p_prc_7"))& Vend
   substrContent = substrContent & "p_prc_8:" &trim(SafeRequest("p_prc_8"))& Vend
   substrContent = substrContent & "t_prc_1:" &trim(SafeRequest("t_prc_1"))& Vend
   substrContent = substrContent & "t_prc_2:" &trim(SafeRequest("t_prc_2"))& Vend
   substrContent = substrContent & "t_prc_3:" &trim(SafeRequest("t_prc_3"))& Vend
   substrContent = substrContent & "t_prc_4:" &trim(SafeRequest("t_prc_4"))& Vend
   substrContent = substrContent & "t_prc_5:" &trim(SafeRequest("t_prc_5"))& Vend
   substrContent = substrContent & "t_prc_6:" &trim(SafeRequest("t_prc_6"))& Vend
   substrContent = substrContent & "t_prc_7:" &trim(SafeRequest("t_prc_7"))& Vend
   substrContent = substrContent & "t_prc_8:" &trim(SafeRequest("t_prc_8"))& Vend
   substrContent = substrContent & "."& Vend
 pageturn="/master/sysmng/prc_mng/prc_edt.asp?c_cls="&SafeRequest("p_cls")&"&ptid="&trim(SafeRequest("ptid"))
case "prc_del"

   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_del"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "c_cls:" &trim(SafeRequest("c_cls"))& Vend
   substrContent = substrContent & "."& Vend
pageturn="/master/sysmng/prc_mng/prc_lst.asp"
case "prc_adv_add"
   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_adv_add"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "p_prd:" &trim(SafeRequest("p_prd"))& Vend
   substrContent = substrContent & "p_cls:" &trim(SafeRequest("p_cls"))& Vend
   substrContent = substrContent & "p_yar:" &trim(SafeRequest("p_yar"))& Vend
   substrContent = substrContent & "p_tmetpe:" &trim(SafeRequest("p_tmetpe"))& Vend
   substrContent = substrContent & "p_prc:" &trim(SafeRequest("p_prc"))& Vend
   substrContent = substrContent & "."& Vend
pageturn="/master/sysmng/prc_mng/prc_adv.asp?c_cls="&trim(SafeRequest("c_cls"))&"&ptid="&trim(SafeRequest("ptid"))
case "prc_adv_edt"
   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_adv_edt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "pid:" &trim(SafeRequest("pid"))& Vend
   substrContent = substrContent & "p_prd:" &trim(SafeRequest("p_prd"))& Vend
   substrContent = substrContent & "p_cls:" &trim(SafeRequest("p_cls"))& Vend
   substrContent = substrContent & "p_yar:" &trim(SafeRequest("p_yar"))& Vend
   substrContent = substrContent & "p_tmetpe:" &trim(SafeRequest("p_tmetpe"))& Vend
   substrContent = substrContent & "p_prc:" &trim(SafeRequest("p_prc"))& Vend
   substrContent = substrContent & "."& Vend
pageturn="/master/sysmng/prc_mng/prc_adv.asp?c_cls="&trim(SafeRequest("c_cls"))&"&ptid="&trim(SafeRequest("ptid"))
case "prc_adv_del"
   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_adv_del"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "pid:" &trim(SafeRequest("pid"))& Vend
   substrContent = substrContent & "."& Vend
pageturn="/master/sysmng/prc_mng/prc_adv.asp?c_cls="&trim(SafeRequest("c_cls"))&"&ptid="&trim(SafeRequest("ptid"))
case "prc_nme_edt"
   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_nme_edt"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "c_cls:" &trim(SafeRequest("c_cls"))& Vend
   substrContent = substrContent & "c_nme:" &trim(SafeRequest("c_nme"))& Vend
   substrContent = substrContent & "c_inf:" &trim(SafeRequest("c_inf"))& Vend
   substrContent = substrContent & "c_pwr:" &trim(SafeRequest("c_pwr"))& Vend
   substrContent = substrContent & "."& Vend
pageturn="/master/sysmng/prc_mng/prc_lst.asp"

case "prc_add"

   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prc_add"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "c_cls:" &trim(SafeRequest("c_cls"))& Vend
   substrContent = substrContent & "c_pwr:" &trim(SafeRequest("c_pwr"))& Vend
   substrContent = substrContent & "c_nme:" &trim(SafeRequest("c_nme"))& Vend
   substrContent = substrContent & "c_inf:" &trim(SafeRequest("c_inf"))& Vend
   substrContent = substrContent & "."& Vend
pageturn="/master/sysmng/prc_mng/prc_lst.asp"
case "prd_prc"

   substrContent = "entryclass:sys_mng"&Vend
   substrContent =substrContent& "entrytype:prd_prc"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "p_prd:" &trim(SafeRequest("p_prd"))& Vend
   
   p_prd=triM(SafeRequest("p_prd"))
   query="select * from clslst order by c_cls"
   rs.open query,conn,1,1
   while not rs.eof 
   for i=1 to 8
   prd_nme=p_prd&"_"&cstr(rs("c_cls"))&"_"&i
   prd_tme="t"&p_prd&"_"&cstr(rs("c_cls"))&"_"&i
   prd_nme_prc=SafeRequest(prd_nme)
   prd_tme_tpe=SafeRequest(prd_tme)
   substrContent = substrContent & prd_nme&":" &prd_nme_prc& Vend
   substrContent = substrContent & prd_tme&":" &prd_tme_tpe& Vend
   next
   rs.movenext
   wend
    substrContent = substrContent & "."& Vend
pageturn="/master/sysmng/pdt_mng/pdt_edt.asp?g_prd="&p_prd
 end select

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

%>
