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

<%=chk_log_usr()%> 
<%
snme=SafeRequest("snme")
years=SafeRequest("years")
if snme="" or chk_int(years)=false then
		      call errorpage(-2,"对不起，参数错误！...")
end if
conn.open constr
query="select * from v_svrlst where s_nme='"&snme&"' and s_unme='"&session("usrname")&"'"
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"))
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 & "years:"& SafeRequest("years") & Vend
   substrContent = substrContent & "pdtprcstr:"& SafeRequest("s_prcstr") & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/svr_mng/svr_rnw.asp?snme=" & snme)
   Else
      call errorpage(-2,doresult)
   end if
%>
