|
1 | 1 | <? |
2 | | -/** |
3 | | -require('../config.php'); |
4 | | -require('lib/Translation.class.php'); |
5 | | -$benchmark_start = microtime_float(); |
6 | | -
|
7 | | -// arguments |
8 | | -$lang = isSet($_POST['lang']) ? $_POST['lang'] : 'en'; |
9 | | -
|
10 | | -// get translation file |
11 | | -$translation = new Translation($lang); |
12 | | -
|
13 | | -// make overview page |
14 | | -$source = CONTENTDIR."/api_$lang/environment/"; |
15 | | -$path = REFERENCEDIR . ($lang == 'en' ? '' : "/$lang") . "/environment/"; |
16 | | -make_necessary_directories($path."images/file"); |
17 | | -$page = new Page("Environment (IDE)", "Environment", "Environment"); |
18 | | -$page->content(file_get_contents($source."index.html")); |
19 | | -$page->language($lang); |
20 | | -writeFile('reference/'.($lang=='en'?'':"$lang/").'environment/index.html', $page->out()); |
21 | | -copydirr($source.'/images', $path.'/images'); |
22 | | -*/ |
23 | 2 | require('../config.php'); |
24 | 3 | require('lib/Translation.class.php'); |
25 | 4 | $benchmark_start = microtime_float(); |
26 | 5 |
|
27 | | -//$lang = isSet($_POST['lang']) ? $_POST['lang'] : 'en'; |
28 | | -$lang = 'en'; |
| 6 | +$lang = isSet($_POST['lang']) ? $_POST['lang'] : 'en'; |
| 7 | +//$lang = 'en'; |
29 | 8 | echo "Language selected"; |
30 | 9 |
|
31 | 10 | $source = CONTENTDIR."/api_$lang/environment/"; |
32 | 11 | $path = DISTDIR."/environment/"; |
33 | 12 |
|
34 | 13 | // get translation file |
35 | | -$translation = new Translation($lang); |
36 | | - |
37 | | -// make directories if they are not already there |
38 | | -if (!is_dir($path)) { |
39 | | - //mkdir($path, '0775'); |
40 | | - echo "Environment folder created"; |
41 | | - |
42 | | -} |
43 | | - |
44 | | -if (!is_dir($path.'images/')) { |
45 | | - //mkdir($path.'images/', '0775'); |
46 | | - echo "Image folder created"; |
47 | | - |
48 | | -} |
| 14 | +$translation = new Translation($lang); |
49 | 15 |
|
50 | 16 | // make page |
51 | 17 |
|
52 | | -//make_necessary_directories($path."images/file"); |
| 18 | +make_necessary_directories($path."images/file"); |
53 | 19 | $page = new LocalPage('Environment (IDE)', 'Environment', 'Environment', '../'); |
54 | 20 | $page->content(file_get_contents($source.'index.html')); |
55 | 21 | $page->language($lang); |
|
0 commit comments