/**
* help.php
*
- * Copyright (c) 1999-2002 The SquirrelMail Project Team
+ * Copyright (c) 1999-2003 The SquirrelMail Project Team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* Displays help for the user
*
* $Id$
+ * @package squirrelmail
*/
-/* Path for SquirrelMail required files. */
+/** Path for SquirrelMail required files. */
define('SM_PATH','../');
/* SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
+require_once(SM_PATH . 'functions/global.php');
require_once(SM_PATH . 'functions/display_messages.php');
displayPageHeader($color, 'None' );
* else see if we can get a relevant chapter from the referer */
$chapter = 0;
-if ( isset( $_GET['chapter'] ) )
-{
- $chapter = intval( $_GET['chapter']);
-}
-elseif (isset($_SERVER['HTTP_REFERER']))
-{
- $ref = strtolower($_SERVER['HTTP_REFERER']);
+if ( sqgetGlobalVar('chapter', $temp, SQ_GET) ) {
+ $chapter = (int) $temp;
+} elseif ( sqgetGlobalVar('HTTP_REFERER', $temp, SQ_SERVER) ) {
+ $ref = strtolower($temp);
$contexts = array ( 'src/compose' => 4, 'src/addr' => 5,
'src/folders' => 6, 'src/options' => 7, 'src/right_main' => 2,
html_tag( 'tr' ) .
html_tag( 'td' ) .
'<b><center>' . _("Table of Contents") . '</center></b><br>';
- do_hook('help_chapter');
echo html_tag( 'ol' );
for ($i=0, $cnt = count($helpdir); $i < $cnt; $i++) {
$doc = file("../help/$user_language/$helpdir[$i]");
. '">' . $help_info[0] . '</a>' .
html_tag( 'ul', $help_info[2] );
}
+ do_hook('help_chapter');
echo '</ol></td></tr></table>';
} else {
$doc = file("../help/$user_language/" . $helpdir[$chapter-1]);