// 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 a faculty. * * @author Simon Wilkinson * @version 1.0 * @copyright Copyright (c) 2014 The University of Nottingham * @package */ require '../include/sysadmin_auth.inc'; require '../include/errors.inc'; require_once '../classes/facultyutils.class.php'; $facultyID = check_var('facultyID', 'GET', true, false, true); if (!FacultyUtils::faculty_name_by_id($facultyID, $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
// You should have received a copy of the GNU General Public License // along with Rogō. If not, see <http://www.gnu.org/licenses/>. /** * * @author Simon Wilkinson * @version 1.0 * @copyright Copyright (c) 2014 The University of Nottingham * @package */ require '../include/staff_auth.inc'; require_once '../include/errors.inc'; require_once '../classes/logger.class.php'; require_once '../classes/facultyutils.class.php'; $facultyID = check_var('facultyID', 'REQUEST', true, false, true); // Check the Faculty ID actually exists for editing. $name = FacultyUtils::faculty_name_by_id($facultyID, $mysqli); if (!$name) { $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); } $duplicate = false; if (isset($_POST['submit'])) { // Check for existing name if (FacultyUtils::facultyname_exists($_POST['new_faculty'], $mysqli)) { $duplicate = true; } if (!$duplicate) { $result = $mysqli->prepare("UPDATE faculty SET name = ? WHERE id = ?"); $result->bind_param('si', $_POST['new_faculty'], $facultyID); $result->execute(); $result->close();