# HG changeset patch # User Matti Hamalainen # Date 1571038446 -10800 # Node ID d5847f016de557ff11cbaa8534029c4b13ad3a13 # Parent 24e6915fc0fb432e3b274f1654e90e9cad6e3378# Parent 0eca3f1b1d489476bc9782973884ee8ab1afe50e Merge. diff -r 24e6915fc0fb -r d5847f016de5 admajax.php --- a/admajax.php Mon Oct 14 10:33:39 2019 +0300 +++ b/admajax.php Mon Oct 14 10:34:06 2019 +0300 @@ -1279,8 +1279,7 @@ "
Controls for competition showing mode. Select and activate desired compo, then ". "hit 'Next entry' to activate the first entry to show. Notice! You need to have generated 'show positions' ". "before starting compos!
\n". - "
\n". - stGetFormOptionListStart("ctrlCompoList", " ", TRUE); + "
\n"; $sql = "SELECT compos.*, ". @@ -1293,16 +1292,19 @@ $currCompoID = stGetDisplayVar("compoID"); if (($res = stExecSQL($sql)) !== FALSE) { + echo stGetFormOptionListStart("ctrlCompoList", " ", TRUE); foreach ($res as $item) { echo stGetFormOptionListItem(" ", $item["id"], ($item["id"] == $currCompoID), sprintf("%-20s (%d entries)", substr($item["name"], 0, 20), $item["nentries"])); } + echo stGetFormOptionListEnd(" ", TRUE); } + else + echo "ERROR"; echo - stGetFormOptionListEnd(" ", TRUE). "
\n". " ".stGetFormButtonInput("setcompo", "", "", "Change compo", "activateCompo()")."\n". "
\n". @@ -1334,13 +1336,18 @@ "
\n"; $sql = "SELECT * FROM news ORDER BY utime DESC"; - foreach (stExecSQL($sql) as $item) + if (($res = stExecSQL($sql)) !== false) { - echo - "
\n". - stGetNewsItemData($item["id"], $item, "ne"). - "
\n"; + foreach ($res as $item) + { + echo + "
\n". + stGetNewsItemData($item["id"], $item, "ne"). + "
\n"; + } } + else + echo "ERROR"; break; case "newsitem":