<script language="javascript"> 
function puterr(){
	var r=confirm('您确定要进行升级吗?');
	if(r==true){
		formjf.submit();
	};
	else{
		return false;
		};
};
</script>
		<div class="userMain">
			<div class="uMain_title"><span class="pay">在线升级</span></div>
			<div class="uMain_content">
				<div class="stageBox">
					<div class="stageBoxTop"><span></span></div>
					<div class="stageBoxCenter">
						<div class="stageBoxCenterContent">
							<div class="main_nav">
								<ul>
									<li class="navb_4"><a href="?ac=pay&op=<?php if($chsh_usertype==1){echo'yue">月';}else{echo'dian">点';}?>卡列表</a></li>				 
									<li class="navb_4"><a href="?ac=pay&op=my">我的卡号</a></li>
									<li class="navb_4 nava_4"><a href="?ac=change">在线升级</a></li>
								</ul>
								<div class="action"><a href="?ac=paycz&op=add">在线充值</a></div>
<?php
	global $db;
	$sql="select * from s_users where S_Name='".$chsh_username."'";
	$result=$db->query($sql);
	$row=$db->fetch_array($result);
?>
															</div>
							<div class="minHeight500">


<?php
if($op==""){
?>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" valign="top" style="border:2px #21A8F6 solid;"><table width="90%" border="0" cellspacing="1" cellpadding="0">
              <tr>
                <td height="380" bgcolor="#EAF5FF"><table width="80%" height="229" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
                    <form method="post" action="do.php?ac=savechange" name="formjf" id="formjf">
                      <tr>
                        <td width="30%" height="35" align="center" class="td_border">用户帐号：</td>
                        <td width="70%" align="left" class="td_border">
                        <?php echo $chsh_username?>                        </td>
                      </tr>
                      <tr>
                        <td height="35" align="center" class="td_border">剩余财富：</td>
                        <td align="left" class="td_border"><?php echo $row["S_Coin"]?>点</td>
                      </tr>
                      <tr>
                        <td height="35" align="center" class="td_border">需要点数：</td>
                        <td align="left" class="td_border"><?php echo S_TGChange?>点</td>
                      </tr>
                      <tr>
                        <td height="35" align="center" class="td_border">升级后点数：</td>
                        <td align="left" class="td_border"><?php if($row["S_Coin"]<S_TGChange){echo"点数不够";}else{echo ($row["S_Coin"]-S_TGChange)."点";}?></td>
                      </tr>
                      <tr>
                        <td height="82" colspan="2" align="left" valign="top" class="td_border">
                        <font color="#FF0000"><br />
                       &nbsp;&nbsp;&nbsp;升级包月说明：<br />
                       &nbsp;&nbsp;&nbsp;默认包月点数为<?php echo S_TGChange?>点，升级后可以购买月卡进行续期。<br />
                       &nbsp;&nbsp;&nbsp;包月会员下载本站所有舞曲全部免费！<br /></font>                        
                       </td>
                      </tr>
                      <tr>
                        <td class="td_border" height="35" align="center" colspan="2">
                        <input type="button" value="确定升级" class="subput" onclick="puterr()" <?php if($chsh_usertype==1){echo"disabled";}?>/><?php if($chsh_usertype==1){echo"<font color=red>&nbsp;&nbsp;您已经是包月会员了,您的到期时间为：".$chsh_points."</font>";}?><br />
                        </td>
                      </tr>
                    </form>
                </table>
                </td>
              </tr>
          </table></td>
        </tr>
      </table> 
                </table>
                </td>
              </tr>
          </table></td>
        </tr>
      </table> 
<?php
}
?>							</ul>
								</div>
							</div>
						</div>
					</div>
					<div class="stageBoxBottom"><span></span></div>
				</div>