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">
|
<select name="schoolid">
|
||||||
<option value=""><?=i18n("Choose your school")?></option>
|
<option value=""><?=i18n("Choose your school")?></option>
|
||||||
<?
|
<?
|
||||||
$q=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER BY school");
|
$q=mysql_query("SELECT id,school,city FROM schools WHERE year='".$config['FAIRYEAR']."' ORDER BY city,school");
|
||||||
$prev="somethingthatdoesnotexist";
|
while($r=mysql_fetch_object($q)) {
|
||||||
while($r=mysql_fetch_object($q))
|
echo "<option $sel value=\"$r->id\">".htmlspecialchars($r->city).' - '.htmlspecialchars($r->school)."</option>\n";
|
||||||
{
|
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
Loading…
Reference in New Issue
Block a user