- added a hook at beginning of left_main
[squirrelmail.git] / src / help.php
CommitLineData
e222c290 1<HTML>
e222c290 2
3<?php
4
ef870322 5 /**
6 ** help.php
7 **
8 ** Copyright (c) 1999-2000 The SquirrelMail development team
9 ** Licensed under the GNU GPL. For full terms see the file COPYING.
10 **
11 ** This checks if the user's preferred language has a directory and file present
12 ** then loads it or english if preferred is not found.
13 **
14 **/
e222c290 15
16 if (!isset($config_php))
17 include("../config/config.php");
18
19/** If it was a successful login, lets load their preferences **/
20 include("../src/load_prefs.php");
21 echo "<BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
22
23/**
24 ** Check to see if the help files have been translated into the users language
25 ** If so, include them, if not, give them english. The po file should really have
26 ** The echo line put in it.
27 **/
28
29 if (file_exists("../help/$user_language/basic.hlp")) {
30 include ("../help/$user_language/basic.hlp");
f7942326 31 } elseif(file_exists("../help/en/basic.hlp")) {
802d73a4 32 echo "<CENTER><B><FONT COLOR=$color[2]>";
33 echo _("Your preferred language is not yet translated. English will be substituted here.");
34 echo "</FONT></B></CENTER><BR>";
e222c290 35 include ("../help/en/basic.hlp");
f7942326 36 } else {
37 $nohelp = true;
e222c290 38 }
39 if (file_exists("../help/$user_language/main_folder.hlp")) {
40 include ("../help/$user_language/main_folder.hlp");
f7942326 41 } elseif(file_exists("../help/en/main_folder.hlp")) {
802d73a4 42 echo "<CENTER><B><FONT COLOR=$color[2]>";
43 echo _("Your preferred language is not yet translated. English will be substituted here.");
44 echo "</FONT></B></CENTER><BR>";
e222c290 45 include ("../help/en/main_folder.hlp");
f7942326 46 } else {
47 $nohelp = true;
e222c290 48 }
49 if (file_exists("../help/$user_language/read_mail.hlp")) {
50 include ("../help/$user_language/read_mail.hlp");
f7942326 51 } elseif(file_exists("../help/en/read_mail.hlp")) {
802d73a4 52 echo "<CENTER><B><FONT COLOR=$color[2]>";
53 echo _("Your preferred language is not yet translated. English will be substituted here.");
54 echo "</FONT></B></CENTER><BR>";
e222c290 55 include ("../help/en/read_mail.hlp");
f7942326 56 } else {
57 $nohelp = true;
e222c290 58 }
59 if (file_exists("../help/$user_language/compose.hlp")) {
60 include ("../help/$user_language/compose.hlp");
f7942326 61 } elseif(file_exists("../help/en/compose.hlp")) {
e222c290 62 echo "<CENTER><B><FONT COLOR=$color[2]>Your preferred language is not yet translated. English will be substituted here.</FONT></B></CENTER><BR>";
802d73a4 63 echo "<CENTER><B><FONT COLOR=$color[2]>";
64 echo _("Your preferred language is not yet translated. English will be substituted here.");
65 echo "</FONT></B></CENTER><BR>";
e222c290 66 include ("../help/en/compose.hlp");
f7942326 67 } else {
68 $nohelp = true;
e222c290 69 }
70 if (file_exists("../help/$user_language/addresses.hlp")) {
71 include ("../help/$user_language/addresses.hlp");
f7942326 72 } elseif(file_exists("../help/en/addresses.hlp")) {
802d73a4 73 echo "<CENTER><B><FONT COLOR=$color[2]>";
74 echo _("Your preferred language is not yet translated. English will be substituted here.");
75 echo "</FONT></B></CENTER><BR>";
e222c290 76 include ("../help/en/addresses.hlp");
f7942326 77 } else {
78 $nohelp = true;
e222c290 79 }
80 if (file_exists("../help/$user_language/folders.hlp")) {
81 include ("../help/$user_language/folders.hlp");
f7942326 82 } elseif(file_exists("../help/en/folders.hlp")) {
802d73a4 83 echo "<CENTER><B><FONT COLOR=$color[2]>";
84 echo _("Your preferred language is not yet translated. English will be substituted here.");
85 echo "</FONT></B></CENTER><BR>";
e222c290 86 include ("../help/en/folders.hlp");
f7942326 87 } else {
88 $nohelp = true;
e222c290 89 }
90 if (file_exists("../help/$user_language/options.hlp")) {
91 include ("../help/$user_language/options.hlp");
f7942326 92 } elseif(file_exists("../help/en/options.hlp")) {
802d73a4 93 echo "<CENTER><B><FONT COLOR=$color[2]>";
94 echo _("Your preferred language is not yet translated. English will be substituted here.");
95 echo "</FONT></B></CENTER><BR>";
e222c290 96 include ("../help/en/options.hlp");
f7942326 97 } else {
98 $nohelp = true;
e222c290 99 }
100 if (file_exists("../help/$user_language/FAQ.hlp")) {
101 include ("../help/$user_language/FAQ.hlp");
f7942326 102 } elseif(file_exists("../help/en/FAQ.hlp")) {
802d73a4 103 echo "<CENTER><B><FONT COLOR=$color[2]>";
104 echo _("Your preferred language is not yet translated. English will be substituted here.");
105 echo "</FONT></B></CENTER><BR>";
e222c290 106 include ("../help/en/FAQ.hlp");
f7942326 107 } else {
108 $nohelp = true;
109 }
110// If any of the standard help files aren't there, tell them.
111
112 if($nohelp) {
113 echo "<BR><CENTER><B><FONT COLOR=$color[2]>",_("ERROR: Some or all of the standard English help files ar missing."), "</FONT></B></CENTER><BR>";
e222c290 114 }
115
116?>
e222c290 117</BODY>
118</HTML>