<div class="primary-block">
<?php include('templates/rank/rankrs_top.tpl'); ?>
    <div class="main-content">
        <h1 class="title-content">Xếp hạng nhân vật</h1>
        <div class="intro-content">
            <div class="in-20">
                <span class="color-violet">Xếp hạng Theo Số Level Master</span><br />
            </div>
        </div>
    </div>
</div>
    <div class="primary-block out-top-20">    
    <div class="in-20 font-14 text-semibold">
        <p class="update-time"><span class="color-red">Cập nhập lúc:</span> <span class="color-brown"><? echo $time_top; ?><span class="color-red"> <span class="color-red">( 5 phút cập nhập 1 lần )</span></p>

        <div class="out-top-20">
            <table class="table table-blue-white table-border-2 table-text-center table-sort">
                <thead>
                <tr>
                    <th>#</th>
                    <th>Nhân vật</th>
                    <th>Level Master</th>
                    <th>Relife / Reset</th>
                    <th>Lớp nhân vật</th>
                </tr>
                </thead>
                <tbody>
                <? 
                    foreach($rank as $key => $val) { 
                        //$vip_day_view = '';
                        //if($val['vip_day'] > 0) $vip_day_view = "<span>". $val['vip_day'] ."d</span>";
						
						$top = $key+1;
						if($top==1){$top='<img src="images/icons/top/1.png" width="80px"/>';}
				        if($top==2){$top='<img src="images/icons/top/2.png" width="60px"/>';}
				        if($top==3){$top='<img src="images/icons/top/3.png" width="55px"/>';}
                ?>
                <tr>
                    <td align="center"><? echo $top; ?></td>
                    <td align="center"><? echo $val['name']; ?></td>
                    <td align="center"><? echo $val['MasterLevel']; ?></td>
                    <td align="center"><? echo '<font color"red">'. $val['relife'] .'</font> / '. $val['reset']; ?></td>
                    <td align="center"><? echo $val['class']; ?></td>
                </tr>
                <? } ?>
                </tbody>
            </table>
        </div>
    </div>
</div>