26 require_once(
"../class/config.php");
27 include_once(
"head.php");
30 "mail_id" =>array (
"request",
"integer",
""),
31 "pass" => array (
"post",
"string",
""),
32 "passconf" => array(
"post",
"string",
""),
33 "quotamb" => array(
"post",
"integer",0),
34 "enabled" => array(
"post",
"boolean",
true),
35 "islocal" => array(
"post",
"boolean",
true),
36 "recipients" => array(
"post",
"string",
""),
41 include(
"mail_list.php");
48 if ($islocal && $mailbox_action==
"DELETE") $islocal=
false;
53 <h3><?php printf(_(
"Editing the email %s"),
$res[
"address"].
"@".
$res[
"domain"]); ?></h3>
59 $c=$admin->listPasswordPolicies();
62 echo
$msg->msg_html_all();
65 <form action=
"mail_doedit.php" method=
"post" name=
"main" id=
"main" autocomplete=
"off">
67 <!-- honeypot fields -->
68 <input type=
"text" style=
"display: none" id=
"fakeUsername" name=
"fakeUsername" value=
"" />
69 <input type=
"password" style=
"display: none" id=
"fakePassword" name=
"fakePassword" value=
"" />
71 <input type=
"hidden" name=
"mail_id" value=
"<?php ehe($mail_id); ?>" />
72 <input type=
"hidden" name=
"new_account" value=
"<?php echo isset($new_account)?$new_account:false;?>" />
74 <tr><th colspan=
"2"><b><?php
__(
"Is this email enabled?"); ?></b></th></tr>
76 <tr><td style=
"width: 50%; text-align: justify"><?php
__(
"You can enable or disable this email anytime. This will bounce any mail received on this address, but will not delete the stored email, or the redirections or password."); ?><br />
80 <input type=
"radio" name=
"enabled" id=
"enabled0" class=
"inc" value=
"0"<?php
cbox($enabled==0); ?> /><label
for=
"enabled0"><?php
__(
"No (email disabled)"); ?></label>
81 <input type=
"radio" name=
"enabled" id=
"enabled1" class=
"inc" value=
"1"<?php
cbox($enabled==1); ?> /><label
for=
"enabled1"><?php
__(
"Yes (email enabled)"); ?></label>
85 <tr><th colspan=
"2"><b><?php
__(
"Is it a POP/IMAP account?"); ?></b></th></tr>
86 <tr><td style=
"width: 50%; text-align: justify"><?php
__(
"POP/IMAP accounts are receiving emails in the server. To read those emails, you can use a Webmail, or a mail client such as Thunderbird. If you don't use POP/IMAP, you can configure your email to be a redirection to other existing emails. The maximum size is in megabytes, use 0 to make it infinite."); ?><br />
88 <?php
if ($islocal) { ?>
89 <p><?php printf(_(
'This mailbox is currently using %1$s / %2$s'),
format_size($used),
format_size($quotabytes)); ?></p>
91 <?php
if ($mailbox_action==
"DELETE") { ?>
92 <p
class=
"alert alert-warning"><?php
__(
"This mailbox is pending deletion. You can recover its mails by setting it to 'Yes' NOW!"); ?></p>
97 <input type=
"radio" name=
"islocal" id=
"islocal0" class=
"inc" value=
"0"<?php !isset(
$new_account)?
cbox($islocal==0):
""; ?> onclick=
"popoff()" /><label
for=
"islocal0"><?php
__(
"No"); ?></label>
98 <input type=
"radio" name=
"islocal" id=
"islocal1" class=
"inc" value=
"1"<?php !isset(
$new_account)?
cbox($islocal==1):
cbox($islocal==0); ?> onclick=
"popon();" /><label
for=
"islocal1"><?php
__(
"Yes"); ?></label>
101 <table
class=
"tedit" >
102 <tr
id=
'mail_edit_pass' style=
'display: none;'><td colspan=
'2'><a href=
'javascript:mail_edit_pass();'><?php
__(
"Click here to edit the existing password");?></a></td></tr>
104 <tr
id=
'mail_edit_pass2'><td><label
for=
"passconf"><?php
__(
"Confirm password"); ?></label></td><td><input type=
"password" class=
"int" autocomplete=
"off" name=
"passconf" id=
"passconf" value=
"" size=
"20" maxlength=
"32" /></td></tr>
105 <tr><td><label
for=
"quotamb"><?php
__(
"Maximum allowed size of this Mailbox"); ?></label></td><td><input type=
"text" class=
"int intleft" style=
"text-align: right" name=
"quotamb" id=
"quotamb" value=
"<?php ehe($quotamb); ?>" size=
"7" maxlength=
"6" /><span
class=
"int intright"><?php
__(
"MB"); ?></span></td></tr>
109 <?php
if ($islocal) { ?>
110 <tr
id=
"turnoff" style=
"display: none;"><td colspan=
"2" class=
"alert alert-warning"><?php
__(
"WARNING: turning POP/IMAP off will DELETE the stored messages in this email address."); ?></td></tr>
112 <tr><th colspan=
"2"><b><?php
__(
"Is it a redirection to other email addresses?"); ?></b></th></tr>
114 <tr><td style=
"width: 50%; text-align: justify"><label
for=
"recipients"><?php
__(
"If you want to send emails received on this address to other addresses, even outside this server, enter those recipients here."); ?></label></td><td>(<?php
__(
"one recipient per line"); ?>)<br /><textarea
class=
"int" cols=
"32" rows=
"5" name=
"recipients" id=
"recipients"><?php echo
$recipients; ?></textarea></td></tr>
118 foreach(
$html as $h) echo $h;
121 <tr
class=
"trbtn"><td colspan=
"2">
122 <input type=
"submit" class=
"inb ok" name=
"submit" value=
"<?php __("Change
this email address
"); ?>" />
123 <input type=
"button" class=
"inb cancel" name=
"cancel" value=
"<?php __("Cancel
"); ?>" onclick=
"window.history.go(-1);"/>
131 <script type=
"text/javascript">
134 $(
'#turnoff').show();
135 $(
'#poptbl').addClass(
'grey');
136 $(
'#pass').attr(
"disabled",
"disabled");
137 $(
'#quotamb').attr(
"disabled",
"disabled");
138 $(
'#passconf').attr(
"disabled",
"disabled");
141 $(
'#turnoff').hide();
142 $(
'#poptbl').removeClass(
'grey');
143 $(
'#pass').removeAttr(
"disabled");
144 $(
'#quotamb').removeAttr(
"disabled");
145 $(
'#passconf').removeAttr(
"disabled");
148 function mail_edit_pass() {
149 $(
'#mail_edit_pass').toggle();
150 $(
'#mail_edit_pass1').toggle();
151 $(
'#mail_edit_pass2').toggle();
157 echo
'<script type="text/javascript">mail_edit_pass();</script>';
160 include_once(
"foot.php");
const DEFAULT_PASS_SIZE
Define constants from vars of /etc/alternc/local.sh The you can't choose where is the AlternC Panel.
display_div_generate_password($pass_size=DEFAULT_PASS_SIZE, $fields_to_fill1="", $fields_to_fill2="", $classcount=3)
Show a button to set a random password for a password field.
format_size($size, $html=0)
cbox($test, $echo=true)
ECHOes checked="checked" only if the parameter is true useful for checkboxes and radio buttons.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
$fields
Form to edit a mailbox parameters.
if(empty($_POST['key'])||empty($_POST['val'])) $key