<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/web_top.asp"-->
      <%
chk_log_usr()
	fnme=SafeRequest("fnme")
	If fnme="" Then
	call errorpage(-2,"对不起，参数错误！")
	End If
 query="select * from v_ftplst where f_unme='"&session("usrname")&"'  and f_ftpnme='"&fnme&"'"
	rs.open query,conn,1,1
    if rs.recordcount<>1 then
	rs.close
	conn.close
	call errorpage(-2,"对不起，该订单不存在或者不属于您的会员号，管理员请先切换到该订单会员！")
	response.end
	end if
	f_svrip=rs("f_svrip")
	f_prd=rs("f_prd")
	g_tag=trim(rs("g_tag"))
	g_pdtcls=rs("g_pdtcls")
    ftpname=trim(rs("f_ftpnme"))
	f_prcstr=(rs("f_prcstr"))
	g_nme=trim(rs("g_nme"))
	query="select * from v_prclst where p_prcstr='"&f_prcstr &"' and g_prd='"&f_prd &"'  and p_cls="&session("usrclass")
	rs1.open query,conn,1,1
	if rs1.eof then
	rs1.close
	query="select top 1 * from v_prclst where  g_prd='"&f_prd &"'  and p_cls="&session("usrclass")&" order by p_yar"
	rs1.open query,conn,1,1
	end if
	if rs1.eof then
	call errorpage(-2,"对不起，系统价格定义错误！")
	else
	oldprc=rs1("p_prc")
	oldsze=rs1("g_sze")
	g_tag=rs1("g_tag")
	oldmaxcns=rs1("g_maxcns")
	oldclsnme=rs1("pc_nme")
	f_yar=rs1("p_yar")
	p_tmetpe=rs1("p_tmetpe")
	oldsst=rs1("g_sst")
	oldprc = get_cst(p_tmetpe, 5, 1, 1, clng(oldprc)/clng(f_yar))
	end if
	rs1.close
%>
      <%
			    f_prd=trim(rs("f_prd"))
                months=datediff("m",now(),cdate(rs("f_exptme")))
				years=datediff("yyyy",now(),cdate(rs("f_exptme")))
if years<=0 then
years=1
end if
if months<=0 then
months=1
end if
		%>
      <table cellspacing=0 cellpadding=0 width="100%" border=0>
        <tbody> 
        <tr> 
          <td colspan=2><img height=3 
            src="/imgs/spacer.gif" width=3></td>
        </tr>
        <tr> 
          <td width=438 
          background=/imgs/bg_inside_pages_link.jpg 
          height=30><img height=11 
            src="/imgs/aword_square.gif" width=11 
            align=absMiddle> <a href="/">首 页</a> <strong>&gt;</strong> <a href="/control/">管理中心</a> 
            <b>&gt;</b> <a href="/control/ftp_mng/ftp_lst.asp">FTP空间管理</a></td>
          <td>&nbsp;</td>
        </tr>
        <tr> 
          <td colspan=2><img height=10 
            src="/imgs/shadow_inside_pages.jpg" 
        width=438></td>
        </tr>
        </tbody> 
      </table>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY> 
        <TR> 
          <TD vAlign=top width=180 bgColor=#f3f3f3> 
            <!--#include virtual="/incs/control_left.asp"-->
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
            <br>
          </TD>
          <TD vAlign=top width=10 
          background=/imgs/bg_inside_pages_block.jpg><IMG 
            height=1 src="/imgs/bg_inside_pages_block.jpg" 
            width=10></TD>
          <TD vAlign=top> 
            <table cellspacing=2 cellpadding=0 width="100%" border=0>
              <tbody> 
              <tr> 
                <td  colspan=2 valign="middle"> 
                  <table class=line cellspacing=0 cellpadding=0 width="98%" 
                  border=0 align="center">
                    <tbody> 
                    <tr> 
                      <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>FTP空间<font color="#000000">列表<a href="index.asp"><font color="#FF0000">（查询）</font></a></font></strong></span></b></font></td>
                      <td valign=bottom noWrap align=right 
                        width="75%"><a href="ftp_lst.asp?querytype=8"><font color="#000000">今天新开通</font></a> 
                        <font color="#000000">|</font> <a href="ftp_lst.asp?querytype=9"><font color="#000000">本周新开通</font></a> 
                        <font color="#000000">|</font> <a href="ftp_lst.asp?querytype=10"><font color="#000000">本周到期</font></a> 
                        <font color="#000000">| </font><a href="ftp_lst.asp?querytype=11"><font color="#000000">本月到期</font></a></td>
                    </tr>
                    <tr> 
                      <td align=middle width="100%" colspan=2 height=5></td>
                    </tr>
                    <tr> 
                      <td align=middle width="100%" colspan=2 height=2 bgcolor="#5F5F5F"></td>
                    </tr>
                    </tbody> 
                  </table>
                  <br>
                </td>
              </tr>
              <tr> 
                <td  colspan=2 valign="middle" height="28"> 
                  <table width="80%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr> 
                      <td> 
                        <!--#include file="menu.asp"-->
                      </td>
                    </tr>
                  </table>
                  <br>
                  <table cellPadding="0" cellSpacing="0" id="AutoNumber3" style="border-collapse: collapse" width="100%" height="218" align="center" border="0">
                    <tr> 
                      <td height="4" width="99%" valign="top"  > 
                        <table cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse" width="100%" height="118" border="0">
                          <tr> 
                            <td height="14" width="100%" valign="top"> 
                              <table border=0 cellpadding=2 
                        cellspacing=1 bordercolordark="#FFFFFF" align="center"  width="95%" bgcolor="#666666">
                                <tr align="middle"> 
                                  <td colspan=3 height="22" bgcolor="#8b8b8b"> 
                                    <div align="center"><b><font color="#FFFFFF">FTP空间型号升级</font></b></div>
                                  </td>
                                </tr>
                                <form action="ftp_upd_rez.asp" method =post name= f_f_prdchg>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td height="35" class=datalistgrida  width="22%"> 
                                      <div align="center">当前FTP类型：</div>
                                    </td>
                                    <td colspan="2"  class=datalistgrida > 
                                      <input type="radio" name="oldf_prd" value="radiobutton" disabled=1 checked>
                                      <%=g_nme%>(<%=f_prd%>.<%=oldclsnme%>)</td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td height="22"  class=datalistgrida > 
                                      <div align="center">可选升级类型：</div>
                                    </td>
                                    <td colspan="2" class=datalistgrida  style="line-height:150%" > 
                                      <% 
				i=1
