772f0fdecdff5b40acb8914fd804fed9d9769a16
[noxon-gateway.git] / src / header.php
1 <?php
2 set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/../src/');
3 $path = $fullUri = urldecode($_SERVER['REQUEST_URI']);//with query string
4 $qPos = strpos($fullUri, '?');
5 if ($qPos !== false) {
6     $path = substr($fullUri, 0, $qPos);
7 }
8 $dataDir = __DIR__ . '/../data/';
9 $varDir  = realpath(__DIR__ . '/../var') . '/';
10 $cacheDir = __DIR__ . '/../www/cache/';
11 $host1 = 'http://radio567.vtuner.com/';
12 $host2 = 'http://radio5672.vtuner.com/';
13 if ($_SERVER['HTTP_HOST'] !== '') {
14     $host1 = 'http://' . $_SERVER['HTTP_HOST'] . '/';
15     $host2 = 'http://' . $_SERVER['HTTP_HOST'] . '/';
16 }
17 $cacheDirUrl = $host1 . 'cache/';
18 $cfgFile = $dataDir . 'config.php';
19 if (file_exists($cfgFile)) {
20     include $cfgFile;
21 }
22 ?>