// You should have received a copy of the GNU General Public License // along with Rogō. If not, see <http://www.gnu.org/licenses/>. /** * * Confirm that it is OK to proceed deleting an announcement. * * @author Simon Wilkinson * @version 1.0 * @copyright Copyright (c) 2014 The University of Nottingham * @package */ require '../include/sysadmin_auth.inc'; require_once '../include/errors.inc'; require_once '../classes/announcementutils.class.php'; $announcementID = check_var('announcementID', 'GET', true, false, true); if (!announcement_utils::announcement_exist($announcementID, $mysqli)) { $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email')); $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true); } $mysqli->close(); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html;charset=<?php echo $configObject->get('cfg_page_charset'); ?> " /> <title><?php
$userObject = UserObject::get_instance(); // Redirect Students (if not also staff), External Examiners and Invigilators to their own areas. if ($userObject->has_role('Student') and !$userObject->has_role(array('Staff', 'Admin', 'SysAdmin'))) { header("location: ./paper/"); exit; } elseif ($userObject->has_role('External Examiner')) { header("location: ./reviews/"); exit; } elseif ($userObject->has_role('Invigilator')) { header("location: ./invigilator/"); exit; } // If we're still here we should be staff require_once './include/staff_auth.inc'; // Check for any news/announcements $announcements = announcement_utils::get_staff_announcements($mysqli); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html; charset=<?php echo $configObject->get('cfg_page_charset'); ?> " /> <title>Centa<?php echo ' ' . $configObject->get('cfg_install_type'); ?> </title>
* Delete an announcement - SysAdmin only. * * @author Simon Wilkinson * @version 1.0 * @copyright Copyright (c) 2014 The University of Nottingham * @package */ require '../include/sysadmin_auth.inc'; require_once '../include/errors.inc'; require_once '../classes/announcementutils.class.php'; $announcementID = check_var('announcementID', 'POST', true, false, true); if (!announcement_utils::announcement_exist($announcementID, $mysqli)) { $msg = sprintf($string['furtherassistance'], $configObject->get('support_email'), $configObject->get('support_email')); $notice->display_notice_and_exit($mysqli, $string['pagenotfound'], $msg, $string['pagenotfound'], '../artwork/page_not_found.png', '#C00000', true, true); } announcement_utils::delete($announcementID, $mysqli); $mysqli->close(); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="content-type" content="text/html;charset=<?php echo $configObject->get('cfg_page_charset'); ?> " /> <title>Announcement Deleted</title> <link rel="stylesheet" type="text/css" href="../css/body.css" />