<?php
#######################################################|#
#|                    HabboMCMS - TheRox
#|                    Powered by HoloCMS 
#|            Copyright 2011-2012 ALL RIGHTS RESERVED
#######################################################|#



require_once('../global.php');
if($hkzone !== true){ header("Location: index.php?throwBack=true"); exit; }
if(!session_is_registered(acp)){ header("Location: index.php?p=login"); exit; }

$pagename = "User ID";

if(isset($_POST['query'])){
	$query = Filter($_POST['query']);
	$find = mysql_query("SELECT id,username FROM users WHERE username LIKE '".$query."' LIMIT 1") or die(mysql_error());
	$results = mysql_num_rows($find);
	if($results > 0){
		$row = mysql_fetch_assoc($find);
		header("LOCATION: index.php?p=edituser&key=".$row['id']); exit;
	} else {
		$msg = "Non-trouver.";
	}
} else {
	$msg = "Utilisez le formulaire ci-dessous pour rechercher un utilisateur.";
}

require_once('subheader.php');
require_once('header.php');
?>
<table cellpadding='0' cellspacing='8' width='100%' id='tablewrap'>
<tr> <td width='22%' valign='top' id='leftblock'>
 <div>
 <!-- LEFT CONTEXT SENSITIVE MENU -->
<?php require_once('usermenu.php'); ?>
 <!-- / LEFT CONTEXT SENSITIVE MENU -->
 </div>
 </td>
 <td width='78%' valign='top' id='rightblock'>
 <div><!-- RIGHT CONTENT BLOCK -->
 
<?php if(isset($msg)){ ?><p><strong><?php echo $msg; ?></strong></p><?php } ?>
 
<form action='index.php?p=uid&do=getthatdamnid' method='post' name='theAdminForm' id='theAdminForm'>
<div class='tableborder'>
<div class='tableheaderalt'>Retrouver l'ID d'un Bobba</div>

<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'>
<tr>
<td class='tablerow1'  width='40%'  valign='middle'><b>Nom d'Utilisateur</b><div class='graytext'>Pour voir l'ID d'un utilisateur, s'il vous plaît entrer son nom ici.</div></td>
<td class='tablerow2'  width='60%'  valign='middle'><input type='text' name='query' value="<?php echo Filter($_POST['query']); ?>" size='30' class='textinput'></td>
</tr>

<tr>
<tr><td align='center' class='tablesubheader' colspan='2' ><input type='submit' value='Trouver l&#39;ID' class='realbutton' accesskey='s'></td></tr>
</form></table></div><br />	 </div><!-- / RIGHT CONTENT BLOCK -->
	 </td></tr>
</table>
</div><!-- / OUTERDIV -->
<div align='center'><br />
<?php
$mtime = explode(' ', microtime());
$totaltime = $mtime[0] + $mtime[1] - $starttime;
printf('Time: %.3f', $totaltime);
?>
</div>