Mercurial > hg > fapweb
diff admajax.php @ 1120:b2bca5f6d0ff default tip
Cosmetic cleanup: remove trailing whitespace.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 13 Dec 2020 13:47:13 +0200 |
parents | a4daa7ea7479 |
children |
line wrap: on
line diff
--- a/admajax.php Mon Oct 14 10:54:32 2019 +0300 +++ b/admajax.php Sun Dec 13 13:47:13 2020 +0200 @@ -95,7 +95,7 @@ array(CHK_RANGE, VT_INT, array(EPREV_NONE, EPREV_AUDIO), "Invalid preview type value.")); } break; - + case COMPO_POINTS: stChkRequestItemFail("evalue", $fake, $res, array(CHK_TYPE, VT_INT, "Invalid points value, must be a valid integer.")); @@ -139,7 +139,7 @@ switch ($item["ctype"]) { case COMPO_NORMAL: - $str1 = + $str1 = " File path: ".stGetFormTextInput(40, SQL_LEN_COMPO_PATH, "cpath", $id, $prefix, $item["cpath"])."<br />\n"; $str2 = @@ -261,7 +261,7 @@ echo " <div class=\"entryCell entryShowID\">".($item["show_id"] > 0 ? $item["show_id"] : "-")."</div>\n"; } - + switch ($compo["ctype"]) { case COMPO_NORMAL: @@ -324,10 +324,10 @@ stGetFormOptionListEnd(" ", TRUE). "</div>\n"; } - + echo "</div>\n"; break; - + case COMPO_POINTS: case COMPO_ASSIGN: echo @@ -366,7 +366,7 @@ stGetFormButtonInput("update", $eid, $prefix, "Update", "updateEntry(".$item["compo_id"].",".$eid.", 0)"). stGetFormButtonInput("delete", $eid, $prefix, "Delete", "deleteEntry(".$item["compo_id"].",".$eid.")"); break; - + case EEMODE_ADD: echo stGetFormButtonInput("add", $item["compo_id"], $prefix, "Add new", "addEntry(".$item["compo_id"].")"); @@ -383,7 +383,7 @@ function stGetUserKeyClass($item) { global $setUserKeyMode; - + switch ($setUserKeyMode) { case VOTE_FREELY: @@ -409,7 +409,7 @@ { $nkeys = stFetchSQLColumn("SELECT COUNT(*) FROM userkeys WHERE active=1"); $totalKeys = stFetchSQLColumn("SELECT COUNT(*) FROM userkeys"); - + $nvoters = stFetchSQLColumn("SELECT COUNT(DISTINCT(key_id)) FROM votes"); return @@ -438,7 +438,7 @@ $str .= stGetFormCheckBoxInput("active", $id, $prefix, $item["active"], FALSE, "class=\"keyactive\" onChange=\"userKeySetActive(".$id.")\"", ""); } - + return $str; case VOTE_ASSIGN: @@ -451,7 +451,7 @@ if ($item["key_id"] != 0) $str .= stGetFormButtonInput("clear", $id, $prefix, "Clear", "userKeyAssign(".$id.",0)"); - + $str .= "</td>\n". " <td class=\"vkey\">"; @@ -556,7 +556,7 @@ substr($item["author"], 0, 15))); } } - + return $str.stGetFormOptionListEnd($indent, $outer); } @@ -606,7 +606,7 @@ $sql = stPrepareSQL("SELECT * FROM rot_list_data WHERE id=%d", $list_id); if (($data = stFetchSQL($sql)) === FALSE) return "<p>No such rotation list ID #".intval($list_id)."</p>"; - + $str = ($outer ? $indent."<div class=\"ctrlBox\" id=\"ctrlRotationListEdit\">\n" : ""). $indent." <div class=\"ctrlTitle\">Edit rotation list</div>\n". @@ -666,7 +666,7 @@ { $sql = stPrepareSQL("SELECT * FROM rot_list_data WHERE id=%d", stGetDisplayVar("rotateList")); - + $str = $indent.($outer ? "<div id=\"ctrlActiveRotationList\">" : ""). "<b>Active list:</b> "; @@ -703,7 +703,7 @@ " </div>\n". " </form>\n". ($outer ? "</div>\n" : ""); - + return $str; } @@ -859,7 +859,7 @@ 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) @@ -876,7 +876,7 @@ } } } - + $nenabled = stFetchSQLColumn("SELECT COUNT(*) FROM compos WHERE visible<>0 AND voting<>0"); if ($nenabled == 0) echo "<li>No competitions that are visible and enabled for voting.</li>\n"; @@ -910,12 +910,12 @@ if ($ncompos > 0) echo "<li>NON-VOTING COMPOS: <b>".$nentries."</b> entries/participants in <b>".$ncompos."</b> compos.</li>\n"; - + if ($errors == 0) echo "<li>No errors/warnings detected.</li>\n"; echo "</ul>\n"; - + break; case "ctrl": @@ -1165,7 +1165,7 @@ { $sql = stPrepareSQL("DELETE FROM rot_list_slides WHERE list_id=%d AND slide_id=%d AND order_num=%d", $list_id, $slide_id, $order_num); - + if (stExecSQLCond($sql, "List slide refs deleted.")) { stNormalizeListSlideOrder($list_id); @@ -1190,11 +1190,11 @@ case "infoCurrEntryList": echo stGetInfoCurrEntryList("", FALSE); break; - + case "infoRotationLists": echo stGetInfoRotationLists("", FALSE); break; - + case "infoDisplaySlides": echo stGetInfoDisplaySlides("", FALSE); break; @@ -1474,7 +1474,7 @@ "<div class=\"info\">". "User key length ".stGetSetting("userKeyLength")." ". "<b>Voting mode: "; - + if (isset($voteModeData[$setUserKeyMode])) echo $voteModeData[$setUserKeyMode][0]."</b>. ".$voteModeData[$setUserKeyMode][1]; else @@ -1627,7 +1627,7 @@ echo "</form>\n"; } break; - + case "compolist": $index = 0; foreach (stExecSQL("SELECT * FROM compos") as $compo) @@ -1891,12 +1891,12 @@ "cpath" => "S", ); break; - + default: $cdata = array(); break; } - + $sql = stPrepareSQLUpdate("compos", "WHERE id=".$id, array_merge(array( @@ -1982,7 +1982,7 @@ $sql = stPrepareSQL("UPDATE attendees SET key_id=NULL WHERE id=%d", $id); stExecSQLCond($sql, "Assigned key cleared."); break; - + case "active": // Autobots activate! $sql = stPrepareSQL("UPDATE userkeys SET active=%B WHERE id=%d", "active", $id);