<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html12")%>
　企业邮箱
<%=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 dsEmaillist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_EmailProductlist where isbydomain='n' and isbyhost='n' and canbyenduser='y'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') order by orderbyid desc"
if agentname<>"n" then Sql="Select * from FreeHost.FreeHost_EmailProductlist where isbydomain='n' and isbyhost='n' and canbyagnenduser='y'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') 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")&"'  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_EmailProductlist where canbyagnenduser='y' and typeid='"&Request.QueryString("typeid")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"')  order by orderbyid desc"

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


%>
<br>
<table width="100%" height="122"  border="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td width="35%" rowspan="2" bgcolor="#FAFAFA">　<img src="/style/img/mail/<%=dsEmaillist("id")%>.gif" align="middle">
      <%
	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 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='邮箱产品' 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
%>元)</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="emailmore.asp?id=<%=dsEmaillist("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/selfemail.asp?id=<%=dsEmaillist("id")%>"><FONT color=#000000>实时在线开通</FONT></A></P></td>
  </tr>
</table>
<br>
<br>
<%
dsEmaillist.movenext
i=i+1
wend
dsEmaillist.close
set dsEmaillist=nothing
end if%>



<%=htmlwrite("html14")%>
