forked from justdeleteme/justdelete.me
-
Notifications
You must be signed in to change notification settings - Fork 0
/
static-gen.php
71 lines (63 loc) · 1.29 KB
/
static-gen.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
$langs = ['en', 'it', 'de', 'fr', 'ru', 'pt_br', 'cat', 'es', 'vi', 'tr', 'ar', 'nl'];
include 'contrib.php';
foreach ($langs as $language)
{
// start the output buffer
ob_start(); ?>
<?php
$lang = $language;
if ($lang == "en") {
$full_name = "English";
}
if ($lang == "it") {
$full_name = "Italiano";
}
if ($lang == "de") {
$full_name = "Deutsch";
}
if ($lang == "fr") {
$full_name = "Français";
}
if ($lang == "ru") {
$full_name = "Pусский";
}
if ($lang == "pt_br") {
$full_name = "Português";
}
if ($lang == "cat") {
$full_name = "Català";
}
if ($lang == "es") {
$full_name = "Español";
}
if ($lang == "vi") {
$full_name = "Tiếng Việt";
}
if ($lang == "tr") {
$full_name = "Türk";
}
if ($lang == "ar") {
$full_name = "العربية";
}
if ($lang == "nl") {
$full_name = "Nederlands";
}
include ('dev.php');
if ($language == "en")
{
$cachefile = "index.html";
}
else {
$cachefile = $language.".html";
}
// open the cache file "cache/home.html" for writing
$fp = fopen($cachefile, 'w');
// save the contents of output buffer to the file
fwrite($fp, ob_get_contents());
// close the file
fclose($fp);
// Send the output to the browser
ob_end_flush();
}
?>