Skip to content
Snippets Groups Projects
Select Git revision
  • feature/android_api_19
  • master default protected
  • chrome-manifest-v3
  • feature/migrate-cordova-13
  • feat/improve-network-scan
  • feat/force-migration-check
  • develop
  • feature/encrypted_comment
  • gitlab_migration_1
  • rml8
  • v1.7.15-rc1
  • v1.7.14
  • v1.7.13
  • v1.7.12
  • v1.7.11
  • v1.7.10
  • v1.7.9
  • v1.7.8
  • v1.7.7
  • v1.7.6
  • v1.7.5
  • v1.7.4
  • v1.7.3
  • v1.7.2
  • v1.7.1
  • v1.7.0
  • v1.7.0-rc2
  • v1.7.0-rc1
  • v1.6.12
  • v1.6.11
30 results

gulpfile.js

Blame
  • index.php 1.51 KiB
    <?php
    include('config.php');
    
    defineLang();
    
    putenv('LC_ALL='. LANG_FOLDER);
    setlocale(LC_ALL, LOCALE_CODE);
    
    textdomain("menu");
    
    if (!isset($_GET['page'])) {
    	
    	$page = NULL;
    	
    } else {
    
    	$tmp = explode('/', $_GET['page'], 3);
    	$page = '/' . $tmp[1];
    	$subpage = isset($tmp[2]) ? '/' . $tmp[2] : '';
    
    
    }
    
    $router = 
    	array(
    		[
    			'permalink' => '/', 
    			'i18nedPermalink' => _('/'), 
    			'tpl' => 'home.php'
    		], 
    		[
    			'permalink' => '/fonctionnalites', 
    			'i18nedPermalink' => _('/fonctionnalites'), 
    			'tpl' => 'features.php'
    		], 
    		[
    			'permalink' => '/telechargement', 
    			'i18nedPermalink' => _('/telechargement'), 
    			'tpl' => 'download.php'
    		], 
    		[
    			'permalink' => '/merci', 
    			'i18nedPermalink' => _('/merci'), 
    			'tpl' => 'funding.php'
    		], 
    		[
    			'permalink' => '/tutoriel-cesium', 
    			'i18nedPermalink' => _('/tutoriel-cesium'), 
    			'tpl' => 'tuto.php'
    		], 
    		[
    			'permalink' => '/developpeurs', 
    			'i18nedPermalink' => _('/developpeurs'), 
    			'tpl' => 'jobs.php'
    		],
    		[
    			'permalink' => '/mentions-legales', 
    			'i18nedPermalink' => _('/mentions-legales'), 
    			'tpl' => 'legal-notice.php'
    		]
    	);
    
    $found = false;
    $pageIsHome = false;
    
    foreach ($router as $route)
    {
    	if ($route['i18nedPermalink'] == $page)
    	{
    		$found = true;
    		$pagePermalink = $route['permalink'];
    		$pageIsHome = ($route['i18nedPermalink'] == _('/')) ? true : false;
    		
    		include('tpl/' . $route['tpl']);
    		
    		break;
    	}
    }
    
    if (!$found)
    {
    	// echo '<pre>'; var_dump($page); echo '</pre>';
    	header('Location: '. $rootURL . '/'. LANG . '/');
    }