From dd230b2cdf3acf7fa34e742a1a0ff65d1acc7ed6 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 16 Jun 2010 16:15:17 +0000 Subject: [PATCH] Show registered teams on admin schedule Move more stuff to common include --- admin/schedule.php | 13 +++++-------- schedule.inc.php | 4 ++++ schoolschedule.php | 3 --- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/admin/schedule.php b/admin/schedule.php index dbc2ac1..31fad7f 100644 --- a/admin/schedule.php +++ b/admin/schedule.php @@ -3,8 +3,8 @@ This file is part of the 'Science Fair In A Box' project SFIAB Website: http://www.sfiab.ca - Copyright (C) 2005 Sci-Tech Ontario Inc - Copyright (C) 2005 James Grant + Copyright (C) 2010 Youth Science Ontario + Copyright (C) 2010 James Grant This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public @@ -24,10 +24,9 @@ eventtype=="scienceolympic") { echo "
"; echo i18n("Teams")." : "; - //FIXME: get # actually registered - $regteams=0; - + $regteams=getNumRegistrations($r->id); $maxteams=$r->somaxteams; echo i18n("%1 of %2",array($regteams,$maxteams)); diff --git a/schedule.inc.php b/schedule.inc.php index 5950205..75b259a 100644 --- a/schedule.inc.php +++ b/schedule.inc.php @@ -21,6 +21,10 @@ Boston, MA 02111-1307, USA. */ +$ROWHEIGHT=20; +$BORDERSIZE=2; + + function getTeamEventStatus($teamid,$scheduleid) { global $conference; $q=mysql_query("SELECT * FROM schedule_registrations WHERE so_teams_id='$teamid' AND schedule_id='$scheduleid' AND conferences_id='{$conference['id']}'"); diff --git a/schoolschedule.php b/schoolschedule.php index 3e0afed..55f0241 100644 --- a/schoolschedule.php +++ b/schoolschedule.php @@ -32,9 +32,6 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode']){ $school=mysql_fetch_object($q); if($school) { - $ROWHEIGHT=20; - $BORDERSIZE=2; - if($_GET['action']=="loadschedule") { $date=$_POST['date'];