-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunction.php
46 lines (42 loc) · 918 Bytes
/
function.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
<?php
function LangChecker()
{
// let's check the lang (by default it's en)
// TODO: get the lang using navigator
if (isset($_GET['lang']))
{
if(trim($_GET['lang']) == 'fr') {
$curr_lang = 'fr';
require_once('../lang/fr.php');
}
else
if(trim($_GET['lang']) == 'en'){
$curr_lang = 'en';
require_once('../lang/en.php');
}
else{
$curr_lang = 'en';
require_once('../lang/en.php');
}
}
else{
$curr_lang = 'en';
require_once('../lang/en.php');
}
// don't forget this one
require_once('../lang/selector.php');
}
function ShowDir($dir = './logs')
{
$handle = opendir($dir);
while ($months = readdir($handle))
{
// Is there is a way to make this proper?
if ($months !== '.') {
if ($months !== '..')
echo "$months\n";
}
}
closedir($handle);
}
?>