Browse Source

add multilanguage support (currently EN and DE)

master
mxmehl 5 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
     
  5. BIN
     
  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
Allow from all
</FilesMatch>

<FilesMatch "\.(css|js|php|html|htm|var)$">
<FilesMatch "\.(css|js|php|html|htm|var|png)$">
Order Allow,Deny
Allow from all
</FilesMatch>


+ 60
- 67
index.php View File

@@ -1,5 +1,6 @@
<?php include_once 'lang.php'; ?>
<!DOCTYPE html>
<html lang="en-GB">
<html lang="<?php echo $lang['LANG']; ?>">
<head>
<meta charset="utf-8">
<title>UAAP | Uberspace Account Administration Panel</title>
@@ -11,35 +12,33 @@

<h1>Account Administration Panel</h1>

<noscript><span class="warn">Please activate JavaScript in your webbrowser.
This panel will not work without activated JavaScript.</span></noscript>
<noscript><span class="warn"><?php echo $lang['JS_WARN']; ?></span></noscript>

<h4>You have following options:</h4>
<h4><?php echo $lang['INTRO']; ?></h4>

<div id="gallery">
<!--
GENERAL SECTION
-->
<p><strong>General</strong></p>
<p><strong><?php echo $lang['SEC_GENERAL']; ?></strong></p>
<!-- VIEWDATA - View datasheet of whole account -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> View the data sheet</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_VIEWDATA']; ?></b>
<div class="hide">
<p>View the data sheet with all usernames and passwords. <span class="warn">Please keep this document secure!</span></p>
<p><?php echo $lang['F_VIEWDATA_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_VIEWDATA_INTRO_WARN']; ?></span></p>
<form action="submit.php" method="post">
<button type="submit" name="action" value="viewdata">View data sheet</button>
<button type="submit" name="action" value="viewdata"><?php echo $lang['F_VIEWDATA']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->
<!-- QUOTA - Show free and used disk space an whole account -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show used disk space</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_QUOTA']; ?></b>
<div class="hide">
<p>Shows used and free disk space on your webhost. This sums up all
used space by emails, websites and databases.</p>
<p><?php echo $lang['F_QUOTA_INTRO']; ?></p>
<form action="submit.php" method="post">
<button type="submit" name="action" value="quota">Show usage</button>
<button type="submit" name="action" value="quota"><?php echo $lang['F_QUOTA']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
@@ -49,122 +48,117 @@ This panel will not work without activated JavaScript.</span></noscript>
EMAIL SECTION
-->
<p><strong>Email accounts</strong></p>
<p><strong><?php echo $lang['SEC_EMAIL']; ?></strong></p>
<!-- ADDUSER - Add a new email account -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Add a new email</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_ADDUSER']; ?></b>
<div class="hide">
<p>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.</p>
<p><?php echo $lang['F_ADDUSER_INTRO']; ?></p>
<form action="submit.php" method="post">
<label>Username:</label>
<label><?php echo $lang['FT_USER']; ?>:</label>
<input name="user" title="User" />
<label>Password:</label>
<label><?php echo $lang['FT_PASS']; ?>:</label>
<input name="pass" title="Password" type="password" />
<br />
<button type="submit" name="action" value="adduser">Add new account</button>
<button type="submit" name="action" value="adduser"><?php echo $lang['F_ADDUSER']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->
<!-- ADDALIAS - Add a new email redirection -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Add an email redirection</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_ADDALIAS']; ?></b>
<div class="hide">
<p>This creates an alias email account. This account has no mailbox
but just redirects all mails to another account.</p>
<p><?php echo $lang['F_ADDALIAS_INTRO']; ?></p>
<form action="submit.php" method="post">
<label>Alias name:</label>
<label><?php echo $lang['F_ADDALIAS_ALIAS']; ?></label>
<input name="user" title="Alias" />
<label>Destination account:</label>
<label><?php echo $lang['F_ADDALIAS_DEST']; ?></label>
<input name="pass" title="Destination" />
<br />
<button type="submit" name="action" value="addalias">Add alias</button>
<button type="submit" name="action" value="addalias"><?php echo $lang['F_ADDALIAS']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->

<!-- CHANGEPW - Change password of an email account -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Change email password</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_CHANGEPW']; ?></b>
<div class="hide">
<p>Enables you to change the email password of a single account.</p>
<p><?php echo $lang['F_CHANGEPW_INTRO']; ?></p>
<form action="submit.php" method="post">
<label>Username:</label>
<label><?php echo $lang['FT_USER']; ?>:</label>
<input name="user" title="User" />
<label>New Password:</label>
<label><?php echo $lang['FT_NEWPASS']; ?>:</label>
<input name="pass" title="Password" type="password" />
<br />
<button type="submit" name="action" value="changepw">Change password</button>
<button type="submit" name="action" value="changepw"><?php echo $lang['F_CHANGEPW']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->

