2005-01-07 04:45:17 +00:00
|
|
|
<?
|
|
|
|
require("../common.inc.php");
|
|
|
|
require("../register_participants.inc.php");
|
|
|
|
|
|
|
|
send_header("Participant Registration - List");
|
|
|
|
echo "<a href=\"index.php\"><< ".i18n("Back to Administration")."</a>";
|
|
|
|
echo " ";
|
|
|
|
echo "<a href=\"registration.php\"><< ".i18n("Back to Registration")."</a>";
|
|
|
|
echo "<br />";
|
|
|
|
echo "<br />";
|
|
|
|
echo i18n("Choose Status").":";
|
|
|
|
echo "<form name=\"statuschangerform\" method=\"get\" action=\"registration_list.php\">";
|
|
|
|
echo "<select name=\"showstatus\" onchange=\"document.forms.statuschangerform.submit()\">";
|
|
|
|
if($_GET['showstatus']=="") $sel="selected=\"selected\""; else $sel="";
|
2005-01-13 15:56:27 +00:00
|
|
|
echo "<option $sel value=\"\">".i18n("Any Status")."</option>\n";
|
2005-01-07 04:45:17 +00:00
|
|
|
if($_GET['showstatus']=="new") $sel="selected=\"selected\""; else $sel="";
|
2005-01-13 15:56:27 +00:00
|
|
|
echo "<option $sel value=\"new\">".i18n("New")."</option>\n";
|
2005-01-07 04:45:17 +00:00
|
|
|
if($_GET['showstatus']=="open") $sel="selected=\"selected\""; else $sel="";
|
2005-01-13 15:56:27 +00:00
|
|
|
echo "<option $sel value=\"open\">".i18n("Open")."</option>\n";
|
2005-01-07 04:45:17 +00:00
|
|
|
if($_GET['showstatus']=="paymentpending") $sel="selected=\"selected\""; else $sel="";
|
2005-01-13 15:56:27 +00:00
|
|
|
echo "<option $sel value=\"paymentpending\">".i18n("Payment Pending")."</option>\n";
|
2005-01-07 04:45:17 +00:00
|
|
|
if($_GET['showstatus']=="complete") $sel="selected=\"selected\""; else $sel="";
|
2005-01-13 15:56:27 +00:00
|
|
|
echo "<option $sel value=\"complete\">".i18n("Complete")."</option>\n";
|
2005-01-07 04:45:17 +00:00
|
|
|
echo "</select>";
|
|
|
|
echo "</form>";
|
|
|
|
|
|
|
|
if($_GET['showstatus']) $wherestatus="AND status='".$_GET['showstatus']."' ";
|
|
|
|
else $wherestatus="";
|
|
|
|
|
|
|
|
$q=mysql_query("SELECT registrations.id AS reg_id,
|
|
|
|
registrations.num AS reg_num,
|
|
|
|
registrations.status,
|
|
|
|
projects.title,
|
|
|
|
projectcategories.category,
|
|
|
|
projectdivisions.division
|
|
|
|
FROM
|
|
|
|
registrations
|
|
|
|
left outer join projects on projects.registrations_id=registrations.id
|
|
|
|
left outer join projectcategories on projects.projectcategories_id=projectcategories.id
|
|
|
|
left outer join projectdivisions on projects.projectdivisions_id=projectdivisions.id
|
|
|
|
WHERE
|
|
|
|
1
|
|
|
|
$wherestatus
|
|
|
|
ORDER BY
|
|
|
|
registrations.status DESC,
|
|
|
|
projects.title
|
|
|
|
");
|
|
|
|
echo mysql_error();
|
|
|
|
echo "<table class=\"summarytable\">";
|
|
|
|
echo "<tr>";
|
2005-01-13 15:56:27 +00:00
|
|
|
echo "<th>".i18n("Status")."</th>";
|
|
|
|
echo "<th>".i18n("Reg Num")."</th>";
|
|
|
|
echo "<th>".i18n("Project Title")."</th>";
|
|
|
|
echo "<th>".i18n("Age Category")."</th>";
|
|
|
|
echo "<th>".i18n("Division")."</th>";
|
|
|
|
echo "<th>".i18n("School(s)")."</th>";
|
|
|
|
echo "<th>".i18n("Student(s)")."</th>";
|
2005-01-07 04:45:17 +00:00
|
|
|
echo "</tr>";
|
|
|
|
|
|
|
|
while($r=mysql_fetch_object($q))
|
|
|
|
{
|
|
|
|
switch($r->status)
|
|
|
|
{
|
|
|
|
case "new": $status_text="New"; break;
|
|
|
|
case "open": $status_text="Open"; break;
|
|
|
|
case "paymentpending": $status_text="Payment Pending"; break;
|
|
|
|
case "complete": $status_text="Complete"; break;
|
|
|
|
}
|
2005-01-13 15:56:27 +00:00
|
|
|
$status_text=i18n($status_text);
|
2005-01-07 04:45:17 +00:00
|
|
|
|
|
|
|
echo "<tr>";
|
|
|
|
echo "<td>$status_text</td>";
|
|
|
|
echo "<td>$r->reg_num</td>";
|
|
|
|
echo "<td>$r->title</td>";
|
2005-01-13 15:56:27 +00:00
|
|
|
echo "<td>".i18n("$r->category")."</td>";
|
|
|
|
echo "<td>".i18n("$r->division")."</td>";
|
2005-01-07 04:45:17 +00:00
|
|
|
|
|
|
|
$sq=mysql_query("SELECT students.firstname,
|
|
|
|
students.lastname,
|
|
|
|
schools.school
|
|
|
|
FROM
|
|
|
|
students,schools
|
|
|
|
WHERE
|
|
|
|
students.registrations_id='$r->reg_id'
|
|
|
|
AND
|
|
|
|
students.schools_id=schools.id
|
|
|
|
");
|
|
|
|
echo mysql_error();
|
|
|
|
|
|
|
|
$studnum=1;
|
|
|
|
$schools="";
|
|
|
|
$students="";
|
|
|
|
while($studentinfo=mysql_fetch_object($sq))
|
|
|
|
{
|
|
|
|
$students.="$studentinfo->firstname $studentinfo->lastname <br />";
|
|
|
|
$schools.="$studentinfo->school <br />";
|
|
|
|
}
|
|
|
|
echo "<td>$schools</td>";
|
|
|
|
echo "<td>$students</td>";
|
|
|
|
|
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
echo "</table>\n";
|
|
|
|
echo "<br />";
|
|
|
|
|
|
|
|
send_footer();
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|