-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHome.php
53 lines (43 loc) · 1.35 KB
/
Home.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
<?php
/*
GamePanelX
Description: Home page with frames
Author: Ryan D. Gehrig
License: GNU General Public License (GPL)
*/
include_once('include/config.php');
include_once('include/SqlCon.php');
include_once('include/auth.php');
// Make sure nobody can log in until the install folder is deleted
if (file_exists('install'))
{
die('<b>ERROR:</b> You must delete the folder \'install\' before you can log in!');
}
//Make check to see if the logged in user is an admin.
$query = "SELECT is_admin FROM users WHERE username='$GPXuserName'";
sqlCon($query);
// If they're an admin, forward to AdminMain.php
if($row['is_admin'] == 'Y')
{
$mainFrameLoc = 'AdminMain.php';
$leftPanelLoc = 'PanelLeftAdmin.php';
}
// If they're a normal user, send to Main.php
else
{
$mainFrameLoc = 'Main.php';
$leftPanelLoc = 'PanelLeft.php';
}
?>
<html>
<head>
<title><?php echo $config['title']; ?></title>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW, NOARCHIVE, NOSNIPPET">
</head>
<frameset border="0" frameborder="0" framespacing="0" rows="81,100%">
<frame src="PanelTop.php" name="topFrame">
<frameset border="0" frameborder="0" framespacing="0" cols="210,*">
<frame src="<?php echo $leftPanelLoc; ?>" name="leftFrame">
<frame src="<?php echo $mainFrameLoc; ?>" name="mainFrame">
</frameset>
</html>