Fix initial login to fetch encrypted token
[noxon-gateway.git] / src / header.php
1 <?php
2 set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../src/');
3
4 $requestUriNoQuery = explode('?', $_SERVER['REQUEST_URI'])[0];
5 $path = urldecode($requestUriNoQuery);
6
7 $dataDir = __DIR__ . '/../data/';
8 $varDir  = realpath(__DIR__ . '/../var') . '/';
9 $cacheDir = __DIR__ . '/../www/cache/';
10 $host1 = 'http://radio567.vtuner.com/';
11 $host2 = 'http://radio5672.vtuner.com/';
12 if ($_SERVER['HTTP_HOST'] !== '') {
13     $host1 = 'http://' . $_SERVER['HTTP_HOST'] . '/';
14     $host2 = 'http://' . $_SERVER['HTTP_HOST'] . '/';
15 }
16 $cacheDirUrl = $host1 . 'cache/';
17 $cfgFile = $dataDir . 'config.php';
18 if (file_exists($cfgFile)) {
19     include $cfgFile;
20 }
21 ?>