<!-- LISTUSERS - List all email accounts -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> List all email accounts</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_LISTUSERS']; ?></b>
<div class="hide">
<p>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.</p>
<p><?php echo $lang['F_LISTUSERS_INTRO']; ?></p>
<form action="submit.php" method="post">
<button type="submit" name="action" value="listusers">List accounts</button>
<button type="submit" name="action" value="listusers"><?php echo $lang['F_LISTUSERS']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->

<!-- SIZEALL - Show total sizes of all email accounts -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show total account sizes</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_SIZEALL']; ?></b>
<div class="hide">
<p>Shows total size of every active email account on your webhost.</p>
<p><?php echo $lang['F_SIZEALL_INTRO']; ?></p>
<form action="submit.php" method="post">
<button type="submit" name="action" value="sizeall">Show size</button>
<button type="submit" name="action" value="sizeall"><?php echo $lang['F_SIZEALL']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->

<!-- SIZEUSER - Show size of every folder of a single email account -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show detailed account size</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_SIZEUSER']; ?></b>
<div class="hide">
<p>Shows size of every single folder in a single email account.
Very useful to detect folders which use up all your space.</p>
<p><?php echo $lang['F_SIZEUSER_INTRO']; ?></p>
<form action="submit.php" method="post">
<label>Username:</label>
<label><?php echo $lang['FT_USER']; ?>:</label>
<input name="user" title="User" />
<br />
<button type="submit" name="action" value="sizeuser">Show size</button>
<button type="submit" name="action" value="sizeuser"><?php echo $lang['F_SIZEUSER']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->

<!-- USERDETAIL - Detailed info about a single email account -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Show detailed account info</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_USERDETAIL']; ?></b>
<div class="hide">
<p>Show various information about a single email account.</p>
<p><?php echo $lang['F_USERDETAIL_INTRO']; ?></p>
<form action="submit.php" method="post">
<label>Username:</label>
<label><?php echo $lang['FT_USER']; ?>:</label>
<input name="user" title="User" />
<br />
<button type="submit" name="action" value="userdetail">Get details</button>
<button type="submit" name="action" value="userdetail"><?php echo $lang['F_USERDETAIL']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->

<!-- DELUSER - Delete an email account -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Delete an email account</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_DELUSER']; ?></b>
<div class="hide">
<p>Deletes an email account and all its emails.<br />
<span class="warn">THIS OPERATION CANNOT BE UNDONE! ALL EMAILS OF THIS ACCOUNT WILL BE REMOVED!</span></p>
<p><?php echo $lang['F_DELUSER_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_DELUSER_INTRO_WARN']; ?></span></p>
<form action="submit.php" method="post">
<label>Username:</label>
<label><?php echo $lang['FT_USER']; ?>:</label>
<input name="user" title="User" />
<br />
<label for="sure">
<input type="checkbox" name="sure" value="yes" id="sure">Yes, I'm really sure that I want to delete this account
<input type="checkbox" name="sure" value="yes" id="sure"><?php echo $lang['F_DELUSER_CONF']; ?>
</label>
<button type="submit" name="action" value="deluser">Delete account</button>
<button type="submit" name="action" value="deluser"><?php echo $lang['F_DELUSER']; ?></button>
</form>
</div> <!-- /hide -->
@@ -172,44 +166,43 @@ This panel will not work without activated JavaScript.</span></noscript>
WEB SECTION
-->
<p><strong>Web Applications</strong></p>
<p><strong><?php echo $lang['SEC_WEB']; ?></strong></p>
<!-- INSTALLWP - Install an empty WordPress -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Install WordPress automatically</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_INSTALLWP']; ?></b>
<div class="hide">
<p>This install WordPress for your automatically. It only works if
your website directory is still empty and you didn't create a
database called &lt;YourUsername&gt;_wp.</p>
<p><?php echo $lang['F_INSTALLWP_INTRO']; ?></p>
<form action="submit.php" method="post">
<label>Desired WordPress login name:</label>
<label><?php echo $lang['F_INSTALLWP_USER']; ?></label>
<input name="user" title="WordPress Login" />
<label>Your full email address:</label>
<label><?php echo $lang['F_INSTALLWP_MAIL']; ?></label>
<input name="pass" title="Email address" />
<br />
<button type="submit" name="action" value="installwp">Install WordPress</button>
<button type="submit" name="action" value="installwp"><?php echo $lang['F_INSTALLWP']; ?></button>
<!-- Hidden confirmation box -->
<input type="hidden" name="sure" value="yes" />
</form>
</div> <!-- /hide -->
<!-- UNINSTALLWP - Uninstall WordPress -->
<b class="switch"><span class="turn_on">&#187;</span><span class="turn_off">&#171;</span> Uninstall WordPress</b>
<b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_UNINSTALLWP']; ?></b>
<div class="hide">
<p>Deletes all files in your webdirectory and the database &lt;YourUsername&gt;_wp.<br />
<span class="warn">THIS OPERATION CANNOT BE UNDONE! ALL POST, PAGES AND SETTINGS WILL BE REMOVED!</span></p>
<p><?php echo $lang['F_UNINSTALLWP_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_UNINSTALLWP_INTRO_WARN']; ?></span></p>
<form action="submit.php" method="post">
<label for="sure">
<input type="checkbox" name="sure" value="yes" id="sure">Yes, I'm really sure that I want to uninstall WordPress completely
<input type="checkbox" name="sure" value="yes" id="sure"><?php echo $lang['F_UNINSTALLWP_CONF']; ?>
</label>
<button type="submit" name="action" value="uninstallwp">Uninstall WordPress</button>
<button type="submit" name="action" value="uninstallwp"><?php echo $lang['F_UNINSTALLWP']; ?></button>
</form>
</div> <!-- /hide -->

