Browse Source

add multilanguage support (currently EN and DE)

mxmehl 3 years ago
parent
commit
e31a21fa6f
8 changed files with 289 additions and 78 deletions
  1. 1
    1
      .htaccess.sample
  2. 60
    67
      index.php
  3. 42
    0
      lang.php
  4. BIN
      lang/de.png
  5. BIN
      lang/en.png
  6. 88
    0
      lang/lang.de.php
  7. 89
    0
      lang/lang.en.php
  8. 9
    10
      submit.php

+ 1
- 1
.htaccess.sample View File

@@ -22,7 +22,7 @@ require valid-user
22 22
   Allow from all
23 23
 </FilesMatch>
24 24
 
25
-<FilesMatch "\.(css|js|php|html|htm|var)$">
25
+<FilesMatch "\.(css|js|php|html|htm|var|png)$">
26 26
   Order Allow,Deny
27 27
   Allow from all
28 28
 </FilesMatch>

+ 60
- 67
index.php View File

@@ -1,5 +1,6 @@
1
+<?php include_once 'lang.php'; ?>
1 2
 <!DOCTYPE html>
2
-<html lang="en-GB">
3
+<html lang="<?php echo $lang['LANG']; ?>">
3 4
 <head>
4 5
   <meta charset="utf-8">
5 6
   <title>UAAP | Uberspace Account Administration Panel</title>
@@ -11,35 +12,33 @@
11 12
 
12 13
 <h1>Account Administration Panel</h1>
13 14
 
14
-<noscript><span class="warn">Please activate JavaScript in your webbrowser. 
15
-This panel will not work without activated JavaScript.</span></noscript>
15
+<noscript><span class="warn"><?php echo $lang['JS_WARN']; ?></span></noscript>
16 16
 
17
-<h4>You have following options:</h4>
17
+<h4><?php echo $lang['INTRO']; ?></h4>
18 18
 
19 19
 <div id="gallery">
20 20
   <!--
21 21
     GENERAL SECTION
22 22
   -->
23 23
   
24
-  <p><strong>General</strong></p>
24
+  <p><strong><?php echo $lang['SEC_GENERAL']; ?></strong></p>
25 25
   <!-- VIEWDATA - View datasheet of whole account -->
26
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> View the data sheet</b>
26
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_VIEWDATA']; ?></b>
27 27
   <div class="hide">
28
-    <p>View the data sheet with all usernames and passwords. <span class="warn">Please keep this document secure!</span></p>
28
+    <p><?php echo $lang['F_VIEWDATA_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_VIEWDATA_INTRO_WARN']; ?></span></p>
29 29
     <form action="submit.php" method="post">
30
-      <button type="submit" name="action" value="viewdata">View data sheet</button>
30
+      <button type="submit" name="action" value="viewdata"><?php echo $lang['F_VIEWDATA']; ?></button>
31 31
       <!-- Hidden confirmation box -->
32 32
       <input type="hidden" name="sure" value="yes" />
33 33
     </form>
34 34
   </div> <!-- /hide -->
35 35
   
36 36
   <!-- QUOTA - Show free and used disk space an whole account -->
37
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show used disk space</b>
37
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_QUOTA']; ?></b>
38 38
   <div class="hide">
39
-    <p>Shows used and free disk space on your webhost. This sums up all 
40
-    used space by emails, websites and databases.</p>
39
+    <p><?php echo $lang['F_QUOTA_INTRO']; ?></p>
41 40
     <form action="submit.php" method="post">
42
-      <button type="submit" name="action" value="quota">Show usage</button>
41
+      <button type="submit" name="action" value="quota"><?php echo $lang['F_QUOTA']; ?></button>
43 42
       <!-- Hidden confirmation box -->
44 43
       <input type="hidden" name="sure" value="yes" />
45 44
     </form>
@@ -49,122 +48,117 @@ This panel will not work without activated JavaScript.</span></noscript>
49 48
     EMAIL SECTION
50 49
   -->
51 50
   
52
-  <p><strong>Email accounts</strong></p>
51
+  <p><strong><?php echo $lang['SEC_EMAIL']; ?></strong></p>
53 52
   <!-- ADDUSER - Add a new email account -->
54
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Add a new email</b>
53
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_ADDUSER']; ?></b>
55 54
   <div class="hide">
