<!-- Title -->
<div class="primary-block">
    <div class="main-content">
        <h1 class="title-content">Reset</h1>
        <ul class="tabs-content">
            <li><a href="#char_manager&act=reset" rel="ajax">Reset</a></li>

            <? if(isset($Use_ResetVIP) && $Use_ResetVIP == 1) { ?>
            <li><a href="#char_manager&act=resetvip" rel="ajax">Reset VIP</a></li>
            <? } ?>

	<? if ( isset($Use_ResetVIP2) && $Use_ResetVIP2 == 1 ) { ?>
	<li class="active"><a href="#char_manager&act=resetvip2" rel="ajax">Reset VIP-2</a></li>
	<? } ?>

            <? if((isset($Use_UyThacOnline) && $Use_UyThacOnline == 1) || (isset($Use_UyThacOffline) && $Use_UyThacOffline == 1)) { ?>
            <li><a href="#char_manager&act=uythac_reset" rel="ajax">Reset UT</a></li>
            <? } ?>

            <? if( ((isset($Use_UyThacOnline) && $Use_UyThacOnline == 1) || (isset($Use_UyThacOffline) && $Use_UyThacOffline == 1)) && isset($Use_ResetVIP) && $Use_ResetVIP == 1 ) { ?>
            <li><a href="#char_manager&act=uythac_resetvip" rel="ajax">Reset UT VIP</a></li>
            <? } ?>

            <? if(isset($Use_ResetOver) && $Use_ResetOver == 1) { ?>
            <li><a href="#char_manager&act=resetover" rel="ajax">RS OVER</a></li>
            <? } ?>

            <? if( (isset($Use_ResetOver) && $Use_ResetOver == 1) && isset($Use_ResetVIP) && $Use_ResetVIP == 1 ) { ?>
            <li><a href="#char_manager&act=resetvipover" rel="ajax">RS OVER VIP</a></li>
            <? } ?>
        </ul>
    </div>
</div>
<!-- End Title -->
<!-- Content -->
<div class="priority-block out-top-20">
    <div class="head-block">
        <h1 class="title-head"><span class="text-semibold">Lưu ý</span></h1>
    </div>
    <div class="in-20">
        <ul class="noted in-left-10">
    		<li><b>Reset VIP-2</b> : LV Reset thấp hơn, Không tốn Jewel, Point và Mệnh Lệnh được hưởng khi Reset cao hơn . Tuy nhiên sẽ phải tốn Gcoin hoặc Vpoint hơn khi Reset.</li>
    		<li><b>Được sử dụng Gcoin Khuyến Mại</b></li>
		<li><b>Sau khi Reset nhân vật trở về (Level = <font color=red><? echo $level_after_resetvip2 ?></font> và Exp = <font color=red><? echo $exp_after_resetvip2 ?></font>).</b></li>
    		<li>Reset không cần cởi đồ.<br>
    		<li>Sau khi Reset hãy vào phần <b><a href="#char_manager&act=rutpoint" onclick="$('index2.php?mod=char_manager&act=rutpoint','hienthi');"><font color=red>Rút Point</font></a></b> để lấy Point sử dụng.</li>

        </ul>
    </div>
</div>

