Show team registrations on the schedule view for teachers

This commit is contained in:
james 2010-06-15 22:01:09 +00:00
parent a4ea7f6b1e
commit 7ca5edc2a1

View File

@ -115,8 +115,20 @@ if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode']){
echo i18n("Capacity").": ";
$regteams=getNumRegistrations($r->id);
$maxteams=$r->somaxteams;
echo i18n("%1 of %2",array($regteams,$maxteams));
echo i18n("%1 of %2",array($regteams,$maxteams))."<br />";
$regq=mysql_query("SELECT so_teams.name
FROM schedule_registrations
JOIN so_teams ON so_teams_id=so_teams.id
WHERE schedule_registrations.conferences_id='{$conference['id']}'
AND so_teams.schools_id={$school->id}
AND schedule_registrations.schedule_id='$r->id'");
echo mysql_error();
while($regr=mysql_fetch_object($regq)) {
echo "<div style=\"padding: 2px; border: 1px solid black; background-color: yellow;\">";
echo $regr->name;
echo "</div>";
}
}
echo "</div>";