Mercurial > hg > fapweb
comparison pages/vote.inc.php @ 988:7d7bd913649c
Order the compos on vote page.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 29 Nov 2014 18:28:50 +0200 |
parents | c1738ee91f6a |
children | 3714c6c53529 |
comparison
equal
deleted
inserted
replaced
987:06e45615b46b | 988:7d7bd913649c |
---|---|
117 " ".stGetFormHiddenInput("mode", "done")."\n". | 117 " ".stGetFormHiddenInput("mode", "done")."\n". |
118 " ".stGetFormHiddenInput("action", "submit")."\n". | 118 " ".stGetFormHiddenInput("action", "submit")."\n". |
119 " ".stGetFormHiddenInput("onerror", "noauthvote")."\n". | 119 " ".stGetFormHiddenInput("onerror", "noauthvote")."\n". |
120 stGetVoteButton(); | 120 stGetVoteButton(); |
121 | 121 |
122 foreach (stExecSQL("SELECT * FROM compos WHERE visible<>0 AND voting<>0") as $compo) | 122 foreach (stExecSQL("SELECT * FROM compos WHERE visible<>0 AND voting<>0 ORDER BY id") as $compo) |
123 { | 123 { |
124 $esql = stPrepareSQL("FROM entries WHERE (flags & %d)=0 AND compo_id=%d", EFLAG_DISQUALIFIED, $compo["id"]); | 124 $esql = stPrepareSQL("FROM entries WHERE (flags & %d)=0 AND compo_id=%d", EFLAG_DISQUALIFIED, $compo["id"]); |
125 $nentries = stFetchSQLColumn("SELECT COUNT(*) ".$esql); | 125 $nentries = stFetchSQLColumn("SELECT COUNT(*) ".$esql); |
126 if ($nentries > 0) | 126 if ($nentries > 0) |
127 { | 127 { |