56
-    <p>You can add a new email account your primary and all other domains.<br />
57
-    Please do not add your domain, just everything in front of the @-symbol.</p>
55
+    <p><?php echo $lang['F_ADDUSER_INTRO']; ?></p>
58 56
     <form action="submit.php" method="post">
59
-      <label>Username:</label>
57
+      <label><?php echo $lang['FT_USER']; ?>:</label>
60 58
       <input name="user" title="User" />
61
-      <label>Password:</label>
59
+      <label><?php echo $lang['FT_PASS']; ?>:</label>
62 60
       <input name="pass" title="Password" type="password" />
63 61
       <br />
64
-      <button type="submit" name="action" value="adduser">Add new account</button>
62
+      <button type="submit" name="action" value="adduser"><?php echo $lang['F_ADDUSER']; ?></button>
65 63
       <!-- Hidden confirmation box -->
66 64
       <input type="hidden" name="sure" value="yes" />
67 65
     </form>
68 66
   </div> <!-- /hide -->
69 67
   
70 68
   <!-- ADDALIAS - Add a new email redirection -->
71
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Add an email redirection</b>
69
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_ADDALIAS']; ?></b>
72 70
   <div class="hide">
73
-    <p>This creates an alias email account. This account has no mailbox 
74
-    but just redirects all mails to another account.</p>
71
+    <p><?php echo $lang['F_ADDALIAS_INTRO']; ?></p>
75 72
     <form action="submit.php" method="post">
76
-      <label>Alias name:</label>
73
+      <label><?php echo $lang['F_ADDALIAS_ALIAS']; ?></label>
77 74
       <input name="user" title="Alias" />
78
-      <label>Destination account:</label>
75
+      <label><?php echo $lang['F_ADDALIAS_DEST']; ?></label>
79 76
       <input name="pass" title="Destination" />
80 77
       <br />
81
-      <button type="submit" name="action" value="addalias">Add alias</button>
78
+      <button type="submit" name="action" value="addalias"><?php echo $lang['F_ADDALIAS']; ?></button>
82 79
       <!-- Hidden confirmation box -->
83 80
       <input type="hidden" name="sure" value="yes" />
84 81
     </form>
85 82
   </div> <!-- /hide -->
86 83
 
87 84
   <!-- CHANGEPW - Change password of an email account -->
88
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Change email password</b>
85
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_CHANGEPW']; ?></b>
89 86
   <div class="hide">
90
-    <p>Enables you to change the email password of a single account.</p>
87
+    <p><?php echo $lang['F_CHANGEPW_INTRO']; ?></p>
91 88
     <form action="submit.php" method="post">
92
-      <label>Username:</label>
89
+      <label><?php echo $lang['FT_USER']; ?>:</label>
93 90
       <input name="user" title="User" />
94
-      <label>New Password:</label>
91
+      <label><?php echo $lang['FT_NEWPASS']; ?>:</label>
95 92
       <input name="pass" title="Password" type="password" />
96 93
       <br />
97
-      <button type="submit" name="action" value="changepw">Change password</button>
94
+      <button type="submit" name="action" value="changepw"><?php echo $lang['F_CHANGEPW']; ?></button>
98 95
       <!-- Hidden confirmation box -->
99 96
       <input type="hidden" name="sure" value="yes" />
100 97
     </form>
101 98
   </div> <!-- /hide -->
102 99
 
103 100
   <!-- LISTUSERS - List all email accounts -->
104
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> List all email accounts</b>
101
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_LISTUSERS']; ?></b>
105 102
   <div class="hide">
106
-    <p>Shows all available email accounts on your webhost. 
107
-    You will be able to see the username and if it has a mailbox or is just a redirection.</p>
103
+    <p><?php echo $lang['F_LISTUSERS_INTRO']; ?></p>
108 104
     <form action="submit.php" method="post">
109
-      <button type="submit" name="action" value="listusers">List accounts</button>
105
+      <button type="submit" name="action" value="listusers"><?php echo $lang['F_LISTUSERS']; ?></button>
110 106
       <!-- Hidden confirmation box -->
111 107
       <input type="hidden" name="sure" value="yes" />
112 108
     </form>
113 109
   </div> <!-- /hide -->
