<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("canshowpro")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if
if not ef then%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0 background="img/midtop4.gif">
  <TBODY>
    <TR>
      <TD width=53 align="left" background="img/midtop1.gif"><strong> 　 </strong><font color="#FFFFFF">─<strong>&gt;</strong></font> </TD>
      <TD width="151"><table height="59"  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="7" background="img/midtop.gif">&nbsp;</td>
            <td width="120" align="center" valign="middle" background="img/r3.jpg" id="tableTop1" style="Cursor:hand"><a href="product-sql.asp"><font color="#FFFFFF">数据库产品定义</font></a></td>
            <td width="5" background="img/midtop2.gif">&nbsp;</td>
          </tr>
      </table></TD>
      <TD width="15">&nbsp;</TD>
      <TD width="83">&nbsp;</TD>
      <TD width="83" align="left">&nbsp;</TD>
      <TD align="left">&nbsp;</TD>
      <TD width=23 align="right"><IMG height=59 
                  src="img/rtop4.jpg" 
                  width=19></TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
  <TBODY>
    <TR>
      <TD width=19 background="img/midlef.gif" id=rightid>&nbsp;</TD>
      <TD height="300" align="center" vAlign=top bgcolor="#FFFFFF">
<%
PAY_Month="0.084"
PAY_Season="0.25"
PAY_halfyear="0.5"
PAY_Nextyear="1"
PAY_2year="2"
PAY_3year="3"
PAY_4year="4"
PAY_5year="5"
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_SqlProductlist order by orderbyid desc"
		ds.Open Sql,conn,1,1
If ds.Eof Then%>
产品列表为空.
<%
canbyenduser="y"
canbyagnenduser="y"
canbyagn="y"
typeid=0
orderbyid=0
else%>
<DIV class="tableborder">
<table width="100%"  border="0" cellspacing="1">
  <tr >
    <td width="24%" height="24" align="center" background="img/tablebg.gif"><font color="#FFFFFF">编号</font></td>
    <td width="63%" align="center" background="img/tablebg.gif"><font color="#FFFFFF">产品参数</font></td>
    <td height="24" colspan="2" align="center" background="img/tablebg.gif"><font color="#FFFFFF">操作</font></td>
    </tr>
<%while not ds.Eof

if  Request.QueryString ("id")=Cstr(ds("id")) then
Sqltype=ds("Sqltype")
usermoney=ds("usermoney")
Sqlcount=ds("Sqlcount")
ServerlistID=ds("ServerlistID")
ServerlistID2=ds("ServerlistID2")
ServerlistID3=ds("ServerlistID3")
ServerlistID4=ds("ServerlistID4")
ServerlistID5=ds("ServerlistID5")
userspacelimt=ds("userspacelimt")
logspacelimt=ds("logspacelimt")
info=ds("info")
infomore=ds("infomore")
isbyhost=ds("isbyhost")
Hosttype=ds("Hosttype")
cantest=ds("cantest")
canmonth=ds("canmonth")
canseason=ds("canseason")
canhalfyear=ds("canhalfyear")
canbyenduser=ds("canbyenduser")
canbyagnenduser=ds("canbyagnenduser")
canbyagn=ds("canbyagn")
orderbyid=ds("orderbyid")
typeid=ds("typeid")
updatebytypeid=ds("updatebytypeid")
canupdatespace=ds("canupdatespace")
updatespacemoney=ds("updatespacemoney")

PAY_Month=ds("PAY_Month")
PAY_Season=ds("PAY_Season")
PAY_halfyear=ds("PAY_halfyear")
PAY_Nextyear=ds("PAY_Nextyear")
PAY_2year=ds("PAY_2year")
PAY_3year=ds("PAY_3year")
PAY_4year=ds("PAY_4year")
PAY_5year=ds("PAY_5year")
onlyusebyagn=ds("onlyusebyagn")
end if








