include_once("../common/includes/settings.php"); include_once("../common/classes/Carbon.php"); include_once('config.php'); /*if(isInSession()){ redirectIfNotSecure(); }*/ use Carbon\Carbon; use Carbon\CarbonInterval; $now = Carbon::now()->format('Y-m-d H:i:s'); //echo $now; /*$challenge_detail = ChallengeDetail::byId(5); $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', '2017-07-21 11:59:59'); // Show login modal if not logged in if (isInSession()) { $logged_in = true; $enable_checkout = true; $cuser = ChallengeUser::where('cid', array(4,5,6), 'IN')->where('userid', getSessionUserid())->getOne(); if(!$cuser) { header("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/index.php"); exit; } } else { $logged_in = false; $enable_checkout = false; } $user = new User(getSessionUserid()); if ($user->isBanned()) { header ("Location: ".$GLOBAL_HOSTHTTP_URL."/common/logout.php"); exit; } /*echo '
'; print_r($cuser); echo '';*/ $cuser_rsvp = ChallengeUserRsvp::where('userid', getSessionUserid())->where('cid', 6)->getOne(); if(isset($_POST['rsvp_submit'])){ if($cuser_rsvp){ $cuser_rsvp->userid = getSessionUserid(); $cuser_rsvp->rsvp = $_POST['rsvp']; $cuser_rsvp->rsvp_remarks = $_POST['rsvp_remarks']; $cuser_rsvp->rsvp_date = $now; } if($cuser_rsvp->save()) { $_SESSION['content-message'] = ' '; $_SESSION['redirect'] = 'Success'; //sleep(5); //header ("Location: ".$GLOBAL_HOSTHTTP_URL."/challenges/togo1117/index.php"); //exit; } else { $_SESSION['content-message'] = ' '; $_SESSION['redirect'] = 'Error'; } } ## Fill in the following for SEO $canonical_url = 'http://www.togoparts.com/challenges/togo1117/index.php'; $WEBPAGE_TITLE = "Challenge Season RSVP Finisher Event | ".$GLOBAL_PORTAL_NAME; $meta_description = "RSVP Finisher Event for Season Challenge"; $meta_keywords = ""; $canonical_url = ""; //for canonical meta rel tag if applicable $noSitetakeover = true; $cb = $GLOBAL_HOSTHTTP_URL . '/challenges/rsvp-season-challenge-event.php'; ?> require_once ($GLOBAL_ABSOLUTE_PATH."/common/includes/htmlheader-new.inc.php");?>