public function confirm() { parent::init(); try { $token = Session::get('SummitConfirmSpeakerPage.Token'); if (isset($_REQUEST['t'])) { $token = base64_decode($_REQUEST['t']); Session::set('SummitConfirmSpeakerPage.Token', $token); return $this->redirect($this->Link('confirm')); } if (empty($token)) { throw new InvalidArgumentException('missing token!'); } $request = PresentationSpeakerSummitAssistanceConfirmationRequest::get()->filter('ConfirmationHash', PresentationSpeakerSummitAssistanceConfirmationRequest::HashConfirmationToken($token))->first(); if (is_null($request)) { throw new NotFoundEntityException('PresentationSpeakerSummitAssistanceConfirmationRequest', ''); } if (!$request->alreadyConfirmed()) { $request->confirm($token); $request->write(); } $data['Speaker'] = $request->Speaker(); $data['Summit'] = $request->Summit(); Session::set('Current.PresentationSpeakerSummitAssistanceConfirmationRequest', $request); return $this->customise($data)->renderWith(array('SummitConfirmSpeakerPage', 'SummitPage'), $this->parent); } catch (Exception $ex) { SS_Log::log($ex->getMessage(), SS_Log::WARN); return $this->httpError(404, 'Sorry, this speaker confirmation token does not seem to be correct.'); } }
/** * Check for auth tokens * @return mixed */ public function init() { parent::init(); if (!Summit::get_active()->isInDB()) { return $this->httpError(404, 'There is no active summit'); } /** * On the existing tokenauthentication system, this is a fairly trivialmatter, and I'm not so sure it's anything to navigate right now. * Thiswas implemented to provide the video upload people a simple API foradding videos. It's a very specific use c * ase, and general users shouldnot be using it. If they can and they are, then that needs to bechanged. */ $result = $this->checkAuthenticationToken(); if (!$result && !Member::currentUser()) { //check if speaker registration token is present.. $speaker_registration_token = $this->request->getVar(SpeakerRegistrationRequest::ConfirmationTokenParamName); if (!is_null($speaker_registration_token)) { $request = $this->speaker_registration_request_repository->getByConfirmationToken($speaker_registration_token); if (is_null($request) || $request->alreadyConfirmed()) { return SummitSecurity::permission_failure($this); } // redirect to register member speaker $url = Controller::join_links(Director::baseURL(), 'summit-login', 'registration'); return $this->redirect($url . '?BackURL=' . urlencode($this->request->getURL()) . '&' . SpeakerRegistrationRequest::ConfirmationTokenParamName . '=' . $speaker_registration_token); } return SummitSecurity::permission_failure($this); } $speaker = Member::currentUser()->getCurrentSpeakerProfile(); if (!$speaker) { $speaker = PresentationSpeaker::create(array('MemberID' => Member::currentUserID(), 'SummitID' => Summit::get_active()->ID, 'FirstName' => Member::currentUser()->FirstName, 'LastName' => Member::currentUser()->Surname)); $speaker->write(); } }
public function init() { $this->top_section = 'full'; parent::init(); Requirements::block("summit/css/combined.css"); Requirements::css("themes/openstack/static/css/combined.css"); }
public function init() { parent::init(); Requirements::block("summit/css/combined.css"); Requirements::css("themes/openstack/static/css/combined.css"); Requirements::javascript("themes/openstack/static/js/guide.js"); }
public function init() { $this->top_section = 'short'; //or full parent::init(); Requirements::javascript('themes/openstack/javascript/urlfragment.jquery.js'); Requirements::css("summit/css/summitapp-venues.css"); Requirements::javascript('https://maps.googleapis.com/maps/api/js?v=3.exp'); Requirements::javascript('summit/javascript/summitapp-venues.js'); }
public function init() { $this->top_section = 'full'; $this->event_repository = new SapphireSummitEventRepository(); $this->speaker_repository = new SapphirePresentationSpeakerRepository(); parent::init(); Requirements::css('themes/openstack/bower_assets/jquery-loading/dist/jquery.loading.min.css'); Requirements::css('themes/openstack/bower_assets/chosen/chosen.min.css'); Requirements::css("summit/css/schedule-grid.css"); Requirements::javascript('themes/openstack/javascript/jquery-ajax-loader.js'); Requirements::javascript('themes/openstack/bower_assets/chosen/chosen.jquery.min.js'); }
function init() { parent::init(); Requirements::clear(); if (!$this->request->param('Action')) { $this->redirect($this->Link() . 'Presentation/'); } Requirements::javascript('themes/openstack/javascript/jquery.min.js'); Requirements::javascript('themes/openstack/javascript/bootstrap.min.js'); Requirements::javascript('themes/openstack/javascript/bootstrap.min.js'); Requirements::javascript('themes/openstack/javascript/presentationeditor/mousetrap.min.js'); Requirements::javascript('themes/openstack/javascript/speaker-voting.js'); }
public function init() { $this->top_section = 'full'; parent::init(); Requirements::css('themes/openstack/bower_assets/jquery-loading/dist/jquery.loading.min.css'); Requirements::css('themes/openstack/bower_assets/chosen/chosen.min.css'); Requirements::css("summit/css/schedule-grid.css"); Requirements::javascript('themes/openstack/javascript/jquery-ajax-loader.js'); Requirements::javascript('themes/openstack/bower_assets/chosen/chosen.jquery.min.js'); Requirements::javascript('themes/openstack/bower_assets/jquery-validate/dist/jquery.validate.min.js'); Requirements::javascript('themes/openstack/bower_assets/jquery-validate/dist/additional-methods.min.js'); Requirements::javascript('themes/openstack/javascript/urlfragment.jquery.js'); }
public function init() { $this->top_section = 'short'; //or full parent::init(); if (!Member::currentUser()) { return OpenStackIdCommon::doLogin(); } Requirements::javascript("summit/bower_components/sweetalert/lib/sweet-alert.js"); Requirements::css("summit/bower_components/sweetalert/lib/sweet-alert.css"); //Requirements::javascript('//tinymce.cachefly.net/4.3/tinymce.min.js'); Requirements::javascript('summit/javascript/summitapp-review.js'); Requirements::javascript('marketplace/code/ui/frontend/js/star-rating.min.js'); Requirements::css("marketplace/code/ui/frontend/css/star-rating.min.css"); }
public function confirm() { parent::init(); $getVars = $this->request->getVars(); $hashKey = $getVars['h']; if (isset($hashKey)) { $speakerID = substr(base64_decode($hashKey), 3); } if (isset($speakerID) && is_numeric($speakerID) && ($Speaker = PresentationSpeaker::get()->byID($speakerID))) { Session::set('ConfirmSpeakerHash', $hashKey); Session::set('Speaker', $Speaker); $Speaker->Confirmed = true; $Speaker->write(); $data['FirstName'] = $Speaker->FirstName; $data['LastName'] = $Speaker->LastName; $data['Summit'] = Summit::get_active(); return $this->customise($data)->renderWith(array('SummitConfirmSpeakerPage', 'SummitPage'), $this->parent); } else { return $this->httpError(404, 'Sorry, this speaker confirmation code does not seem to be correct.'); } }
public function init() { $this->top_section = 'full'; $lat = $this->HostCityLat; if (empty($lat)) { $lat = '49.287141'; } $lng = $this->HostCityLng; if (empty($lng)) { $lng = '-123.116976'; } Requirements::customScript("\n var settings = {\n host_city_lat: {$lat},\n host_city_lng: {$lng}\n };\n "); parent::init(); if (!$this->CampusGraphic) { Requirements::javascript('https://maps.googleapis.com/maps/api/js?v=3.exp'); } Requirements::javascript("summit/javascript/host-city.js"); if (!$this->CampusGraphic) { Requirements::javascript("summit/javascript/host-city-map.js"); } if (!$this->CampusGraphic) { Requirements::customScript($this->MapScript()); } }
public function init() { parent::init(); Requirements::clear(); }
public function init() { parent::init(); Requirements::javascript("summit/javascript/jquery-livesearch.js"); Requirements::javascript("summit/javascript/faq.js"); }
/** * Overload the redirect method so we can replace all references to Security * with its summit counterpart * * @param string $url * @param integer $code [description] * @return SS_HTTPResponse */ public function redirect($url, $code = 302) { return parent::redirect(preg_replace('/^Security\\//', $this->config()->url_segment . '/', $url), $code); }
/** * Check for auth tokens * @return mixed */ public function init() { parent::init(); if (!Summit::get_active()->isInDB()) { return $this->httpError(404, 'There is no active summit'); } /** * On the existing tokenauthentication system, this is a fairly trivialmatter, and I'm not so sure it's anything to navigate right now. * Thiswas implemented to provide the video upload people a simple API foradding videos. It's a very specific use c * ase, and general users shouldnot be using it. If they can and they are, then that needs to bechanged. */ $result = $this->checkAuthenticationToken(); if (!$result && !Member::currentUser()) { //check if speaker registration token is present.. $speaker_registration_token = $this->request->getVar(SpeakerRegistrationRequest::ConfirmationTokenParamName); if (!is_null($speaker_registration_token)) { // send it to SummitSecurity Controller to complete speaker registration $request = $this->speaker_registration_request_repository->getByConfirmationToken($speaker_registration_token); if (is_null($request) || $request->alreadyConfirmed()) { return $this->httpError(404); } // redirect to register member speaker $url = Controller::join_links(Director::baseURL(), 'summit-login', 'registration'); Session::set(SpeakerRegistrationRequest::ConfirmationTokenParamName, $speaker_registration_token); Session::set('BackURL', $this->request->getURL()); return $this->redirect($url); } return SummitSecurity::permission_failure($this); } $this->speaker_manager->ensureSpeakerProfile(Member::currentUser()); }
public function init() { parent::init(); Requirements::javascript("summit/javascript/schedule.js"); }
public function MetaTags() { $entity = $this->getSummitEntity(Controller::curr()->getRequest()); if (!is_null($entity)) { return $entity->MetaTags(); } $tags = parent::MetaTags(); // IOS $tags .= AppLinkIOSMetadataBuilder::buildAppLinksMetaTags($tags, "schedule"); // Android $tags .= AppLinkIAndroidMetadataBuilder::buildAppLinksMetaTags($tags, "schedule"); return $tags; }
public function init() { parent::init(); Requirements::css('summit/css/summit.highlights.css'); Requirements::javascript('themes/openstack/css/bootstrap.lightbox.css'); Requirements::javascript('themes/openstack/javascript/bootstrap.lightbox.js'); }
public function init() { parent::init(); }
public function init() { $this->top_section = 'full'; parent::init(); }
public function init() { $lat = $this->HostCityLat; $lng = $this->HostCityLng; if (empty($lat) || empty($lng)) { $summit = $this->Summit()->ID > 0 ? $this->Summit() : $this->CurrentSummit(); $venue = $summit->getMainVenue(); if (!is_null($venue)) { $lat = $venue->Lat; $lng = $venue->Lng; } else { $lat = $lng = 0.0; } } Requirements::customScript("\n var settings = {\n host_city_lat: {$lat},\n host_city_lng: {$lng}\n };\n "); parent::init(); Requirements::javascript("summit/javascript/host-city.js"); if (empty($this->CampusGraphic)) { Requirements::javascript('https://maps.googleapis.com/maps/api/js?v=3.exp'); Requirements::javascript("summit/javascript/host-city-map.js"); Requirements::customScript($this->MapScript()); } }
public function init() { parent::init(); Requirements::css("themes/openstack/static/css/combined.css"); }
public function init() { parent::init(); Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.js"); Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/additional-methods.js"); Requirements::javascript('themes/openstack/javascript/jquery.cleanform.js'); Requirements::javascript('themes/openstack/javascript/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.js'); Requirements::javascript('themes/openstack/javascript/pure.min.js'); Requirements::javascript("summit/javascript/Chart.min.js"); if ($this->getOrderedAttendeesByRegion()->count() > 0) { $script = '// Audience Chart - Attendees by Region var pieDataRegion = [];'; foreach ($this->getOrderedAttendeesByRegion() as $data) { $script .= sprintf('pieDataRegion.push({ value: %s, color: "#%s", label: "%s" });', $data->Value, $data->Color, $data->Label); } Requirements::customScript($script); } else { Requirements::customScript('// Audience Chart - Attendees by Region var pieDataRegion = [{ value: 47, color: "#cf3427", label: "Europe" }, { value: 35, color: "#29abe2", label: "North America" }, { value: 15, color: "#2A4E68", label: "APAC" }, { value: 2, color: "#5BB6A7", label: "Middle East" }, { value: 1, color: "#faaf3c", label: "Latin America" }];'); } if ($this->getOrderedAttendeesByRoles()->count() > 0) { $script = '// Audience Chart - Attendees by Region var pieDataRole = [];'; foreach ($this->getOrderedAttendeesByRoles() as $data) { $script .= sprintf('pieDataRole.push({ value: %s, color: "#%s", label: "%s" });', $data->Value, $data->Color, $data->Label); } Requirements::customScript($script); } else { Requirements::customScript('// Audience Chart - Attendees by Roles var pieDataRole = [{ value: 33, color: "#cf3427", label: "Prdt Strgy, Mgt, Archt" }, { value: 26, color: "#29abe2", label: "Developer" }, { value: 16, color: "#2A4E68", label: "User, Sys Admin" }, { value: 10, color: "#5BB6A7", label: "Bus Dev, Mrkt" }, { value: 9, color: "#faaf3c", label: "CEO, CIO, IT Mgr" }, { value: 6, color: "#000000", label: "Other" }];'); } Requirements::javascript("summit/javascript/sponsor.js"); Requirements::javascript('summit/javascript/sponsor.sponsorships.js'); $this->packagePurchaseOrderSecurityToken = new SecurityToken('packagePurchaseOrderSecurityToken'); }