%>

  <tr bgcolor="#E4EAF2">
    <td height="30" align="center"><%=ds("id")%>.<%=ds("Sqltype")%></td>
    <td align="left">　价格:<%=ds("usermoney")%>元　
      <%
	Set dsserver = Server.CreateObject("ADODB.Recordset")	
	Sql="Select * from FreeHost.FreeHost_ServerSqllist where id='"&ds ("ServerlistID")&"'"
	dsserver.Open Sql,conn,1,1
%>
      <%=dsserver("ip")%>
      <%dsserver.close%> 
      数据库上限<%=ds("userspacelimt")%>M　日志上限<%=ds("logspacelimt")%>M　
      <%if ds("cantest")="y" then%>
可以试用
<%else%>
不可以试用
<%end if%>
　排队:<%=ds("orderbyid")%>
<%if ds("isbyhost")="y" then%><br>　附属于虚拟主机产品:<%=ds("Hosttype")%><%end if%>
</td>
    <td width="6%" align="center"><a href="/style/info/sql.asp" target="_blank"><font color="#618ECF"><strong>浏览</strong></font></a> </td>
    <td width="7%" align="center"><a href="product-Sql.asp?id=<%=ds("id")%>#m"><font color="#618ECF"><strong>修改</strong></font></a> </td>
  </tr>
<%
ds.movenext
wend%>
</table>
</div>
<%end if%>	  


<%if  Request.QueryString ("id")="" then
canbyenduser="y"
canbyagnenduser="y"
canbyagn="y"
asp="y"
orderbyid=0
typeid=0
subweb=0
updatebytypeid="n"
end if

%><a name="m">
<form action="product-Sqllist-sub.asp" method="post" name="form1">
	<DIV class="tableborder">
<table width="100%"  border="0" cellspacing="1">
  <tr >
    <td height="24" colspan="2" align="center" background="img/tablebg.gif"><font color="#FFFFFF">添加/修改产品类型</font></td>
  </tr>
  <tr bgcolor="#E4EAF2">
    <td width="9%" align="right">&nbsp;</td>
    <td width="91%" align="left">      <br>
      产品名： 
        <input name="Sqltype" type="text" id="Sqltype" size="20" maxlength="50" value="<%=Sqltype%>" <%if Sqltype<>"" then%>readonly<%end if%>>
排队顺序：
<input name="orderbyid" type="text" id="orderbyid" size="4" maxlength="6" value="<%=orderbyid%>">
(数值大排前面)<br>
价格：
      <input name="usermoney" type="text" id="usermoney" size="4" maxlength="6" value="<%=usermoney%>">
元一年<br>
月付费率：
<input name="PAY_Month" type="text" size="4" maxlength="6" value="<%=PAY_Month%>">
(如果一个产品是120元/年，每月支付的价格就是120X费率，默认费率是0.084=1/12)<br>
季付费率：
<input name="PAY_Season" type="text" size="4" maxlength="6" value="<%=PAY_Season%>">
(如果一个产品是120元/年，每季支付的价格就是120X费率，默认费率是0.25=1/4)<br>
半年付费率：
<input name="PAY_halfyear" type="text" size="4" maxlength="6" value="<%=PAY_halfyear%>">
(如果一个产品是120元/年，每季支付的价格就是120X费率，默认费率是0.5=1/2)<br>
一次购买两年费率：
<input name="PAY_2year" type="text" size="4" maxlength="6" value="<%=PAY_2year%>">
　三年费率
<input name="PAY_3year" type="text" size="4" maxlength="6" value="<%=PAY_3year%>">
　四年费率
<input name="PAY_4year" type="text" size="4" maxlength="6" value="<%=PAY_4year%>">
　五年费率
<input name="PAY_5year" type="text" size="4" maxlength="6" value="<%=PAY_5year%>">
<br>
续费一年费率：
<input name="PAY_Nextyear" type="text" size="4" maxlength="6" value="<%=PAY_Nextyear%>">
(续费二,三,四,五年的费率和一次性购买二,三,四,五年是一样的)<br>
<br>
数据库文件上限
<input name="userspacelimt" type="text" id="userspacelimt" size="4" maxlength="5" value="<%=userspacelimt%>">
M　数据库日志文件上限
<input name="logspacelimt" type="text" id="logspacelimt" size="4" maxlength="5" value="<%=logspacelimt%>">
M<br>  
    分类编号：
    <input name="typeid" type="text" id="orderbyid" size="4" maxlength="6" value="<%=typeid%>">
