forked from science-ation/science-ation
Always show the city in the school access login page, and sort it first by city then school name (previously it only showed the city for duplicate school names)
This commit is contained in:
parent
f70314653b
commit
17745cbb0a
@ -234,15 +234,9 @@ else
|
||||
<select name="schoolid">
|
||||
<option value=""><?=i18n("Choose your school")?></option>
|
||||
<?
|
||||
$q=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER BY school");
|
||||
$prev="somethingthatdoesnotexist";
|
||||
while($r=mysql_fetch_object($q))
|
||||
{
|
||||
if($r->school==$prev)
|
||||
echo "<option value=\"$r->id\">$r->school ($r->city)</option>\n";
|
||||
else
|
||||
echo "<option value=\"$r->id\">$r->school</option>\n";
|
||||
$prev=$r->school;
|
||||
$q=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER BY city,school");
|
||||
while($r=mysql_fetch_object($q)) {
|
||||
echo "<option $sel value=\"$r->id\">".htmlspecialchars($r->city).' - '.htmlspecialchars($r->school)."</option>\n";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user