</div> <!-- /gallery -->

<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>


</div> <!-- /wrapper -->
<div class="footer">
<p>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.</p>
<p><?php echo $lang['FOOTER']; ?></p>
</div> <!-- footer -->

</body>


+ 42
- 0
lang.php View File

@@ -0,0 +1,42 @@
<?php
session_start();
header('Cache-control: private'); // IE 6 FIX

if(isSet($_GET['lang']))
{
$lang = $_GET['lang'];

// register the session and set the cookie
$_SESSION['lang'] = $lang;

setcookie("lang", $lang, time() + (3600 * 24 * 30));
}
else if(isSet($_SESSION['lang']))
{
$lang = $_SESSION['lang'];
}
else if(isSet($_COOKIE['lang']))
{
$lang = $_COOKIE['lang'];
}
else
{
$lang = 'en';
}

switch ($lang) {
case 'en':
$lang_file = 'lang.en.php';
break;

case 'de':
$lang_file = 'lang.de.php';
break;

default:
$lang_file = 'lang.en.php';

}

include_once 'lang/'.$lang_file;
?>

BIN
View File


BIN
View File


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

@@ -0,0 +1,88 @@
<?php

$lang = array();

// GENERAL
$lang['LANG'] = 'de-DE';
$lang['LANG_EN'] = 'English';
$lang['LANG_DE'] = 'Deutsch';
$lang['JS_WARN'] = 'Bitte aktivieren Sie JavaScript in Ihrem Webbrowser. Diese Oberfläche wird ohne aktiviertes JavaScript nicht funktionieren.';
$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.';


/////////////
// SUBMIT.PHP
/////////////

$lang['S_INTRO'] = 'Ergebnisse';
$lang['S_BACK1'] = '&#171; ZURÜCK';
$lang['S_BACK2'] = 'zur Administrations-Seite';
$lang['S_CHECKERR'] = 'Sie haben nicht die erforderliche Bestätigungs-Box aktiviert. Abbruch.';
$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.';


/////////////
// INDEX.PHP
/////////////

$lang['INTRO'] = 'Sie haben folgende Optionen:';

// SECTION GENERAL
$lang['SEC_GENERAL'] = 'Allgemein';

$lang['F_VIEWDATA'] = 'Datenblatt anschauen';
$lang['F_VIEWDATA_INTRO'] = 'Das Datenblatt mit allen Benutzernamen und Passwörtern anschauen';
$lang['F_VIEWDATA_INTRO_WARN'] = 'Bitte halten Sie dieses Dokument sicher und unter Verschluss auf!';

$lang['F_QUOTA'] = 'Speicherbelegung anzeigen';
$lang['F_QUOTA_INTRO'] = 'Zeigt verwendeten und freien Plattenspeicher auf dem Webspace an. Das summiert allen verwendeten Speicher durch E-Mails, Webseiten und Datenbanken.';

// SECTION EMAIL
$lang['SEC_EMAIL'] = 'E-Mail Postfächer';

