Copyright (C) 2005 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. */ ?> title!=$r->name) { $name="($r->name)"; } echo "

$r->title $name

"; switch($_GET['tab']) { case "summary": echo ""; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo ""; echo "\n"; echo "\n"; echo "\n"; echo "
".i18n("Time")."".i18n("Duration")."".i18n("Location")."
".format_time(strtotime($r->hour.":".$r->minute))."$r->duration minutes$r->location
\n"; echo "
"; echo "

".i18n("Summary")."

\n"; echo nl2br(trim($r->summary)); echo "
\n"; echo "
\n"; if($r->website) { echo "website\">".i18n("Click here for the full event description")."
\n"; } break; case "register": $regteams=getNumRegistrations($r->id); echo i18n("Current capacity: %1 of %2 Teams",array($regteams,$r->somaxteams)); echo "
"; echo "
"; echo i18n("Your school's teams").":
"; echo ""; echo ""; echo " "; echo " "; echo " "; echo ""; $query="SELECT * FROM so_teams WHERE schools_id='{$school->id}' AND conferences_id='{$conference['id']}'"; $tq=mysql_query($query); echo mysql_error(); while($team=mysql_fetch_object($tq)) { $status=getTeamEventStatus($team->id,$r->id); if($status=="registered") { $cl="class=\"happy\""; $statusmsg=i18n("Registered"); $buttonmsg=i18n("Un-Register"); $action="unregister"; } else { $cl="class=\"error\""; $statusmsg=i18n("Not Registered"); $buttonmsg=i18n("Register"); $action="register"; } echo ""; echo ""; echo ""; echo "\n"; } echo "
".i18n("Team Name")."".i18n("Current Status")."".i18n("Action")."
$team->name$statusmsgid,$r->id,'$action')\">
\n"; break; } break; case "register": $teamid=intval($_POST['teamid']); $scheduleid=intval($_POST['scheduleid']); $conferenceid=$conference['id']; switch($_POST['regaction']) { case "register": $results = registerTeamInEvent($conferenceid, $scheduleid, $teamid); if($results['success'] == true){ happy_("Successfully registered the team for this scheduled event"); }else{ error_($results['message']); } break; case "unregister": $results = unregisterTeamInEvent($conferenceid, $scheduleid, $teamid); if($results['success'] == true){ happy_("Successfully unregistered the team from this scheduled event"); }else{ error_($results['message']); } break; } break; } } else { echo "Invalid school"; } ?>