114 110
 
115 111
   <!-- SIZEALL - Show total sizes of all email accounts -->
116
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show total account sizes</b>
112
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_SIZEALL']; ?></b>
117 113
   <div class="hide">
118
-    <p>Shows total size of every active email account on your webhost.</p>
114
+    <p><?php echo $lang['F_SIZEALL_INTRO']; ?></p>
119 115
     <form action="submit.php" method="post">
120
-      <button type="submit" name="action" value="sizeall">Show size</button>
116
+      <button type="submit" name="action" value="sizeall"><?php echo $lang['F_SIZEALL']; ?></button>
121 117
       <!-- Hidden confirmation box -->
122 118
       <input type="hidden" name="sure" value="yes" />
123 119
     </form>
124 120
   </div> <!-- /hide -->
125 121
 
126 122
   <!-- SIZEUSER - Show size of every folder of a single email account -->
127
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show detailed account size</b>
123
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_SIZEUSER']; ?></b>
128 124
   <div class="hide">
129
-    <p>Shows size of every single folder in a single email account. 
130
-    Very useful to detect folders which use up all your space.</p>
125
+    <p><?php echo $lang['F_SIZEUSER_INTRO']; ?></p>
131 126
     <form action="submit.php" method="post">
132
-      <label>Username:</label>
127
+      <label><?php echo $lang['FT_USER']; ?>:</label>
133 128
       <input name="user" title="User" />
134 129
       <br />
135
-      <button type="submit" name="action" value="sizeuser">Show size</button>
130
+      <button type="submit" name="action" value="sizeuser"><?php echo $lang['F_SIZEUSER']; ?></button>
136 131
       <!-- Hidden confirmation box -->
137 132
       <input type="hidden" name="sure" value="yes" />
138 133
     </form>
139 134
   </div> <!-- /hide -->
140 135
 
141 136
   <!-- USERDETAIL - Detailed info about a single email account -->
142
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show detailed account info</b>
137
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_USERDETAIL']; ?></b>
143 138
   <div class="hide">
144
-    <p>Show various information about a single email account.</p>
139
+    <p><?php echo $lang['F_USERDETAIL_INTRO']; ?></p>
145 140
     <form action="submit.php" method="post">
146
-      <label>Username:</label>
141
+      <label><?php echo $lang['FT_USER']; ?>:</label>
147 142
       <input name="user" title="User" />
148 143
       <br />
149
-      <button type="submit" name="action" value="userdetail">Get details</button>
144
+      <button type="submit" name="action" value="userdetail"><?php echo $lang['F_USERDETAIL']; ?></button>
150 145
       <!-- Hidden confirmation box -->
151 146
       <input type="hidden" name="sure" value="yes" />
152 147
     </form>
153 148
   </div> <!-- /hide -->
154 149
 
155 150
   <!-- DELUSER - Delete an email account -->
156
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Delete an email account</b>
151
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_DELUSER']; ?></b>
157 152
   <div class="hide">
158
-    <p>Deletes an email account and all its emails.<br />
159
-    <span class="warn">THIS OPERATION CANNOT BE UNDONE! ALL EMAILS OF THIS ACCOUNT WILL BE REMOVED!</span></p>
153
+    <p><?php echo $lang['F_DELUSER_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_DELUSER_INTRO_WARN']; ?></span></p>
160 154
     <form action="submit.php" method="post">
161
-      <label>Username:</label>
155
+      <label><?php echo $lang['FT_USER']; ?>:</label>
162 156
       <input name="user" title="User" />
163 157
       <br />
164 158
       <label for="sure"> 
165
-        <input type="checkbox" name="sure" value="yes" id="sure">Yes, I'm really sure that I want to delete this account
159
+        <input type="checkbox" name="sure" value="yes" id="sure"><?php echo $lang['F_DELUSER_CONF']; ?>
166 160
       </label> 
167
-      <button type="submit" name="action" value="deluser">Delete account</button>
161
+      <button type="submit" name="action" value="deluser"><?php echo $lang['F_DELUSER']; ?></button>
168 162
     </form>
169 163
   </div> <!-- /hide -->
170 164
   
@@ -172,44 +166,43 @@ This panel will not work without activated JavaScript.</span></noscript>
172 166
     WEB SECTION
