<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
'If session("username")="" Then
'	ef=True
'	ec="授权非法，有可能是超时造成的。"
'end if

if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
agentname=session("agentname")
If session("canshowagn")="y" And Request("username")<>"" Then
If Not RegExpTest("[^A-Za-z0-9]",Request("username")) Then
agentname=Request("username")
End If
End If

if session("agentusername")<>"" Or session("AgnRunasUser")=True Or session("canshowagn")="y" then 
if session("agentusername")<>"" Then agentname=session("agentusername")
	Set dsagent = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent where username='"&agentname&"'"
		dsagent.Open Sql,conn,1,1
if Not dsagent.eof then
Set dsagnettype = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_Agent_pers where agenttype='"&dsagent("agenttype")&"'" 
		dsagnettype.Open Sql,conn,1,1
if Not dsagnettype.eof Then
canshowagnpric=True
Else
canshowagnpric=false
End if
end If
dsagent.close
end If



'ds.close
'set ds=nothing
'conn.Close 
'set conn=nothing
%>

<%if session("agentusername")<>"" Then%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html5")%>
<%else%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html2")%>
<%End if%>
　价格总览
<%if session("agentusername")<>"" Then%>
<%=htmlwrite("html6")%>
<%else%>
<%=htmlwrite("html3")%>
<%End if%>

<br>
<font color="#0000FF">域名</font><br>

<%

	Set RsDlist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_DomainProductlist order by id asc"
		RsDlist.Open Sql,conn,1,1
