' => array(), * * ---- is the ID (must be unique in array) Passed by other websites via GET Parameter url/?ref= It also is the unique identifier for a Site (e.g. Nextcloud or GitLab) * * ---- Is the Configuration for the Site within an array. Avilable indexes are: * ---------'Identity' => '' : Required Paramenter To Name the Site * ---------'BaseUrl' => '' : Required Paramter to redirect back to the site * ---------'CookieDomainOverwrite' => '' : Optional Parameter to redirect to different domains than neclab.eu * ---------'CustomDeclineText' => 'Custom text to be displayed when decline is clicked / will overwrite default action of redirection to privacy satement' : optional parameter * ---------'CustomInfoText' => 'Custom Text to Describe the websited tried toa cces' : Optional Paramater will replace the default text at top of cookie consent if set * ---------'UsedCookiesInfo' => 'Custom Cookie information' : optional Parameter will add a new section below website url on cookie consent to describe what cookies are used. * */ 0 => array( 'Identity' => 'NLE Nextcloud', 'BaseUrl' => 'https://nextcloud.neclab.eu/', 'CustomDeclineText' => 'Unfortunately NextCloud cannot operate without its default non-tracking essential cookies. More information can be found here. Please re-load the page and accept the cookies if you want to use NextCloud.', 'CustomInfoText' => ' You are trying to access NEC Laboratories Europe (NLE) NextCloud service. NextCloud is an open-source file hosting software. This website only uses the minimum cookies needed by NextCloud to work properly, which are non-tracking essential cookies. More information can be found here.', 'UsedCookiesInfo' => false, /*'UsedCookiesInfo' =>'

Cookie

Data Stored

Lifetime

Session cookie

  • session ID

  • secret token (used to decrypt the session on the server)

24 minutes

Same-site cookies

no user-related data are stored, all same-site cookies are the same for all users on all Nextcloud instances

forever

Remember-me cookie

  • user id

  • original session id

  • remember token

15 days

',*/ ), 1 => array( 'Identity' => 'NLE GitLab', 'BaseUrl' => 'https://gitlab.neclab.eu/', ), 2 => array( 'Identity' => 'Mattermost', 'BaseUrl' => 'https://mattermost.nlehd.de/', 'CookieDomainOverwrite' => 'nlehd.de' ), 3 => array( 'Identity' => 'NLE Mailman / Listserv', 'BaseUrl' => 'https://listserv.neclab.eu/', ), 4 => array( 'Identity' => 'Patchwork Unikraft', 'BaseUrl' => 'https://patchwork.unikraft.org', 'CookieDomainOverwrite' => 'unikraft.org' ), 5 => array( 'Identity' => 'Concourse Unikraft', 'BaseUrl' => 'https://concourse.unikraft.org', 'CookieDomainOverwrite' => 'unikraft.org' ), 6 => array( 'Identity' => 'Marketing Nextcloud Server', 'BaseUrl' => 'https://marketing.neclab.eu', ), ); $currentSiteConfig = false; if(isset($_GET['ref']) && isset($siteConfigurations[$_GET['ref']])) { $currentSiteConfig = $siteConfigurations[$_GET['ref']]; } if(isset($_POST['cookieAccepted']) && $_POST['cookieAccepted'] == 'accept' && $currentSiteConfig) { // // Set the "Session" Cookie with an accepted Cookie // // Cookie name default $cookieName = 'nleCookieSplash'; if(isset($currentSiteConfig['CookieDomainOverwrite']) && $currentSiteConfig['CookieDomainOverwrite'] ){ // Cookie Domain overwrite is active -> use it $cookieDomain = $currentSiteConfig['CookieDomainOverwrite']; } else { // Cookie Default Domain $cookieDomain = 'neclab.eu'; } // Cookie Content $cookieContent = array ( 'Accepted' => true, ); // JSON Encode the Cookie content to be passed to the Cookie $jsonContent = json_encode($cookieContent); // life time of the cookie that remembers the accepted state // time() for now + time in seconds $cookieLifeTime = time()+60*60*24*7; // actually set the cookie if (!setcookie($cookieName, $jsonContent ,$cookieLifeTime,'/',$cookieDomain)) { die(); } $deepUri = ''; // redirect to the desired page header("Location: ".$currentSiteConfig['BaseUrl'].$deepUri); die(); } if($currentSiteConfig) { require 'cookieSplash.php'; } else { require 'missingConfig.php'; } ?>