query = "select * from v_prclst where  g_sst=" & oldsst & " and  p_cls=" & session("usrclass") & " and g_tag='" & g_tag & "' and (g_sze >= " & oldsze & " and  g_maxcns>= " & oldmaxcns & " and p_prd<>'" & f_prd & "') and p_yar="&f_yar &" and g_shw=1 and p_tmetpe=" & p_tmetpe &" order by g_sze"
rs1.open query,conn,1,1
if rs1.eof then
				response.write "<font color=#ff0000>对不起，当前没有可升级产品！</font>"
				end if
				while not rs1.eof
				newprc = get_cst(p_tmetpe, 5, 1, 1, clng(rs1("p_prc"))/clng(rs1("p_yar")))
				if  clng(newprc)>clng(oldprc) then
		     %>
                          <input type=hidden name="newprdprc<%=rs1("g_prd")%>" value="<%=newprc%>">                                      <input type="radio" name="newproid" value="<%=rs1("g_prd")%>" onclick="javascript:document.f_f_prdchg.p_prohg.value=Math.round((document.f_f_prdchg.newprdprc<%=rs1("g_prd")%>.value-<%=oldprc%>)*<%=months%>/12);">
                                      <%=rs1("g_nme")%>（<%=rs1("g_prd")%>.<%=rs1("pc_nme")%>） 
                                      <%
									  
						  if cint(g_pdtcls)<>cint(rs1("pc_id")) then
						  response.write "<font color=#ff0000>＊</font>"
						  end if
						  %>
                                      <br>
                                      <% 
			end if
				 rs1.movenext
				 wend
				rs1.close

				 %>
                                    </td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  class=datalistgrida  height="35" align="center"> 
                                      需要支付的费用： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <input class="input" name="p_prohg" size="10" maxlength="50" value="<%=clng((up_prc)*months/12)%>"  disabled=1>
                                      元人民币 </td>
                                    <td  class=datalistgrida  width="20%"> 
                                      <input name="Clear2" type="button" value="升 级"  class=btxx onClick="javascript:confirm_f_prdchg();">
                                      <input type=hidden name="ftpname" value="<%=ftpname%>" >
                                      <input type=hidden name=module value="prd">
                                    </td>
                                  </tr>
                                </form>
                                <tr bgcolor="#FFFFFF"> 
                                  <td height="22" class=datalistgrida  >&nbsp;</td>
                                  <td colspan="2" class=datalistgrida  style="line-height:150%" >注：用<font color="#FF0000">＊</font>号标出的新产品型号因为开设在不同类型的服务器上，有可能需要管理员手工处理。<br>
                                    <br>
                                    FTP空间型号升级的付费算法：M = ( P2 - P1 ) * (总月数 - 已使用月数) 
                                    / 12<br>
                                    P2：是指升级后的型号的年价。<br>
                                    P1：是指升级前的型号的年价。<br>
                                    <br>
                                    要升级到其它型号的FTP空间，请联系本站。<br>
                                    <br>
                                    另：型号升级不影响已经作过的其它升级，各项参数采用累加法。</td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                          <%
		prd_fsze=find_prdhst("fsze",g_pdtcls)

