<div class="primary-block">
<div class="primary-block out-top-20">
    <div class="main-content">
        <ul class="tabs-content">
			<li class="active"><a href="#rank&act=rankpointrs&action=daily&type=all" rel="ajax">Danh Vọng 1</a></li>
			<li><a href="#rank&act=rankpointrs2&action=daily&type=all" rel="ajax">Danh Vọng 2</a></li>
        </ul>
    </div>

<div>
    </div>

</div>
    <div class="main-content">
        <h1 class="title-content">Xếp hạng Danh Vọng</h1>
        <div class="intro-content">
            <div class="in-20">
			<span class="color-violet">
	<center><b>Xếp hạng Theo Điểm Danh Vọng 1</b>: </center>
	<b>Điểm danh vọng</b> : Là số điểm nhận được tương ứng với cấp độ (LV) của Nhân vật khi thực hiện Reset, Reset OVER  (Reset Ủy Thác không được tính)<br />
    <font color='red'><strong>BXH Danh Vọng 1</strong></font> tính điểm Danh Vọng từ :
        <li><font color='blue'><strong>Reset</strong></font></li>
        <li><font color='blue'><strong>Reset VIP</strong></font></li>
        <li><font color='blue'><strong>Reset OVER</strong></font></li>
        <li><font color='blue'><strong>Reset OVER VIP</strong></font></li>
			</span>
<?
if(!isset($_GET['action'])) $_GET['action'] = 'daily';
if(!isset($_GET['type'])) $_GET['type'] = 'all';

if ($thehe_choise)
{
    echo "<table> <tr>";
    for($i=count($thehe_choise)-1;$i>0;$i--)
    {
        if(strlen($thehe_choise[$i]) > 0) {
            echo "<span class='tag tag-red'>";
            if($_SESSION['thehe'] == $i );
                else echo '<a href="#rank&act=rankpointrs&thehe='.$i.'" rel="ajax">';
            echo $thehe_choise[$i];
            if($_SESSION['thehe'] == $i );
                else echo "</a>";
            echo "</span>";
        }
    }
    echo "</tr> </table>";
}
?>
            </div>
        </div>
    </div>	
</div>
<div class="primary-block out-top-20">
<div class="primary-block out-top-20">
    <div class="main-content">
        <ul class="tabs-content">
			<li <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=all" rel="ajax">Ngày</a>
			<div class="submenu">
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='all') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=all" rel="ajax">ALL</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='dw') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=dw" rel="ajax">DW</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='dk') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=dk" rel="ajax">DK</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='elf') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=elf" rel="ajax">ELF</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='mg') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=mg" rel="ajax">MG</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='dl') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=dl" rel="ajax">DL</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='sum') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=sum" rel="ajax">SUM</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='rf') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=rf" rel="ajax">RF</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='daily' && $_GET['type']=='gl') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=daily&type=gl" rel="ajax">GL</a></p>
			</div>		
			</li>
			<li <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=all" rel="ajax">Tuần</a>
			<div class="submenu">
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='all') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=all" rel="ajax">ALL</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='dw') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=dw" rel="ajax">DW</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='dk') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=dk" rel="ajax">DK</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='elf') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=elf" rel="ajax">ELF</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='mg') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=mg" rel="ajax">MG</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='dl') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=dl" rel="ajax">DL</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='sum') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=sum" rel="ajax">SUM</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='rf') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=rf" rel="ajax">RF</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='week' && $_GET['type']=='gl') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=week&type=gl" rel="ajax">GL</a></p>
			</div>
			</li>
			<li <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=all" rel="ajax">Tháng</a>
			<div class="submenu">
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='all') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=all" rel="ajax">ALL</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='dw') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=dw" rel="ajax">DW</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='dk') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=dk" rel="ajax">DK</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='elf') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=elf" rel="ajax">ELF</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='mg') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=mg" rel="ajax">MG</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='dl') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=dl" rel="ajax">DL</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='sum') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=sum" rel="ajax">SUM</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='rf') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=rf" rel="ajax">RF</a></p>
			<p <? if($_GET['act']=='rankpointrs' && $_GET['action']=='month' && $_GET['type']=='gl') echo 'class="active"'; ?>><a href="#rank&act=rankpointrs&action=month&type=gl" rel="ajax">GL</a></p>
			</div>
			</li>
        </ul>
    </div>

<div>
    </div>

</div>

<? if(isset($err)) echo "<center><font color='red'><b>$err</b></font></center>"; ?>

 
<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">( 5p cập nhập 1 lần )</span></span></span></p>
		
    <? 
        foreach($rank as $key => $val) {
    ?>
	<div class="out-top-20">
				<p class="in-10">
                <span class="color-blue"><? echo $title_top[$key]; ?></strong></span>
            </p>
        <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>Điểm Danh Vọng</th>
		    <th>Lớp nhân vật</th>
            <th>Thế hệ</th>
		  </tr>
		 </thead>
<? foreach($val as $key2 => $val2) { ?>
		<tbody>
		  <tr>
		    <td align="center"><? echo $key2+1; ?></td>
		    <td align="center"><? echo $val2['name']; ?></td>
		    <td align="center"><? echo $val2['reset_score']; ?></td>
		    <td align="center"><? echo $val2['class']; ?></td>
            <td align="center"><? echo $val2['thehe']; ?></td>
		  </tr>
		</tbody>
<? } ?>
		</table>
    <? 
        }
    ?>

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

<!-- End Content -->