Exemplo n.º 1
0
 function init()
 {
     parent::init();
     $this->myEventName = isset($_GET['name']) ? $_GET['name'] : '';
     //register
     $this->inRegistration = isset($_GET['registration']) && $_GET['registration'] == 1 ? $_GET['registration'] : '';
     //waiting list
     if (isset($_GET['registration']) && $_GET['registration'] == 2) {
         $this->waitingList = true;
     }
     $this->inPayment = isset($_GET['payment']) ? $_GET['payment'] : '';
     $obj = MagnetismConnect::magnetism_connect_singleton();
     $this->myEvent = $obj->getEventByName($this->myEventName);
     $this->success = isset($_GET['success']) ? 'Yes' : '';
     $this->accepted = isset($_GET['accepted']) ? 'Yes' : '';
     // if($this->inPayment){
     // 	$this->RegisterForEvent();
     // }
     if ($this->inPayment == "creditcard") {
         $this->PayByCreditCard();
     }
     if ($this->inPayment == "invoice") {
         $this->RequestInvoice();
     }
     if ($this->accepted == 'Yes') {
         $this->RegisterForEvent();
     }
     if ($this->myEvent['Price'] == 0) {
         $this->isFree = true;
         if ($this->inRegistration) {
             return $this->RegisterForEvent();
         }
     }
     $this->isRegistered();
 }
 /**
  * Allow this controller to be viewed when the site is in draft mode.
  */
 function init()
 {
     $draftsecurity = Session::get('unsecuredDraftSite');
     Session::set("unsecuredDraftSite", true);
     parent::init();
     Session::set("unsecuredDraftSite", $draftsecurity);
 }
 function init()
 {
     parent::init();
     Requirements::css('newsletter/css/SubscriptionPage.css');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-validate/jquery.validate.min.js');
 }
Exemplo n.º 4
0
 public function init()
 {
     if (!Permission::check("ADMIN")) {
         Security::permissionFailure();
     }
     parent::init();
 }
 public function init()
 {
     parent::init();
     $themeDir = SSViewer::get_theme_folder();
     Requirements::javascript('framework/thirdparty/jquery/jquery.js');
     if (Locator::getLocations()) {
         Requirements::javascript('http://maps.google.com/maps/api/js?sensor=false');
         Requirements::javascript('locator/thirdparty/handlebars/handlebars-v1.3.0.js');
         Requirements::javascript('locator/thirdparty/jquery-store-locator/js/jquery.storelocator.js');
     }
     Requirements::css('locator/css/map.css');
     $featured = Locator::getLocations(array('Featured' => 1))->count() > 0 ? 'featuredLocations: true' : 'featuredLocations: false';
     // map config based on user input in Settings tab
     // AutoGeocode or Full Map
     $load = $this->data()->AutoGeocode ? 'autoGeocode: true, fullMapStart: false,' : 'autoGeocode: false, fullMapStart: true, storeLimit: 1000, maxDistance: true,';
     $base = Director::baseFolder();
     $themePath = $base . '/' . $themeDir;
     $listTemplatePath = file_exists($themePath . '/templates/location-list-description.html') ? $themeDir . '/templates/location-list-description.html' : 'locator/templates/location-list-description.html';
     $infowindowTemplatePath = file_exists($themePath . '/templates/infowindow-description.html') ? $themeDir . '/templates/infowindow-description.html' : 'locator/templates/infowindow-description.html';
     // in page or modal
     $modal = $this->data()->ModalWindow ? 'modalWindow: true' : 'modalWindow: false';
     $kilometer = $this->data()->Unit == 'km' ? 'lengthUnit: "km"' : 'lengthUnit: "m"';
     $link = $this->Link() . 'xml.xml';
     // init map
     if (Locator::getLocations()) {
         Requirements::customScript("\n                \$(function(\$) {\n                    \$('#map-container').storeLocator({\n                        " . $load . "\n                        dataLocation: '" . $link . "',\n                        listTemplatePath: '" . $listTemplatePath . "',\n                        infowindowTemplatePath: '" . $infowindowTemplatePath . "',\n                        originMarker: true,\n                        " . $modal . ',
                     ' . $featured . ",\n                        slideMap: false,\n                        zoomLevel: 0,\n                        distanceAlert: 120,\n                        formID: 'Form_LocationSearch',\n                        inputID: 'Form_LocationSearch_address',\n                        categoryID: 'Form_LocationSearch_category',\n                        distanceAlert: -1,\n                        " . $kilometer . '
                 });
             });
         ');
     }
 }
 function init()
 {
     parent::init();
     $google_geo_coding_api_key = null;
     $google_geo_coding_client_id = null;
     $google_geo_coding_private_key = null;
     if (defined('GOOGLE_GEO_CODING_API_KEY')) {
         $google_geo_coding_api_key = GOOGLE_GEO_CODING_API_KEY;
     } else {
         if (defined('GOOGLE_GEO_CODING_CLIENT_ID') && defined('GOOGLE_GEO_CODING_PRIVATE_KEY')) {
             $google_geo_coding_client_id = GOOGLE_GEO_CODING_CLIENT_ID;
             $google_geo_coding_private_key = GOOGLE_GEO_CODING_PRIVATE_KEY;
         }
     }
     //managers
     $this->factory = new EventRegistrationRequestFactory();
     $this->event_registration_request_manager = new EventRegistrationRequestManager(new SapphireEventRegistrationRequestRepository(), new SapphireEventRepository(), $this->factory, new GoogleGeoCodingService(new SapphireGeoCodingQueryRepository(), new UtilFactory(), SapphireTransactionManager::getInstance(), $google_geo_coding_api_key, $google_geo_coding_client_id, $google_geo_coding_private_key), new SapphireEventPublishingService(), new EventValidatorFactory(), SapphireTransactionManager::getInstance());
     //js files
     Requirements::css("themes/openstack/css/chosen.css", "screen,projection");
     Requirements::css(THIRDPARTY_DIR . '/jquery-ui-themes/smoothness/jquery-ui.css');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-ui/jquery-ui.js');
     Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js");
     Requirements::javascript(Director::protocol() . "ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/additional-methods.min.js");
     Requirements::combine_files('event_registration_request_page.js', array("themes/openstack/javascript/chosen.jquery.min.js", "themes/openstack/javascript/jquery.ui.datepicker.validation.package-1.0.1/jquery.ui.datepicker.validation.js", "themes/openstack/javascript/jquery.validate.custom.methods.js", 'events/js/event.registration.request.page.js'));
 }
