Location: PHPKode > projects > Standardized Test Practice Engine > stpe/admin/viewadders.php
<?php
/*
Copyright 2004 by Jonathan Bell and Daniel Perelman
This file is part of STPE - the Standardized Test Practice Engine.

    STPE is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    STPE is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Foobar; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
include_once("../globals.inc.php");
?>
<?php
include("login.inc.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?php
include_once("../dbinit.inc.php");
$sql = "SELECT * FROM `users` order by id";
$total_result = @mysql_query($sql, $connection) or die("Error #". mysql_errno() . ": " . mysql_error());
$total_found = @mysql_num_rows($total_result);

$x = 0;
while ($row = mysql_fetch_array($total_result)) {
	$id[$x]=$row['id'];
    $topicnum[$x]=$row['topicnum'];
    $topicdesc[$x]=$row['topicdesc'];
    $sectionnum[$x]=$row['sectionnum'];
    $sectiondesc[$x]=$row['sectiondesc'];
    $names[$x]=$row['names'];
    $code[$x]=$row['code'];
    $teachername[$x]=$row['teachername'];
	$x++;
}
?>
<html>

<head>
<title><?php echo $site_name; ?> Admin</title>

<link rel="stylesheet" type="text/css" href="../style.css" />
</head>
<body>
<?php include("../header.inc.php"); ?>
	<table>
		<tr valign="top">
			<?php include("../nav.inc.php"); ?>
			<td class="maincontent">
				<h2>Current test adding users</h2>
	<table>
	<tr><th>Topic Number</th><th>Topic Description</th><th>Section Number</th><th>Section Description</th><th>Names</th><th>Teacher</th>
	<th>Code</th></tr>
	<?php
	foreach($id as $key => $thisid){
		echo '<tr><td>'.$topicnum[$key].'</td>
		<td>'.$topicdesc[$key].'</td>
		<td>'.$sectionnum[$key].'</td>
		<td>'.$sectiondesc[$key].'</td>
		<td>'.$names[$key].'</td>
		<td>'.$teachername[$key].'</td>
		';
		echo '<td>'.$code[$key].'</td></tr>';
	}
	echo "</table>";
	echo "<p><input type=\"hidden\" name=\"count\" value=\"$thisid\" /></p>";
	?>
			</td>
		</tr>
	</table>
<?php include("../footer.inc.php"); ?>
</body>
</html>
Return current item: Standardized Test Practice Engine