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

<%=chk_log()%> 
<%
chk_newpwr 1,31,2

s_prcstr=SafeRequest("s_prcstr")
years=SafeRequest("years")
snme=SafeRequest("snme")
if s_prcstr="" or chk_int(years)=false then
		      call errorpage(-2,"对不起，参数错误！...")
end if
conn.open constr
if session("sysclass")>=5 then
query="select * from v_ot5lst   where s_nme ='"&snme&"'"
elseif session("sysclass")>=4 then
query="select * from v_ot5lst  where s_nme ='"&snme&"'  and  ((("&session("sysarestr")&" or u_myare=0) and u_rotnme='') or u_rotnme='"&session("usrname")&"')"
else
query="select * from v_ot5lst   where s_nme ='"&snme&"' s_unme='"&session("usrname")&"'"
end if
rs.open query,conn,1,1
if rs.recordcount<>1 then
     call errorpage(-2,"对不起，该订单不存在或者您无权操作！...")
elseif now()-rs("s_exptme")>1 then	 
    call errorpage(-2,"对不起，该订单已经过期，无法再续费！...")
end if
proid=trim(rs("s_prd"))
if trim(lcase(rs("s_unme")))<>trim(lcase(session("usrname"))) then
query="select * from memlst where u_nme='"&rs("s_unme")&"'"
rs1.open query,conn,1,1
entryuser=rs("s_unme")
entrypass=trim(rs1("u_pss"))
agentname=session("usrname")
agentpass=session("usrpass")
rs1.close
end if
rs.close

   substrContent = "entryclass:pdtrnw"&Vend
   substrContent =substrContent& "entrytype:pdtrnw"&Vend
   substrContent =substrContent& "entryuser:"&entryuser&Vend
   substrContent =substrContent& "entrypass:"&entrypass&Vend
   substrContent =substrContent& "agentname:"&agentname&Vend
   substrContent =substrContent& "agentpass:"&agentpass&Vend
   substrContent = substrContent & "proid:" & proid & Vend
   substrContent = substrContent & "pdtname:" & snme & Vend
   substrContent = substrContent & "pdtprcstr:" & s_prcstr & Vend
   substrContent = substrContent & "years:" & years & Vend
   substrContent = substrContent & "newprice:"& SafeRequest("newprice") & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/master/pdtmng/ot5_mng/ot5_rnw.asp?snme=" & snme)
   Else
      call errorpage(-2,doresult)
   end if
%>
