/
help.php
44 lines (35 loc) · 1.32 KB
/
help.php
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
// help.php - Get context sensitive help
//
// SiT (Support Incident Tracker) - Support call tracking system
// Copyright (C) 2000-2009 Salford Software Ltd. and Contributors
//
// This software may be used and distributed according to the terms
// of the GNU General Public License, incorporated herein by reference.
//
$permission = 26; // Help
require ('core.php');
require (APPLICATION_LIBPATH . 'functions.inc.php');
$title = "Help";
// This page requires authentication
require (APPLICATION_LIBPATH . 'auth.inc.php');
// External variables
$id = cleanvar($_REQUEST['id']);
$title = $strHelp;
include (APPLICATION_INCPATH . 'htmlheader.inc.php');
journal(CFG_LOGGING_MAX, 'Help Viewed', "Help document $id was viewed", CFG_JOURNAL_OTHER, $id);
echo "<h2>".icon('help', 32, $strHelp)." ";
if ($id > 0) echo permission_name($id).' ';
echo "{$strHelp}</h2>";
echo "<div id='help'>";
$helpfile = APPLICATION_HELPPATH . "{$_SESSION['lang']}".DIRECTORY_SEPARATOR."help.html";
if (!file_exists($helpfile)) $helpfile = APPLICATION_HELPPATH . "{$_SESSION['lang']}".DIRECTORY_SEPARATOR ."en-GB/help.html";
if (file_exists($helpfile))
{
$helptext = file_get_contents($helpfile);
}
else trigger_error("Error: Missing helpfile 'help.html'", E_USER_ERROR);
echo $helptext;
echo "</div>";
include (APPLICATION_INCPATH . 'htmlfooter.inc.php');
?>