Location: PHPKode > projects > Standardized Test Practice Engine > stpe/questions.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
/*
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");
include("dbinit.inc.php");
$sql = "SELECT * FROM `users` WHERE group_id = 0 order by topicdesc";
$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)) {

    $topicnum[$x]=$row['topicnum'];
    $topicdesc[$x]=$row['topicdesc'];
    $sectionnum[$x]=$row['sectionnum'];
    $sectiondesc[$x]=$row['sectiondesc'];
	$x++;
}
include("form_field.class.php");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title><?php echo $site_name; ?>: Create New</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">
<b>Remember:</b> Submitting your work here is analogous to handing it in. All submission 
are FINAL and you will NOT be able to edit them later.
The most important thing that you need is your authorization code. If you enter the 
incorrect one, or if you enter it wrong,
then your submission will not have worked.<br /><br />
<p><strong>Some hints</strong> for entering special letters and symbols:<br />
There will be some letter and symbols that you will not be able to enter normally on a keyboard. 
<a href="chars.php" taget="_blank">Here is a list of how you should enter them</a>. <strong>
DO NOT ENTER THESE CHARACTERS ANY OTHER WAY.</strong><br /></p>

<form action="submitnew.php" method="post" enctype="multipart/form-data">
	<table>
<tr valign="top">
	<td>
Code
	</td>
	<td>
<input type="text" name="code" size="36" maxlength="32" />
	</td>
</tr>
<tr valign="top">
	<td>
Topic
	</td>
	<td>
	<select name="subject">
	<option selected="selected" label="Select your subject!!!!!!!" value="">Select your subject!!!!</option>
<?php
	foreach($topicnum as $key => $thistopicnum){
echo '<option label="'.$topicdesc[$key].' - '.$sectiondesc[$key].'" 
value="'.$thistopicnum.'.'.$sectionnum[$key].'">'
.$topicdesc[$key].' - '.$sectiondesc[$key].'</option>
';
	}
?>
	</select>
	</td>
</tr>
<tr valign="top">
	<td>
Review:<br /><br />
	</td>
	<td>
<textarea name="review" rows="30" cols="60"></textarea><br />
<strong>A word about images...</strong><br />
Images MUST be in one of the following formats: JPG, GIF, TIFF, or PNG. If they are NOT, then they will NOT
 be processed. Additionally, all of your images collectively may NOT total any more than 2 megabytes.<br />
	<?php
	for($x=1;$x<=$_POST['upload_images'];$x++){
		echo 'Image '.$x.'<input type="file" name="image'.$x.'" /><br />';
		echo 'This image is represented by: &lt;img'.$x.'&gt;<br /><br />';
		}
	?>
	
	</td>
</tr>
<tr valign="top">
	<td>
"More info links"
	</td>
	<td>
	<?php
	for($x=1;$x<=$_POST['more_info'];$x++){
		$field = &new form_field;
		$field ->more_info($x);
	}
	
	?>

	</td>
</tr>
	</table>
	<p>Classification Questions:</p>
	<table>
<tr valign="top">
	<td>
Statement
	</td>
	<td>
(Correct) Answer
	</td>
</tr>
<?php
	for($x=1;$x<=$_POST['classification'];$x++){
$field = &new form_field;

$field ->classification($x);
}
?>
	</table>
	<p>Relationship Analysis Questions</p>
	<table>
<tr valign="top">
	<td>
<b>I</b>
	</td>
	<td>
	</td>
	<td>
<b>II</b>
	</td>
	<td>
Correct answers
	</td>
</tr>
<?php
	for($count=1;$count<=$_POST['relationship'];$count++){
$field = &new form_field;
$field ->relationship($count);
}
?>
	</table>
	<p>Five Choice Completion Questions. Check the correct answer.<br />
	Type 1 questions:<br />
	<?php
	for($count=1;$count<=$_POST['type1'];$count++){
		$field = &new form_field;
		$field ->type1($count);
	}
	?>
	Type 2 question:<br />
	<?php
	for($count=1;$count<=$_POST['type2'];$count++){
		$field = &new form_field;
		$field -> type2($count);
	}
	?>
	<br />
	Type 3 questions:<br />
	<?php
	for($count=1;$count<=$_POST['type3'];$count++){
		$field = &new form_field;
		$field -> type3($count);
	}
	?>
	<br />
	<strong>When you click submit here, your review will be entered into the system. This is analogous 
	to turning it in. Be sure that you have checked your spelling, grammar, etc. Do not worry about 
	fine-formatting. The final formating tasks will be performed by the editors.</strong><br />
	<input type="submit" /> <input type="reset" />
	</p>
</form>
	</td>
</tr>
	</table>
<?php include("footer.inc.php"); ?>
</body>
</html>
Return current item: Standardized Test Practice Engine