forked from MediaFrontPage/mediafrontpage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
executable file
·41 lines (40 loc) · 1.44 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
<?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; }
// Checking to see if the user came from the server check page. If so, redirect to settings
$settings = false;
if(!empty($_SERVER['HTTP_REFERER'])){
if(strpos($_SERVER['HTTP_REFERER'],'servercheck')){
$settings = true;
}
}
?>
<html>
<head>
<title>Media Center</title>
<link rel="shortcut icon" href="favicon.ico" />
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
</head>
<frameset rows="<?php echo ($submenu)?"62px":"35px";?>, *" frameborder="0" border="0" framespacing="0">
<frame src="nav.php" name="nav" noresize scrolling="no">
<frame src="<?php echo ($settings)?'settings.php':'mediafrontpage.php'?>" name="main" noresize scrolling="auto">
</frameset>
<noframes>
<p>Your browser does not support frames</p>
</noframes>
</html>