if prd_fsze<>"" then %>
                          <tr> 
                            <td valign=top><br>
                              <table border=0 cellpadding=2 
                        cellspacing=1 bordercolordark="#FFFFFF" align="center"  width="95%" bgcolor="#666666">
                                <form action="ftp_upd_rez.asp" method =post name= f_sizeadd>
                                  <tr align="middle" bgcolor="#8b8b8b" > 
                                    <td colspan="3" height="22"  > 
                                      <div align="center"><b><font color="#FFFFFF">增加FTP空间</font></b></div>
                                    </td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  class=datalistgrida  height="35" align="center" width="22%"> 
                                      现有FTP空间： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <input class="input" name="404file" size="10" maxlength="50" value="<%=rs("f_sze")%>"  disabled=1>
                                      M 标准FTP空间 + 
                                      <input class="input" name="404file3" size="10" maxlength="50" value="<%=rs("f_szeadd")%>"  disabled=1>
                                      M 升级增加的FTP空间</td>
                                    <td  class=datalistgrida >&nbsp; </td>
                                  </tr>
                                  <%
if prd_fsze<>"" then
	query="select * from pdtlst where g_prd='"&prd_fsze &"'"
	rs1.open query,conn,1,1
	if rs1.eof then
	call errorpage(-2,"对不起，升级产品未定义！")
	else
	u_hsze=cint(rs1("g_sze"))
	end if
	rs1.close
end if	
				  %>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  class=datalistgrida  height="35" align="center"> 
                                      需要增加： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <select name="f_szeaddcnt">
                                        <option value=1>1</option>
                                        <option value=2>2</option>
                                        <option value=3>3</option>
                                        <option value=4>4</option>
                                        <option value=5>5</option>
                                        <option value=6>6</option>
                                        <option value=7>7</option>
                                        <option value=8>8</option>
                                        <option value=9>9</option>
                                        <option value=10>10</option>
                                      </select>
                                      X 
                                      <select name="f_prcstr" style="font-size: 9pt" size="1" >
                                        <% 
					  p_cls=session("usrclass")
					  query="select * from v_prclst where g_prd='"&prd_fsze&"' and p_cls="&session("usrclass")&" order by p_tmetpe,p_yar"
 					  rs2.open query,conn,1,1
					  while not rs2.eof 
					  p_yar=rs2("p_yar")
                      p_yar=cstr(cint(p_yar)*u_hsze)&"M"
					  response.write "<option value='"&rs2("p_prcstr")&"'>"&clng(clng(rs2("p_prc"))*months/12)&"元/"&p_yar&"</option>"
					  rs2.movenext
					  wend
					  rs2.close
					  %>
                                      </select>
                                    </td>
                                    <td  class=datalistgrida  width="20%"> 
                                      <input name="Clear" type="button" value="升 级"  class=btxx onClick="javascript:confirm_sizeadd();">
                                      <input type=hidden name="ftpname" value="<%=ftpname%>" >
                                      <input type=hidden name=module value="sze">
                                    </td>
                                  </tr>
                                </form>
                                <tr bgcolor="#FFFFFF"> 
                                  <td  class=datalistgrida  height="22">&nbsp;</td>
                                  <td  class=datalistgrida  colspan="2" height="22" style="line-height:150%">增加FTP空间的付费算法：M 
                                    = P * (总月数 - 已使用月数) / 12 * N<br>
                                    <br>
                                    P：是指增加FTP空间XXX M的一年价格。<br>
                                    N：即所选择需要增加的XXX M的倍数。 <br>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                          <% end if %>
                          <%
prd_fcns=find_prdhst("fcns",g_pdtcls)
if  prd_fcns<>"" then 
		%>
                          <tr> 
                            <td height="163"  valign="top"> <br>
                              <table border=0 cellpadding=2 
                        cellspacing=1 bordercolordark="#FFFFFF" align="center"  width="95%" bgcolor="#666666">
                                <form action="ftp_upd_rez.asp" method =post name= f_cnsadd>
                                  <tr align="middle" bgcolor="#8b8b8b"> 
                                    <td colspan="3" height="22" > 
                                      <div align="center"><b><font color="#FFFFFF">增加FTP帐号数</font></b></div>
                                    </td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  class=datalistgrida height="35" align="center" width="22%"> 
                                      当前FTP帐号数： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <%
