236 lines
10 KiB
PHP
236 lines
10 KiB
PHP
<?php
|
|
/***********************************************************************
|
|
* Copyright (C) 2016 Max Mehl <mail [at] mehl [dot] mx>
|
|
************************************************************************
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as
|
|
* published by the Free Software Foundation, either version 3 of the
|
|
* License, or (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public
|
|
* License along with this program. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
************************************************************************
|
|
*
|
|
* This file is the index file for the whole application. It shows the
|
|
* various forms and passes the users' inputs to submit.php
|
|
*
|
|
***********************************************************************/
|
|
?>
|
|
<?php include_once 'lang.php'; ?>
|
|
<!DOCTYPE html>
|
|
<html lang="<?php echo $lang['LANG']; ?>">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>UAAP | Uberspace Account Administration Panel</title>
|
|
<link rel='stylesheet' href='/static/style.css' type='text/css' media='all' />
|
|
<script src="/static/click_toggle.js" type="text/javascript"></script>
|
|
</head>
|
|
<body>
|
|
<div class="wrapper">
|
|
|
|
<h1>Account Administration Panel</h1>
|
|
|
|
<noscript><span class="warn"><?php echo $lang['JS_WARN']; ?></span></noscript>
|
|
|
|
<h4><?php echo $lang['INTRO']; ?></h4>
|
|
|
|
<div id="gallery">
|
|
<!--
|
|
GENERAL SECTION
|
|
-->
|
|
|
|
<p><strong><?php echo $lang['SEC_GENERAL']; ?></strong></p>
|
|
<!-- VIEWDATA - View datasheet of whole account -->
|
|
<b class="switch"><span class="turn_on">» </span><span class="turn_off">« </span><?php echo $lang['F_VIEWDATA']; ?></b>
|
|
<div class="hide">
|
|
<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"><?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">» </span><span class="turn_off">« </span><?php echo $lang['F_QUOTA']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_QUOTA_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<button type="submit" name="action" value="quota"><?php echo $lang['F_QUOTA']; ?></button>
|
|
<!-- Hidden confirmation box -->
|
|
<input type="hidden" name="sure" value="yes" />
|
|
</form>
|
|
</div> <!-- /hide -->
|
|
|
|
<!--
|
|
EMAIL SECTION
|
|
-->
|
|
|
|
<p><strong><?php echo $lang['SEC_EMAIL']; ?></strong></p>
|
|
<!-- ADDUSER - Add a new email account -->
|
|
<b class="switch"><span class="turn_on">» </span><span class="turn_off">« </span><?php echo $lang['F_ADDUSER']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_ADDUSER_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<label><?php echo $lang['FT_USER']; ?>:</label>
|
|
<input name="user" title="User" />
|
|
<label><?php echo $lang['FT_PASS']; ?>:</label>
|
|
<input name="pass" title="Password" type="password" />
|
|
<br />
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_ADDALIAS']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_ADDALIAS_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<label><?php echo $lang['F_ADDALIAS_ALIAS']; ?></label>
|
|
<input name="user" title="Alias" />
|
|
<label><?php echo $lang['F_ADDALIAS_DEST']; ?></label>
|
|
<input name="pass" title="Destination" />
|
|
<br />
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_CHANGEPW']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_CHANGEPW_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<label><?php echo $lang['FT_USER']; ?>:</label>
|
|
<input name="user" title="User" />
|
|
<label><?php echo $lang['FT_NEWPASS']; ?>:</label>
|
|
<input name="pass" title="Password" type="password" />
|
|
<br />
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_LISTUSERS']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_LISTUSERS_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_SIZEALL']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_SIZEALL_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_SIZEUSER']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_SIZEUSER_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<label><?php echo $lang['FT_USER']; ?>:</label>
|
|
<input name="user" title="User" />
|
|
<br />
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_USERDETAIL']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_USERDETAIL_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<label><?php echo $lang['FT_USER']; ?>:</label>
|
|
<input name="user" title="User" />
|
|
<br />
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_DELUSER']; ?></b>
|
|
<div class="hide">
|
|
<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><?php echo $lang['FT_USER']; ?>:</label>
|
|
<input name="user" title="User" />
|
|
<br />
|
|
<label for="sure">
|
|
<input type="checkbox" name="sure" value="yes" id="sure"><?php echo $lang['F_DELUSER_CONF']; ?>
|
|
</label>
|
|
<button type="submit" name="action" value="deluser"><?php echo $lang['F_DELUSER']; ?></button>
|
|
</form>
|
|
</div> <!-- /hide -->
|
|
|
|
<!--
|
|
WEB SECTION
|
|
-->
|
|
|
|
<p><strong><?php echo $lang['SEC_WEB']; ?></strong></p>
|
|
<!-- INSTALLWP - Install an empty WordPress -->
|
|
<b class="switch"><span class="turn_on">» </span><span class="turn_off">« </span><?php echo $lang['F_INSTALLWP']; ?></b>
|
|
<div class="hide">
|
|
<p><?php echo $lang['F_INSTALLWP_INTRO']; ?></p>
|
|
<form action="submit.php" method="post">
|
|
<label><?php echo $lang['F_INSTALLWP_USER']; ?></label>
|
|
<input name="user" title="WordPress Login" />
|
|
<label><?php echo $lang['F_INSTALLWP_MAIL']; ?></label>
|
|
<input name="pass" title="Email address" />
|
|
<br />
|
|
<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">» </span><span class="turn_off">« </span><?php echo $lang['F_UNINSTALLWP']; ?></b>
|
|
<div class="hide">
|
|
<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"><?php echo $lang['F_UNINSTALLWP_CONF']; ?>
|
|
</label>
|
|
<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><?php echo $lang['FOOTER']; ?></p>
|
|
</div> <!-- footer -->
|
|
|
|
</body>
|
|
</html>
|