mail("jrghv.09@gmail.com","togo1050 Registration","Access tried!"); exit; include_once("../../common/includes/settings.php"); include_once("../../common/classes/Carbon.php"); include_once('../config.php'); use Carbon\Carbon; if($_POST['Submit'] == 'checkout') { $_SESSION['challenge-reg'] = $_POST; header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/togo1050/registration-checkout.php"); } $challenge_detail = ChallengeDetail::byId(3); $challenge_name = $challenge_detail->name; $event_start_date = Carbon::parse($challenge_detail->start_date); $event_end_date = Carbon::parse($challenge_detail->end_date); $reg_end_date = Carbon::createFromFormat('Y-m-d H:i:s', '2016-10-01 00:00:00'); // Redirect to index when registration period ends if(Carbon::now() >= $reg_end_date) { //header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/1050/index.php"); //exit; } // Show login modal if not logged in if (isInSession()) { $logged_in = true; $enable_checkout = true; } else { $logged_in = false; $enable_checkout = false; } $user = new User(getSessionUserid()); if ($user->isBanned()) { header ("Location: ".$GLOBAL_HOSTHTTP_URL."/common/logout.php"); exit; } $cuser = ChallengeUser::where('cid', $challenge_detail->cid)->where('userid', getSessionUserid())->getOne(); if($cuser) { header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/togo1050/thank-you.php"); exit; } $prev_participant = ChallengeUser::where('cid', array(1, 2), 'IN')->where('userid', getSessionUserid())->getOne(); if(isset($_SESSION['challenge-reg'])) { $registrant = $_SESSION['challenge-reg']; } ## Fill in the following for SEO $canonical_url = 'http://www.togoparts.com/challenges/togo1050/index.php'; $WEBPAGE_TITLE = "TOGO1050 Registration | ".$GLOBAL_PORTAL_NAME; $meta_description = "Register for the TOGO1050 Challenge"; $meta_keywords = ""; $canonical_url = ""; //for canonical meta rel tag if applicable $noSitetakeover = true; $cb = $GLOBAL_HOSTHTTP_URL . '/challenges/togo1050/registration.php'; ?>
require_once ($GLOBAL_ABSOLUTE_PATH."/common/includes/htmlheader-new.inc.php");?>