and finally, fix special awards registration in teh system

This commit is contained in:
james 2011-03-03 22:42:49 +00:00
parent 2d2b9f4ef2
commit 4c15b72a8b

View File

@ -23,39 +23,12 @@
?> ?>
<? <?
require("common.inc.php"); require("common.inc.php");
include "register_participants.inc.php"; require_once("register_participants.inc.php");
include "projects.inc.php"; require_once("projects.inc.php");
user_auth_required("participant");
//authenticate based on email address and registration number from the SESSION $u=user_load($_SESSION['users_id']);
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.firstname FROM registrations,students ". $q=mysql_query("SELECT * FROM projects WHERE registrations_id='".$u['registrations_id']."'");
"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.conferences_id=".$conference['id']." ".
"AND students.conferences_id=".$conference['id']);
echo mysql_error();
if(mysql_num_rows($q)==0)
{
header("Location: register_participants.php");
exit;
}
$authinfo=mysql_fetch_object($q);
$q=mysql_query("SELECT * FROM projects WHERE registrations_id='".$_SESSION['registration_id']."'");
$project=mysql_fetch_object($q); $project=mysql_fetch_object($q);
//send the header //send the header
@ -153,9 +126,8 @@ function checkboxclicked(b)
} }
//output the current status //output the current status
$newstatus=spawardStatus(); $newstatus=spawardStatus($u['registrations_id']);
if($newstatus!="complete") if($newstatus!="complete") {
{
echo error(i18n("Special Awards Self-Nomination Incomplete")); echo error(i18n("Special Awards Self-Nomination Incomplete"));
} }
else if($newstatus=="complete") else if($newstatus=="complete")