2004-11-30 23:18:35 +00:00
< ?
require ( " common.inc.php " );
2004-12-02 19:40:43 +00:00
include " register_participants.inc.php " ;
2004-11-30 23:18:35 +00:00
//authenticate based on email address and registration number from the SESSION
if ( ! $_SESSION [ 'email' ])
{
header ( " Location: register_participants.php " );
exit ;
}
2004-12-02 23:15:42 +00:00
if ( ! ( $_SESSION [ 'registration_number' ] && $_SESSION [ 'registration_id' ]))
2004-11-30 23:18:35 +00:00
{
header ( " Location: register_participants.php " );
exit ;
}
2004-12-03 04:28:18 +00:00
$q = mysql_query ( " SELECT registrations.id AS regid, students.id AS studentid, students.firstname FROM registrations,students " .
2004-11-30 23:18:35 +00:00
" 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' ]);
2004-11-30 23:38:13 +00:00
echo mysql_error ();
2004-11-30 23:18:35 +00:00
if ( mysql_num_rows ( $q ) == 0 )
{
2004-12-07 05:33:26 +00:00
header ( " Location: register_participants.php?action=logout " );
2004-11-30 23:18:35 +00:00
exit ;
}
$r = mysql_fetch_object ( $q );
2004-12-02 19:40:43 +00:00
send_header ( " Participant Registration - Summary " );
2004-12-02 19:03:53 +00:00
2004-12-07 16:33:14 +00:00
//only display the named greeting if we have their name
if ( $r -> firstname )
{
echo i18n ( " Hello <b>%1</b> " , array ( $r -> firstname ));
echo " <br /> " ;
}
2004-12-02 19:03:53 +00:00
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
2004-12-02 19:40:43 +00:00
echo " <tr><td> " ;
echo " <a href= \" register_participants_students.php \" > " ;
echo i18n ( " Student Information " );
echo " </a> " ;
echo " </td><td> " ;
2004-12-02 19:03:53 +00:00
//check to see if its complete
2004-12-14 14:56:34 +00:00
$statusstudent = studentStatus ();
echo outputStatus ( $statusstudent );
2004-12-02 19:03:53 +00:00
echo " </td></tr> " ;
2005-01-05 15:05:32 +00:00
//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> " ;
2004-12-10 22:33:15 +00:00
//project information - project requires students, so only show the link if the students is complete
2004-12-07 14:20:42 +00:00
echo " <tr><td> " ;
2004-12-14 14:56:34 +00:00
if ( $statusstudent == " complete " )
2004-12-07 16:42:53 +00:00
echo " <a href= \" register_participants_project.php \" > " ;
echo i18n ( " Project Information " );
2004-12-14 14:56:34 +00:00
if ( $statusstudent == " complete " )
2004-12-07 16:42:53 +00:00
echo " </a> " ;
2004-12-07 14:20:42 +00:00
echo " </td><td> " ;
2004-12-02 19:03:53 +00:00
//check to see if its complete
2004-12-14 14:56:34 +00:00
$statusproject = projectStatus ();
echo outputStatus ( $statusproject );
2004-12-10 19:59:18 +00:00
echo " </td></tr> " ;
2004-12-07 14:20:42 +00:00
2004-12-10 19:59:18 +00:00
//mentor information
echo " <tr><td> " ;
2004-12-10 22:33:15 +00:00
echo " <a href= \" register_participants_mentor.php \" > " ;
2004-12-10 19:59:18 +00:00
echo i18n ( " Mentor Information " );
2004-12-14 14:56:34 +00:00
echo " </a> " ;
2004-12-10 19:59:18 +00:00
echo " </td><td> " ;
//check to see if its complete
2004-12-14 14:56:34 +00:00
$statusmentor = mentorStatus ();
echo outputStatus ( $statusmentor );
2004-12-02 19:03:53 +00:00
echo " </td></tr> " ;
//safety information
2004-12-10 20:38:16 +00:00
echo " <tr><td> " ;
2004-12-10 22:33:15 +00:00
echo " <a href= \" register_participants_safety.php \" > " ;
2004-12-10 20:38:16 +00:00
echo i18n ( " Safety Information " );
2004-12-14 14:56:34 +00:00
echo " </a> " ;
2004-12-10 20:38:16 +00:00
echo " </td><td> " ;
2004-12-02 19:03:53 +00:00
//check to see if its complete
2004-12-14 14:56:34 +00:00
$statussafety = safetyStatus ();
echo outputStatus ( $statussafety );
2004-12-02 19:03:53 +00:00
echo " </td></tr> " ;
//signature page
2004-12-14 14:56:34 +00:00
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> " ;
2004-12-14 20:11:10 +00:00
echo i18n ( " Print " );
2004-12-02 19:03:53 +00:00
//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> " ;
2005-01-07 04:46:52 +00:00
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 ));
2004-12-02 19:03:53 +00:00
echo " <br /><br /> " ;
2004-11-30 23:18:35 +00:00
2005-01-07 04:46:52 +00:00
2004-12-02 23:15:42 +00:00
echo " <a href= \" register_participants.php?action=logout \" > " . i18n ( " Logout " ) . " </a> " ;
2004-11-30 23:18:35 +00:00
send_footer ();
?>