If not	RsDlist.eof then%>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%while not RsDlist.eof

	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='域名产品' and username='"&agentname&"' and id="&RsDlist("id")
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof Then
UserpaymoneyEnd1=dsendmoney("usermoney")
UserpaymoneyEnd2=dsendmoney("year2")
UserpaymoneyEnd3=dsendmoney("year3")
UserpaymoneyEnd4=dsendmoney("year4")
UserpaymoneyEnd5=dsendmoney("year5")
if Application("domaincansetM")=true Then
If Not IsNull(dsendmoney("usermoney"&"API"&RsDlist("regapi"))) Then UserpaymoneyEnd1=dsendmoney("usermoney"&"API"&RsDlist("regapi"))
if Not IsNull(dsendmoney("year2"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd2=dsendmoney("year2"&"API"&RsDlist("regapi"))
if Not IsNull(dsendmoney("year3"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd3=dsendmoney("year3"&"API"&RsDlist("regapi"))
if Not IsNull(dsendmoney("year4"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd4=dsendmoney("year4"&"API"&RsDlist("regapi"))
if Not IsNull(dsendmoney("year5"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd5=dsendmoney("year5"&"API"&RsDlist("regapi"))
End If

If IsNull(UserpaymoneyEnd1) Then UserpaymoneyEnd1=RsDlist("usermoney")
If IsNull(UserpaymoneyEnd2) Then UserpaymoneyEnd2=RsDlist("year2")
If IsNull(UserpaymoneyEnd3) Then UserpaymoneyEnd3=RsDlist("year3")
If IsNull(UserpaymoneyEnd4) Then UserpaymoneyEnd4=RsDlist("year4")
If IsNull(UserpaymoneyEnd5) Then UserpaymoneyEnd5=RsDlist("year5")


else
UserpaymoneyEnd1=RsDlist("usermoney")
UserpaymoneyEnd2=RsDlist("year2")
UserpaymoneyEnd3=RsDlist("year3")
UserpaymoneyEnd4=RsDlist("year4")
UserpaymoneyEnd5=RsDlist("year5")
if Application("domaincansetM")=true Then
If Not IsNull(RsDlist("usermoney"&"API"&RsDlist("regapi"))) Then UserpaymoneyEnd1=RsDlist("usermoney"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year2"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd2=RsDlist("year2"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year3"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd3=RsDlist("year3"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year4"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd4=RsDlist("year4"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year5"&"API"&RsDlist("regapi"))) then UserpaymoneyEnd5=RsDlist("year5"&"API"&RsDlist("regapi"))
end If


end if
dsendmoney.close
if session("AgnRunasUser")=True Or canshowagnpric Then
	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='域名产品' and username='"&agentname&"' and id="&RsDlist("id")
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof Then
myrealcost1=RsDlist("usermoneyagn")'不用折扣算
myrealcost2=RsDlist("year2agn")
myrealcost3=RsDlist("year3agn")
myrealcost4=RsDlist("year4agn")
myrealcost5=RsDlist("year5agn")
if Application("domaincansetM")=true Then
If Not isNull(RsDlist("usermoneyagn"&"API"&RsDlist("regapi"))) Then myrealcost1=RsDlist("usermoneyagn"&"API"&RsDlist("regapi"))'不用折扣算
if Not IsNull(RsDlist("year2agn"&"API"&RsDlist("regapi"))) then myrealcost2=RsDlist("year2agn"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year3agn"&"API"&RsDlist("regapi"))) then myrealcost3=RsDlist("year3agn"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year4agn"&"API"&RsDlist("regapi"))) then myrealcost4=RsDlist("year4agn"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year5agn"&"API"&RsDlist("regapi"))) then myrealcost5=RsDlist("year5agn"&"API"&RsDlist("regapi"))
End if
Else
myrealcost1=dsagnpri("usermoney")
myrealcost2=dsagnpri("year2")
myrealcost3=dsagnpri("year3")
myrealcost4=dsagnpri("year4")
myrealcost5=dsagnpri("year5")
If IsNull(myrealcost1) Then myrealcost1=RsDlist("usermoneyagn")
If IsNull(myrealcost2) Then myrealcost2=RsDlist("year2agn")
If IsNull(myrealcost3) Then myrealcost3=RsDlist("year3agn")
If IsNull(myrealcost4) Then myrealcost4=RsDlist("year4agn")
If IsNull(myrealcost5) Then myrealcost5=RsDlist("year5agn")

if Application("domaincansetM")=true Then
If Not isNull(RsDlist("usermoneyagn"&"API"&RsDlist("regapi"))) Then myrealcost1=RsDlist("usermoneyagn"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year2agn"&"API"&RsDlist("regapi"))) then myrealcost2=RsDlist("year2agn"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year3agn"&"API"&RsDlist("regapi"))) then myrealcost3=RsDlist("year3agn"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year4agn"&"API"&RsDlist("regapi"))) then myrealcost4=RsDlist("year4agn"&"API"&RsDlist("regapi"))
if Not IsNull(RsDlist("year5agn"&"API"&RsDlist("regapi"))) then myrealcost5=RsDlist("year5agn"&"API"&RsDlist("regapi"))

If Not isNull(dsagnpri("usermoney"&"API"&RsDlist("regapi"))) Then myrealcost1=dsagnpri("usermoney"&"API"&RsDlist("regapi"))
if Not IsNull(dsagnpri("year2"&"API"&RsDlist("regapi"))) then myrealcost2=dsagnpri("year2"&"API"&RsDlist("regapi"))
if Not IsNull(dsagnpri("year3"&"API"&RsDlist("regapi"))) then myrealcost3=dsagnpri("year3"&"API"&RsDlist("regapi"))
if Not IsNull(dsagnpri("year4"&"API"&RsDlist("regapi"))) then myrealcost4=dsagnpri("year4"&"API"&RsDlist("regapi"))
if Not IsNull(dsagnpri("year5"&"API"&RsDlist("regapi"))) then myrealcost5=dsagnpri("year5"&"API"&RsDlist("regapi"))
End if

end if
dsagnpri.close
end if

%>
  <tr>
    <td width="30%" bgcolor="#FFFFFF"><strong><%=RsDlist("Domaintype")%></strong>　(<%=RsDlist("Domstr")%>)</td>
    <td align="center" valign="middle" bgcolor="#EEEEEE">


　 价格：<%=UserpaymoneyEnd1%>元/1年 <%=UserpaymoneyEnd2%>元/2年 <%=UserpaymoneyEnd3%>元/3年 <%=UserpaymoneyEnd4%>元/4年 <%=UserpaymoneyEnd5%>元/5年
<%if session("AgnRunasUser")=True Or canshowagnpric then%><font color=red>(代理成本价：<%=myrealcost1%>元/1年 <%=myrealcost2%>元/2年 <%=myrealcost3%>元/3年 <%=myrealcost4%>元/4年 <%=myrealcost5%>元/5年)</font><%if Application("domaincansetM")=true Then%><br>(独立接口域名价格请在代理区,价格设置中查看)<%End if%><%End if%>
</td>
  </tr>

<%
RsDlist.movenext
wend%>
</table>
<%else%>
尚未定义域名价格
<%End if%>












<br>
  <font color="#0000FF">虚拟主机</font>：<br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%
	Set dsHostlist = Server.CreateObject("ADODB.Recordset")	
'		Sql="Select * from FreeHost.FreeHost_HostProductlist where canbyenduser='y' order by orderbyid desc"
'if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_HostProductlist where canbyagnenduser='y' order by orderbyid desc"

		Sql="Select * from FreeHost.FreeHost_HostProductlist where canbyenduser='y' and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_HostProductlist where canbyagnenduser='y' and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') order by orderbyid desc"

		dsHostlist.Open Sql,conn,1,1
If dsHostlist.Eof Then%>
产品列表为空.
<%else%>
<%while not dsHostlist.Eof

usermoney=dsHostlist("usermoney")
PAY_Month=dsHostlist("PAY_Month")
PAY_Season=dsHostlist("PAY_Season")
PAY_halfyear=dsHostlist("PAY_halfyear")
PAY_Nextyear=dsHostlist("PAY_Nextyear")
PAY_2year=dsHostlist("PAY_2year")
PAY_3year=dsHostlist("PAY_3year")
PAY_4year=dsHostlist("PAY_4year")
PAY_5year=dsHostlist("PAY_5year")

if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='虚拟主机' and username='"&agentname&"' and id="&dsHostlist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if

%>
  <tr>
    <td width="30%" height="30" bgcolor="#FFFFFF">　　
      <%
	info=dsHostlist("info")
	Hosttype=dsHostlist("Hosttype")
isAgnHostSer=false
	Set newname_host = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_HostProductlist_AGN where agent1='"&agentname&"' and id='"&dsHostlist("id")&"'"
		newname_host.Open Sql,conn,1,1
if not newname_host.eof then
info=newname_host("info")
Hosttype=newname_host("Hosttype")
if newname_host ("ServerlistID")<>0 Then isAgnHostSer=True '这是独立模板的产品
newname_host.close
end if

%>
    <font size="3"><strong><%=Hosttype%></strong></font>      <td align="center" valign="middle" bgcolor="#EEEEEE">价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年 <%=usermoney*PAY_Nextyear%>元/续费	
 <br>
 <%if canshowagnpric then%>(<font color=red>代理成本价格:
<%

	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='虚拟主机' and username='"&agentname&"' and id="&dsHostlist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsHostlist("usermoney")*dsagnettype("pers")
else
response.write  dsagnpri("usermoney")
end if
dsagnpri.close
%>
元1年)</font>
<%
If isAgnHostSer then%>
(<font color=red>当前此产品为独立模式产品，成本价为0元</font>)
<%End if
End if%>
</td>
        <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/style/info/hostmore.asp?id=<%=dsHostlist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
<%
dsHostlist.movenext
wend
dsHostlist.close
set dsHostlist=nothing
end if%>
</table>


<br>
<font color="#0000FF">数据库：</font><br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%	Set dsSqllist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_SqlProductlist where isbyhost='n' and canbyenduser='y' order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_SqlProductlist where isbyhost='n' and canbyagnenduser='y' order by orderbyid desc"

		dsSqllist.Open Sql,conn,1,1
If dsSqllist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsSqllist.Eof
usermoney=dsSqllist("usermoney")
PAY_Month=dsSqllist("PAY_Month")
PAY_Season=dsSqllist("PAY_Season")
PAY_halfyear=dsSqllist("PAY_halfyear")
PAY_Nextyear=dsSqllist("PAY_Nextyear")
PAY_2year=dsSqllist("PAY_2year")
PAY_3year=dsSqllist("PAY_3year")
PAY_4year=dsSqllist("PAY_4year")
PAY_5year=dsSqllist("PAY_5year")
if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='数据库产品' and username='"&agentname&"' and id="&dsSqllist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
  <tr>
    <td width="30%" height="30" bgcolor="#FAFAFA">　
      <%
	info=dsSqllist("info")
	Sqltype=dsSqllist("Sqltype")
isAgnHostSer=false
	Set newname_Sql = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_SqlProductlist_AGN where agent1='"&agentname&"' and id='"&dsSqllist("id")&"'"
		newname_Sql.Open Sql,conn,1,1
if not newname_Sql.eof then
info=newname_Sql("info")
Sqltype=newname_Sql("Sqltype")
if newname_Sql ("ServerlistID")<>0 Then isAgnHostSer=True '这是独立模板的产品
newname_Sql.close
end if%>　<strong><font size="3"><%=Sqltype%></font></strong>	    
    <td align="center" bgcolor="#EEEEEE">价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年	
 <%=usermoney*PAY_Nextyear%>元/续费<br>
 <%if canshowagnpric then%>(<font color=red>代理成本价格:
<%

	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='数据库产品' and username='"&agentname&"' and id="&dsSqllist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsSqllist("usermoney")*dsagnettype("pers")
else
response.write  dsagnpri("usermoney")
end if
dsagnpri.close
%>
元1年)</font>
<%
If isAgnHostSer then%>
(<font color=red>当前此产品为独立模式产品，成本价为0元</font>)
<%End if
End if%>
	</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="/style/info/sqlmore.asp?id=<%=dsSqllist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
<%
dsSqllist.movenext
i=i+1
wend
dsSqllist.close
set dsSqllist=nothing
end if%>
</table>

<br>
<font color="#0000FF">邮箱产品：</font><br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%
	Set dsEmaillist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_EmailProductlist where isbydomain='n' and isbyhost='n' and canbyenduser='y' order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_EmailProductlist where isbydomain='n' and isbyhost='n' and canbyagnenduser='y' order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_EmailProductlist where canbyenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) and agentname<>"n" then Sql="Select * from FreeHost.FreeHost_EmailProductlist where canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

		dsEmaillist.Open Sql,conn,1,1
If dsEmaillist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsEmaillist.Eof
usermoney=dsEmaillist("usermoney")
PAY_Month=dsEmaillist("PAY_Month")
PAY_Season=dsEmaillist("PAY_Season")
PAY_halfyear=dsEmaillist("PAY_halfyear")
PAY_Nextyear=dsEmaillist("PAY_Nextyear")
PAY_2year=dsEmaillist("PAY_2year")
PAY_3year=dsEmaillist("PAY_3year")
PAY_4year=dsEmaillist("PAY_4year")
PAY_5year=dsEmaillist("PAY_5year")
if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='邮箱产品' and username='"&agentname&"' and id="&dsEmaillist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
  <tr>
    <td width="30%" height="30" bgcolor="#FAFAFA">　
      <%
	info=dsEmaillist("info")
	Emailtype=dsEmaillist("Emailtype")
isAgnHostSer=false
	Set newname_email = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_EmailProductlist_AGN where agent1='"&agentname&"' and id='"&dsEmaillist("id")&"'"
		newname_email.Open Sql,conn,1,1
if not newname_email.eof then
info=newname_email("info")
Emailtype=newname_email("Emailtype")
if newname_email ("ServerlistID")<>0 Then isAgnHostSer=True '这是独立模板的产品
newname_email.close
end if%>　<strong><font size="3"><%=Emailtype%></font></strong>	    
    <td align="center" bgcolor="#EEEEEE">价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年	
 <%=usermoney*PAY_Nextyear%>元/续费<br>
 <%if canshowagnpric then%>(<font color=red>代理成本价格:
<%

	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='邮箱产品' and username='"&agentname&"' and id="&dsEmaillist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsEmaillist("usermoney")*dsagnettype("pers")
else
response.write  dsagnpri("usermoney")
end if
dsagnpri.close
%>
元1年)</font>
<%
If isAgnHostSer then%>
(<font color=red>当前此产品为独立模式产品，成本价为0元</font>)
<%End if
End if%>
</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="/style/info/emailmore.asp?id=<%=dsEmaillist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
<%
dsEmaillist.movenext
i=i+1
wend
dsEmaillist.close
set dsEmaillist=nothing
end if%>
</table>


<br>
<font color="#0000FF">云服务器产品：</font><br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%
	Set dsVPSlist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_VPSProductlist where canbyenduser='y' order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_VPSProductlist where canbyagnenduser='y' order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_VPSProductlist where canbyenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) and agentname<>"n" then Sql="Select * from FreeHost.FreeHost_VPSProductlist where canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

		dsVPSlist.Open Sql,conn,1,1
If dsVPSlist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsVPSlist.Eof
usermoney=dsVPSlist("usermoney")
PAY_Month=dsVPSlist("PAY_Month")
PAY_Season=dsVPSlist("PAY_Season")
PAY_halfyear=dsVPSlist("PAY_halfyear")
PAY_Nextyear=dsVPSlist("PAY_Nextyear")
PAY_2year=dsVPSlist("PAY_2year")
PAY_3year=dsVPSlist("PAY_3year")
PAY_4year=dsVPSlist("PAY_4year")
PAY_5year=dsVPSlist("PAY_5year")
if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='云服务器产品' and username='"&agentname&"' and id="&dsVPSlist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
  <tr>
    <td width="30%" height="30" bgcolor="#FAFAFA">　
      <%
	info=dsVPSlist("info")
	VPStype=dsVPSlist("VPStype")
isAgnHostSer=false
	Set newname_VPS = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_VPSProductlist_AGN where agent1='"&agentname&"' and id='"&dsVPSlist("id")&"'"
		newname_VPS.Open Sql,conn,1,1
if not newname_VPS.eof then
info=newname_VPS("info")
VPStype=newname_VPS("VPStype")
if newname_VPS ("ServerlistID")<>0 Then isAgnHostSer=True '这是独立模板的产品
newname_VPS.close
end if%>　<strong><font size="3"><%=VPStype%></font></strong>	    
    <td align="center" bgcolor="#EEEEEE">价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年	
 <%=usermoney*PAY_Nextyear%>元/续费<br>
 <%if canshowagnpric then%>(<font color=red>代理成本价格:
<%

	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='云服务器产品' and username='"&agentname&"' and id="&dsVPSlist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsVPSlist("usermoney")*dsagnettype("pers")
else
response.write  dsagnpri("usermoney")
end if
dsagnpri.close
%>
元1年)</font>
<%
If isAgnHostSer then%>
(<font color=red>当前此产品为独立模式产品，成本价为0元</font>)
<%End if
End if%>
</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="/style/info/VPSmore.asp?id=<%=dsVPSlist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
<%
dsVPSlist.movenext
i=i+1
wend
dsVPSlist.close
set dsVPSlist=nothing
end if%>
</table>


<br>
<font color="#0000FF">CDN产品：</font><br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%
	Set dsCDNlist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_CDNProductlist where canbyenduser='y' order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_CDNProductlist where canbyagnenduser='y' order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_CDNProductlist where canbyenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) and agentname<>"n" then Sql="Select * from FreeHost.FreeHost_CDNProductlist where canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

		dsCDNlist.Open Sql,conn,1,1
If dsCDNlist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsCDNlist.Eof
usermoney=dsCDNlist("usermoney")
PAY_Month=dsCDNlist("PAY_Month")
PAY_Season=dsCDNlist("PAY_Season")
PAY_halfyear=dsCDNlist("PAY_halfyear")
PAY_Nextyear=dsCDNlist("PAY_Nextyear")
PAY_2year=dsCDNlist("PAY_2year")
PAY_3year=dsCDNlist("PAY_3year")
PAY_4year=dsCDNlist("PAY_4year")
PAY_5year=dsCDNlist("PAY_5year")
if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='CDN产品' and username='"&agentname&"' and id="&dsCDNlist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
  <tr>
    <td width="30%" height="30" bgcolor="#FAFAFA">　
      <%
	info=dsCDNlist("info")
	CDNtype=dsCDNlist("CDNtype")
isAgnHostSer=false
	Set newname_CDN = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_CDNProductlist_AGN where agent1='"&agentname&"' and id='"&dsCDNlist("id")&"'"
		newname_CDN.Open Sql,conn,1,1
if not newname_CDN.eof then
info=newname_CDN("info")
CDNtype=newname_CDN("CDNtype")
'if newname_CDN ("ServerlistID")<>0 Then isAgnHostSer=True '这是独立模板的产品
newname_CDN.close
end if%>　<strong><font size="3"><%=CDNtype%></font></strong>	    
    <td align="center" bgcolor="#EEEEEE">价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年	
 <%=usermoney*PAY_Nextyear%>元/续费<br>
 <%if canshowagnpric then%>(<font color=red>代理成本价格:
<%

	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='CDN产品' and username='"&agentname&"' and id="&dsCDNlist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsCDNlist("usermoney")*dsagnettype("pers")
else
response.write  dsagnpri("usermoney")
end if
dsagnpri.close
%>
元1年)</font>
<%
If isAgnHostSer then%>
(<font color=red>当前此产品为独立模式产品，成本价为0元</font>)
<%End if
End if%>
</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="/style/info/CDNmore.asp?id=<%=dsCDNlist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
<%
dsCDNlist.movenext
i=i+1
wend
dsCDNlist.close
set dsCDNlist=nothing
end if%>
</table>

<br>
<font color="#0000FF">主机托管类：</font><br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%
	Set dsIDClist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_IDCProductlist where istg=1 and canbyenduser='y' order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_IDCProductlist where istg=1 and  canbyagnenduser='y' order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_IDCProductlist where  istg=1 and canbyenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) and agentname<>"n" then Sql="Select * from FreeHost.FreeHost_IDCProductlist where  istg=1 and canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

		dsIDClist.Open Sql,conn,1,1
If dsIDClist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsIDClist.Eof
usermoney=dsIDClist("usermoney")
PAY_Month=dsIDClist("PAY_Month")
PAY_Season=dsIDClist("PAY_Season")
PAY_halfyear=dsIDClist("PAY_halfyear")
PAY_Nextyear=dsIDClist("PAY_Nextyear")
PAY_2year=dsIDClist("PAY_2year")
PAY_3year=dsIDClist("PAY_3year")
PAY_4year=dsIDClist("PAY_4year")
PAY_5year=dsIDClist("PAY_5year")
if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='IDC产品' and username='"&agentname&"' and id="&dsIDClist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
  <tr>
    <td width="30%" height="30" bgcolor="#FAFAFA">　
      <%
	info=dsIDClist("info")
	IDCtype=dsIDClist("IDCtype")
if agentname<>"n" then 
	Set newname_IDC = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_IDCProductlist_AGN where agent1='"&agentname&"' and id='"&dsIDClist("id")&"'"
		newname_IDC.Open Sql,conn,1,1
if not newname_IDC.eof then
info=newname_IDC("info")
IDCtype=newname_IDC("IDCtype")
newname_IDC.close
end if
end if
%>　<strong><font size="3"><%=IDCtype%></font></strong>	    
    <td align="center" bgcolor="#EEEEEE">价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年	
 <%=usermoney*PAY_Nextyear%>元/续费<br>
 <%if canshowagnpric then%>(<font color=red>代理成本价格:
<%
	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='IDC产品' and username='"&agentname&"' and id="&dsIDClist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsIDClist("price"&dsagnettype("id"))'得到产品定义中的此级别的代理价
'if isreplay then myrealcost=RsDlist("usermoneyagnrepay")'续费
else
response.write  dsagnpri("usermoney")'如果手工定义过此代理的价格就提取此价格
'if isreplay then myrealcost=dsagnpri("usermoneyrepay")'续费
end if
dsagnpri.close
%>
元1年)</font>
<%End if%>

</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="/style/info/idcmore.asp?id=<%=dsIDClist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
<%
dsIDClist.movenext
i=i+1
wend
dsIDClist.close
set dsIDClist=nothing
end if%>
</table>
<br>
<font color="#0000FF">主机租用类：</font><br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%
	Set dsIDClist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_IDCProductlist where istg=0 and canbyenduser='y' order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_IDCProductlist where istg=0 and  canbyagnenduser='y' order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_IDCProductlist where  istg=0 and canbyenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) and agentname<>"n" then Sql="Select * from FreeHost.FreeHost_IDCProductlist where  istg=0 and canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

		dsIDClist.Open Sql,conn,1,1
If dsIDClist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsIDClist.Eof
usermoney=dsIDClist("usermoney")
PAY_Month=dsIDClist("PAY_Month")
PAY_Season=dsIDClist("PAY_Season")
PAY_halfyear=dsIDClist("PAY_halfyear")
PAY_Nextyear=dsIDClist("PAY_Nextyear")
PAY_2year=dsIDClist("PAY_2year")
PAY_3year=dsIDClist("PAY_3year")
PAY_4year=dsIDClist("PAY_4year")
PAY_5year=dsIDClist("PAY_5year")
if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='IDC产品' and username='"&agentname&"' and id="&dsIDClist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
  <tr>
    <td width="30%" height="34" bgcolor="#FAFAFA">　
      <%
	info=dsIDClist("info")
	IDCtype=dsIDClist("IDCtype")
if agentname<>"n" then 
	Set newname_IDC = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_IDCProductlist_AGN where agent1='"&agentname&"' and id='"&dsIDClist("id")&"'"
		newname_IDC.Open Sql,conn,1,1
if not newname_IDC.eof then
info=newname_IDC("info")
IDCtype=newname_IDC("IDCtype")
newname_IDC.close
end if
end if
%>　<strong><font size="3"><%=IDCtype%></font></strong>	    
    <td align="center" bgcolor="#EEEEEE">价格:<%If dsIDClist("canmonth")="y" then%><%=usermoney*PAY_Month%>元/月 <%End if%><%If dsIDClist("canseason")="y" then%><%=usermoney*PAY_Season%>元/季
    <%End if%><%If dsIDClist("canhalfyear")="y" then%><%=usermoney*PAY_halfyear%>元/半年 <%End if%>价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年	
 <%=usermoney*PAY_Nextyear%>元/续费<br>
 <%if canshowagnpric then%>(<font color=red>代理成本价格:
<%
	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='IDC产品' and username='"&agentname&"' and id="&dsIDClist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsIDClist("price"&dsagnettype("id"))'得到产品定义中的此级别的代理价
'if isreplay then myrealcost=RsDlist("usermoneyagnrepay")'续费
else
response.write  dsagnpri("usermoney")'如果手工定义过此代理的价格就提取此价格
'if isreplay then myrealcost=dsagnpri("usermoneyrepay")'续费
end if
dsagnpri.close
%>
元1年)</font>
<%End if%>

</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="/style/info/idcmore.asp?id=<%=dsIDClist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
<%
dsIDClist.movenext
i=i+1
wend
dsIDClist.close
set dsIDClist=nothing
end if%>
</table>


<br>
<font color="#0000FF">其他类产品：</font><br>
<table width="100%"  border="0" cellspacing="1" bgcolor="#CCCCCC">
<%	Set dsSqllist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_OtherProductlist where isbyhost='n' and canbyenduser='y' order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_OtherProductlist where isbyhost='n' and canbyagnenduser='y' order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) then Sql="Select * from FreeHost.FreeHost_OtherProductlist where canbyenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

if Request.QueryString ("typeid")<>"" and  IsNumeric(Request.QueryString("typeid")) and agentname<>"n" then Sql="Select * from FreeHost.FreeHost_OtherProductlist where canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  order by orderbyid desc"

		dsSqllist.Open Sql,conn,1,1
If dsSqllist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsSqllist.Eof
usermoney=dsSqllist("usermoney")
PAY_Month=dsSqllist("PAY_Month")
PAY_Season=dsSqllist("PAY_Season")
PAY_halfyear=dsSqllist("PAY_halfyear")
PAY_Nextyear=dsSqllist("PAY_Nextyear")
PAY_2year=dsSqllist("PAY_2year")
PAY_3year=dsSqllist("PAY_3year")
PAY_4year=dsSqllist("PAY_4year")
PAY_5year=dsSqllist("PAY_5year")
if agentname<>"n" then 
	Set dsendmoney = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_user_price where prtype='其他产品' and username='"&agentname&"' and id="&dsSqllist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
  <tr>
    <td width="30%" height="34" bgcolor="#FAFAFA">　
      <%
	info=dsSqllist("info")
	Sqltype=dsSqllist("Othertype")
if agentname<>"n" then 
	Set newname_Other = Server.CreateObject("ADODB.Recordset")	
Sql="Select * from FreeHost.FreeHost_OtherProductlist_AGN where agent1='"&agentname&"' and id='"&dsSqllist("id")&"'"
		newname_Other.Open Sql,conn,1,1
if not newname_Other.eof then
info=newname_Other("info")
Sqltype=newname_Other("Othertype")
newname_Other.close
end if
end if
%>　<strong><font size="3"><%=Sqltype%></font></strong>	    
    <td align="center" bgcolor="#EEEEEE">价格:<%=usermoney%>元/1年
 <%=usermoney*PAY_2year%>元/2年 <%=usermoney*PAY_3year%>元/3年 <%=usermoney*PAY_4year%>元/4年 <%=usermoney*PAY_5year%>元/5年	
 <%=usermoney*PAY_Nextyear%>元/年/续费<br>
 <%if agentname<>"n" And canshowagnpric then%>(<font color=red>代理成本价格:
<%

	Set dsagnpri = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent_price where prtype='其他产品' and username='"&agentname&"' and id="&dsSqllist("id")&""
		dsagnpri.Open Sql,conn,1,1
if dsagnpri.eof then
response.write  dsSqllist("usermoney")*dsagnettype("pers")
else
response.write  dsagnpri("usermoney")
end if
dsagnpri.close
%>
元1年)</font>
<%End if%>
	</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="/style/info/othermore.asp?id=<%=dsSqllist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>

<%
dsSqllist.movenext
i=i+1
wend
dsSqllist.close
set dsSqllist=nothing
end if%>
</table>

<%if session("agentusername")<>"" Then%>
<%=htmlwrite("html7")%>
<%else%>
<%=htmlwrite("html4")%>
<%End if%>
<%
end if
if ef then
Response.Redirect "e.asp?e="&ec
end if
%>
