diff --git a/admin/registration_receivedforms.php b/admin/registration_receivedforms.php index 875bad1..b8e461c 100644 --- a/admin/registration_receivedforms.php +++ b/admin/registration_receivedforms.php @@ -9,6 +9,7 @@ echo "
"; echo "
"; +$showformatbottom=true; if($_POST['action']=="received" && $_POST['registration_number']) { $q=mysql_query("SELECT * FROM registrations WHERE num='".$_POST['registration_number']."' AND year='".$config['FAIRYEAR']."'"); @@ -24,7 +25,7 @@ } else if($r->status=='closed') { - echo error(i18n("Registration number (%1) has already been received.",array($_POST['registration_number'],$r->status))); + echo notice(i18n("Registration number (%1) has already been received.",array($_POST['registration_number'],$r->status))); } else @@ -43,7 +44,6 @@ $statusmentor == "complete" && $statussafety == "complete" ) { - echo "

".i18n("Registration Summary for %1",array($reg_num))."

"; $q=mysql_query("SELECT projects.title, projectcategories.category, @@ -60,10 +60,12 @@ echo mysql_Error(); $projectinfo=mysql_fetch_object($q); - - echo "".i18n("Registration Number").": $reg_num
"; - echo "".i18n("Project Title").": $projectinfo->title
"; - echo "".i18n("Category / Division").": $projectinfo->category / $projectinfo->division
"; + echo ""; + echo ""; + + echo ""; + echo ""; + echo ""; $q=mysql_query("SELECT students.firstname, students.lastname, @@ -80,32 +82,45 @@ echo mysql_Error(); while($studentinfo=mysql_fetch_object($q)) { if($studnum==1) - echo "".i18n("School").": $studentinfo->school
"; + echo ""; - echo "".i18n("Student %1",array($studnum)).": $studentinfo->firstname $studentinfo->lastname
"; + echo ""; } - - //FIXME: create button - if the above information is correct, please 'click here' to complete the registration process, otherwise, click here to cancel. - + echo "
".i18n("Registration Summary for %1",array($reg_num))."
".i18n("Registration Number").":$reg_num
".i18n("Project Title").":$projectinfo->title
".i18n("Category / Division").":$projectinfo->category / $projectinfo->division
".i18n("School").":$studentinfo->school
".i18n("Student %1",array($studnum)).":$studentinfo->firstname $studentinfo->lastname
\n"; echo "
"; - echo "
"; - echo "
"; + echo ""; + echo ""; + echo ""; + echo "\n"; + echo ""; + echo "\n"; + echo ""; + echo "
"; + echo i18n("Is this the correct form to register?"); + echo "
"; + echo "
"; + echo ""; + echo ""; + echo ""; + echo "
"; + + echo "
 "; + echo "
"; + echo ""; + echo ""; + echo ""; + echo "
"; + echo "
"; + + $showformatbottom=false; } else { echo error(i18n("All Registration sections are not complete. Cannot register")); } - - - - - - - } - } else { @@ -115,13 +130,31 @@ echo mysql_Error(); } - echo "

".i18n("Input New Received Form")."

"; - echo "
"; - echo ""; - echo i18n("Enter the registration number from the form: ")."
"; - echo ""; - echo ""; - echo "
"; + else if($_POST['action']=="receivedyes" && $_POST['registration_number']) + { + //actually set it to 'closed' + mysql_query("UPDATE registrations SET status='closed' WHERE num='".$_POST['registration_number']."'"); + //FIXME: assign the project number here as well! + echo happy(i18n("Registration of form %1 successfully completed",array($registration_number))); + + } + else if($_POST['action']=="receivedno" && $_POST['registration_number']) + { + echo notice(i18n("Registration of form %1 cancelled",array($registration_number))); + + } + + + if($showformatbottom) + { + echo "

".i18n("Input New Received Form")."

"; + echo "
"; + echo ""; + echo i18n("Enter the registration number from the form: ")."
"; + echo ""; + echo ""; + echo "
"; + } send_footer(); ?>