173 167
   -->
174 168
   
175
-  <p><strong>Web Applications</strong></p>
169
+  <p><strong><?php echo $lang['SEC_WEB']; ?></strong></p>
176 170
   <!-- INSTALLWP - Install an empty WordPress -->
177
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Install WordPress automatically</b>
171
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_INSTALLWP']; ?></b>
178 172
   <div class="hide">
179
-    <p>This install WordPress for your automatically. It only works if 
180
-    your website directory is still empty and you didn't create a 
181
-    database called &lt;YourUsername&gt;_wp.</p>
173
+    <p><?php echo $lang['F_INSTALLWP_INTRO']; ?></p>
182 174
     <form action="submit.php" method="post">
183
-      <label>Desired WordPress login name:</label>
175
+      <label><?php echo $lang['F_INSTALLWP_USER']; ?></label>
184 176
       <input name="user" title="WordPress Login" />
185
-      <label>Your full email address:</label>
177
+      <label><?php echo $lang['F_INSTALLWP_MAIL']; ?></label>
186 178
       <input name="pass" title="Email address" />
187 179
       <br />
188
-      <button type="submit" name="action" value="installwp">Install WordPress</button>
180
+      <button type="submit" name="action" value="installwp"><?php echo $lang['F_INSTALLWP']; ?></button>
189 181
       <!-- Hidden confirmation box -->
190 182
       <input type="hidden" name="sure" value="yes" />
191 183
     </form>
192 184
   </div> <!-- /hide -->
193 185
   
194 186
   <!-- UNINSTALLWP - Uninstall WordPress -->
195
-  <b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Uninstall WordPress</b>
187
+  <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_UNINSTALLWP']; ?></b>
196 188
   <div class="hide">
197
-    <p>Deletes all files in your webdirectory and the database &lt;YourUsername&gt;_wp.<br />
198
-    <span class="warn">THIS OPERATION CANNOT BE UNDONE! ALL POST, PAGES AND SETTINGS WILL BE REMOVED!</span></p>
189
+    <p><?php echo $lang['F_UNINSTALLWP_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_UNINSTALLWP_INTRO_WARN']; ?></span></p>
199 190
     <form action="submit.php" method="post">
200 191
       <label for="sure"> 
201
-        <input type="checkbox" name="sure" value="yes" id="sure">Yes, I'm really sure that I want to uninstall WordPress completely
192
+        <input type="checkbox" name="sure" value="yes" id="sure"><?php echo $lang['F_UNINSTALLWP_CONF']; ?>
202 193
       </label> 
203
-      <button type="submit" name="action" value="uninstallwp">Uninstall WordPress</button>
194
+      <button type="submit" name="action" value="uninstallwp"><?php echo $lang['F_UNINSTALLWP']; ?></button>
204 195
     </form>
205 196
   </div> <!-- /hide -->
206 197
 
207 198
 </div> <!-- /gallery -->
208 199
 
200
+<p><a href="/?lang=en"><img src="/lang/en.png" title="<?php echo $lang['LANG_EN']; ?>" /></a> | <a href="/?lang=de"><img src="/lang/de.png" title="<?php echo $lang['LANG_DE']; ?>" /></a></p>
201
+
202
+
209 203
 </div> <!-- /wrapper -->
210 204
 <div class="footer">
211
-  <p>This web application has been created by <a href="http://mehl.mx">Max Mehl</a><br />
212
-  The program can be obtained on <a href="http://src.mehl.mx/uberspace-webadmin.git">Git</a> under an AGPLv3+ license.</p>
205
+  <p><?php echo $lang['FOOTER']; ?></p>
213 206
 </div> <!-- footer -->
214 207
 
215 208
 </body>

+ 42
- 0
lang.php View File

