<!--#include virtual="/incs/config.asp" -->
<!--#include virtual="/incs/web_top.asp" -->
      <%
chk_log_usr()

	mnme=SafeRequest("mnme")
	If mnme="" Then
	call errorpage(-2,"对不起，参数错误！")
	End If
	query="select * from v_emllst  where m_unme='"&session("usrname")&"'  and m_dme ='"&mnme&"'"
	rs.open query,conn,1,1
    if rs.recordcount<>1 then
	rs.close
	conn.close
	call errorpage(-2,"对不起，该订单不存在或者不属于您的会员号，管理员请先切换到该订单会员！")
	response.end
	end if
    mailname=trim(rs("m_dme"))
	m_prd=trim(rs("m_prd"))
	m_yarcnt=rs("m_yarcnt")
	m_prcstr=rs("m_prcstr")
	g_sst=rs("m_sst")
	g_pdtcls=rs("g_pdtcls")

	query="select * from v_prclst where p_prcstr='"&m_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='"&m_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")
	m_yar=rs1("p_yar")
	p_tmetpe=rs1("p_tmetpe")
	oldsst=rs1("g_sst")
	oldprc = get_cst(p_tmetpe, 5, 1, 1, clng(oldprc)/clng(m_yar))
	end if
	rs1.close
%>
      <%
                months=datediff("m",now(),cdate(rs("m_exptme")))
				years=datediff("yyyy",now(),cdate(rs("m_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/eml_mng/eml_lst.asp">企业邮局管理</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>邮局<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="eml_lst.asp?querytype=8"><font color="#000000">今天新开通</font></a> 
                        <font color="#000000">|</font> <a href="eml_lst.asp?querytype=9"><font color="#000000">本周新开通</font></a> 
                        <font color="#000000">|</font> <a href="eml_lst.asp?querytype=10"><font color="#000000">本周到期</font></a> 
                        <font color="#000000">| </font><a href="eml_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   bordercolor="#5785B2" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse" width="98%" align="center">
                    <tr> 
                      <td height="34" bgcolor="#FFFFFF"> 
                        <div align="center"> 
                          <table width="85%" border="0" cellspacing="0" cellpadding="0" align="center">
                            <tr> 
                              <td> 
                                <!--#include file="eml_mnu.asp"-->
                              </td>
                            </tr>
                          </table>
                          <br>
                        </div>
                      </td>
                    </tr>
                  </table>
                  <table   bordercolor="#FFFFFF" cellpadding="0" cellspacing="0" id="AutoNumber3" style="border-collapse: collapse" width="95%" height="218" align="center">
                    <tr> 
                      <td height="4" width="99%" valign="top" bgcolor="#FFFFFF" > 
                        <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  cellpadding="0" cellspacing="0" >
                                <tr> 
                                  <td height=1></td>
                                </tr>
                              </table>
                              <table align="center" border="0" cellpadding="4" cellspacing="1" width="100%" bordercolordark="#FFFFFF" bgcolor="#666666">
                                <tr align="middle" bgcolor="#8b8b8b"> 
                                  <td colspan=3 height="22"> 
                                    <div align="center"><b><font color="#FFFFFF">邮局型号升级</font></b><font color="#FFFFFF">&nbsp; 
                                      </font> </div>
                                  </td>
                                </tr>
                                <form action="eml_upd_rez.asp" method =post name= f_proidchg>
                                  <tr bgcolor="#FFFFFF" > 
                                    <td height="35" class=datalistgrida   width="22%" align="center"> 
                                      当前邮局类型：</td>
                                    <td colspan="2" class=datalistgrida > 
                                      <input type="radio" name="oldproid" value="radiobutton" disabled=1 checked>
                                      <%=rs("g_nme")%>(<%=m_prd%>)</td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF" > 
                                    <td height="22" class=datalistgrida align="center" > 
                                      可选升级类型：</td>
                                    <td colspan="2"  class=datalistgrida style="line-height:150%"> 
                                      <% 
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_yar="&m_yar &"  and p_prd<>'" & m_prd & "') 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_proidchg.p_prohg.value=Math.round((document.f_proidchg.newprdprc<%=rs1("g_prd")%>.value-<%=oldprc%>)*<%=months%>/12);">
                                      <%=rs1("g_nme")%><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="submit" value="升  级"  class=btxx onClick="javascript:return confirm_proidchg();">
                                      <input type=hidden name="mailname" value="<%=mailname%>" >
                                      <input type=hidden name=module value="prd">
                                    </td>
                                  </tr>
                                </form>
                                <tr bgcolor="#FFFFFF" > 
                                  <td height="22" class=datalistgrida align="center">&nbsp;</td>
                                  <td colspan="2" class=datalistgrida style="line-height:150%">邮局型号升级的付费算法：M 
                                    = ( P2 - P1 ) * (总月数 - 已使用月数) / 12<br>
                                    P2：是指升级后的型号的年价。<br>
                                    P1：是指升级前的型号的年价。<br>
                                    <br>
                                    如果要您要增加的邮局数没有可选型号，可以通过增加邮局空间进行升级</td>
                                </tr>
                              </table>
                            </td>
                          </tr>
                          <% theprd=find_prdnew("msze",g_sst)
						  if theprd<>"" then %>
                          <tr> 
                            <td  valign="top"> <br>
                              <table align="center" border="0" cellpadding="4" cellspacing="1" width="100%" bordercolordark="#FFFFFF" bgcolor="#666666">
                                <form action="eml_upd_rez.asp" method =post name= f_sizeadd>
                                  <tr align="middle" > 
                                    <td  colspan="3" height="22"> <b><font color="#FFFFFF">增加邮局空间</font></b></td>
                                  </tr>
                                  <%
	query="select * from pdtlst where g_prd='"&theprd &"'"
	rs1.open query,conn,1,1
	if rs1.eof then
	call errorpage(-2,"对不起，升级产品未定义！")
	else
	g_msze=cint(rs1("g_sze"))
	end if
	rs1.close
					  %>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  height="35" class=datalistgrida   align="center" width="22%"> 
                                      现有邮局空间： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <input class="input" name="404file" size="10" maxlength="50" value="<%=rs("m_sze")%>"  disabled=1>
                                      M 标准邮局空间 + 
                                      <input class="input" name="404file3" size="10" maxlength="50" value="<%=rs("m_szeadd")%>"  disabled=1>
                                      M 升级增加的邮局空间</td>
                                    <td  class=datalistgrida>&nbsp; </td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  class=datalistgrida  height="35" align="center"> 
                                      需要增加： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <select name="m_szeaddcnt">
                                        <option value=1>1</option>
                                        <option value=2>2</option>
                                        <option value=3>3</option>
                                        <option value=5>5</option>
                                        <option value=10>10</option>
                                        <option value=20>20</option>
                                        <option value=30>30</option>
                                        <option value=50>50</option>
                                      </select>
                                      X 
                                      <select name="m_prcstr" style="font-size: 9pt" size="1" >
                                        <% 
					  p_cls=session("usrclass")
					  query="select * from v_prclst where g_prd='"&theprd&"' 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_msze)&"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="submit" value="升  级"  class=btxx onClick="javascript:return confirm_sizeadd();">
                                      <input type=hidden name="mailname" value="<%=mailname%>" >
                                      <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%">增加邮局空间的付费算法：M 
                                    = P * (总月数 - 已使用月数) / 12 * N<br>
                                    <br>
                                    P：是指增加空间XXX M一年的价格。<br>
                                    N：即所选择需要增加的XXX M的倍数。<br>
                                    <br>
                                  </td>
                                </tr>
                               
                              </table>
                              </td></tr>
							   <% end if %><br>
				                          <% theprd=find_prdnew("mcns",g_sst)
						  if theprd<>"" then %>
			  <tr><td>
                              <table align="center" border="0" cellpadding="4" cellspacing="1" width="100%" bordercolordark="#FFFFFF" bgcolor="#666666">
                                <form action="eml_upd_rez.asp" method =post name= f_cnsadd>
                                  <tr align="middle" > 
                                    <td  colspan="3" height="22"> <b><font color="#FFFFFF">增加邮局用户</font></b></td>
                                  </tr>
                                  <%
	query="select * from pdtlst where g_prd='"&theprd &"'"
	rs1.open query,conn,1,1
	if rs1.eof then
	call errorpage(-2,"对不起，升级产品未定义！")
	else
	g_maxcns=cint(rs1("g_maxcns"))
	end if
	rs1.close
					  %>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  height="35" class=datalistgrida   align="center" width="22%"> 
                                      现有邮局用户： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <input class="input" name="404file2" size="10" maxlength="50" value="<%=rs("m_sze")%>"  disabled=1>
                                      个标准邮局用户 + 
                                      <input class="input" name="404file32" size="10" maxlength="50" value="<%=rs("m_szeadd")%>"  disabled=1>
                                      个升级增加的邮局用户</td>
                                    <td  class=datalistgrida>&nbsp; </td>
                                  </tr>
                                  <tr bgcolor="#FFFFFF"> 
                                    <td  class=datalistgrida  height="35" align="center"> 
                                      需要增加： </td>
                                    <td  class=datalistgrida  height="22"> 
                                      <select name="m_cnsaddcnt">
                                        <option value=1>1</option>
                                        <option value=2>2</option>
                                        <option value=3>3</option>
                                        <option value=5>5</option>
                                        <option value=10>10</option>
                                        <option value=20>20</option>
                                        <option value=30>30</option>
                                        <option value=50>50</option>
                                      </select>
                                      X 
                                      <select name="m_prcstr" style="font-size: 9pt" size="1" >
                                        <% 
					  p_cls=session("usrclass")
					  query="select * from v_prclst where g_prd='"&theprd&"' 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="Clear3" type="submit" value="升  级"  class=btxx onClick="javascript:return confirm_cnsadd();">
                                    <input type=hidden name="mailname" value="<%=mailname%>" >
                                      <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%">增加邮局用户数的付费算法：M 
                                    = P * (总月数 - 已使用月数) / 12 * N <br>
                                    <br>
                                    P：是指增加邮局用户数 XXX个的一年价格。<br>
                                    N：即所选择需要增加的XXX个邮局用户数的倍数。 <br>
                                  </td>
                                </tr>
                              </table>
							  </td>
                          </tr>
							  <% end if %>
                        </table>
                      </td>
                    </tr>
                    <tr> 
                      <td height="4" width="99%" valign="top" bgcolor="#FFFFFF" >&nbsp;</td>
                    </tr>
                  </table>
                </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>
      <script language="javascript">
function confirm_proidchg()
{
if(confirm("如果确认升级邮局型号，系统将自动扣除您的款项，是否确认此升级操作？"))
return true;
else
return false;
}

function confirm_sizeadd()
{
if(confirm("如果确认增加邮局空间，系统将自动扣除您的款项，是否确认此升级操作？"))
return true;
else
return false;


}
function confirm_cnsadd()
{
if(confirm("如果确认增加邮局用户，系统将自动扣除您的款项，是否确认此升级操作？"))
return true;
else
return false;


}

</script>
      <!--#include virtual="/incs/web_bottom.asp"-->




