forked from science-ation/science-ation
167 lines
4.8 KiB
PHP
167 lines
4.8 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.status AS status, 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");
|
|
|
|
//only display the named greeting if we have their name
|
|
if($r->firstname)
|
|
{
|
|
echo i18n("Hello <b>%1</b>",array($r->firstname));
|
|
echo "<br />";
|
|
}
|
|
echo "<br />";
|
|
|
|
if(registrationFormsReceived())
|
|
{
|
|
if($r->status=="complete")
|
|
{
|
|
echo i18n("Congratulations, You are successfully registered for the %1. No further changes may be made to any of your forms.",array($config['fairname']));
|
|
|
|
}
|
|
else if($r->status=="paymentpending")
|
|
{
|
|
echo i18n("We have received your forms but are missing your registration fee. You are NOT registered for the fair until your registration fee has been received");
|
|
|
|
}
|
|
|
|
}
|
|
else
|
|
{
|
|
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
|
|
$statusstudent=studentStatus();
|
|
echo outputStatus($statusstudent);
|
|
echo "</td></tr>";
|
|
|
|
//participant emergency contact information
|
|
echo "<tr><td>";
|
|
if($statusstudent=="complete")
|
|
echo "<a href=\"register_participants_emergencycontact.php\">";
|
|
echo i18n("Emergency Contact Information");
|
|
if($statusstudent=="complete")
|
|
echo "</a>";
|
|
echo "</td><td>";
|
|
//check to see if its complete
|
|
$statusemergencycontact=emergencycontactStatus();
|
|
echo outputStatus($statusemergencycontact);
|
|
echo "</td></tr>";
|
|
|
|
//project information - project requires students, so only show the link if the students is complete
|
|
echo "<tr><td>";
|
|
if($statusstudent=="complete")
|
|
echo "<a href=\"register_participants_project.php\">";
|
|
echo i18n("Project Information");
|
|
if($statusstudent=="complete")
|
|
echo "</a>";
|
|
echo "</td><td>";
|
|
//check to see if its complete
|
|
$statusproject=projectStatus();
|
|
echo outputStatus($statusproject);
|
|
echo "</td></tr>";
|
|
|
|
//mentor information
|
|
echo "<tr><td>";
|
|
echo "<a href=\"register_participants_mentor.php\">";
|
|
echo i18n("Mentor Information");
|
|
echo "</a>";
|
|
echo "</td><td>";
|
|
//check to see if its complete
|
|
$statusmentor=mentorStatus();
|
|
echo outputStatus($statusmentor);
|
|
echo "</td></tr>";
|
|
|
|
//safety information
|
|
echo "<tr><td>";
|
|
echo "<a href=\"register_participants_safety.php\">";
|
|
echo i18n("Safety Information");
|
|
echo "</a>";
|
|
echo "</td><td>";
|
|
//check to see if its complete
|
|
$statussafety=safetyStatus();
|
|
echo outputStatus($statussafety);
|
|
echo "</td></tr>";
|
|
|
|
//signature page
|
|
echo "<tr><td>";
|
|
if($statusstudent=="complete" && $statusproject=="complete" && $statusmentor=="complete" && $statussafety=="complete")
|
|
echo "<a href=\"register_participants_signature.php\">";
|
|
echo i18n("Signature Page");
|
|
if($statusstudent=="complete" && $statusproject=="complete" && $statusmentor=="complete" && $statussafety=="complete")
|
|
echo "</a>";
|
|
echo "</td><td>";
|
|
echo i18n("Print");
|
|
//check to see if its complete
|
|
echo "</td></tr>";
|
|
|
|
//received information
|
|
echo "<tr><td>".i18n("Signature Page Received")."</td><td>";
|
|
if(registrationFormsReceived())
|
|
echo outputStatus("complete");
|
|
else
|
|
echo outputStatus("incomplete");
|
|
|
|
//check to see if its complete
|
|
echo "</td></tr>";
|
|
|
|
|
|
echo "</table>";
|
|
|
|
echo "<br /><br />";
|
|
echo "<h3>".i18n("Registration Instructions")."</h3>";
|
|
|
|
//now get the text of special instructions for the bottom of this page:
|
|
$q=mysql_query("SELECT * FROM pagetext WHERE textname='register_participants_main_instructions'");
|
|
$r=mysql_fetch_object($q);
|
|
echo nl2br(i18n($r->text));
|
|
|
|
echo "<br /><br />";
|
|
|
|
|
|
echo "<a href=\"register_participants.php?action=logout\">".i18n("Logout")."</a>";
|
|
|
|
|
|
send_footer();
|
|
?>
|