//mail("jrghv.09@gmail.com","togowcd Registration","Access tried!"); exit; include_once("../../common/includes/settings.php"); include_once("../../common/classes/Carbon.php"); include_once('../config.php'); if(isInSession()){ redirectIfNotSecure(); } use Carbon\Carbon; $conf =& $chall_conf['togowcd']; $challenge_name = $conf['hashtag']; $lc_c_name = strtolower( $challenge_name ); $event_start_date = Carbon::parse( $conf['race_start'] ); $event_end_date = Carbon::parse( $conf['race_end'] ); $reg_end_date = Carbon::createFromFormat('Y-m-d H:i:s', $conf['reg_end'] ); if($_POST['Submit'] == 'checkout') { $_SESSION['challenge-reg'] = $_POST; header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/$lc_c_name/registration-checkout.php"); } $codes = array("uI78gQ0E29Rn","05v96y3NdqaY","2196gU0q9IT1","iJxGiG20Y667","bWWIvA558L99"); $is_code = false; if(isset($_GET['code'])) { if (in_array($_GET['code'], $codes)) { /*header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/togo817/index.php"); exit;*/ $is_code = true; } } // Redirect to index when registration period ends /*if(Carbon::now() >= $reg_end_date) { header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/togo817index.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', $conf['id'] )->where('userid', getSessionUserid())->getOne(); if($cuser) { header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/" . $lc_c_name . "/update-general-info.php"); exit; } $prev_participant = ChallengeUser::where('cid', array(1, 2, 3, 4, 5, 6, 7, 8, 11), 'IN')->where('userid', getSessionUserid())->getOne(); $userreg = new User( $_SESSION['session_userid'] ); if(isset($_SESSION['challenge-reg'])) { $registrant = $_SESSION['challenge-reg']; } // if(!isAdmin()){ // header("Location: http://www.togoparts.com/pages/index.php"); // } $ip = $REMOTE_ADDR; // $ip = '219.93.13.232'; // Malaysia // $ip = '128.199.232.195'; // Singapore $record = GetGeoIPRecord($ip); $userCountryCode = $record->country_code; if( !in_array( $userCountryCode, array( "MY", "ID" ) ) ) $userCountryCode = "SG"; //echo $userCountryCode; $price_jersey= $conf['fee'][$userCountryCode]['currency'] . " " . $conf['fee'][$userCountryCode]['price']['0']; $price_tee = $conf['fee'][$userCountryCode]['currency'] . " " . $conf['fee'][$userCountryCode]['price']['1']; ## Fill in the following for SEO $canonical_url = $conf['canonical_url'] . "index.php"; //for canonical meta rel tag if applicable $WEBPAGE_TITLE = "#$challenge_name Registration | ".$GLOBAL_PORTAL_NAME; $meta_description = "Register for the $challenge_name Challenge"; $meta_keywords = ""; $canonical_url = ""; //for canonical meta rel tag if applicable $noSitetakeover = true; $cb = $GLOBAL_HOSTHTTP_URL . "/challenges/$lc_c_name/registration.php"; //$cb = 'https://www.togoparts.regress/challenges/$lc_c_name/registration.php'; ?>
Team
* If you reside outside Singapore, please click here for the details of rewards delivery and collection.