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

<%=chk_log_usr()%> 
<%
vnme=SafeRequest("vnme")
years=SafeRequest("years")
if vnme="" or chk_int(years)=false then
		      call errorpage(-2,"对不起，参数错误！...")
end if
conn.open constr
query="select * from advlst where v_nme='"&vnme&"' and v_unme='"&session("usrname")&"'"
rs.open query,conn,1,1
if rs.recordcount<>1 then
     call errorpage(-2,"对不起，该订单不存在或者您无权操作！...")
elseif now()-rs("v_exptme")>1 then	 
    call errorpage(-2,"对不起，该订单已经过期，无法再续费！...")
end if
proid=trim(rs("v_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:" &vnme& Vend
   substrContent = substrContent & "years:"& SafeRequest("years") & Vend
   substrContent = substrContent & "pdtprcstr:"& SafeRequest("v_prcstr") & Vend
   substrContent = substrContent & "." & Vend
   doresult = hzsocket(substrContent)
   left5=left(doresult,5)
   If left5= "10000" Then
      call okpage( "/control/adv_mng/adv_rnw.asp?vnme=" & vnme)
   Else
      call errorpage(-2,doresult)
   end if
%>
