forked from MediaFrontPage/mediafrontpage
/
index.php
executable file
·190 lines (178 loc) · 6.83 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?php
//Check for config file and curl
if (file_exists('firstrun.php') && !file_exists('config.ini')){header('Location: servercheck.php');exit;}
//Authentication check
require_once('config.php');
if ($authsecured && (!isset($_SESSION['loggedin']) || !$_SESSION['loggedin'])) {
echo "<script>window.location = 'login.php';</script>";
exit;
}
// Redirect if on a mobile browser
// require_once "m/mobile_device_detect.php";
// if(mobile_device_detect(true,true,true,true,true,true,true,false,false) ) {
// echo "<script>window.location = 'm/';</script>";
// exit();
// }
$submenu = false;
require_once "config.php";
if(!empty($subnavlink)||!empty($subnavlink_blank)||!empty($subnavselect)){$submenu = true;}
require_once "functions.php";
require_once "widgets.php";
include "nav.php";
require_once "layoutmiddleman.php";
//turn off warnings
// $errlevel = error_reporting();
// error_reporting(E_ALL & ~E_WARNING);
// if (!include ("layout.php")){
// file was missing so include default theme
// require("default-layout.php");
// }
// Turn on warnings
// error_reporting($errlevel);
// if (empty ($arrLayout)) {
// require_once("default-layout.php");
// }
foreach( $wIndex as $wId => $widget ) {
renderWidgetHeaders($widget);
}
?>
<html>
<head>
<title>MediaFrontPage</title>
<link rel="shortcut icon" href="favicon.ico" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<script type="text/javascript" language="javascript" src="js/ajax.js"></script>
<script type="text/javascript" language="javascript" src="js/popuptext.js"></script>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js"></script>
<script type="text/javascript" src="js/highslide/highslide.js"></script>
<script type="text/javascript" src="js/jquery.tablesorter.js"></script>
<script type="text/javascript" src="js/prettyPhoto/jquery.prettyPhoto.js"></script>
<link rel="stylesheet" type="text/css" href="js/prettyPhoto/prettyPhoto.css" />
<script type="text/javascript" src="js/prettyLoader/js/jquery.prettyLoader.js"></script>
<link rel="stylesheet" type="text/css" href="js/prettyLoader/css/prettyLoader.css" />
<link rel="stylesheet" type="text/css" href="js/highslide/highslide.css" />
<script type="text/javascript">
//<![CDATA[
// override Highslide settings here
// instead of editing the highslide.js file
hs.registerOverlay({
html: '<div class="closebutton" onclick="return hs.close(this)" title="Close"></div>',
position: 'top right',
fade: 2 // fading the semi-transparent overlay looks bad in IE
});
hs.showCredits = false;
hs.graphicsDir = 'js/highslide/graphics/';
//hs.wrapperClassName = 'borderless';
hs.outlineType = 'outer-glow';
//hs.outlineType = 'borderless';
//hs.outlineType = 'rounded-white';
//hs.outlineType = null;
//hs.wrapperClassName = 'outer-glow';
hs.dimmingOpacity = 0.75;
//]]>
</script>
<style type="text/css">
.highslide-dimming {
background: black;
}
a.highslide {
border: 0;
}
</style>
<script type="text/javascript">InitPopupBox();</script>
<!-- START: JQuery Scrollbar for Coming Episodes Widget, Javascript Entries -->
<link href="css/scrollbar.php" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/jquery.mousewheel.min.js"></script>
<!-- END: JQuery Scrollbar for Coming Episodes Widget, Javascript Entries -->
<script type="text/javascript" language="javascript">
function logout(){
var xmlhttp
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest()
} else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200){
if(xmlhttp.responseText){
window.top.document.location.href = "login.php"
alert("Logout successful")
}
}
}
xmlhttp.open("GET","logout.php",true)
xmlhttp.send()
}'
</script>
</head>
<body>
<div id="main">
<?php
foreach ($arrLayout as $sectionId => $widgets) {
echo "\n\t<ul id=\"".$sectionId."\" class=\"section ui-sortable\">\n";
foreach ($widgets as $wId => $wAttribute) {
echo "\t\t<li id=\"".$wId."\" class=\"widget";
if (!empty($wAttribute["color"])) {
echo " ".$wAttribute["color"];
}
if (!empty($wAttribute["display"])) {
echo " ".$wAttribute["display"];
}
echo "\">";
echo "\t\t\t<div class=\"widget-head\">";
echo "\t\t\t\t<h3>".$wAttribute['title']."</h3>\n";
echo "\t\t\t</div><!-- .widget-head -->\n";
echo "\t\t\t<div class=\"widget-content\">\n";
if(empty($wAttribute['params'])) {
renderWidget($wIndex[$wId]);
} else {
renderWidget($wIndex[$wId], $wAttribute['params']);
}
echo "\t\t\t</div><!-- .widget-content -->\n";
echo "\t\t</li><!-- #".$wId." .widget -->\n";
}
echo "\t</ul><!-- #".$sectionId." .section -->\n";
}
?>
</div>
<!-- #main -->
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/widget.js"></script>
<!-- START: JQuery Scrollbar for Coming Episodes Widget, Javascript Entries -->
<script>
$(window).load(function() {
mCustomScrollbars();
}
);
function mCustomScrollbars(){
/*
malihu custom scrollbar function parameters:
1) scroll type (values: "vertical" or "horizontal")
2) scroll easing amount (0 for no easing)
3) scroll easing type
4) extra bottom scrolling space for vertical scroll type only (minimum value: 1)
5) scrollbar height/width adjustment (values: "auto" or "fixed")
6) mouse-wheel support (values: "yes" or "no")
7) scrolling via buttons support (values: "yes" or "no")
8) buttons scrolling speed (values: 1-20, 1 being the slowest)
*/
$("#mcs3_container").mCustomScrollbar("vertical",900,"easeOutCirc",1.05,"auto","yes","no",0);
}
/* function to fix the -10000 pixel limit of jquery.animate */
$.fx.prototype.cur = function(){
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
var r = parseFloat( jQuery.css( this.elem, this.prop ) );
return typeof r == 'undefined' ? 0 : r;
}
</script>
<script src="js/scrollbar.js"></script>
<!-- END: JQuery Scrollbar for Coming Episodes Widget, Javascript Entries -->
<?php
include "footer.php";
?>
</body>
</html>