<?php
/*======================================================================*\
|| #################################################################### ||
|| # EoT-Clan BF3 Leaderboard                                         # ||
|| # ---------------------------------------------------------------- # ||
|| # Dieses Copyright darf nicht entfernet werden                     # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # -----------------BF3 Leaderboard is a free Software--------------# ||
|| #                   http://eot-clan.net                            # ||
|| #################################################################### ||
\*======================================================================*/
if(!defined('DIRECTACCESS')){
echo 'You cannot access this file directly!';
die;
}
?>

		 		<table class="default" cellspacing="0" cellpadding="0">
             <td class="head" colspan="12"><?php echo LANG_ADMIN_PLAYERS_LIST; ?></td>
           <tr>
            <th style="border-right:1px solid #303030; font-size:12px;"><?php echo LANG_ADMIN_PLAYERS_DBID; ?></th>
             <th style="border-right:1px solid #303030;font-size:12px;"><?php echo LANG_ADMIN_PLAYERS_NAME; ?></th>
             <th style="border-right:1px solid #303030;font-size:12px;"><?php echo LANG_ADMIN_PLAYERS_STATUS; ?></th>
              <th style="border-right:1px solid #303030;font-size:12px;"><?php echo LANG_ADMIN_PLAYERS_REFRESH; ?></th>
              <th style="border-right:1px solid #303030;font-size:12px;">BF3Stats.com</th>
             <th style="border-right:0px solid #303030;font-size:12px;"><?php echo LANG_ADMIN_PLAYERS_DELETE; ?></th>
            </tr>
		
		
	<?php		
 

$query = "SELECT * FROM ".DBPrefix."generalStats ORDER BY pid";
$result = mysql_query($query);
$aData = array();
 while($data = mysql_fetch_assoc($result)){	
 $aData[] = $data;
}
 
 foreach ($aData as $data){			
			$color = $row['vip_color']; 
       $vip = $data['vip_member'];
				if ($data['vip_member'] == 0){
					$status = $row['vip'];
					$wert = 1;
					$color2 = $style['body_font_color'];
				}else{
					$status = LANG_ADMIN_EDIT_VIP_MEMBER;
					$wert = 0;
					$color2 = $row['vip_color'];
				}
				$img = "";
				if ($data['invisible'] == "invisible" ){
					$img = "<a class='tooltip' href='#'><img src='../img/warning.png' style='position:absolute'/><span style='margin-top:25px;margin-left:-85px;z-index:1000;'>".LANG_ADMIN_SOLDIER_WARNING."</span></a>";
				}
				?>
         <tr height="20px">
						<td class="result" style="border-right:1px solid #303030; font-size:12px;"><?php echo $data['pid'].$img; ?></td>
						 <td class="result" style="border-right:1px solid #303030;font-size:12px;">
						 	<form action="edit.php" method="post" >	
						 	<input  name="editsSoldiername" style="color:<?php echo $color2; ?>;background:transparent;border:1px solid <?php echo $style['table_border_color']; ?>" value="<?php echo htmlspecialchars($data['soldiername']); ?>" type="text" />
			          <input type="hidden" value="<?php echo $data['pid']; ?>" name="pid" />
			          <input type="hidden" value="Send" />
			        </form>
			        <?php if ($row['platform'] != 'pc' ){ ?>
			       	<form action="edit.php" method="post" >	
						 	PersonaName:<br /><input  name="editpersona" style="color:<?php echo $color2; ?>;background:transparent;border:1px solid <?php echo $style['table_border_color']; ?>" value="<?php echo htmlspecialchars($data['persona']); ?>" type="text" />
			        <input type="hidden" value="<?php echo $data['pid']; ?>" name="pid" />
			          <input type="hidden" value="Send" />
			        </form>
			        	<?php } ?>
			       </td>	
						 	<td class="result" style="border-right:1px solid #303030;font-size:12px;">
               <form action="edit.php" method="post" >
               	<input type="hidden" value="<?php echo $data['pid']; ?>" name="id" />
               	<input type="hidden" value="<?php echo $wert; ?>" name="wert" />
                <input type="submit" name="vip_member" onClick="return confirm('<?php echo LANG_ADMIN_EDIT_VIP_MEMBER_WARN; ?>')" class="inputbutton" value="<?php echo $status; ?>">
               </form>
						 		</td>
						 	 <td class="result" style="border-right:1px solid #303030;font-size:12px;"><?php echo $EoT->unix_to_time($data['last_update']); ?></td>	
						  <td class="result" style="border-right:1px solid #303030;font-size:12px;"><a href="http://bf3stats.com/stats_<?php echo $row['platform']; ?>/<?php echo rawurlencode($data['soldiername']); ?>" target="_blank"><?php echo LANG_ADMIN_PLAYERS_BF3STATS; ?></a></td>	   
						 <td class="result" style="border-right:0px solid #303030;font-size:12px;">
						 	<form action="remove.php" method="post" >
	             <input type="hidden" value="<?php echo $data['pid']; ?>" name="deleteplayers" />
              <input type="submit" onClick="return confirm('<?php echo LANG_ADMIN_PLAYERS_DELETE_CHECK.htmlspecialchars($data['soldiername']).LANG_ADMIN_PLAYERS_DELETE_CHECK_2; ?>')" class="inputbutton" value="<?php echo LANG_ADMIN_PLAYERS_DELETE_2; ?>">
          </tr>
         </form>
        </td>
       

<?php } ?>

</table>