@@ -0,0 +1,42 @@
1
+<?php
2
+session_start();
3
+header('Cache-control: private'); // IE 6 FIX
4
+
5
+if(isSet($_GET['lang']))
6
+{
7
+$lang = $_GET['lang'];
8
+
9
+// register the session and set the cookie
10
+$_SESSION['lang'] = $lang;
11
+
12
+setcookie("lang", $lang, time() + (3600 * 24 * 30));
13
+}
14
+else if(isSet($_SESSION['lang']))
15
+{
16
+$lang = $_SESSION['lang'];
17
+}
18
+else if(isSet($_COOKIE['lang']))
19
+{
20
+$lang = $_COOKIE['lang'];
21
+}
22
+else
23
+{
24
+$lang = 'en';
25
+}
26
+
27
+switch ($lang) {
28
+  case 'en':
29
+  $lang_file = 'lang.en.php';
30
+  break;
31
+
32
+  case 'de':
33
+  $lang_file = 'lang.de.php';
34
+  break;
35
+
36
+  default:
37
+  $lang_file = 'lang.en.php';
38
+
39
+}
40
+
41
+include_once 'lang/'.$lang_file;
42
+?>

BIN
lang/de.png View File


BIN
lang/en.png View File


+ 88
- 0
lang/lang.de.php View File