　限制只允许同一类型之间才能升级:
<input name="updatebytypeid" type="checkbox" id="updatebytypeid" value="y" <%if updatebytypeid="y"  then%>checked<%end if%>>
<br>
<font color="#999999">(允许单独升级库大小：
<input name="canupdatespace" type="checkbox" id="canupdatespace" value="y" <%if canupdatespace="y"  then%>checked<%end if%>>
价格：
<input name="updatespacemoney" type="text" id="updatespacemoney" size="4" maxlength="6" value="<%=updatespacemoney%>">
元每10M 此功能暂时无效)</font><br>
由于其他产品附送:
<input name="isbyhost" type="checkbox" id="isbyhost" value="y" <%if isbyhost="y" then%>checked<%end if%>>
附属于虚拟主机产品:
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_HostProductlist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
产品列表为空.
<%else%>
<select name="Hosttype" id="Hosttype">
  <%while not dsX.Eof%>
  <option value="<%=dsX("Hosttype")%>" <%if dsX("Hosttype")=Hosttype then%>selected<%
  end if%>><%=dsX("Hosttype")%></option>
  <br>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
<br>
是否允许试用:
<input name="cantest" type="checkbox" id="cantest" value="y"   <%if cantest="y" then%>checked<%end if%>>
是否允许月付:
<input name="canmonth" type="checkbox" id="canmonth" value="y"   <%if canmonth="y" then%>checked<%end if%>>
是否允许季付:
<input name="canseason" type="checkbox" id="canseason" value="y"   <%if canseason="y" then%>checked<%end if%>>
是否允许半年付:
<input name="canhalfyear" type="checkbox" id="canhalfyear" value="y"   <%if canhalfyear="y" then%>checked<%end if%>>
<br>
此产品主站的最终用户可以看到:
<input name="canbyenduser" type="checkbox" id="canbyenduser" value="y" <%if canbyenduser="y" then%>checked<%end if%>>
代理的最终用户可以看到:
<input name="canbyagnenduser" type="checkbox" id="canbyagnenduser" value="y"   <%if canbyagnenduser="y" then%>checked<%end if%>>
代理可以看到:
<input name="canbyagn" type="checkbox" id="canbyagn" value="y"   <%if canbyagn="y" then%>checked<%end if%>>
<br>
用户可选的服务器一：
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_ServerSqllist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
服务器列表为空.
<%else%>
<select name="ServerlistID" id="ServerlistID">
  <%while not dsX.Eof%>
  <option value="<%=dsX("id")%>" <%if ServerlistID=dsX("id") then%>selected<%end if%>><%=dsX("id")%>.<%=dsX("servername")%>
  <%if dsX("agent1")<>"n" then%>
  代理名：<%=dsX("agent1")%>
  <%end if%>
  [<%=dsX("netby")%>]</option>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
<br>
用户可选的服务器二：
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_ServerSqllist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
服务器列表为空.
<%else%>
<select name="ServerlistID2" id="ServerlistID2">
  <option value="0" selected>无</option>
  <%while not dsX.Eof%>
  <option value="<%=dsX("id")%>" <%if ServerlistID2=dsX("id") then%>selected<%end if%>><%=dsX("id")%>.<%=dsX("servername")%>
  <%if dsX("agent1")<>"n" then%>
  代理名：<%=dsX("agent1")%>
  <%end if%>
  [<%=dsX("netby")%>]</option>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
