root/alternc/trunk/bureau/admin/adm_mxaccount.php

Revision 1653, 3.5 kB (checked in by benjamin, 3 years ago)

new translations + secondarymx management

Line 
1 <?php
2 /*
3  $Id: adm_mxacount.php,v 1.2 2006/02/17 18:57:02 olivier Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  GNU General Public License for more details.
23
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Benjamin Sonntag
27  Purpose of file: Manage list of allowed accounts for secondary mx
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31
32 if (!$admin->enabled) {
33     __("This page is restricted to authorized staff");
34     exit();
35 }
36
37 if ($delaccount) {
38     // Delete an account
39     if ($mail->del_slave_account($delaccount)) {
40         $error=_("The requested account has been deleted. It is now denied.");
41     }
42 }
43 if ($newlogin) {
44     // Add an account
45     if ($mail->add_slave_account($newlogin,$newpass)) {
46         $error=_("The requested account address has been created. It is now allowed.");
47         unset($newlogin); unset($newpass);
48     }
49 }
50
51 include("head.php");
52 ?>
53 </head>
54 <body>
55 <h3><?php __("Manage allowed accounts for secondary mx"); ?></h3>
56 <?php
57     if ($error) {
58       echo "<p class=\"error\">$error</p>";
59     }
60
61 $c=$mail->enum_slave_account();
62
63 if (is_array($c)) {
64
65 ?>
66 <p>
67 <?php __("Here is the list of the allowed accounts for secondary mx management. You can configure the alternc-secondarymx package on your secondary mx server and give him the login/pass that will grant him access to your server's mx-hosted domain list. "); ?>
68 </p>
69
70 <table border="0" cellpadding="4" cellspacing="0">
71 <tr><th><?php __("Action"); ?></th><th><?php __("Login"); ?></th><th><?php __("Password"); ?></th></tr>
72 <?php
73 $col=1;
74 for($i=0;$i<count($c);$i++) {
75  $col=3-$col;
76 ?>
77
78 <tr class="lst<?php echo $col; ?>">
79 <td><a href="adm_mxaccount.php?delaccount=<?php echo urlencode($c[$i]["login"]); ?>"><?php __("Delete"); ?></a></td>
80 <td><?php echo $c[$i]["login"]; ?></td>
81 <td><?php echo $c[$i]["pass"]; ?></td>
82 </tr>
83 <?php
84 }
85 ?>
86 </table>
87     <?php } ?>
88 <p><?php __("If you want to allow a new server to access your mx-hosted domain list, give him an account."); ?></p>
89 <form method="post" action="adm_mxaccount.php">
90 <table border="0" cellpadding="4" cellspacing="0">
91 <tr><th><label for="newlogin"><?php __("Login"); ?></label></th><th><label for="newpass"><?php __("Password"); ?></label></th></tr>
92 <tr>
93     <td><input type="text" class="int" value="<?php echo urlencode($newlogin); ?>" id="newlogin" name="newlogin" maxlength="64" size="32" /> / </td>
94     <td><input type="password" class="int" value="<?php echo urlencode($newpass); ?>" id="newpass" name="newpass" maxlength="64" size="32" /></td>
95 </tr>
96 <tr><td colspan="2">
97     <input type="submit" value="<?php __("Add this account to the allowed list"); ?>" class="inb" />
98 </table>
99
100 </form>
101 </body>
102 </html>
103
Note: See TracBrowser for help on using the browser.