@@ -0,0 +1,88 @@
1
+<?php
2
+
3
+$lang = array();
4
+
5
+// GENERAL
6
+$lang['LANG'] = 'de-DE';
7
+$lang['LANG_EN'] = 'English';
8
+$lang['LANG_DE'] = 'Deutsch';
9
+$lang['JS_WARN'] = 'Bitte aktivieren Sie JavaScript in Ihrem Webbrowser. Diese Oberfläche wird ohne aktiviertes JavaScript nicht funktionieren.';
10
+$lang['FOOTER'] = 'Diese Webanwendung wurde von <a href="http://mehl.mx">Max Mehl</a> entwickelt <br />Das Programm kann auf <a href="http://src.mehl.mx/uberspace-webadmin.git">Git</a> unter einer AGPLv3+ Lizenz herunter geladen werden.';
11
+
12
+
13
+/////////////
14
+// SUBMIT.PHP
15
+/////////////
16
+
17
+$lang['S_INTRO'] = 'Ergebnisse';
18
+$lang['S_BACK1'] = '&#171; ZURÜCK';
19
+$lang['S_BACK2'] = 'zur Administrations-Seite';
20
+$lang['S_CHECKERR'] = 'Sie haben nicht die erforderliche Bestätigungs-Box aktiviert. Abbruch.';
21
+$lang['S_MESSAGE'] = 'Wenn Fehler auftreten sollen, prüfen Sie bitte nochmals alle Eingabedaten. <br />Wenn das Problem dann immer noch besteht, kontaktieren Sie uns bitte und fügen Sie die Fehlermeldung hinzu.';
22
+
23
+
24
+/////////////
25
+// INDEX.PHP
26
+/////////////
27
+
28
+$lang['INTRO'] = 'Sie haben folgende Optionen:';
29
+
30
+// SECTION GENERAL
31
+$lang['SEC_GENERAL'] = 'Allgemein';
32
+
33
+$lang['F_VIEWDATA'] = 'Datenblatt anschauen';
34
+$lang['F_VIEWDATA_INTRO'] = 'Das Datenblatt mit allen Benutzernamen und Passwörtern anschauen';
35
+$lang['F_VIEWDATA_INTRO_WARN'] = 'Bitte halten Sie dieses Dokument sicher und unter Verschluss auf!';
36
+
37
+$lang['F_QUOTA'] = 'Speicherbelegung anzeigen';
38
+$lang['F_QUOTA_INTRO'] = 'Zeigt verwendeten und freien Plattenspeicher auf dem Webspace an. Das summiert allen verwendeten Speicher durch E-Mails, Webseiten und Datenbanken.';
39
+
40
+// SECTION EMAIL
41
+$lang['SEC_EMAIL'] = 'E-Mail Postfächer';
42
+
43
+$lang['F_ADDUSER'] = 'Neues Postfach hinzufügen';
44
+$lang['F_ADDUSER_INTRO'] = 'Sie können ein neues E-Mail-Postfach für die Haupt- und alle weiteren Domains erstellen. <br />Bitte fügen Sie nicht Ihre Domain anbei, sondern nur alles vor dem @-Symbol.';
45
+
46
+$lang['F_ADDALIAS'] = 'E-Mail-Weiterleitung erstellen';
47
+$lang['F_ADDALIAS_INTRO'] = 'Das erstellt einen neuen Alias-E-Mail-Account. Dieser Account hat kein Postfach, er leitet nur alle Mails zu einem anderen Account weiter (beispielsweise "admin" zu "info")';
48
+$lang['F_ADDALIAS_ALIAS'] = 'Weiterleitungs-Name:';
49
+$lang['F_ADDALIAS_DEST'] = 'Ziel-Postfach:';
50
+
51
+$lang['F_CHANGEPW'] = 'E-Mail Passwort ändern';
52
+$lang['F_CHANGEPW_INTRO'] = 'Ermöglicht Ihnen, das Passwort eines einzelnen E-Mail-Postfaches zu ändern.';
53
+
54
+$lang['F_LISTUSERS'] = 'Alle E-Mail-Benutzer auflisten';
55
+$lang['F_LISTUSERS_INTRO'] = 'Zeigt alle verfügbaren E-Mail-Benutzer auf Ihrem Webspace. Sie können die Benutzernamen sehen, und ob sie ein Postfach besitzen oder nur eine Weiterleitung sind.';
56
+
57
+$lang['F_SIZEALL'] = 'Gesamtgröße zeigen';
58
+$lang['F_SIZEALL_INTRO'] = 'Zeigt die gesamte Größe alle E-Mail-Postfächer.';
59
+
60
+$lang['F_SIZEUSER'] = 'Größe eines einzelnen Postfachs zeigen';
61
+$lang['F_SIZEUSER_INTRO'] = 'Zeigt die Größe eines jeden einzelnen Ordners in einem einzelnen E-Mail-Account. Sehr nützlich, um Ordner zu erkennen, die zu viel Platz belegen.';
62
+
63
+$lang['F_USERDETAIL'] = 'Zeige Account-Detailinfos';
64
+$lang['F_USERDETAIL_INTRO'] = 'Zeigt diverse Informationen über einen einzelnen E-Mail-Benutzer,';
65
+
66
+$lang['F_DELUSER'] = 'Lösche E-Mail-Account';
67
+$lang['F_DELUSER_INTRO'] = 'Löscht einen einzelnen E-Mail-Account mit allen E-Mails';
68
+$lang['F_DELUSER_INTRO_WARN'] = 'DIESE AKTION KANN NICHT RÜCKGÄNGIG GEMACHT WERDEN! ALLE E-MAILS DES BENUTZERS WERDEN GELÖSCHT!';
69
+$lang['F_DELUSER_CONF'] = 'Ja, ich bin wirklich sicher, dass ich den Benutzer löschen möchte';
70
+
71
+// SECTION WEB
72
+$lang['SEC_WEB'] = 'Web-Anwendungen';
73
+
74
+$lang['F_INSTALLWP'] = 'WordPress automatisch installieren';
75
+$lang['F_INSTALLWP_INTRO'] = 'Diese Funktion installiert WordPress automatisch für Sie. Es funktioniert nur, wenn das Webverzeichnis noch leer ist und Sie noch keine Datenbank namens <em>IhrBenutzername</em>_wp erstellt haben.';
76
+$lang['F_INSTALLWP_USER'] = 'Gewünschter WordPress-Benutzername:';
77
+$lang['F_INSTALLWP_MAIL'] = 'Ihre volle E-Mail-Adresse:';
78
+
79
+$lang['F_UNINSTALLWP'] = 'WordPress deinstallieren';
80
+$lang['F_UNINSTALLWP_INTRO'] = 'Löscht alle Dateien im Webverzeichnis und die Datenbank <em>IhrBenutzername</em>_wp.';
81
+$lang['F_UNINSTALLWP_INTRO_WARN'] = 'DIESE AKTION KANN NICHT RÜCKGÄNGIG GEMACHT WERDEN! ALLE BEITRÄGE, SEITEN UND EINSTELLUNGEN WERDEN GELÖSCHT!';
82
+$lang['F_UNINSTALLWP_CONF'] = 'Ja, ich bin wirklich sicher, dass ich WordPress vollständig entfernen möchte';
83
+
84
+// FUNCTION TEMPLATES
85
+$lang['FT_USER'] = 'Benutzername';
86
+$lang['FT_PASS'] = 'Passwort';
87
+$lang['FT_NEWPASS'] = 'Neues Passwort';
88
+

+ 89
- 0
lang/lang.en.php View File