<div class="primary-block out-top-20">
    <div class="head-block">
        <h1 class="title-head"><span class="text-semibold">Thông tin nhân vật</span></h1>
    </div>
    <div class="in-20">

        <div class="form-2" id="rs_content">
            <div class="form-row">
                <div class="form-col-1"><span>Nhân vật Reset</span></div>
                <div class="form-col-2"><span class="tag tag-orange"><? echo $_SESSION['mu_nvchon']; ?></span></div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <div class="line"></div>
            <div class="form-row">
                <div class="form-col-1"><span>Reset lần thứ</span></div>
                <div class="form-col-2"><? echo $_SESSION['nv_reset']+1; ?></div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <? if($hotrotanthu == 1 || $use_gioihanrs[$thehe_choise] == 1) { ?>
            <div class="form-row">
                <div class="form-col-1"><span>TOP 0h</span></div>
                <div class="form-col-2">
                    <? echo $char_in_top; ?></strong>
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <? } ?>
            <?
                    if($use_gioihanrs[$thehe_choise] == 1) {
                ?>
            <div class="form-row">
                <div class="form-col-1"><span>Giới hạn Reset</span></div>
                <div class="form-col-2">
                    <? echo $gioihanrs; ?>lần / ngày
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <? } ?>
            <?
                    if($hotrotanthu == 1) {
                ?>
            <div class="form-row">
                <div class="form-col-1"><span>Hỗ Trợ Tân Thủ</span></div>
                <div class="form-col-2"><? echo $tanthu_group; ?></div>
                <div class="form-col-3">Giảm <strong><? echo $level_giam; ?> LV</strong></div>
            </div>
            <? } ?>
            <div class="form-row">
                <div class="form-col-1"><span>Cấp độ</span></div>
                <div class="form-col-2">
                    <? echo $_SESSION['nv_level'] . " / {$level_show}"; ?>
                </div>
                <div class="form-col-3">
                    <? echo $notice_level; ?>
                </div>
            </div>
            <div class="form-row">
                <div class="form-col-1"><span class="bank-icon bank-zen"></span></div>
                <div class="form-col-2">
                    <? echo number_format($zen, 0, ',', '.'); ?>
                </div>
                <div class="form-col-3">
                    <? echo $notice_zen; ?>
                </div>
            </div>
            <div class="form-row">
                <div class="form-col-1"><span class="bank-icon bank-g"></span></div>
                <div class="form-col-2">
                    <? echo $gcoin_reset_vip2; ?>
                </div>
                <div class="form-col-3">
                    <? echo $notice_gcoin; ?>
                </div>
            </div>
            <div class="form-row">
                <div class="form-col-1"><span class="bank-icon bank-v"></span></div>
                <div class="form-col-2">
                    <? echo $vpoint_reset_vip2; ?>
                </div>
                <div class="form-col-3">
                    <? echo $notice_vpoint; ?>
                </div>
            </div>
            <div class="form-row">
                <div class="form-col-1"><span>Reset/ngày</span></div>
                <div class="form-col-2">
                    <? echo "$notice_resetday"; ?>
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
			<!--
            <div class="form-row">
                <div class="form-col-1"><span>Reset vượt mức</span></div>
                <div class="form-col-2">
                    <? echo "$notice_vuotmuc"; ?>
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
			-->
            <div class="form-row">
                <div class="form-col-1"><span>Đổi nhân vật</span></div>
                <div class="form-col-2">
                    <? echo $doinv; ?>
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <div class="form-row">
                <div class="form-col-1"><span>Thoát Game</span></div>
                <div class="form-col-2">
                    <? echo $online; ?>
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <div class="form-row">
                <div class="form-col-1"><span>Chọn loại đơn vị Tiền Tệ</span></div>
                <div class="form-col-2">
                    <input type="radio" name="tiente" value="gcoin" /> <label for="use_gcoin">Gcoin</label><br />
                    <input type="radio" name="tiente" value="vpoint" checked="checked" /> <label for="use_vpoint">Vpoint</label>
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <? if($use_gioihanrs[$thehe_choise]==1 && $use_overrs[$thehe_choise]==1) { ?>

            <div class="form-row">
                <div class="form-col-1"><span>Reset Vượt Mức</span></div>
                <div class="form-col-2">

                    <i>Cho phép Reset vượt mức quy định trong ngày : <b> <? echo $overrs_rs[$thehe_choise]; ?> lần Reset </b><br />
                        Bắt buộc phải Reset bằng Gcoin.<br />
                        Chi phí thêm : <b> <? echo $overrs_gcoin[$thehe_choise]; ?> Gcoin </b><br>
						<? if($add_bxh[$thehe_choise]==0){?>
						Số lần Reset vượt mức không được tính vào BXH ALL, chỉ tính vào BXH Reset 2 theo thời gian Ngày, Tuần, Tháng.
						<? }?>
						</i>
                </div>
                <div class="form-col-3">&nbsp;</div>
            </div>
            <? } ?>
            <div class="form-submit">
                
                    <button class="btn btn-green btn-block btn-lg" type="button" name="Submit" id="btn_rsvip2" <? if($accept=='0') { echo 'disabled="disabled"'; } ?> >Thực hiện Reset VIP-2</button>

                <span id="rs_loading"></span>
                <div id="rs_err"></div>
            </div>
        </div>
    </div>
