Enables Uberspace users to administrate some functions via a very simple web panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. <?php
  2. /***********************************************************************
  3. * Copyright (C) 2016 Max Mehl <mail [at] mehl [dot] mx>
  4. ************************************************************************
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public
  17. * License along with this program. If not, see
  18. * <http://www.gnu.org/licenses/>.
  19. *
  20. ************************************************************************
  21. *
  22. * This file is the index file for the whole application. It shows the
  23. * various forms and passes the users' inputs to submit.php
  24. *
  25. ***********************************************************************/
  26. ?>
  27. <?php include_once 'lang.php'; ?>
  28. <!DOCTYPE html>
  29. <html lang="<?php echo $lang['LANG']; ?>">
  30. <head>
  31. <meta charset="utf-8">
  32. <title>UAAP | Uberspace Account Administration Panel</title>
  33. <link rel='stylesheet' href='/static/style.css' type='text/css' media='all' />
  34. <script src="/static/click_toggle.js" type="text/javascript"></script>
  35. </head>
  36. <body>
  37. <div class="wrapper">
  38. <h1>Account Administration Panel</h1>
  39. <noscript><span class="warn"><?php echo $lang['JS_WARN']; ?></span></noscript>
  40. <h4><?php echo $lang['INTRO']; ?></h4>
  41. <div id="gallery">
  42. <!--
  43. GENERAL SECTION
  44. -->
  45. <p><strong><?php echo $lang['SEC_GENERAL']; ?></strong></p>
  46. <!-- VIEWDATA - View datasheet of whole account -->
  47. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_VIEWDATA']; ?></b>
  48. <div class="hide">
  49. <p><?php echo $lang['F_VIEWDATA_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_VIEWDATA_INTRO_WARN']; ?></span></p>
  50. <form action="submit.php" method="post">
  51. <button type="submit" name="action" value="viewdata"><?php echo $lang['F_VIEWDATA']; ?></button>
  52. <!-- Hidden confirmation box -->
  53. <input type="hidden" name="sure" value="yes" />
  54. </form>
  55. </div> <!-- /hide -->
  56. <!-- QUOTA - Show free and used disk space an whole account -->
  57. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_QUOTA']; ?></b>
  58. <div class="hide">
  59. <p><?php echo $lang['F_QUOTA_INTRO']; ?></p>
  60. <form action="submit.php" method="post">
  61. <button type="submit" name="action" value="quota"><?php echo $lang['F_QUOTA']; ?></button>
  62. <!-- Hidden confirmation box -->
  63. <input type="hidden" name="sure" value="yes" />
  64. </form>
  65. </div> <!-- /hide -->
  66. <!--
  67. EMAIL SECTION
  68. -->
  69. <p><strong><?php echo $lang['SEC_EMAIL']; ?></strong></p>
  70. <!-- ADDUSER - Add a new email account -->
  71. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_ADDUSER']; ?></b>
  72. <div class="hide">
  73. <p><?php echo $lang['F_ADDUSER_INTRO']; ?></p>
  74. <form action="submit.php" method="post">
  75. <label><?php echo $lang['FT_USER']; ?>:</label>
  76. <input name="user" title="User" />
  77. <label><?php echo $lang['FT_PASS']; ?>:</label>
  78. <input name="pass" title="Password" type="password" />
  79. <br />
  80. <button type="submit" name="action" value="adduser"><?php echo $lang['F_ADDUSER']; ?></button>
  81. <!-- Hidden confirmation box -->
  82. <input type="hidden" name="sure" value="yes" />
  83. </form>
  84. </div> <!-- /hide -->
  85. <!-- ADDALIAS - Add a new email redirection -->
  86. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_ADDALIAS']; ?></b>
  87. <div class="hide">
  88. <p><?php echo $lang['F_ADDALIAS_INTRO']; ?></p>
  89. <form action="submit.php" method="post">
  90. <label><?php echo $lang['F_ADDALIAS_ALIAS']; ?></label>
  91. <input name="user" title="Alias" />
  92. <label><?php echo $lang['F_ADDALIAS_DEST']; ?></label>
  93. <input name="pass" title="Destination" />
  94. <br />
  95. <button type="submit" name="action" value="addalias"><?php echo $lang['F_ADDALIAS']; ?></button>
  96. <!-- Hidden confirmation box -->
  97. <input type="hidden" name="sure" value="yes" />
  98. </form>
  99. </div> <!-- /hide -->
  100. <!-- CHANGEPW - Change password of an email account -->
  101. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_CHANGEPW']; ?></b>
  102. <div class="hide">
  103. <p><?php echo $lang['F_CHANGEPW_INTRO']; ?></p>
  104. <form action="submit.php" method="post">
  105. <label><?php echo $lang['FT_USER']; ?>:</label>
  106. <input name="user" title="User" />
  107. <label><?php echo $lang['FT_NEWPASS']; ?>:</label>
  108. <input name="pass" title="Password" type="password" />
  109. <br />
  110. <button type="submit" name="action" value="changepw"><?php echo $lang['F_CHANGEPW']; ?></button>
  111. <!-- Hidden confirmation box -->
  112. <input type="hidden" name="sure" value="yes" />
  113. </form>
  114. </div> <!-- /hide -->
  115. <!-- LISTUSERS - List all email accounts -->
  116. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_LISTUSERS']; ?></b>
  117. <div class="hide">
  118. <p><?php echo $lang['F_LISTUSERS_INTRO']; ?></p>
  119. <form action="submit.php" method="post">
  120. <button type="submit" name="action" value="listusers"><?php echo $lang['F_LISTUSERS']; ?></button>
  121. <!-- Hidden confirmation box -->
  122. <input type="hidden" name="sure" value="yes" />
  123. </form>
  124. </div> <!-- /hide -->
  125. <!-- SIZEALL - Show total sizes of all email accounts -->
  126. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_SIZEALL']; ?></b>
  127. <div class="hide">
  128. <p><?php echo $lang['F_SIZEALL_INTRO']; ?></p>
  129. <form action="submit.php" method="post">
  130. <button type="submit" name="action" value="sizeall"><?php echo $lang['F_SIZEALL']; ?></button>
  131. <!-- Hidden confirmation box -->
  132. <input type="hidden" name="sure" value="yes" />
  133. </form>
  134. </div> <!-- /hide -->
  135. <!-- SIZEUSER - Show size of every folder of a single email account -->
  136. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_SIZEUSER']; ?></b>
  137. <div class="hide">
  138. <p><?php echo $lang['F_SIZEUSER_INTRO']; ?></p>
  139. <form action="submit.php" method="post">
  140. <label><?php echo $lang['FT_USER']; ?>:</label>
  141. <input name="user" title="User" />
  142. <br />
  143. <button type="submit" name="action" value="sizeuser"><?php echo $lang['F_SIZEUSER']; ?></button>
  144. <!-- Hidden confirmation box -->
  145. <input type="hidden" name="sure" value="yes" />
  146. </form>
  147. </div> <!-- /hide -->
  148. <!-- USERDETAIL - Detailed info about a single email account -->
  149. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_USERDETAIL']; ?></b>
  150. <div class="hide">
  151. <p><?php echo $lang['F_USERDETAIL_INTRO']; ?></p>
  152. <form action="submit.php" method="post">
  153. <label><?php echo $lang['FT_USER']; ?>:</label>
  154. <input name="user" title="User" />
  155. <br />
  156. <button type="submit" name="action" value="userdetail"><?php echo $lang['F_USERDETAIL']; ?></button>
  157. <!-- Hidden confirmation box -->
  158. <input type="hidden" name="sure" value="yes" />
  159. </form>
  160. </div> <!-- /hide -->
  161. <!-- DELUSER - Delete an email account -->
  162. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_DELUSER']; ?></b>
  163. <div class="hide">
  164. <p><?php echo $lang['F_DELUSER_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_DELUSER_INTRO_WARN']; ?></span></p>
  165. <form action="submit.php" method="post">
  166. <label><?php echo $lang['FT_USER']; ?>:</label>
  167. <input name="user" title="User" />
  168. <br />
  169. <label for="sure">
  170. <input type="checkbox" name="sure" value="yes" id="sure"><?php echo $lang['F_DELUSER_CONF']; ?>
  171. </label>
  172. <button type="submit" name="action" value="deluser"><?php echo $lang['F_DELUSER']; ?></button>
  173. </form>
  174. </div> <!-- /hide -->
  175. <!--
  176. WEB SECTION
  177. -->
  178. <p><strong><?php echo $lang['SEC_WEB']; ?></strong></p>
  179. <!-- INSTALLWP - Install an empty WordPress -->
  180. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_INSTALLWP']; ?></b>
  181. <div class="hide">
  182. <p><?php echo $lang['F_INSTALLWP_INTRO']; ?></p>
  183. <form action="submit.php" method="post">
  184. <label><?php echo $lang['F_INSTALLWP_USER']; ?></label>
  185. <input name="user" title="WordPress Login" />
  186. <label><?php echo $lang['F_INSTALLWP_MAIL']; ?></label>
  187. <input name="pass" title="Email address" />
  188. <br />
  189. <button type="submit" name="action" value="installwp"><?php echo $lang['F_INSTALLWP']; ?></button>
  190. <!-- Hidden confirmation box -->
  191. <input type="hidden" name="sure" value="yes" />
  192. </form>
  193. </div> <!-- /hide -->
  194. <!-- UNINSTALLWP - Uninstall WordPress -->
  195. <b class="switch"><span class="turn_on">&#187; </span><span class="turn_off">&#171; </span><?php echo $lang['F_UNINSTALLWP']; ?></b>
  196. <div class="hide">
  197. <p><?php echo $lang['F_UNINSTALLWP_INTRO']; ?><br /><span class="warn"><?php echo $lang['F_UNINSTALLWP_INTRO_WARN']; ?></span></p>
  198. <form action="submit.php" method="post">
  199. <label for="sure">
  200. <input type="checkbox" name="sure" value="yes" id="sure"><?php echo $lang['F_UNINSTALLWP_CONF']; ?>
  201. </label>
  202. <button type="submit" name="action" value="uninstallwp"><?php echo $lang['F_UNINSTALLWP']; ?></button>
  203. </form>
  204. </div> <!-- /hide -->
  205. </div> <!-- /gallery -->
  206. <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>
  207. </div> <!-- /wrapper -->
  208. <div class="footer">
  209. <p><?php echo $lang['FOOTER']; ?></p>
  210. </div> <!-- footer -->
  211. </body>
  212. </html>