-
Notifications
You must be signed in to change notification settings - Fork 0
/
cv.php
36 lines (32 loc) · 1.04 KB
/
cv.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
<?php
/**
* Created by PhpStorm.
* User: tom
* Date: 18.10.2016
* Time: 11:17
*/
// Turn on all error reporting
@ini_set('display_errors', 'on');
define('_PS_MODE_DEV_', true);
ini_set('display_errors', 1);
require __DIR__ . '/vendor/autoload.php';
if (empty($_GET['lang'])) {
// header("Location: cv.php?lang=en");
// $languages = new ConfigLanguages(['pl' => 'Polski', 'en' => 'English', 'de' => 'Deutsch', 'ru' => 'Russian']);
$locale_arr = explode('-', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
$locale = $locale_arr[0];
$langlist = ['pl' => 'Polski', 'en' => 'English', 'de' => 'Deutsch', 'ru' => 'Russian'];
if (!empty($langlist[$locale])) {
$_GET['lang'] = $locale;
}
if (empty($_GET['lang'])) {
$_GET['lang'] = "en";
}
}
require __DIR__ . '/src/Cv.php';
try {
new \Resume\Cv($_GET);
} catch (Exception $e) {
new \Phunc\addDebugError('CV_NOT_WORKING', $e);
include('Public' . DIRECTORY_SEPARATOR . 'error' . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'index.php');
}