- echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
-
-/**
- ** Check to see if the help files have been translated into the users language
- ** If so, include them, if not, give them english. The po file should really have
- ** The echo line put in it.
- **/
-
- if (file_exists("../help/$user_language/basic.hlp")) {
- include ("../help/$user_language/basic.hlp");
- } elseif(file_exists("../help/en/basic.hlp")) {
- echo "<CENTER><B><FONT COLOR=$color[2]>";
- echo _("Your preferred language is not yet translated. English will be substituted here.");
- echo "</FONT></B></CENTER><BR>";
- include ("../help/en/basic.hlp");
- } else {
- $nohelp = true;
- }
- if (file_exists("../help/$user_language/main_folder.hlp")) {
- include ("../help/$user_language/main_folder.hlp");
- } elseif(file_exists("../help/en/main_folder.hlp")) {
- echo "<CENTER><B><FONT COLOR=$color[2]>";
- echo _("Your preferred language is not yet translated. English will be substituted here.");
- echo "</FONT></B></CENTER><BR>";
- include ("../help/en/main_folder.hlp");
- } else {
- $nohelp = true;
- }
- if (file_exists("../help/$user_language/read_mail.hlp")) {
- include ("../help/$user_language/read_mail.hlp");
- } elseif(file_exists("../help/en/read_mail.hlp")) {
- echo "<CENTER><B><FONT COLOR=$color[2]>";
- echo _("Your preferred language is not yet translated. English will be substituted here.");
- echo "</FONT></B></CENTER><BR>";
- include ("../help/en/read_mail.hlp");
- } else {
- $nohelp = true;
- }
- if (file_exists("../help/$user_language/compose.hlp")) {
- include ("../help/$user_language/compose.hlp");
- } elseif(file_exists("../help/en/compose.hlp")) {
- echo "<CENTER><B><FONT COLOR=$color[2]>Your preferred language is not yet translated. English will be substituted here.</FONT></B></CENTER><BR>";
- echo "<CENTER><B><FONT COLOR=$color[2]>";
- echo _("Your preferred language is not yet translated. English will be substituted here.");
- echo "</FONT></B></CENTER><BR>";
- include ("../help/en/compose.hlp");
- } else {
- $nohelp = true;
- }
- if (file_exists("../help/$user_language/addresses.hlp")) {
- include ("../help/$user_language/addresses.hlp");
- } elseif(file_exists("../help/en/addresses.hlp")) {
- echo "<CENTER><B><FONT COLOR=$color[2]>";
- echo _("Your preferred language is not yet translated. English will be substituted here.");
- echo "</FONT></B></CENTER><BR>";
- include ("../help/en/addresses.hlp");
- } else {
- $nohelp = true;
- }
- if (file_exists("../help/$user_language/folders.hlp")) {
- include ("../help/$user_language/folders.hlp");
- } elseif(file_exists("../help/en/folders.hlp")) {
- echo "<CENTER><B><FONT COLOR=$color[2]>";
- echo _("Your preferred language is not yet translated. English will be substituted here.");
- echo "</FONT></B></CENTER><BR>";
- include ("../help/en/folders.hlp");
- } else {
- $nohelp = true;
+
+
+ displayPageHeader($color, "None");
+
+ $helpdir[0] = "basic.hlp";
+ $helpdir[1] = "main_folder.hlp";
+ $helpdir[2] = "read_mail.hlp";
+ $helpdir[3] = "compose.hlp";
+ $helpdir[4] = "addresses.hlp";
+ $helpdir[5] = "folders.hlp";
+ $helpdir[6] = "options.hlp";
+ $helpdir[7] = "search.hlp";
+ $helpdir[8] = "FAQ.hlp";
+
+ /****************[ HELP FUNCTIONS ]********************/
+ // parses through and gets the information from the different documents.
+ // this returns one section at a time. You must keep track of the position
+ // so that it knows where to start to look for the next section.
+
+ function get_info($doc, $pos) {
+ for ($n=$pos; $n < count($doc); $n++) {
+ if (trim(strtolower($doc[$n])) == "<chapter>" || trim(strtolower($doc[$n])) == "<section>") {
+ for ($n++;$n < count($doc) && (trim(strtolower($doc[$n])) != "</section>") && (trim(strtolower($doc[$n])) != "</chapter>"); $n++) {
+ if (trim(strtolower($doc[$n])) == "<title>") {
+ $n++;
+ $ary[0] = trim($doc[$n]);
+ }
+ if (trim(strtolower($doc[$n])) == "<description>") {
+ $ary[1] = "";
+ for ($n++;$n < count($doc) && (trim(strtolower($doc[$n])) != "</description>"); $n++) {
+ $ary[1] .= $doc[$n];
+ }
+ }
+ if (trim(strtolower($doc[$n])) == "<summary>") {
+ $ary[2] = "";
+ for ($n++;$n < count($doc) && (trim(strtolower($doc[$n])) != "</summary>"); $n++) {
+ $ary[2] .= $doc[$n];
+ }
+ }
+ }
+ if (isset($ary)) {
+ $ary[3] = $n;
+ return $ary;
+ } else {
+ $ary[0] = "ERROR: Help files are not in the right format!";
+ $ary[1] = "ERROR: Help files are not in the right format!";
+ $ary[2] = "ERROR: Help files are not in the right format!";
+ return $ary;
+ }
+ }
+ }
+ $ary[0] = "ERROR: Help files are not in the right format!";
+ $ary[1] = "ERROR: Help files are not in the right format!";
+ return $ary;