Exemplo n.º 7
0
 function init()
 {
     parent::init();
     Requirements::themedCSS('editor');
     Requirements::javascript('mysite/js/signup-now.js');
     SSViewer::setOption('rewriteHashlinks', false);
 }
 function init()
 {
     parent::init();
     Requirements::themedCSS('ElectricVehicleCalculator', 'electric-vehicle-calculator');
     Requirements::javascript("framework/thirdparty/jquery/jquery.js");
     Requirements::javascript("electric-vehicle-calculator/thirdparty/chartjs/Chart.min.js");
 }
 public function init()
 {
     /* Inherit initialisation from parent SiteTree */
     parent::init();
     //Include the CSS in the users selected theme to ensure the calendar styles correctly
     Requirements::css("torindul-silverstripe-calendar/css/calendar.css");
 }
 public function init()
 {
     $ageMonth = Cookie::get('bmonth');
     $ageDay = Cookie::get('bday');
     $ageYear = Cookie::get('byear');
     $age = Cookie::get('age');
     $allowed_urls = array('/age-gate/');
     if ($age == NULL) {
         if (!$this->isSearchEngine()) {
             if (!in_array($_SERVER['REQUEST_URI'], $allowed_urls)) {
                 Session::set('AgeGateBackURL', urlencode($_SERVER['REQUEST_URI']));
                 $this->redirect(Director::absoluteBaseURL() . "age-gate/");
             }
         }
     } else {
         if (!in_array($_SERVER['REQUEST_URI'], $allowed_urls)) {
             if ($ageMonth == NULL || $ageDay == NULL || $ageYear == NULL) {
                 if (!in_array($_SERVER['REQUEST_URI'], $allowed_urls)) {
                     Session::set('AgeGateBackURL', urlencode($_SERVER['REQUEST_URI']));
                 }
                 $this->redirect(Director::absoluteBaseURL() . "age-gate/");
             }
         }
     }
     parent::init();
 }
Exemplo n.º 11
0
 /**
  *
  */
 public function init()
 {
     parent::init();
     if (!$this->WebpackDevServer()) {
         Requirements::css('summit-video-app/production/css/main.css');
     }
 }
 public function init()
 {
     parent::init();
     Requirements::javascript(basename(dirname(dirname(__FILE__))) . '/javascript/typo.js');
     $this->Title = 'Typography test page';
     $this->ExtraMeta .= '<meta name="robots" content="noindex, nofollow" />';
 }
