Copyright (C) 2005-2006 James Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ ?> id]=$r->category; $q=mysql_query("SELECT * FROM projectdivisions WHERE conferences_id='{$conference['id']}' ORDER BY id"); while($r=mysql_fetch_object($q)) $divs[$r->id]=$r->division; $action=$_GET['action']; switch($action) { case 'load_row': $id = intval($_GET['id']); $q = list_query($conference_id, '', $id); $r = mysql_fetch_object($q); print_row($r); exit; case 'delete': $regid = intval($_GET['id']); $q = mysql_query("SELECT * FROM projects WHERE registrations_id='$regid'"); if(mysql_num_rows($q)) { $p = mysql_fetch_assoc($q); mysql_query("DELETE FROM winners WHERE projects_id='{$p['id']}'"); } mysql_query("DELETE FROM registrations WHERE id='$regid' AND conferences_id='".$conference['id']."'"); mysql_query("DELETE FROM students WHERE registrations_id='$regid' AND conferences_id='".$conference['id']."'"); mysql_query("DELETE FROM projects WHERE registrations_id='$regid' AND conferences_id='".$conference['id']."'"); mysql_query("DELETE FROM safety WHERE registrations_id='$regid' AND conferences_id='".$conference['id']."'"); // mysql_query("DELETE FROM questions_answers WHERE registrations_id='$regid' AND conferences_id='".$conference['id']."'"); mysql_query("DELETE FROM mentors WHERE registrations_id='$regid' AND conferences_id='".$conference['id']."'"); mysql_query("DELETE FROM emergencycontact WHERE registrations_id='$regid' AND conferences_id='".$conference['id']."'"); happy_("Registration and all related data successfully deleted"); exit; } if($auth_type == 'committee') { send_header("Registration Management", array('Committee Main' => 'committee_main.php', 'Administration' => 'admin/index.php', 'Participant Registration' => 'admin/registration.php') ); } else { send_header("Student/Project Management", array('Fair Main' => 'fair_main.php') ); } ?>
:
"; echo ""; if($showstatus) $stat="&showstatus=".$showstatus; echo "".i18n("Status").""; echo "".i18n("Email Address").""; echo "".i18n("Reg Num").""; echo "".i18n("Proj Num").""; echo "".i18n("Project Title").""; echo "".i18n("Age Category").""; echo "".i18n("Division").""; echo "".i18n("School(s)").""; echo "".i18n("Student(s)").""; echo "".i18n("Action").""; echo ""; echo ""; while($r=mysql_fetch_object($q)) { echo "reg_id}\">"; print_row($r); echo ""; } echo ""; echo ""; echo "

The statistics have moved here: Registration Statistics

"; send_footer(); /* Now some helper fucntions we call more than once */ function list_query($conference_id, $wherestatus, $reg_id) { global $auth_type; $reg = ''; if($reg_id != false) $reg = "AND registrations.id='$reg_id'"; $fair = ''; if($auth_type == 'fair') { $fair = "AND projects.fairs_id='{$_SESSION['fairs_id']}'"; } $q=mysql_query("SELECT registrations.id AS reg_id, registrations.num AS reg_num, registrations.status, registrations.email, projects.title, projects.projectnumber, projects.projectcategories_id, projects.projectdivisions_id FROM registrations left outer join projects on projects.registrations_id=registrations.id WHERE 1 AND registrations.conferences_id='$conference_id' $wherestatus $reg $fair ORDER BY registrations.status DESC, projects.title "); echo mysql_error(); return $q; } function print_row($r) { global $cats, $divs, $config, $conference_id, $conference; 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; } $status_text=i18n($status_text); $scl = "style=\"cursor:pointer;\" onclick=\"popup_editor('{$r->reg_id}','');\""; $pcl = "style=\"cursor:pointer;\" onclick=\"popup_editor('{$r->reg_id}','project');\""; echo "{$status_text}"; echo "{$r->email}"; echo "{$r->reg_num}"; $pn = str_replace(' ', ' ', $r->projectnumber); echo "$pn"; echo "{$r->title}"; echo "".i18n($cats[$r->projectcategories_id]).""; echo "".i18n($divs[$r->projectdivisions_id]).""; $sq=mysql_query("SELECT students.firstname, students.lastname, students.id, schools.school, schools.board, schools.id AS schools_id 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
"; $schools.="$studentinfo->school
"; } echo "$schools"; echo "$students"; echo ""; if($conference_id==$conference['id']) { echo "reg_id});return false\" >"; echo ""; echo ""; echo "
"; echo ""; echo "email\">"; echo "reg_num\">"; echo ""; echo "
"; } echo ""; } ?>