-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathcheckallowed.php
More file actions
28 lines (22 loc) · 796 Bytes
/
checkallowed.php
File metadata and controls
28 lines (22 loc) · 796 Bytes
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
<?php
session_start();
// Check if this user is logged in
if(!isset($_SESSION['gpx_userid']))
{
header('Location: login.php?try=1');
exit(0);
}
// Normal Users - Check if this user owns this server
if(!isset($_SESSION['gpx_admin']) && isset($gpx_srvid))
{
$result_owns = @mysql_query("SELECT id FROM servers WHERE id = '$gpx_srvid' AND userid = '$gpx_userid' LIMIT 1") or die('Failed to check ownership');
$row_owns = mysql_fetch_row($result_owns);
if(empty($row_owns[0])) die('You do not have access to this server!');
}
$gpx_userid = $_SESSION['gpx_userid'];
if(!defined('DOCROOT')) require('configuration.php');
// Setup Plugins
#require(DOCROOT.'/includes/classes/plugins.php');
#$Plugins = new Plugins;
#$Plugins->setup_actions();
?>