Mercurial > hg > fapweb
changeset 375:028daa721ee2
Moar work.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 03 Dec 2013 16:00:27 +0200 |
parents | 9c4accca7bf8 |
children | 55007fe09371 |
files | admajax.php |
diffstat | 1 files changed, 17 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.php Tue Dec 03 15:52:08 2013 +0200 +++ b/admajax.php Tue Dec 03 16:00:27 2013 +0200 @@ -323,21 +323,31 @@ stRandomizeCompoShowOrder($compo_id, $patch); } } + break; + + case "check": + // + // Perform systems check + // + echo + "<h1>Competitions / voting</h1>\n". + "<ul>\n"; + + echo "<li>".(stGetSetting("allowVoting") ? "Voting <b>IS ENABLED</b>." : "Voting is NOT enabled!")."</li>\n"; + + if (($compos = stExecSQL("SELECT * FROM compos")) === FALSE) + stError("Eh? SQL error occured."); else - if ($type == "check") { - if (($compos = stExecSQL("SELECT * FROM compos")) === FALSE) - stError("Eh? SQL error occured."); - else foreach ($compos as $compo) { $nentries = stFetchSQLColumn("SELECT COUNT(*) FROM entries WHERE show_id=0 AND compo_id=".$compo["id"]); if ($nentries > 0) - { - stError("Compo #".$compo["id"]." - ".$compo["name"]." has NO show order set for some entries."); - } + echo "<li>Compo <b>#".$compo["id"]." - ".$compo["name"]."</b> has NO show order set for some entries.</li>\n"; } } + echo "</ul>\n"; + break; case "get":