X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fhelp.php;h=e9b3c3167ba6cf5034eb859f8e479c12f5b2be59;hb=dda2cc884dbb8745c36c973da3537aad45f4c264;hp=fd308540f7951156d0b154bd482b4b7f0cc60dae;hpb=e5916f84aece606bd90defd122c7f8f978166c6e;p=squirrelmail.git diff --git a/src/help.php b/src/help.php index fd308540..e9b3c316 100644 --- a/src/help.php +++ b/src/help.php @@ -11,10 +11,14 @@ * $Id$ */ -require_once('../src/validate.php'); -require_once('../functions/display_messages.php'); -require_once('../functions/imap.php'); -require_once('../functions/array.php'); +/* Path for SquirrelMail required files. */ +define('SM_PATH','../'); + +/* SquirrelMail required files. */ +require_once(SM_PATH . 'include/validate.php'); +require_once(SM_PATH . 'functions/display_messages.php'); +require_once(SM_PATH . 'functions/imap.php'); +require_once(SM_PATH . 'functions/array.php'); displayPageHeader($color, 'None' ); @@ -82,23 +86,20 @@ function get_info($doc, $pos) { /**************[ END HELP FUNCTIONS ]******************/ -?> -
- - - - -
-
-
- - - - - -
-' . _("Help") .'', 'center', $color[0] ) + ) , + 'center', '', 'width="95%" cellpadding="1" cellspacing="2" border="0"' ); + +do_hook("help_top"); + +echo html_tag( 'table', '', 'center', '', 'width="90%" cellpadding="0" cellspacing="10" border="0"' ) . + html_tag( 'tr' ) . + html_tag( 'td' ); + if (isset($HTTP_REFERER)) { $ref = strtolower($HTTP_REFERER); if (strpos($ref, 'src/compose')){ @@ -133,10 +134,10 @@ if (file_exists("../help/$squirrelmail_language")) { $user_language = 'en_US'; } else { $help_exists = false; - echo "
"; - echo _("Some or all of the help documents are not present!"); - echo '
'; - echo '
'; + echo "
" . + _("Some or all of the help documents are not present!"). + '
'. + ''; /* this is really silly, because there may be some * footers. What about them. * TODO: Fix this so it's not just "exit". @@ -165,35 +166,35 @@ if ($help_exists == true) { } if (!isset($chapter)) { - echo '
'; - echo '
' . _("Table of Contents") . '

'; + echo html_tag( 'table', '', 'center', '', 'cellpadding="0" cellspacing="0" border="0"' ); + html_tag( 'tr' ) . + html_tag( 'td' ) . + '
' . _("Table of Contents") . '

'; do_hook('help_chapter'); - echo '
    '; + echo html_tag( 'ol' ); for ($i=0; $i < count($helpdir); $i++) { $doc = file("../help/$user_language/$helpdir[$i]"); $help_info = get_info($doc, 0); - echo '
  1. ' . $help_info[0] . ''; - echo '
      ' . $help_info[2] . '
    '; + echo '
  2. ' . $help_info[0] . '' . + html_tag( 'ul', $help_info[2] ); } - echo '
'; - echo '
'; + echo ''; } else { $doc = file("../help/$user_language/" . $helpdir[$chapter-1]); $help_info = get_info($doc, 0); echo '
'; if ($chapter <= 1){ - echo '' . _("Previous") + echo '' . _("Previous") . ' | '; } else { - echo '' . _("Previous") . ' | '; } echo '' . _("Table of Contents") . ''; if ($chapter >= count($helpdir)){ echo ' | ' . _("Next") . ''; - } else { + } else { echo ' | ' . _("Next") . ''; } @@ -204,17 +205,15 @@ if ($help_exists == true) { if (isset($help_info[1])){ echo $help_info[1]; } else { - echo '

' . $help_info[2] . '

'; + echo html_tag( 'p', $help_info[2], 'left' ); } $section = 0; for ($n = $help_info[3]; $n < count($doc); $n++) { $section++; $help_info = get_info($doc, $n); - echo "$chapter.$section - $help_info[0]"; - echo '
    '; - echo $help_info[1]; - echo '
'; + echo "$chapter.$section - $help_info[0]" . + html_tag( 'ul', $help_info[1] ); $n = $help_info[3]; } @@ -222,7 +221,9 @@ if ($help_exists == true) { } } do_hook('help_bottom'); + +echo html_tag( 'tr', + html_tag( 'td', ' ', 'left', $color[0] ) + ). + ''; ?> -  - -