forked from repos-media/TV-Icarus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
51 lines (38 loc) · 1.52 KB
/
index.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
<?php define('TVic', 1);
/**
* TV-Icarus Coded by TuxLyn
* version 0.1 {2012-05-07}
* Website: http://GoTux.net/
* Email: TuxLyn[@]Gmail.com
**
* License: docs/license.txt
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 'On');
function pre($array) {
return '<pre>'.print_r($array,1).'</pre>';
} #pre
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
define('root', dirname(__FILE__).'/');
define('news', 'http://www.tvrage.com/news/rss.php');
define('guide', 'http://services.tvrage.com/feeds/countdown.php');
define('shows', 'http://services.tvrage.com/feeds/show_list_letter.php?letter=');
define('episode', 'http://services.tvrage.com/feeds/full_show_info.php?sid=');
define('search', 'http://services.tvrage.com/feeds/search.php?show=');
require(root.'init.php'); // initialize bootstrap
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// OUTPUT: header + page with content + footer
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
require(root.'pages/header.php');
switch (@config('page')) {
case 'news': news(); break;
case 'guide': guide(); break;
case 'shows': shows(); break;
case 'episode': episode(); break;
case 'search': search(); break;
default: news(); break;
} #switch
require(root.'pages/footer.php');
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
## EOF: ./index.php