diff --git a/register_participants.inc.php b/register_participants.inc.php
new file mode 100644
index 0000000..4862d36
--- /dev/null
+++ b/register_participants.inc.php
@@ -0,0 +1,24 @@
+
+function studentStatus()
+{
+ $required_fields=array("name","address","city","postalcode","phone","email","grade","age");
+
+ $q=mysql_query("SELECT * FROM students WHERE registrations_id='".$_SESSION['registration_id']."'");
+
+ while($r=mysql_fetch_object($q))
+ {
+ foreach ($required_fields AS $req)
+ {
+ if(!$r->$req || $r->$req==0)
+ {
+ return "incomplete";
+ }
+ }
+ }
+
+ //if it made it through without returning incomplete, then we must be complete
+ return "complete";
+}
+
+
+?>
diff --git a/register_participants_main.php b/register_participants_main.php
index 63de80a..eef0acb 100644
--- a/register_participants_main.php
+++ b/register_participants_main.php
@@ -1,5 +1,6 @@
require("common.inc.php");
+ include "register_participants.inc.php";
//authenticate based on email address and registration number from the SESSION
if(!$_SESSION['email'])
@@ -30,7 +31,7 @@ echo mysql_error();
}
$r=mysql_fetch_object($q);
- send_header("Participant Registration Summary");
+ send_header("Participant Registration - Summary");
echo i18n("Hello %1",array($r->name));
echo "
";
@@ -43,7 +44,27 @@ echo mysql_error();
echo "
".i18n("Registration Item")." | ".i18n("Status")." |
";
//participant information
-echo "".i18n("Student Information")." | ";
+echo " |
";
+echo "";
+echo i18n("Student Information");
+echo "";
+echo " | ";
+$status=studentStatus();
+switch($status)
+{
+ case 'incomplete':
+ echo " ";
+ echo i18n("Incomplete");
+ echo " ";
+ break;
+ case 'complete':
+ echo "";
+ echo i18n("Complete");
+ echo " ";
+ break;
+ default:
+ break;
+}
//check to see if its complete
echo " |
";
diff --git a/register_participants_students.php b/register_participants_students.php
new file mode 100644
index 0000000..119c921
--- /dev/null
+++ b/register_participants_students.php
@@ -0,0 +1,39 @@
+
+ require("common.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'])
+ {
+ header("Location: register_participants.php");
+ exit;
+ }
+
+ $q=mysql_query("SELECT registrations.id AS regid, students.id AS studentid, students.name 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");
+ exit;
+
+ }
+ $r=mysql_fetch_object($q);
+
+ send_header("Participant Registration - Student Information");
+echo "<< ".i18n("Back to Participant Registration Summary")."
";
+ echo "
";
+
+
+ send_footer();
+?>
diff --git a/sfiab.css b/sfiab.css
index 6f316dd..2ea29fd 100644
--- a/sfiab.css
+++ b/sfiab.css
@@ -115,3 +115,14 @@ a {
padding: 4px;
}
+
+.complete {
+ color: green;
+ font-weight: bold;
+}
+
+.incomplete {
+ color: red;
+ font-weight: bold;
+
+}