<div class="primary-block">
    <div class="main-content">
        <h1 class="title-content"><? echo $event_epitem_name; ?></h1>
		<? include('templates/event/event_epitem_head.tpl'); ?>
    </div>
</div>

<div class="primary-block out-top-20">
    <div class="in-20">
<? 
    if(isset($error_module)) echo "<center><font color='red'><strong>$error_module</strong></font></center>";
?>
<center><b>Xếp hạng Event <? echo $event_epitem_name; ?></b></center>
    <br /><br />
    <table class="table table-blue table-text-center table-border-2">
	<thead>
            <tr class="span">
                <th colspan="2" align="center">
                	<b>Xếp hạng theo số lượng Item Ép Thành Công</b>
                </th>
            </tr>
        <tr>
            <th align="center"><b>Nhân Vật</b></th>
            <th align="center"><b>Số lượng Item Ép thành công</b></th>
        </tr>
		</thead>
        <? 
            $tr_bgcolor1 = "#FFFFFF";
            $tr_bgcolor2 = "#FFCCFF";
            $tr_bgcolor = $tr_bgcolor1;
            if(isset($list_rank_slg_arr) && is_array($list_rank_slg_arr)) {
                foreach($list_rank_slg_arr as $rank_slg) { 
        ?>
		<tbody>
        <tr bgcolor="<? echo $tr_bgcolor; ?>">
            <td align="center"><strong><? echo $rank_slg['name']; ?></strong></td>
            <td align="center"><? echo $rank_slg['count']; ?></td>
        </tr>
		</tbody>
        <? 
                if($tr_bgcolor == $tr_bgcolor1) $tr_bgcolor = $tr_bgcolor2;
                else $tr_bgcolor = $tr_bgcolor1;
                }
            }
        ?>
    </table>
    <br />
        <table class="table table-blue table-text-center table-border-2">
	<thead>
            <tr class="span">
                <th colspan="4" align="center">
                	<b>Xếp hạng theo Thời gian Item Ép Thành Công Sớm nhất</b>
                </th>
            </tr>
        <tr>
            <th align="center"><b>Nhân Vật</b></th>
            <th align="center"><b>Hình Ảnh</b></th>
            <th align="center"><b>Item đăng ký</b></th>
            <th align="center"><b>Item Hoàn Thành</b></th>
        </tr>
	</thead>
        <? 
            $trname_bgcolor1 = "#FFFFFF";
            $trname_bgcolor2 = "#FFCCFF";
            $trname_bgcolor = $trname_bgcolor1;
            if(isset($list_rank_ear_arr) && is_array($list_rank_ear_arr)) {
                foreach($list_rank_ear_arr as $rank_ear) {
        ?>
		<tbody>
        <tr>
            <td align="center" bgcolor="<? echo $trname_bgcolor; ?>"><strong><? echo $rank_ear['name']; ?></strong></td>
            <td align="center" bgcolor="#121212"><img src="items/<? echo $rank_ear['image']; ?>.gif"></td>
            <td align="center" bgcolor="#121212">
                <font color='pink'>Đăng ký : <? echo $rank_ear['time_reg']; ?> </font><br />
                <? echo $rank_ear['info']; ?>
            </td>
            <td align="center" bgcolor="#121212">
                <font color='yellow'>Hoàn thành : <? echo $rank_ear['time_finish']; ?> </font><br />
                <? echo $rank_ear['infoend']; ?>
            </td>
        </tr>
		</tbody>
        <? 
                    if($trname_bgcolor == $trname_bgcolor1) $trname_bgcolor = $trname_bgcolor2;
                    else $trname_bgcolor = $trname_bgcolor1;
                }
            }
        ?>
    </table>
        
    </div>
</div>