<?php
	$break = explode('/', $_SERVER["SCRIPT_NAME"]);
	if($break[count($break) - 1] != "index.php") { exit(); }
?>
		  <h1>Search for Users</h1><hr><br>
		  <form name="adminSearchForm" id="adminSearchForm" action="process.php" method="POST">
		  <b>Search for a user by entering their username, e-mail, or part of either.<br>(ie. '@hotmail.com')</b><br><br>
		  Search For: <input type="text" name="name" size="20" value="<?php if(isset($_SESSION['adminSearchName'])) echo $_SESSION['adminSearchName']; ?>"><br>
		  <input type="submit" value="Search">
		  <input type="hidden" name="pageno" id="pageno" value="0">
		  <input type="hidden" name="adminsearchsubmit" value="1"><br>
<?php
	if(isset($_SESSION['adminSearchName']))
	{
		$database->printAdminSearchList($_SESSION['pageno'],mysql_real_escape_string($_SESSION['adminSearchName']));
		unset($_SESSION['adminSearchName']);
		unset($_SESSION['pageno']);
	}
?>
		</form>