// $DO_BETA = true; // $EVENT_MODE = 5; //// $CONFIG['theme-alert'] = '<b>BETA TEST</b> • Vote data will be <b>DELETED</b> • Report bugs <a href="http://ludumdare.com/compo/">HERE</a>'; // $CONFIG['theme-alert'] = '<b>BETA TEST</b> • Treat this as Live • Report bugs <a href="http://ludumdare.com/compo/">HERE</a>'; //} define('HTML_TITLE', $EVENT_NAME . " - Theme Hub"); const HTML_USE_CORE = true; const HTML_CSS_INCLUDE = ["/style/theme-hub.css.php"]; const HTML_OTHER_CSS_INCLUDE = []; const HTML_JS_INCLUDE = []; const HTML_OTHER_JS_INCLUDE = ["api-legacy.js", "api-theme.js"]; const HTML_SHOW_FOOTER = true; const HTML_USE_GOOGLE = true; // Extract Id from Cookie (and not Announcement) // if ($EVENT_MODE !== 5 && isset($_COOKIE['lusha'])) { $cookie_id = legacy_GetUserFromCookie(); } else { $cookie_id = 0; } // Hack, only let "PoV" do admin things $admin = false; if (isset($_GET['admin'])) { if (defined('LEGACY_DEBUG') || $cookie_id === 19) { $admin = true; } } // ** Modes ** // const THEME_MODE_NAMES = ["Inactive", "Theme Suggestion Round", "Theme Slaughter Round", "Theme Voting Round", "Final Round Theme Voting", "Theme Announcement", "Coming Soon"]; const THEME_MODE_SHORTNAMES = ["Inactive", "Suggestion", "Slaughter", "Voting", "Final Voting", "Announcement", "Coming Soon"]; const THEME_MODE_SHOW_TIMES = [false, true, true, true, true, true, false]; // ??? //
<?php require_once __DIR__ . "/../api.php"; require_once __DIR__ . "/../db.php"; require_once __DIR__ . "/../core/config.php"; require_once __DIR__ . "/../core/theme.php"; require_once __DIR__ . "/../core/legacy_user.php"; config_Load(); require_once __DIR__ . "/common.php"; $response = json_NewResponse(); $user_id = legacy_GetUserFromCookie(); $ADMIN = defined('LEGACY_DEBUG') || $user_id === 19; // MAIN (Only accept POST requests) // if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) { $action = trim($_POST['action']); $max_themes = 3; //$response['EVENT_MODE'] = $EVENT_MODE; //$response['EVENT_MODE_DIFF'] = $EVENT_MODE_DIFF; // User Account Required // if ($user_id > 0 && $EVENT_NODE > 0) { if ($action == "GETMY") { $response['ideas'] = theme_GetMyIdeas($EVENT_NODE, $user_id); $response['count'] = count($response['ideas']); } else { if ($action == "GETMYOTHER") { $response['ideas'] = theme_GetMyOtherIdeas($EVENT_NODE, $user_id); $response['count'] = count($response['ideas']); } else { if ($action == "ADD" && isset($_POST['idea']) && IsThemeSuggestionsOpen()) { $idea = mb_trim($_POST['idea']); if ($idea !== "") {