<br>
用户可选的服务器三：
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_ServerSqllist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
服务器列表为空.
<%else%>
<select name="ServerlistID3" id="ServerlistID3">
  <option value="0" selected>无</option>
  <%while not dsX.Eof%>
  <option value="<%=dsX("id")%>" <%if ServerlistID3=dsX("id") then%>selected<%end if%>><%=dsX("id")%>.<%=dsX("servername")%>
  <%if dsX("agent1")<>"n" then%>
  代理名：<%=dsX("agent1")%>
  <%end if%>
  [<%=dsX("netby")%>]</option>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
<br>
用户可选的服务器四：
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_ServerSqllist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
服务器列表为空.
<%else%>
<select name="ServerlistID4" id="ServerlistID4">
  <option value="0" selected>无</option>
  <%while not dsX.Eof%>
  <option value="<%=dsX("id")%>" <%if ServerlistID4=dsX("id") then%>selected<%end if%>><%=dsX("id")%>.<%=dsX("servername")%>
  <%if dsX("agent1")<>"n" then%>
  代理名：<%=dsX("agent1")%>
  <%end if%>
  [<%=dsX("netby")%>]</option>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
<br>
用户可选的服务器五：
<%
	Set dsX = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_ServerSqllist order by id asc"
		dsX.Open Sql,conn,1,1
If dsX.Eof Then%>
服务器列表为空.
<%else%>
<select name="ServerlistID5" id="ServerlistID5">
  <option value="0" selected>无</option>
  <%while not dsX.Eof%>
  <option value="<%=dsX("id")%>" <%if ServerlistID5=dsX("id") then%>selected<%end if%>><%=dsX("id")%>.<%=dsX("servername")%>
  <%if dsX("agent1")<>"n" then%>
  代理名：<%=dsX("agent1")%>
  <%end if%>
  [<%=dsX("netby")%>]</option>
  <%
dsX.movenext
wend%>
</select>
<%end if%>
<br>
（服务器只能为单纯的Mysql或SQL2000服务器，不能一个Mysql一个SQL2000混在一起）
<br>
简要说明：
<textarea name="info" cols="30" rows="3" id="info"><%=info%></textarea>
<br>
<br>
详细说明：
<textarea name="infomore" cols="45" rows="6" id="infomore"><%=infomore%></textarea>
(可以用html语法)<br>
　　　　　
<input name="Submit" type="submit" id="Submit" value="添加">
<input name="modify" type="submit" id="modify" value="修改">
　　　　　　
<input name="delit" type="submit" id="delit" value="删除">
<br>
 <br>
 此产品限制只提供给指定的代理使用,代理名：
 <input name="onlyusebyagn" type="text" value="<%=onlyusebyagn%>" size="14" maxlength="14">
(可以不填写)</td>
  </tr>
</table></div>
</form>


              <form name="form2" method="post" action="product-Sql-modifyname.asp">           
<DIV class="tableborder">
<table width="100%"  border="0" cellspacing="1">
  <tr >
    <td height="24" colspan="2" align="center" background="img/tablebg.gif"><font color="#FFFFFF">修改产品名称：</font></td>
  </tr>
  <tr bgcolor="#E4EAF2">
    <td width="9%" height="40" align="right">&nbsp;</td>
    <td width="91%" align="left">	                  原产品名：
                  <input name="Sqltype" type="text" id="Sqltype" size="20" maxlength="50">
新产品名：
<input name="newSqltype" type="text" id="newSqltype" size="20" maxlength="50">
<input type="submit" name="Submit" value="提交"></td>
  </tr>
</table></div>
</form>

  
	  </TD>
      <TD width=18 background="img/midri.gif">&nbsp;</TD>
    </TR>
  </TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
    <TR>
      <TD width=30><IMG height=19 
                  src="img/rb1.jpg" 
                  width=30></TD>
      <TD 
                background=img/rb2.jpg>&nbsp;</TD>
      <TD width=30><IMG height=19 
                  src="img/rb3.jpg" 
                  width=30></TD>
    </TR>
  </TBODY>
</TABLE>


			
<%=htmlwrite("html10")%>
<%end if
if ef then
Response.Redirect "e.asp?e="&ec
end if%>
