Gazelle/sections/staffpm/index.php

77 lines
1.5 KiB
PHP
Raw Normal View History

2012-01-26 08:00:25 +00:00
<?
enforce_login();
2013-05-01 08:00:16 +00:00
if (!isset($_REQUEST['action'])) {
2012-01-26 08:00:25 +00:00
$_REQUEST['action'] = '';
2013-05-01 08:00:16 +00:00
}
2012-01-26 08:00:25 +00:00
// Get user level
$DB->query("
SELECT
i.SupportFor,
p.DisplayStaff
FROM users_info as i
2013-05-01 08:00:16 +00:00
JOIN users_main as m ON m.ID = i.UserID
JOIN permissions as p ON p.ID = m.PermissionID
2012-01-26 08:00:25 +00:00
WHERE i.UserID = ".$LoggedUser['ID']
);
list($SupportFor, $DisplayStaff) = $DB->next_record();
// Logged in user is staff
$IsStaff = ($DisplayStaff == 1);
// Logged in user is Staff or FLS
2012-03-31 08:00:23 +00:00
$IsFLS = ($IsStaff || $LoggedUser['ExtraClasses'][41]);
2012-01-26 08:00:25 +00:00
2013-05-01 08:00:16 +00:00
switch ($_REQUEST['action']) {
2013-02-22 08:00:24 +00:00
case 'viewconv':
2012-01-26 08:00:25 +00:00
require('viewconv.php');
break;
case 'takepost':
require('takepost.php');
break;
case 'resolve':
require('resolve.php');
break;
case 'unresolve':
require('unresolve.php');
break;
case 'multiresolve':
require('multiresolve.php');
break;
case 'assign':
require('assign.php');
break;
case 'make_donor':
require('makedonor.php');
break;
case 'responses':
require('common_responses.php');
break;
case 'get_response':
require('ajax_get_response.php');
break;
case 'delete_response':
require('ajax_delete_response.php');
break;
case 'edit_response':
require('ajax_edit_response.php');
break;
case 'preview':
require('ajax_preview_response.php');
break;
2012-03-04 08:00:21 +00:00
case 'get_post':
require('get_post.php');
break;
2012-12-07 08:00:19 +00:00
case 'scoreboard':
require('scoreboard.php');
break;
2012-01-26 08:00:25 +00:00
default:
if ($IsStaff || $IsFLS) {
require('staff_inbox.php');
} else {
require('user_inbox.php');
}
break;
}
?>