Exemplo n.º 13
0
 public function init()
 {
     //Pull in parent properties for controller e.g css & js assets
     parent::init();
     Requirements::css($this->ThemeDir() . '/css/module-page.css');
     Requirements::css($this->ThemeDir() . '/css/tron-devices.min.css');
 }
 public function init()
 {
     parent::init();
     Requirements::javascript(THIRDPARTY_DIR . '/jquery-form/jquery.form.js');
     Requirements::javascript('microblog/javascript/timeline.js');
     Requirements::css('microblog/css/timeline.css');
 }
Exemplo n.º 15
0
 function init()
 {
     parent::init();
     Requirements::CSS('themes/openstack/css/enterprise.css');
     Requirements::CSS('themes/openstack/css/science.css');
     Requirements::javascript('themes/openstack/javascript/enterprise.js');
 }
    public function init()
    {
        parent::init();
        // Page Specific Includes
        Requirements::customScript('
		 
		  //VITALSCRIPT!!!
		  jQuery("a.sendmessage").bind("click", function(){
			 var myval = $(this).attr("id");
			 jQuery("#SendForm_SendForm_CleanupID").attr("value", myval);
		  });


		  jQuery(".invite").fancybox({
			  "titleShow"		: "false",
			  "transitionIn"		: "elastic",
			  "transitionOut"		: "elastic"
			});

		  //VITALSCRIPT!!!
		  jQuery("a.invite").bind("click", function(){
			 var myval = $(this).attr("id");
			 jQuery("#InviteForm_InviteForm_CleanupID").attr("value", myval);
		  });

		  ');
    }
Exemplo n.º 17
0
 function init()
 {
     parent::init();
     Requirements::CSS('themes/openstack/css/learn.css');
     Requirements::javascript('themes/openstack/javascript/filetracking.jquery.js');
     Requirements::customScript("jQuery(document).ready(function(\$) {\n\n\n            \$('body').filetracking();\n\n             \$(document).on('click', '.outbound-link', function(event){\n                var href = \$(this).attr('href');\n                recordOutboundLink(this,'Outbound Links',href);\n                event.preventDefault();\n                event.stopPropagation()\n                return false;\n            });\n\n        });");
 }
 /**
  * Load all the custom jquery needed to run the custom
  * validation
  */
 public function init()
 {
     parent::init();
     $ui = new Colorbox();
     $ui->initialize();
     Requirements::css(ASSETS_GALLERY_BASE . '/css/AssetsGallery.css');
 }
Exemplo n.º 19
0
 function init()
 {
     parent::init();
     RSSFeed::linkToFeed($this->Link() . "rss");
     Requirements::css('jobs/css/jobs.css');
     Requirements::javascript('jobs/js/jobs.js');
 }
 public function init()
 {
     parent::init();
     // Page Specific Includes
     //e.g Requirements::themedCSS('layout');
     //Requirements::set_write_js_to_body(false);
 }
 function init()
 {
     parent::init();
     $this->customTemplates = null;
     // If there is no dynamic template, default page rendering
     // behaviour applies.
     if (!$this->DynamicTemplateID) {
         return;
     }
     $dt = $this->DynamicTemplate();
     if (!$dt || $dt->ID == 0) {
         return;
     }
     $manifest = $dt->getManifest();
     if (isset($urlParams['Action']) && isset($manifest->actions[$urlParams['Action']])) {
         $action = $urlParams['Action'];
     } else {
         $action = "index";
     }
     // Set up the templates to render from
     if (isset($manifest->actions[$action]["templates"])) {
         $templates = $manifest->getTemplatesForRendering($action, $dt);
     } else {
         if (isset($manifest->actions["index"]["templates"])) {
             $templates = $manifest->getTemplatesForRendering("index", $dt);
         }
     }
     $this->customTemplates = $templates;
     foreach ($manifest->getCssForRendering("index", $dt) as $file) {
         Requirements::css($file['path'], $file['media']);
     }
     foreach ($manifest->getJavascriptForRendering($action, $dt) as $file) {
         Requirements::javascript($file['path']);
     }
 }
Exemplo n.º 22
0
 public function init()
 {
     parent::init();
     // --------------------------------------------------------------------
     // CSS
     // --------------------------------------------------------------------
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/reset.css', 'print,screen');
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/typography.css', 'print,screen');
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/print.css', 'print');
     Requirements::css('vendor/govtnz/swagger-ui/dist/css/screen.css', 'screen');
     $print = array('vendor/govtnz/swagger-ui/dist/css/reset.css', 'vendor/govtnz/swagger-ui/dist/css/typography.css', 'vendor/govtnz/swagger-ui/dist/css/print.css');
     Requirements::combine_files('swagger-print.css', $print, 'print');
     $screen = array('vendor/govtnz/swagger-ui/dist/css/reset.css', 'vendor/govtnz/swagger-ui/dist/css/typography.css', 'vendor/govtnz/swagger-ui/dist/css/screen.css');
     Requirements::combine_files('swagger-screen.css', $screen, 'screen');
     // --------------------------------------------------------------------
     // Javascript
     // --------------------------------------------------------------------
     parent::init();
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/jquery.slideto.min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/jquery.wiggle.min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/jquery.ba-bbq.min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/handlebars-2.0.0.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/underscore-min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/backbone-min.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/swagger-ui.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/highlight.7.3.pack.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/marked.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/dist/lib/swagger-oauth.js');
     Requirements::javascript('vendor/govtnz/swagger-ui/resources/javascript/api-swagger.js');
     Requirements::combine_files('swagger.js', array('vendor/govtnz/swagger-ui/dist/lib/jquery.slideto.min.js', 'vendor/govtnz/swagger-ui/dist/lib/jquery.wiggle.min.js', 'vendor/govtnz/swagger-ui/dist/lib/jquery.ba-bbq.min.js', 'vendor/govtnz/swagger-ui/dist/lib/handlebars-2.0.0.js', 'vendor/govtnz/swagger-ui/dist/lib/underscore-min.js', 'vendor/govtnz/swagger-ui/dist/lib/backbone-min.js', 'vendor/govtnz/swagger-ui/dist/swagger-ui.js', 'vendor/govtnz/swagger-ui/dist/lib/highlight.7.3.pack.js', 'vendor/govtnz/swagger-ui/dist/lib/marked.js', 'vendor/govtnz/swagger-ui/dist/lib/swagger-oauth.js', 'vendor/govtnz/swagger-ui/resources/javascript/api-swagger.js'));
 }
 function init()
 {
     parent::init();
     if ($this->Children()->Count()) {
         Controller::redirect($this->Children()->First()->AbsoluteLink());
     }
 }
Exemplo n.º 24
0
 public function init()
 {
     parent::init();
     //
     Requirements::javascript("cms/javascript/fullScreenImage.js");
     Requirements::css("cms/css/home.css");
 }
 public function init()
 {
     parent::init();
     Requirements::javascript(SAPPHIRE_DIR . '/thirdparty/jquery/jquery.js');
     Requirements::javascript(SS3GALLERY_DIR . '/javascript/ss3Gallery.js');
     Requirements::css(SS3GALLERY_DIR . '/css/ss3Gallery.css');
 }
 public function init()
 {
     parent::init();
     Requirements::css('locations/css/locations.css');
     Requirements::javascript(THIRDPARTY_DIR . '/jquery/jquery.js');
     Requirements::javascript("http://maps.google.com/maps/api/js?sensor=false");
 }
 public function init()
 {
     $this->yt = new Google_Service_YouTube($this->getGoogleClient());
     $this->setDefaults();
     $this->videos = $this->search($this->GetSearchTerm(), $this->GetSearchType());
     parent::init();
 }
Exemplo n.º 28
0
 public function init()
 {
     parent::init();
     // Note: you should use SS template require tags inside your templates
     // instead of putting Requirements calls here.  However these are
     // included so that our older themes still work
 }
Exemplo n.º 29
0
 function init()
 {
     parent::init();
     $this->securityToken = new SecurityToken();
     Requirements::css('news/code/ui/frontend/css/news.css');
     Requirements::css(Director::protocol() . '://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');
 }
Exemplo n.º 30
0
 function init()
 {
     parent::init();
     //if(!Permission::checkMember(Member::currentUser(),"ADMIN")) Security::permissionFailure($this);
     Requirements::css("themes/openstack/bower_assets/jqplot-bower/dist/jquery.jqplot.min.css");
     //jqplot and plugins ...
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/jquery.jqplot.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.canvasAxisTickRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.dateAxisRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.cursor.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.categoryAxisRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.canvasTextRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.canvasOverlay.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.enhancedLegendRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.json2.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.logAxisRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.pointLabels.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.trendline.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.barRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.pieRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.bubbleRenderer.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.canvasAxisLabelRenderer.min.js");
     Requirements::javascript("themes/openstack/bower_assets/jqplot-bower/dist/plugins/jqplot.highlighter.min.js");
     //other js
     Requirements::javascript('themes/openstack/javascript/jquery-ajax-loader.js');
     Requirements::javascript('themes/openstack/bower_assets/jspdf/dist/jspdf.min.js');
     Requirements::javascript('themes/openstack/bower_assets/html2canvas/build/html2canvas.min.js');
     // require custom CSS
     Requirements::css("survey_builder/css/survey-report.css");
     //Requirements::javascript('survey_builder/js/survey_report.js');
 }