source: alternc/trunk/bureau/admin/mail_add.php @ 2890

Revision 2890, 4.2 KB checked in by benjamin, 2 years ago (diff)

mise en forme bien meilleure du systeme de mail temporaire. Remplacement par un radio 'est-ce un email temporaire' OUI/NON

Line 
1<?php
2/*
3 $Id: mail_add.php,v 1.6 2006/01/12 01:10:48 anarcat 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, Franck Missoum
27 Purpose of file: Ask for the values required to create a mail account
28         or a mail alias
29 ----------------------------------------------------------------------
30*/
31require_once("../class/config.php");
32include_once("head.php");
33
34$fields = array (
35        "domain"    => array ("request", "string", ""),
36        "dst_mail"  => array ("request", "string", ""),
37        "many"      => array ("request", "integer", 0),
38        "pop"       => array ("request", "integer", 1),
39);
40getFields($fields);
41
42?>
43<h3><?php printf(_("Add a mail to the domain %s"),$domain); ?> : </h3>
44<?php
45if ($error) {
46  echo "<p class=\"error\">$error</p>";
47}
48
49// If a dst email is indicated, it's for an alias
50// So we desactivate pop by default
51if (!empty($dst_mail)) $pop=0;
52
53?>
54<hr id="topbar"/>
55<br />
56<form action="mail_doadd.php" method="post" name="main" id="main">
57  <input type="hidden" name="domain" value="<?php echo $domain; ?>" />
58 <table class="tedit">
59<tr><td>
60  <label for="email"><?php __("Email address"); ?></label></td><td><input class="int" type="text" name="email" id="email" value="<?php ehe($email); ?>" size="20" maxlength="32" /><span class="int" id="emaildom">@ <?php echo $domain ?></span>
61  </td></tr>
62 <tr><td><label for="pop"><?php __("Is it a POP/IMAP account?"); ?></label></td>
63<td>
64<p>
65 <input type="radio" name="pop" id="pop0" class="inc" value="0"<?php cbox($pop==0); ?> onclick="hide('poptbl');"><label for="pop0"><?php __("No"); ?></label>
66 <input type="radio" name="pop" id="pop1" class="inc" value="1"<?php cbox($pop==1); ?> onclick="show('poptbl');"><label for="pop1"><?php __("Yes"); ?></label>
67</p>
68<div id="poptbl">
69<table class="tedit" >
70        <tr><td><label for="pass"><?php __("POP/IMAP password"); ?></label></td><td><input type="password" class="int" name="pass" id="pass" value="<?php ehe($pass); ?>" size="20" maxlength="32" /></td></tr>
71        <tr><td><label for="passconf"><?php __("Confirm password"); ?></label></td><td><input type="password" class="int" name="passconf" id="passconf" value="<?php echo $pass; ?>" size="20" maxlength="32" /></td></tr>
72</table>
73</div>
74</td></tr>
75
76    <tr><td><label for="alias"><?php __("Redirections<br />Other recipients:"); ?></label></td><td>(<?php __("one email per line"); ?>)<br /><textarea class="int" cols="32" rows="5" name="alias" id="alias"><?php echo $alias; echo ((empty($alias) && !empty($dst_mail))?"":"\n").$dst_mail; ?></textarea></td></tr>
77<tr><td>
78   <?php echo __("Is it a temporary mail account?"); ?><br/>
79</td><td>
80    <?php include_once("trash_dateselect.php"); ?>
81</td></tr>
82<tr class="trbtn"><td colspan="2">
83<input type="hidden" name="many" value="<?php echo intval($many); ?>" />
84  <input type="submit" class="inb" name="submit" value="<?php __("Create this email address"); ?>" />
85  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='mail_list.php?domain=<?php echo urlencode($domain); ?>'"/>
86</td></tr>
87</table>
88</form>
89
90<p><small>
91<?php __("help_mail_add"); ?>
92</small></p>
93<script type="text/javascript">
94document.forms['main'].email.focus();
95document.forms['main'].setAttribute('autocomplete', 'off');
96</script>
97<?php include_once("foot.php");
Note: See TracBrowser for help on using the repository browser.