forked from science-ation/science-ation

- add participants project file - add checks for project completeness - add new status 'empty' for if the section has not been started yet
94 lines
2.5 KiB
PHP
94 lines
2.5 KiB
PHP
<?
|
|
require("common.inc.php");
|
|
include "register_participants.inc.php";
|
|
|
|
//authenticate based on email address and registration number from the SESSION
|
|
if(!$_SESSION['email'])
|
|
{
|
|
header("Location: register_participants.php");
|
|
exit;
|
|
}
|
|
if(! ($_SESSION['registration_number'] && $_SESSION['registration_id']))
|
|
{
|
|
header("Location: register_participants.php");
|
|
exit;
|
|
}
|
|
|
|
$q=mysql_query("SELECT registrations.id AS regid, students.id AS studentid, students.firstname FROM registrations,students ".
|
|
"WHERE students.email='".$_SESSION['email']."' ".
|
|
"AND registrations.num='".$_SESSION['registration_number']."' ".
|
|
"AND registrations.id='".$_SESSION['registration_id']."' ".
|
|
"AND students.registrations_id=registrations.id ".
|
|
"AND registrations.year=".$config['FAIRYEAR']." ".
|
|
"AND students.year=".$config['FAIRYEAR']);
|
|
echo mysql_error();
|
|
|
|
if(mysql_num_rows($q)==0)
|
|
{
|
|
header("Location: register_participants.php?action=logout");
|
|
exit;
|
|
|
|
}
|
|
$r=mysql_fetch_object($q);
|
|
send_header("Participant Registration - Summary");
|
|
|
|
echo i18n("Hello <b>%1</b>",array($r->firstname));
|
|
echo "<br />";
|
|
echo "<br />";
|
|
echo i18n("Please use the checklist below to complete your registration. Click on an item in the table to edit that information. When you have entered all information, the <b>Status</b> field will change to <b>Complete</b>");
|
|
echo "<br />";
|
|
echo "<br />";
|
|
|
|
echo "<table class=\"summarytable\">";
|
|
echo "<tr><th>".i18n("Registration Item")."</th><th>".i18n("Status")."</th></tr>";
|
|
|
|
//participant information
|
|
echo "<tr><td>";
|
|
echo "<a href=\"register_participants_students.php\">";
|
|
echo i18n("Student Information");
|
|
echo "</a>";
|
|
echo "</td><td>";
|
|
//check to see if its complete
|
|
$status=studentStatus();
|
|
echo outputStatus($status);
|
|
echo "</td></tr>";
|
|
|
|
//project information
|
|
echo "<tr><td>";
|
|
echo "<a href=\"register_participants_project.php\">";
|
|
echo "".i18n("Project Information");
|
|
echo "</a>";
|
|
echo "</td><td>";
|
|
//check to see if its complete
|
|
$status=projectStatus();
|
|
echo outputStatus($status);
|
|
|
|
|
|
echo "</td></tr>";
|
|
|
|
//safety information
|
|
echo "<tr><td>".i18n("Safety Information")."</td><td>";
|
|
//check to see if its complete
|
|
echo "</td></tr>";
|
|
|
|
//signature page
|
|
echo "<tr><td>".i18n("Signature Page")."</td><td>";
|
|
//check to see if its complete
|
|
echo "</td></tr>";
|
|
|
|
//received information
|
|
echo "<tr><td>".i18n("Signature Page Received")."</td><td>";
|
|
//check to see if its complete
|
|
echo "</td></tr>";
|
|
|
|
|
|
echo "</table>";
|
|
|
|
echo "<br /><br />";
|
|
|
|
echo "<a href=\"register_participants.php?action=logout\">".i18n("Logout")."</a>";
|
|
|
|
|
|
send_footer();
|
|
?>
|