X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fhelp.php;h=d37b17041dc0287a928c577ba0356ca7c8b27eb9;hp=513db530ea0ee9d1b34748ce30895fdf7f62adc3;hb=1d80c108a1d741b7dcb562ea1cf6d2214322b192;hpb=7ea33e5bfb8c10b0799fbc372cd23106b474d1ee diff --git a/src/help.php b/src/help.php index 513db530..d37b1704 100644 --- a/src/help.php +++ b/src/help.php @@ -3,19 +3,21 @@ /** * 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' ); @@ -128,13 +130,10 @@ if (file_exists("../help/$squirrelmail_language")) { * 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, @@ -153,7 +152,6 @@ if ( $chapter == 0 || !isset( $helpdir[$chapter-1] ) ) { html_tag( 'tr' ) . html_tag( 'td' ) . '
' . _("Table of Contents") . '

'; - do_hook('help_chapter'); echo html_tag( 'ol' ); for ($i=0, $cnt = count($helpdir); $i < $cnt; $i++) { $doc = file("../help/$user_language/$helpdir[$i]"); @@ -162,6 +160,7 @@ if ( $chapter == 0 || !isset( $helpdir[$chapter-1] ) ) { . '">' . $help_info[0] . '' . html_tag( 'ul', $help_info[2] ); } + do_hook('help_chapter'); echo ''; } else { $doc = file("../help/$user_language/" . $helpdir[$chapter-1]); @@ -209,5 +208,6 @@ do_hook('help_bottom'); echo html_tag( 'tr', html_tag( 'td', ' ', 'left', $color[0] ) ). - ''; -?> + ''; + noframes_bottom(); +?> \ No newline at end of file