<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html12")%>
　<strong><a href="idc.asp">主机托管</a></strong>　　　　<font color="#000000"><strong><a href="idc2.asp">主机租用</a></strong>
</font>
<%=htmlwrite("html13")%>
<br>
<%Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")

agentname=session("agentname")
if session("agentusername")<>"" Or session("AgnRunasUser")=True 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

	Set dsIDClist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_IDCProductlist where istg=1 and canbyenduser='y'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') 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")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"')  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")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"')  order by orderbyid desc"

		dsIDClist.Open Sql,conn,1,1
If dsIDClist.Eof Then%>
产品列表为空.
<%else%>
<%
i=1
while not dsIDClist.Eof
usermoney=dsIDClist("usermoney")
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


%>
<br>
<table width="100%" height="122"  border="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td width="35%" rowspan="2" bgcolor="#FAFAFA">　<img src="/style/img/idc/<%=dsIDClist("id")%>.jpg" align="middle">
      <%
	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 width="49%" height="34" align="center" bgcolor="#EEEEEE">价格:<%=usermoney%>元
<%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
%>元)</font><%End if%>

</td>
    <td width="16%" align="center" bgcolor="#EEEEEE"><a href="/netpay/"></a><a href="idcmore.asp?id=<%=dsIDClist("id")%>" target="_blank"><font color="#000000">详细介绍&gt;&gt;&gt;&gt;</font></a></td>
  </tr>
  <tr>
    <td height="85" bgcolor="#FFFFFF">     <table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="4%" scope="col">&nbsp;</th>
        <td width="92%" align="left" scope="col"><%=info%></td>
        <th width="4%" scope="col">&nbsp;</th>
      </tr>
    </table></td>
    <td width="16%" align="center" bgcolor="#FAFAFA"><P><A href="/netpay/"><FONT color=#006600>现在付款开通</FONT></A></P>
    <P><A href="/user/selfIDC.asp?id=<%=dsIDClist("id")%>"><FONT color=#000000>实时在线开通</FONT></A></P></td>
  </tr>
</table>
<br>
<br>
<%
dsIDClist.movenext
i=i+1
wend
dsIDClist.close
set dsIDClist=nothing
end if%>



<%=htmlwrite("html14")%>
