<%@ Language=VBScript %>
<%
If Request.QueryString ("id")="" Then
	ef=True
	ec="请选择产品！"
ElseIf Instr(1, Request.QueryString ("id"), "'", 1)>0 then
	ef=True
	ec="非法产品ID！"
ElseIf Not IsNumeric(Request.QueryString("id")) then
	ef=True
	ec="非法产品ID！"
end if
if not ef then
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 dsSqllist = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_SqlProductlist where canbyenduser='y' and id='"&Request.QueryString ("id")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') "
If session("agentname")<>"n" Then 	Sql="Select * from FreeHost.FreeHost_SqlProductlist where canbyagnenduser='y' and id='"&Request.QueryString ("id")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') "
If session("agentusername")<>"" Then 	Sql="Select * from FreeHost.FreeHost_SqlProductlist where canbyagn='y' and id='"&Request.QueryString ("id")&"'  and (onlyusebyagn is null or onlyusebyagn='"&agentname&"') "		
		dsSqllist.Open Sql,conn,1,1
if dsSqllist.Eof then
	ef=True
	ec="产品不存在！"
end if
end if

if not ef then
%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html12")%>　详细介绍
<%=htmlwrite("html13")%>
<%usermoney=dsSqllist("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="&dsSqllist("id")&""
		dsendmoney.Open Sql,conn,1,1
if not dsendmoney.eof then
usermoney=dsendmoney("usermoney")
end if
dsendmoney.close
end if


%>
<br>
<br>
<table width="100%" height="178"  border="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr bgcolor="#EEEEEE">
    <td width="20%" align="center"><%
	info=dsSqllist("info")
	infomore=dsSqllist("infomore")
	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")
infomore=newname_Sql("infomore")
Sqltype=newname_Sql("Sqltype")
if newname_Sql ("ServerlistID")<>0 Then isAgnHostSer=True '这是独立模板的产品
newname_Sql.close
end if%>
      <font size="3"><strong><%=Sqltype%></strong></font>
    <td width="64%" height="49" align="center">价格:<%=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="&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
%>元)</font><%
If isAgnHostSer then%>
(<font color=red>当前此产品为独立模式产品，成本价为0元</font>)
<%End if
End if%>
	</td>
    <td width="16%" align="center"><font color="#000000">更强更稳定</font></td>
  </tr>
  <tr>
    <td width="20%" align="center" bgcolor="#FAFAFA">
    <img src="/style/img/sql/<%=dsSqllist("id")%>b.jpg" align="middle">

    <td bgcolor="#FAFAFA">      <table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th width="4%" scope="col">&nbsp;</th>
        <td width="92%" align="left" scope="col"><%=infomore%></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/selfsql.asp?id=<%=dsSqllist("id")%>"><FONT color=#000000>实时在线开通</FONT></A></P></td>
  </tr>
</table>
<br>
<br>
<%=htmlwrite("html14")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
