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