@@ -0,0 +1,89 @@
1
+<?php
2
+
3
+$lang = array();
4
+
5
+// GENERAL
6
+$lang['LANG'] = 'en-GB';
7
+$lang['LANG_EN'] = 'English';
8
+$lang['LANG_DE'] = 'Deutsch';
9
+$lang['JS_WARN'] = 'Please activate JavaScript in your webbrowser. This panel will not work without activated JavaScript.';
10
+$lang['FOOTER'] = 'This web application has been created by <a href="http://mehl.mx">Max Mehl</a><br />The program can be obtained on <a href="http://src.mehl.mx/uberspace-webadmin.git">Git</a> under an AGPLv3+ license.';
11
+
12
+
13
+/////////////
14
+// SUBMIT.PHP
15
+/////////////
16
+
17
+$lang['S_INTRO'] = 'Results';
18
+$lang['S_BACK1'] = '&#171; GO BACK';
19
+$lang['S_BACK2'] = 'to main administration page';
20
+$lang['S_CHECKERR'] = 'You did not hit the necessary checkbox. Aborting.';
21
+$lang['S_MESSAGE'] = 'In case of errors, please check all input data again. <br />If the problem still exists, please contact us and add the error message.';
22
+
23
+
24
+/////////////
25
+// INDEX.PHP
26
+/////////////
27
+
28
+$lang['INTRO'] = 'You have following options:';
29
+
30
+// SECTION GENERAL
31
+$lang['SEC_GENERAL'] = 'General';
32
+
33
+$lang['F_VIEWDATA'] = 'View the data sheet';
34
+$lang['F_VIEWDATA_INTRO'] = 'View the data sheet with all usernames and passwords.';
35
+$lang['F_VIEWDATA_INTRO_WARN'] = 'Please keep this document secure!';
36
+
37
+$lang['F_QUOTA'] = 'Show used disk space';
38
+$lang['F_QUOTA_INTRO'] = 'Shows used and free disk space on your webhost. This sums up all 
39
+    used space by emails, websites and databases.';
40
+
41
+// SECTION EMAIL
42
+$lang['SEC_EMAIL'] = 'Email accounts';
43
+
44
+$lang['F_ADDUSER'] = 'Add a new email';
45
+$lang['F_ADDUSER_INTRO'] = 'You can add a new email account your primary and all other domains. <br />Please do not add your domain, just everything in front of the @-symbol.';
46
+
47
+$lang['F_ADDALIAS'] = 'Add an email redirection';
48
+$lang['F_ADDALIAS_INTRO'] = 'This creates an alias email account. This account has no mailbox but just redirects all mails to another account (For example, "admin" to "info")';
49
+$lang['F_ADDALIAS_ALIAS'] = 'Alias name:';
50
+$lang['F_ADDALIAS_DEST'] = 'Destination account:';
51
+
52
+$lang['F_CHANGEPW'] = 'Change email password';
53
+$lang['F_CHANGEPW_INTRO'] = 'Enables you to change the email password of a single account.';
54
+
55
+$lang['F_LISTUSERS'] = 'List all email accounts';
56
+$lang['F_LISTUSERS_INTRO'] = 'Shows all available email accounts on your webhost. You will be able to see the username and if it has a mailbox or is just a redirection.';
57
+
58
+$lang['F_SIZEALL'] = 'Show total account sizes';
59
+$lang['F_SIZEALL_INTRO'] = 'Shows total size of every active email account on your webhost.';
60
+
61
+$lang['F_SIZEUSER'] = 'Show detailed account size';
62
+$lang['F_SIZEUSER_INTRO'] = 'Shows size of every single folder in a single email account. Very useful to detect folders which use up all your space.';
63
+
64
+$lang['F_USERDETAIL'] = 'Show detailed account info';
65
+$lang['F_USERDETAIL_INTRO'] = 'Show various information about a single email account.';
66
+
67
+$lang['F_DELUSER'] = 'Delete an email account';
68
+$lang['F_DELUSER_INTRO'] = 'Deletes an email account and all its emails. ';
69
+$lang['F_DELUSER_INTRO_WARN'] = 'THIS OPERATION CANNOT BE UNDONE! ALL EMAILS OF THIS ACCOUNT WILL BE REMOVED!';
70
+$lang['F_DELUSER_CONF'] = 'Yes, I am really sure that I want to delete this account';
71
+
72
+// SECTION WEB
73
+$lang['SEC_WEB'] = 'Web Applications';
74
+
75
+$lang['F_INSTALLWP'] = 'Install WordPress automatically';
76
+$lang['F_INSTALLWP_INTRO'] = 'This install WordPress for your automatically. It only works if your website directory is still empty and you did not create a database called <em>YourUsername</em>_wp.';
77
+$lang['F_INSTALLWP_USER'] = 'Desired WordPress login name:';
78
+$lang['F_INSTALLWP_MAIL'] = 'Your full email address:';
79
+
80
+$lang['F_UNINSTALLWP'] = 'Uninstall WordPress';
81
+$lang['F_UNINSTALLWP_INTRO'] = 'Deletes all files in your webdirectory and the database <em>YourUsername</em>_wp.';
82
+$lang['F_UNINSTALLWP_INTRO_WARN'] = 'THIS OPERATION CANNOT BE UNDONE! ALL POSTS, PAGES AND SETTINGS WILL BE REMOVED!';
83
+$lang['F_UNINSTALLWP_CONF'] = 'Yes, I am really sure that I want to uninstall WordPress completely';
84
+
85
+// FUNCTION TEMPLATES
86
+$lang['FT_USER'] = 'Username';
87
+$lang['FT_PASS'] = 'Password';
88
+$lang['FT_NEWPASS'] = 'New Password';
89
+

