define('FC_NUM_WEEKS', 15); define('FC_DEFAULT_VALUE', 9999); define('FC_NUM_CHALLENGES', 10); // How much to truncate the Messages when a new challenge is created. // 0 - No messages truncated // 1 - Messages from last week (and older) are truncated // 2 - Messages from two weeks ago (and older) are truncated // ... define('FC_MSGS_TRUNCATE', 1); // Get the Wodk Library (DB, Logger and TwigExtensions) // Get our templating engine Twig // Get the micro-framework Limonade require_once 'vendor/autoload.php'; // Autoload our controllers require_once 'controllers/AppController.php'; AppController::register(); // Get our routes require_once 'routes.php'; // Global helpers function get_post($var) { if (isset($_POST[$var])) { return $_POST[$var]; } else { if (isset($GLOBALS['_JSON']->{$var})) { return $GLOBALS['_JSON']->{$var}; } else { $json = json_decode(file_get_contents('php://input')); if (isset($json)) { if (isset($json->{$var})) { return $json->{$var};