</div>

<? if($use_gioihanrs[$thehe_choise] == 1) { ?>

			<?if ( ($use_gioihanrs_type[$thehe_choise] == 2 && $char_in_top != 1) || ($use_gioihanrs_type[$thehe_choise] == 3 && $char_in_top != 1) ){?>
<div class="priority-block out-top-20">
    <div class="head-block">
        <h1 class="title-head"><span class="text-semibold">Giới hạn Reset đặc biệt</span></h1>
    </div>
    <div class="in-20">
	<ul class="noted in-left-10">
				<li>Tổng số lần reset của TOP 1 lúc 0h hôm nay là: <strong><font color="red"><?=$Top1_TotalRS;?></font></strong> lần.</li>
				<li>Sau khi max giới hạn, tổng reset của TOP 1 sẽ là: <strong><font color="red"><?=$SUM_Top1_TotalRS;?></font></strong> lần.</li>
				<li>Bạn đang đứng Top <?=$show_top;?>, tổng reset hiện tại của bạn là: <strong><font color="red"><?=$char_sumrs;?></font></strong> lần.</li>
				<li>Bạn được reset cho đến khi kém TOP 1 lúc max giới hạn ngày <strong><font color="red"><?=$duocreset;?></font></strong> lần, tức hôm nay bạn có thể reset <strong><font color="red"><?=$gioihanrs;?></font></strong> lần.</li>
    </ul>
	</div>
</div>
			<? } ?>
			
	<div class="out-top-20">		
		<table class="table table-blue table-text-center table-border-2">
		<thead>
		  <tr>
		    <th colspan="4" align="center">
		    	<b>Giới hạn Reset trong ngày</b><br>
		    	Nhân vật <strong class="clr02"><?=$_SESSION['mu_nvchon']; ?></strong> đứng TOP <?=$show_top; ?> được Reset tối đa <b><?=$gioihanrs; ?></b> lần / ngày<br />
                <i>(TOP nhân vật tính tại lúc 0h00 hàng ngày)</i>
	    	</th>
		  </tr>
		  <tr>
		    <th align="center" rowspan="2"><b>TOP</b></th>
		    <th align="center" colspan="3"><b>Giới hạn số lần Reset/ngày</b></th>
		  </tr>
          <tr>
		    <th align="center"><b>Thứ 2 - Thứ 6</b></th>
		    <th align="center"><b>Thứ 7</b></th>
            <th align="center"><b>Chủ Nhật</b></th>
		  </tr>
	        </thead>
	        <tbody>
		<tr>
		    <td align="center">TOP 1</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top1[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top1[$thehe_choise] + +floor($gioihanrs_top1[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top1[$thehe_choise] + +floor($gioihanrs_top1[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center"><?=$gioihanrs_top1_type2[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top1_type2[$thehe_choise] + +floor($gioihanrs_top1_type2[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top1_type2[$thehe_choise] + +floor($gioihanrs_top1_type2[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 3){?>
			<td align="center"><?=$gioihanrs_top1_type3[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top1_type3[$thehe_choise] + +floor($gioihanrs_top1_type3[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top1_type3[$thehe_choise] + +floor($gioihanrs_top1_type3[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } ?>
		  </tr>
          <tr>
		    <td align="center">TOP 2</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top2[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top2[$thehe_choise] + +floor($gioihanrs_top2[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top2[$thehe_choise] + +floor($gioihanrs_top2[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top2_type2[$thehe_choise];?>] lần reset</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 3){?>
			<td align="center" rowspan="14" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_other_type3[$thehe_choise]; ?>] lần reset</td>
			<? } ?>
		  </tr>
          <tr>
		    <td align="center">TOP 3</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top3[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top3[$thehe_choise] + +floor($gioihanrs_top3[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top3[$thehe_choise] + +floor($gioihanrs_top3[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top3_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
          <tr>
		    <td align="center">TOP 4</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top4[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top4[$thehe_choise] + +floor($gioihanrs_top4[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top4[$thehe_choise] + +floor($gioihanrs_top4[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top4_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
          <tr>
		    <td align="center">TOP 5-10</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top10[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top10[$thehe_choise] + +floor($gioihanrs_top10[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top10[$thehe_choise] + +floor($gioihanrs_top10[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top10_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 11-20</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top20[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top20[$thehe_choise] + +floor($gioihanrs_top20[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top20[$thehe_choise] + +floor($gioihanrs_top20[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top20_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 21-30</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top30[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top30[$thehe_choise] + +floor($gioihanrs_top30[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top30[$thehe_choise] + +floor($gioihanrs_top30[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top30_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 31-40</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top40[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top40[$thehe_choise] + +floor($gioihanrs_top40[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top40[$thehe_choise] + +floor($gioihanrs_top40[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top40_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 41-50</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top50[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top50[$thehe_choise] + +floor($gioihanrs_top50[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top50[$thehe_choise] + +floor($gioihanrs_top50[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top50_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 51-60</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top60[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top60[$thehe_choise] + +floor($gioihanrs_top60[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top60[$thehe_choise] + +floor($gioihanrs_top60[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top60_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 61-70</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top70[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top70[$thehe_choise] + +floor($gioihanrs_top70[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top70[$thehe_choise] + +floor($gioihanrs_top70[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top70_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 71-80</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top80[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top80[$thehe_choise] + +floor($gioihanrs_top80[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top80[$thehe_choise] + +floor($gioihanrs_top80[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top80_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 81-90</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top90[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top90[$thehe_choise] + +floor($gioihanrs_top90[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top90[$thehe_choise] + +floor($gioihanrs_top90[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top90_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP 91-100</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_top100[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top100[$thehe_choise] + +floor($gioihanrs_top100[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_top100[$thehe_choise] + +floor($gioihanrs_top100[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_top100_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
		<tr>
		    <td align="center">TOP > 100</td>
			<?if ($use_gioihanrs_type[$thehe_choise] == 1){?>
		    <td align="center"><?=$gioihanrs_other[$thehe_choise]; ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_other[$thehe_choise] + +floor($gioihanrs_other[$thehe_choise] * $overrs_sat_extra[$thehe_choise]/100); ?> lần / ngày</td>
            <td align="center"><?=$gioihanrs_other[$thehe_choise] + +floor($gioihanrs_other[$thehe_choise] * $overrs_sun_extra[$thehe_choise]/100); ?> lần / ngày</td>
			<? } elseif ($use_gioihanrs_type[$thehe_choise] == 2){?>
			<td align="center" colspan="3">Cho đến khi kém TOP 1 lúc max giới hạn ngày [<?=$gioihanrs_other_type2[$thehe_choise];?>] lần reset</td>
			<? } ?>
		  </tr>
	</tbody>
        </table>
<? } ?>
<br />

<table class="table table-blue table-text-center table-border-2">
<thead>
<tr>
    <th align="center" rowspan="2"><b>Reset</b></th>
    <th align="center" colspan="3"><b>Điều kiện Reset</b></th>
    <th align="center" colspan="2"><b>Phần thưởng</b></th>
</tr>
<tr>
    <th align="center"><b>Level</b></th>
    <th align="center"><b>Gcoin</b></th>
    <th align="center"><b>Vpoint</b></th>
    <th align="center"><b>Point</b></th>
    <th align="center"><b>ML</b></th>
</tr>
<tbody>
<? if ($cap_reset_max>0) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_0++; echo "$reset_cap_0 - $reset_cap_1"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_1_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_1_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_1_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_1_vip2 = floor($gcoin_cap_1_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_1_vip2; ?></td>
		    <td align="center"><? echo $point_cap_1_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_1_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>1) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_1++; echo "$reset_cap_1 - $reset_cap_2"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_2_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_2_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_2_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_2_vip2 = floor($gcoin_cap_2_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_2_vip2; ?></td>
		    <td align="center"><? echo $point_cap_2_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_2_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>2) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_2++; echo "$reset_cap_2 - $reset_cap_3"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_3_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_3_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_3_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_3_vip2 = floor($gcoin_cap_3_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_3_vip2; ?></td>
		    <td align="center"><? echo $point_cap_3_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_3_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>3) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_3++; echo "$reset_cap_3 - $reset_cap_4"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_4_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_4_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_4_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_4_vip2 = floor($gcoin_cap_4_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_4_vip2; ?></td>
		    <td align="center"><? echo $point_cap_4_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_4_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>4) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_4++; echo "$reset_cap_4 - $reset_cap_5"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_5_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_5_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_5_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_5_vip2 = floor($gcoin_cap_5_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_5_vip2; ?></td>
		    <td align="center"><? echo $point_cap_5_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_5_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>5) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_5++; echo "$reset_cap_5 - $reset_cap_6"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_6_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_6_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_6_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_6_vip2 = floor($gcoin_cap_6_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_6_vip2; ?></td>
		    <td align="center"><? echo $point_cap_6_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_6_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>6) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_6++; echo "$reset_cap_6 - $reset_cap_7"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_7_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_7_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_7_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_7_vip2 = floor($gcoin_cap_7_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_7_vip2; ?></td>
		    <td align="center"><? echo $point_cap_7_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_7_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>7) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_7++; echo "$reset_cap_7 - $reset_cap_8"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_8_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_8_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_8_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_8_vip2 = floor($gcoin_cap_8_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_8_vip2; ?></td>
		    <td align="center"><? echo $point_cap_8_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_8_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>8) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_8++; echo "$reset_cap_8 - $reset_cap_9"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_9_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_9_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_9_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_9_vip2 = floor($gcoin_cap_9_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_9_vip2; ?></td>
		    <td align="center"><? echo $point_cap_9_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_9_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>9) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_9++; echo "$reset_cap_9 - $reset_cap_10"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_10_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_10_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_10_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_10_vip2 = floor($gcoin_cap_10_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_10_vip2; ?></td>
		    <td align="center"><? echo $point_cap_10_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_10_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>10) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_10++; echo "$reset_cap_10 - $reset_cap_11"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_11_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_11_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_11_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_11_vip2 = floor($gcoin_cap_11_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_11_vip2; ?></td>
		    <td align="center"><? echo $point_cap_11_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_11_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>11) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_11++; echo "$reset_cap_11 - $reset_cap_12"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_12_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_12_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_12_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_12_vip2 = floor($gcoin_cap_12_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_12_vip2; ?></td>
		    <td align="center"><? echo $point_cap_12_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_12_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>12) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_12++; echo "$reset_cap_12 - $reset_cap_13"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_13_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_13_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_13_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_13_vip2 = floor($gcoin_cap_13_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_13_vip2; ?></td>
		    <td align="center"><? echo $point_cap_13_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_13_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>13) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_13++; echo "$reset_cap_13 - $reset_cap_14"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_14_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_14_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_14_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_14_vip2 = floor($gcoin_cap_14_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_14_vip2; ?></td>
		    <td align="center"><? echo $point_cap_14_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_14_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>14) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_14++; echo "$reset_cap_14 - $reset_cap_15"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_15_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_15_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_15_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_15_vip2 = floor($gcoin_cap_15_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_15_vip2; ?></td>
		    <td align="center"><? echo $point_cap_15_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_15_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>15) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_15++; echo "$reset_cap_15 - $reset_cap_16"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_16_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_16_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_16_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_16_vip2 = floor($gcoin_cap_16_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_16_vip2; ?></td>
		    <td align="center"><? echo $point_cap_16_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_16_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>16) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_16++; echo "$reset_cap_16 - $reset_cap_17"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_17_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_17_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_17_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_17_vip2 = floor($gcoin_cap_17_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_17_vip2; ?></td>
		    <td align="center"><? echo $point_cap_17_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_17_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>17) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_17++; echo "$reset_cap_17 - $reset_cap_18"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_18_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_18_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_18_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_18_vip2 = floor($gcoin_cap_18_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_18_vip2; ?></td>
		    <td align="center"><? echo $point_cap_18_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_18_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>18) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_18++; echo "$reset_cap_18 - $reset_cap_19"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_19_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_19_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_19_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_19_vip2 = floor($gcoin_cap_19_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_19_vip2; ?></td>
		    <td align="center"><? echo $point_cap_19_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_19_vip2; ?></td>
		  </tr>
<? } ?>
<? if ($cap_reset_max>19) { ?>
		  <tr>
		    <td align="center"><? $reset_cap_19++; echo "$reset_cap_19 - $reset_cap_20"; ?></td>
		    <td align="center"><? echo "<b>" . abs($level_cap_20_vip2 - $level_giam) . "</b> <font size=1>(<i><s>". $level_cap_20_vip2 ."</s></i>)</font>";; ?></td>
		    <td align="center"><? echo $gcoin_cap_20_vip2; ?></td>
		    <td align="center"><? $vpoint_cap_20_vip2 = floor($gcoin_cap_20_vip2*(1+$vpoint_extra/100)); echo $vpoint_cap_20_vip2; ?></td>
		    <td align="center"><? echo $point_cap_20_vip2; ?></td>
		    <td align="center"><? echo $ml_cap_20_vip2; ?></td>
		  </tr>
<? } ?>
</tbody>
</table>
</div>

       <?
            if($hotrotanthu == 1) {
        ?>
        <div class="out-top-20">
		<table class="table table-blue table-text-center table-border-2">
        <thead>
            <tr class="span">
                <th colspan="2" align="center">
                	<b>Tân Thủ Được giảm cấp độ khi Reset</b>
                </td>
            </tr>
            <tr>
                <th align="center"><b>Nhân vật thuộc TOP</b></td>
                <th align="center"><b>Cấp độ khi Reset được giảm</b></td>
            </tr>
	</thead>
            
            <tr>
                <th align="center"><b>TOP 2</b></td>
                <td align="center">Giảm <b><? echo $top2_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP 3</b></td>
                <td align="center">Giảm <b><? echo $top3_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP 4</b></td>
                <td align="center">Giảm <b><? echo $top4_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP 5-10</b></td>
                <td align="center">Giảm <b><? echo $top10_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP 11-20</b></td>
                <td align="center">Giảm <b><? echo $top20_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP 21-30</b></td>
                <td align="center">Giảm <b><? echo $top30_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP 31-40</b></td>
                <td align="center">Giảm <b><? echo $top40_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP 41-50</b></td>
                <td align="center">Giảm <b><? echo $top50_rsredure; ?></b> LV khi Reset</td>
            </tr>
            
            <tr>
                <td align="center"><b>TOP ngoài 50</b></td>
                <td align="center">Giảm <b><? echo $top50_over_rsredure; ?></b> LV khi Reset</td>
            </tr>
            </tbody>
        </table>
		</div>
        <?
                }
        ?>

<!-- End Content -->