$lang['F_ADDUSER'] = 'Neues Postfach hinzufügen';
$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.';

$lang['F_ADDALIAS'] = 'E-Mail-Weiterleitung erstellen';
$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")';
$lang['F_ADDALIAS_ALIAS'] = 'Weiterleitungs-Name:';
$lang['F_ADDALIAS_DEST'] = 'Ziel-Postfach:';

$lang['F_CHANGEPW'] = 'E-Mail Passwort ändern';
$lang['F_CHANGEPW_INTRO'] = 'Ermöglicht Ihnen, das Passwort eines einzelnen E-Mail-Postfaches zu ändern.';

$lang['F_LISTUSERS'] = 'Alle E-Mail-Benutzer auflisten';
$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.';

$lang['F_SIZEALL'] = 'Gesamtgröße zeigen';
$lang['F_SIZEALL_INTRO'] = 'Zeigt die gesamte Größe alle E-Mail-Postfächer.';

$lang['F_SIZEUSER'] = 'Größe eines einzelnen Postfachs zeigen';
$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.';

$lang['F_USERDETAIL'] = 'Zeige Account-Detailinfos';
$lang['F_USERDETAIL_INTRO'] = 'Zeigt diverse Informationen über einen einzelnen E-Mail-Benutzer,';

$lang['F_DELUSER'] = 'Lösche E-Mail-Account';
$lang['F_DELUSER_INTRO'] = 'Löscht einen einzelnen E-Mail-Account mit allen E-Mails';
$lang['F_DELUSER_INTRO_WARN'] = 'DIESE AKTION KANN NICHT RÜCKGÄNGIG GEMACHT WERDEN! ALLE E-MAILS DES BENUTZERS WERDEN GELÖSCHT!';
$lang['F_DELUSER_CONF'] = 'Ja, ich bin wirklich sicher, dass ich den Benutzer löschen möchte';

// SECTION WEB
$lang['SEC_WEB'] = 'Web-Anwendungen';

$lang['F_INSTALLWP'] = 'WordPress automatisch installieren';
$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.';
$lang['F_INSTALLWP_USER'] = 'Gewünschter WordPress-Benutzername:';
$lang['F_INSTALLWP_MAIL'] = 'Ihre volle E-Mail-Adresse:';

$lang['F_UNINSTALLWP'] = 'WordPress deinstallieren';
$lang['F_UNINSTALLWP_INTRO'] = 'Löscht alle Dateien im Webverzeichnis und die Datenbank <em>IhrBenutzername</em>_wp.';
$lang['F_UNINSTALLWP_INTRO_WARN'] = 'DIESE AKTION KANN NICHT RÜCKGÄNGIG GEMACHT WERDEN! ALLE BEITRÄGE, SEITEN UND EINSTELLUNGEN WERDEN GELÖSCHT!';
$lang['F_UNINSTALLWP_CONF'] = 'Ja, ich bin wirklich sicher, dass ich WordPress vollständig entfernen möchte';

// FUNCTION TEMPLATES
$lang['FT_USER'] = 'Benutzername';
$lang['FT_PASS'] = 'Passwort';
$lang['FT_NEWPASS'] = 'Neues Passwort';


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

@@ -0,0 +1,89 @@
<?php

$lang = array();

// GENERAL
$lang['LANG'] = 'en-GB';
$lang['LANG_EN'] = 'English';
$lang['LANG_DE'] = 'Deutsch';
$lang['JS_WARN'] = 'Please activate JavaScript in your webbrowser. This panel will not work without activated JavaScript.';
$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.';


/////////////
// SUBMIT.PHP
/////////////

$lang['S_INTRO'] = 'Results';
$lang['S_BACK1'] = '&#171; GO BACK';
$lang['S_BACK2'] = 'to main administration page';
$lang['S_CHECKERR'] = 'You did not hit the necessary checkbox. Aborting.';
$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.';


/////////////
// INDEX.PHP
/////////////

$lang['INTRO'] = 'You have following options:';

// SECTION GENERAL
$lang['SEC_GENERAL'] = 'General';

$lang['F_VIEWDATA'] = 'View the data sheet';
$lang['F_VIEWDATA_INTRO'] = 'View the data sheet with all usernames and passwords.';
$lang['F_VIEWDATA_INTRO_WARN'] = 'Please keep this document secure!';

$lang['F_QUOTA'] = 'Show used disk space';
$lang['F_QUOTA_INTRO'] = 'Shows used and free disk space on your webhost. This sums up all
used space by emails, websites and databases.';