+ 9
- 10
submit.php View File

@@ -1,16 +1,17 @@
1
+<?php include_once 'lang.php'; ?>
1 2
 <!DOCTYPE html>
2
-<html lang="en-GB">
3
+<html lang="<?php echo $lang['LANG']; ?>">
3 4
 <head>
4 5
   <meta charset="utf-8">
5
-  <title>UAAP | Results</title>
6
+  <title>UAAP | <?php echo $lang['S_INTRO']; ?></title>
6 7
   <link rel='stylesheet' href='/static/style.css' type='text/css' media='all' />
7 8
 </head>
8 9
 <body>
9 10
 <div class="wrapper">
10 11
 
11
-<h1>Results</h1>
12
+<h1><?php echo $lang['S_INTRO']; ?></h1>
12 13
 
13
-<p><strong><a href="/">&#171; GO BACK</a></strong> to main administration page</p>
14
+<p><strong><a href="/"><?php echo $lang['S_BACK1']; ?></a></strong> <?php echo $lang['S_BACK2']; ?></p>
14 15
 
15 16
 <table class="boxed"><tr><td>
16 17
 
@@ -19,7 +20,7 @@
19 20
 $ACTION = $_POST['action'];
20 21
 $USER = isset($_POST['user']) ? $_POST['user'] : ''; // surpress empty variable errors
21 22
 $PASS = isset($_POST['pass']) ? $_POST['pass'] : '';
22
-$SURE = $_POST['sure'];
23
+$SURE = isset($_POST['sure']) ? $_POST['sure'] : '';
23 24
 
24 25
 // Sanitize variables
25 26
 $ACTION = escapeshellarg($ACTION);
@@ -42,7 +43,7 @@ if($SURE == "yes")
42 43
 }
43 44
 else
44 45
 {
45
-  echo "You did not hit the necessary checkbox. Aborting.";
46
+  echo $lang['S_CHECKERR'];
46 47
 }
47 48
 
48 49
 // Delete passfile
@@ -52,13 +53,11 @@ unlink($PASSFILE);
52 53
 
53 54
 </td></tr></table>
54 55
 
55
-<p>In case of errors, please check all input data again.<br />
56
-If the problem still exists, please contact us and add the error message.</p>
56
+<p><?php echo $lang['S_MESSAGE']; ?></p>
57 57
 
58 58
 </div> <!-- /wrapper -->
59 59
 <div class="footer">
60
-  <p>This web application has been created by <a href="http://mehl.mx">Max Mehl</a><br />
61
-  The program can be obtained on <a href="http://src.mehl.mx/uberspace-webadmin.git">Git</a> under an AGPLv3+ license.</p>
60
+  <p><?php echo $lang['FOOTER']; ?></p>
62 61
 </div>
63 62
 
64 63
 </body>

Loading…
Cancel
Save