Example #1
0
//
// 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/sysadmin_auth.inc';
require '../../include/errors.inc';
require_once '../../classes/helputils.class.php';
require_once '../../classes/userutils.class.php';
$pageid = check_var('id', 'REQUEST', true, false, true);
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
header('Content-Type: text/html; charset=utf8');
$page_details = $help_system->get_page_details($pageid);
if ($page_details === false) {
    $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);
}
if (isset($_POST['save_changes'])) {
    // Update help file record
    $tmp_body = $_POST['edit1'];
    $tmp_title = $_POST['page_title'];
    $tmp_roles = $_POST['page_roles'];
    $help_system->save_page($tmp_title, $tmp_body, $tmp_roles, $pageid, $_POST['edit_id']);
    $mysqli->close();
    header("location: index.php?id={$pageid}");
    exit;
Example #2
0
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// 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/sysadmin_auth.inc';
// Only let SysAdmin staff create links.
require_once '../../classes/helputils.class.php';
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
if (isset($_POST['submit'])) {
    $title = $_POST['title'];
    $pageID = $_POST['pageid'];
    $articleid = $help_system->create_pointer($title, $pageID);
    $mysqli->close();
    header("location: index.php?id={$articleid}");
    exit;
} else {
    $id = null;
    ?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Example #3
0
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Rogō is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// 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/sysadmin_auth.inc';
require_once '../../classes/helputils.class.php';
$id = null;
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'student', $language, $mysqli);
if (isset($_GET['id'])) {
    $restore = $mysqli->prepare("UPDATE student_help SET deleted = NULL WHERE id = ? AND language = ?");
    $restore->bind_param('is', $_GET['id'], $language);
    $restore->execute();
    $restore->close();
}
?>
<!DOCTYPE html>
<html>
Example #4
0
// This file is part of Rogō
//
// Rogō is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Rogō is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// 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/sysadmin_auth.inc';
// Only let SysAdmin staff delete pages.
require '../../include/errors.inc';
require_once '../../classes/helputils.class.php';
$originalID = check_var('id', 'GET', true, false, true);
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
$help_system->delete_page($originalID);
$mysqli->close();
header("location: index.php?id=1");
Example #5
0
//
// 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 '../../include/errors.inc';
require_once '../../classes/helputils.class.php';
$title = check_var('title', 'GET', true, false, true);
$id = null;
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  
  <title>Rog&#333;: <?php 
echo $string['help'] . ' ' . $configObject->get('cfg_install_type');
?>
</title>
  
  <link rel="stylesheet" type="text/css" href="../../css/body.css" />
  <link rel="stylesheet" type="text/css" href="../../css/help.css" />
  <style type="text/css">
Example #6
0
// Rogō is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Rogō is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// 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/sysadmin_auth.inc';
require_once '../../classes/helputils.class.php';
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
if (isset($_GET['id'])) {
    $help_system->restore_page($_GET['id']);
}
$id = null;
?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
Example #7
0
//
// 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/sysadmin_auth.inc';
require '../../include/errors.inc';
require_once '../../classes/helputils.class.php';
header('Content-Type: text/html; charset=utf8');
$id = null;
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
if (isset($_POST['save_changes'])) {
    $tmp_body = $_POST['edit1'];
    $tmp_title = $_POST['title'];
    $roles = $_POST['page_roles'];
    $articleid = $help_system->create_page($tmp_title, $tmp_body, $roles);
    $mysqli->close();
    header("location: index.php?id={$articleid}");
    exit;
} else {
    ?>
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
Example #8
0
/**
* 
* @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/helputils.class.php';
if (isset($_GET['id'])) {
    $id = $_GET['id'];
} else {
    $id = 1;
}
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
if (isset($_GET['highlight'])) {
    $help_system->set_highlight($_GET['highlight']);
}
?>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    
    <title>Rog&#333;: <?php 
echo $string['help'] . ' ' . $configObject->get('cfg_install_type');
?>
</title>
    
Example #9
0
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// 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 '../../classes/helputils.class.php';
$help_system = new OnlineHelp($userObject, $configObject, $string, $notice, 'staff', $language, $mysqli);
function getPath($path, $pageID, $tmp_highlight)
{
    $parts = explode('/', $path);
    $path = '<a class="searchpath" href="index.php?id=1">Help</a>';
    for ($i = 0; $i < count($parts); $i++) {
        if ($i == count($parts) - 1) {
            $path .= " > <a class=\"searchpath\" href=\"index.php?id={$pageID}&highlight={$tmp_highlight}\">" . $parts[$i] . "</a>";
        } else {
            $path .= " > <a class=\"searchpath\" href=\"display_folder.php?title=" . $parts[$i] . "\">" . $parts[$i] . "</a>";
        }
    }
    return $path;
}
function displayTitle($title)
{