<?php define("PAGE_PUBLIC", true); require_once 'init.php'; $key = null; if (isset($_GET['key'])) { $key = $_GET['key']; } $api = new api($app, $key); if (isset($_GET['method'])) { $api->handleRequest($_GET['method'], $_GET); } else { $api->respond(400); }
<?php define("PAGE_PUBLIC", true); define("LANDING_PAGE", true); require_once 'init.php'; $minifier->add_file('home.scss', 'css'); // Set canonical link $app->page->canonical = "https://www.hackthis.co.uk"; if (isset($_GET['api']) && isset($_GET['key'])) { header("Content-type: text/plain"); // Make call to api try { $api = new api($app, $_GET['key']); $api->handleRequest($_POST['action'], null); } catch (Exception $e) { echo $e->getMessage(); } die; } if ($app->user->loggedIn) { require_once "home.php"; } else { define("_SIDEBAR", false); require_once 'header.php'; ?> <div class='row header'> <img src="https://hackthis-10af.kxcdn.com/files/images/logo_landing.png" alt="HackThis!! - The hackers playground"> </div> <?php if (isset($_GET['deleted'])) { $app->utils->message('Your account has been successfully deleted. Painful though parting be, I bow to you as I see you off to distant clouds. ', 'info');