if prd_fcns<>"" then
	query="select * from pdtlst where g_prd='"&prd_fcns &"'"
	rs1.open query,conn,1,1
	if rs1.eof then
	call errorpage(-2,"对不起，升级产品未定义！")
	else
	g_maxcns=rs1("g_maxcns")
	end if
	rs1.close
end if
				  %>
                                      <input class="input" name="404file22" size="10" maxlength="50" value="<%
				  if  isnull(rs("f_maxcns")) or rs("f_maxcns")=""  then
				 response.write "默认"
				 else
				 response.write rs("f_maxcns")
'response.write "默认"
				 end if %>" disabled=1>
                                      个标准FTP帐号 + 
                                      <input class="input" name="404file42" size="10" maxlength="50" value="<%=rs("f_cnsadd")%>"  disabled=1>
                                      个升级增加的FTP帐号</td>
                                    <td   class=datalistgrida width="20%">&nbsp; </td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  class=datalistgrida  height="35" align="center"> 
                                      需要增加： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <select name="f_cnsaddcnt">
                                        <option value=1>1</option>
                                        <option value=2>2</option>
                                        <option value=3>3</option>
                                        <option value=4>4</option>
                                        <option value=5>5</option>
                                        <option value=6>6</option>
                                        <option value=7>7</option>
                                        <option value=8>8</option>
                                        <option value=9>9</option>
                                        <option value=10>10</option>
                                        <option value=11>11</option>
                                        <option value=12>12</option>
                                        <option value=13>13</option>
                                        <option value=14>14</option>
                                        <option value=15>15</option>
                                        <option value=16>16</option>
                                        <option value=17>17</option>
                                        <option value=18>18</option>
                                        <option value=19>19</option>
                                        <option value=20>20</option>
                                      </select>
                                      X 
                                      <select name="f_prcstr" style="font-size: 9pt" size="1" >
                                        <% 
					  p_cls=session("usrclass")
					  query="select * from v_prclst where g_prd='"&prd_fcns&"' and p_cls="&session("usrclass")&" order by p_tmetpe,p_yar"
					  rs2.open query,conn,1,1
					  while not rs2.eof 
					  p_yar=rs2("p_yar")
                      p_yar=cstr(cint(p_yar)*g_maxcns)&"个帐号"
					  response.write "<option value='"&rs2("p_prcstr")&"'>"&clng(clng(rs2("p_prc"))*months/12)&"元/"&p_yar&"</option>"
					  rs2.movenext
					  wend
					  rs2.close
					  %>
                                      </select>
                                    </td>
                                    <td  class=datalistgrida  width="20%"> 
                                      <input name="Clear22" type="button" value="升 级"  class=btxx onClick="javascript:cfm_maxcns();">
                                      <input type=hidden name="ftpname" value="<%=ftpname%>" >
                                      <input type=hidden name=module value="cns">
                                    </td>
                                  </tr>
                                </form>
                                <tr bgcolor="#FFFFFF"> 
                                  <td   class=datalistgrida height="22">&nbsp;</td>
                                  <td  class=datalistgrida  colspan="2" height="22" style="line-height:150%">增加FTP帐号数的付费算法：M 
                                    = P * (总月数 - 已使用月数) / 12 * N <br>
                                    <br>
                                    P：是指增加FTP帐号数 XXX个的一年价格。<br>
                                    N：即所选择需要增加的XXX个连接的倍数。<br>
                                  </td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                          <% end if %>
                        </table>
                        <%
rs.close
%>
                      </td>
                    </tr>
                    <tr> 
                      <td height="4" width="99%" valign="top"  >&nbsp;</td>
                    </tr>
                  </table>
                  <br>
                  <br>
                  <script language="javascript">
function confirm_f_prdchg()
{
if(confirm("如果确认升级FTP空间型号，系统将自动扣除您的款项，是否确认此升级操作？"))
document.f_f_prdchg.submit();
}

function confirm_sizeadd()
{
if(confirm("如果确认增加FTP空间，系统将自动扣除您的款项，是否确认此升级操作？"))
document.f_sizeadd.submit();
}


function cfm_maxcns()
{
if(confirm("如果确认增加FTP帐号，系统将自动扣除您的款项，是否确认此升级操作？"))
document.f_cnsadd.submit();
}
</script>
                  <br>
                  <br>
                </td>
              </tr>
              </tbody> 
            </table>
          </TD>
        </TR>
        </TBODY> 
      </TABLE>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY> 
        <TR> 
          <TD bgColor=#cccccc><IMG height=1 
            src="/imgs/spacer.gif" 
      width=1></TD>
        </TR>
        </TBODY> 
      </TABLE>
      <!--#include virtual="/incs/web_bottom.asp"-->