// SECTION EMAIL
$lang['SEC_EMAIL'] = 'Email accounts';

$lang['F_ADDUSER'] = 'Add a new email';
$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.';

$lang['F_ADDALIAS'] = 'Add an email redirection';
$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")';
$lang['F_ADDALIAS_ALIAS'] = 'Alias name:';
$lang['F_ADDALIAS_DEST'] = 'Destination account:';

$lang['F_CHANGEPW'] = 'Change email password';
$lang['F_CHANGEPW_INTRO'] = 'Enables you to change the email password of a single account.';

$lang['F_LISTUSERS'] = 'List all email accounts';
$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.';

$lang['F_SIZEALL'] = 'Show total account sizes';
$lang['F_SIZEALL_INTRO'] = 'Shows total size of every active email account on your webhost.';

$lang['F_SIZEUSER'] = 'Show detailed account size';
$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.';

$lang['F_USERDETAIL'] = 'Show detailed account info';
$lang['F_USERDETAIL_INTRO'] = 'Show various information about a single email account.';

$lang['F_DELUSER'] = 'Delete an email account';
$lang['F_DELUSER_INTRO'] = 'Deletes an email account and all its emails. ';
$lang['F_DELUSER_INTRO_WARN'] = 'THIS OPERATION CANNOT BE UNDONE! ALL EMAILS OF THIS ACCOUNT WILL BE REMOVED!';
$lang['F_DELUSER_CONF'] = 'Yes, I am really sure that I want to delete this account';

// SECTION WEB
$lang['SEC_WEB'] = 'Web Applications';

$lang['F_INSTALLWP'] = 'Install WordPress automatically';
$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.';
$lang['F_INSTALLWP_USER'] = 'Desired WordPress login name:';
$lang['F_INSTALLWP_MAIL'] = 'Your full email address:';

$lang['F_UNINSTALLWP'] = 'Uninstall WordPress';
$lang['F_UNINSTALLWP_INTRO'] = 'Deletes all files in your webdirectory and the database <em>YourUsername</em>_wp.';
$lang['F_UNINSTALLWP_INTRO_WARN'] = 'THIS OPERATION CANNOT BE UNDONE! ALL POSTS, PAGES AND SETTINGS WILL BE REMOVED!';
$lang['F_UNINSTALLWP_CONF'] = 'Yes, I am really sure that I want to uninstall WordPress completely';

// FUNCTION TEMPLATES
$lang['FT_USER'] = 'Username';
$lang['FT_PASS'] = 'Password';
$lang['FT_NEWPASS'] = 'New Password';


+ 9
- 10
submit.php View File

@@ -1,16 +1,17 @@
<?php include_once 'lang.php'; ?>
<!DOCTYPE html>
<html lang="en-GB">
<html lang="<?php echo $lang['LANG']; ?>">
<head>
<meta charset="utf-8">
<title>UAAP | Results</title>
<title>UAAP | <?php echo $lang['S_INTRO']; ?></title>
<link rel='stylesheet' href='/static/style.css' type='text/css' media='all' />
</head>
<body>
<div class="wrapper">

<h1>Results</h1>
<h1><?php echo $lang['S_INTRO']; ?></h1>

<p><strong><a href="/">&#171; GO BACK</a></strong> to main administration page</p>
<p><strong><a href="/"><?php echo $lang['S_BACK1']; ?></a></strong> <?php echo $lang['S_BACK2']; ?></p>

<table class="boxed"><tr><td>

@@ -19,7 +20,7 @@
$ACTION = $_POST['action'];
$USER = isset($_POST['user']) ? $_POST['user'] : ''; // surpress empty variable errors
$PASS = isset($_POST['pass']) ? $_POST['pass'] : '';
$SURE = $_POST['sure'];
$SURE = isset($_POST['sure']) ? $_POST['sure'] : '';

// Sanitize variables
$ACTION = escapeshellarg($ACTION);
@@ -42,7 +43,7 @@ if($SURE == "yes")
}
else
{
echo "You did not hit the necessary checkbox. Aborting.";
echo $lang['S_CHECKERR'];
}

// Delete passfile
@@ -52,13 +53,11 @@ unlink($PASSFILE);

</td></tr></table>

<p>In case of errors, please check all input data again.<br />
If the problem still exists, please contact us and add the error message.</p>
<p><?php echo $lang['S_MESSAGE']; ?></p>

</div> <!-- /wrapper -->
<div class="footer">
<p>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.</p>
<p><?php echo $lang['FOOTER']; ?></p>
</div>

</body>


Loading…
Cancel
Save