<?php
/******************************************************************************
************** Simple SMS Site Software *********************************
************** SSSSv1.0*****************************************************
************** by (aq) limited http://aql.com *******************************
************** All Rights Reserved ******************************************
************** Please read COPYRIGHT file prior to modification********
********************************************************************************/
session_start();
$user = $_SESSION['user'];
$pass = $_SESSION['pass'];
include("inc/header.inc.php");
include("inc/dbinfo.inc.php");
if ($access == "admin") {
?>
<form method="POST" name="activate_form" action="do_admin_activate.php">
<table class=tableborder>
<tr>
<td width="527" height="16">
<h1>Activate Account</h1>
</tr>
<tr>
<td>
<h2>Select User</h2>
<select size="1" name="D1">
<?
$query = "SELECT username FROM users";
$result = mysql_query($query);
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
$row_count = mysql_num_rows($result); // count number of results (i.e no of users)
for($i = 0; $i < $row_count; $i++)
{
$row = mysql_fetch_row($result); // add each user to an array
foreach ($row as $x) {
$userArray[] = $x;;
}
}
sort ($userArray); // sort array of users
$row_count = count($userArray);
for($i = 0; $i < $row_count; $i++) // cycle through list, add each element as an option
{
?><option><?echo $userArray[$i]?></option><?;
}
?>
</select>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Submit" name="B1">
</tr>
</form>
</table>
<?
}
else {
include("inc/restricted.inc.php");
}
include("inc/footer.inc.php");
?>