26 require_once(
"../class/config.php");
27 include_once(
"head.php");
30 "mail_arg" => array (
"request",
"integer",
""),
31 "domain_id" => array (
"request",
"integer",
""),
32 "show_systemmails" => array (
"request",
"integer",
""),
33 "search" => array (
"request",
"string",
""),
34 "offset" => array (
"request",
"integer", 0),
35 "count" => array (
"request",
"integer", 50),
40 $counts=array(
"10" =>
"10",
"20" =>
"20",
"30" =>
"30",
"50" =>
"50",
"100" =>
"100",
"200" =>
"200",
"500" =>
"500",
"1000" =>
"1000");
50 if(!($mails_list = $mail->enum_domain_mails($domain_id,$search,$offset,$count,$show_systemmails)) && $search) {
53 $allmails_list = $mail->enum_domain_mails($domain_id,$search,$offset,$count,
'true');
60 echo
"<div class=\"alert alert-danger\">$error</div>";
63 if (!empty(
$error)) { echo
"<p class='alert alert-danger'>$error</p>"; }
69 <?php
if ($quota->cancreate(
"mail")) {
70 echo
'<h3>'._(
"Create a new mail account").
"</h3>";
72 echo
'<h3>'._(
"Manage Catch-all").
"</h3>";
78 <?php
if ($quota->cancreate(
"mail")) { ?>
79 <form method=
"post" action=
"mail_doadd.php" id=
"main" name=
"mail_create">
80 <input type=
"text" class=
"int intleft" style=
"text-align: right" name=
"mail_arg" value=
"<?php ehe($mail_arg); ?>" size=
"32" id=
"mail_arg" maxlength=
"255" /><span
id=
"emaildom" class=
"int intright"><?php echo
"@".$domain; ?></span>
81 <input type=
"hidden" name=
"domain_id" value=
"<?php echo $domain_id;?>" />
82 <input type=
"submit" name=
"submit" class=
"inb add" value=
"<?php __("Create
this email address
"); ?>" onClick=
"return false_if_empty('mail_arg', '<?php echo addslashes(_("Can
't have empty mail."));?>');
" />
84 <?php } // $quota->cancreate("mail
") ?>
87 <span class="inb configure
" valign='bottom'><a href="mail_manage_catchall.php?domain_id=<?php echo $domain_id?>
"><?php __("Manage Catch-all
for this domain
");?></a></span>
94 <h3><?php printf(_("Email addresses of the domain %s
"),$domain); ?> : </h3>
96 if (empty($allmails_list) && empty($search)) {
98 __("No mails
for this domain.
");
104 <table class="searchtable
"><tr><td>
105 <form method="get" name="formlist1
" id="formlist1
" action="mail_list.php
">
106 <input type="hidden
" name="domain_id
" value="<?php echo $domain_id; ?>
" />
107 <input type="hidden
" name="offset
" value="0
" />
108 <span class="int intleft
"><img alt="<?php
__(
"Search"); ?>
" title="<?php
__(
"Search"); ?>
" src="/images/search.png
" style="vertical-align: middle
"/> </span><input type="text
" name="search
" value="<?php
ehe($search); ?>
" size="20
" maxlength="64
" class="int intright
" />
110 <?php pager($offset,$count,$mail->total,"mail_list.php?domain_id=
".$domain_id."&count=
".$count."&search=
".urlencode($search)."&offset=%%offset%%
"); ?>
112 <td style="text-align:center
">
113 <input type="checkbox
" id="show_systemmails
" name="show_systemmails
" <?php if($show_systemmails) {echo "checked
";}?> value="1
"onclick="document.getElementById(
'formlist1').submit();
" /><label for="show_systemmails
" ><?php __("Show system emails
");?></label>
116 <td style="text-align:right
">
117 <form method="get" name="formlist2
" id="formlist2
" action="mail_list.php
">
118 <input type="hidden
" name="domain_id
" value="<?php echo $domain_id; ?>
" />
119 <input type="hidden
" name="offset
" value="0
" />
120 <?php __("Items per page:
"); ?> <select name="count
" class="inl
" onchange="submit()
"><?php eoption($counts,$count); ?></select>
124 <form method="post
" action="mail_del.php
">
125 <input type="hidden
" name="domain_id
" value="<?php echo $domain_id; ?>
" />
126 <table class="tlist
">
127 <tr><th></th><th></th><th><?php __("Enabled
");?></th><th style="text-align:right
"><?php __("Address
"); ?></th><th><?php __("Pop/Imap
"); ?></th><th><?php __("Other recipients
"); ?></th><th><?php __("Last login time
"); ?></th></tr>
131 //listing of every mail of the current domain.
132 if(!empty($mails_list)) {
133 while (list($key,$val)=each($mails_list)) {
137 <?php if ($val["mail_action
"]=="DELETING
") { $grey="grey
"; ?>
138 <td colspan="3
"><?php __("Deleting...
"); ?></td>
139 <?php } else if ($val["mail_action
"]=="DELETE
") { $grey="grey
"; ?>
142 <?php if ($val['type'] =='') { ?>
143 <div class="ina
"><a href="mail_undelete.php?search=<?php
ehe($search); ?>&offset=<?php
ehe($offset); ?>&count=<?php
ehe($count); ?>&domain_id=<?php
ehe($domain_id); ?>&mail_id=<?php echo
$val[
"id"] ?>
" title="<?php
__(
"This email will be deleted soon. You may still be able to undelete it by clicking here"); ?>
"><img src="images/undelete.png
" alt="<?php
__(
"Undelete"); ?>
" /><?php __("Undelete
"); ?></a></div>
144 <?php } // if val[type] ?>
146 <td><img src="images/check_no.png
" alt="<?php
__(
"Disabled"); ?>
" /></td>
147 <?php } else if (!$val["type
"]) { ?>
149 <input class="inc
" type="checkbox
" id="del_<?php echo $i; ?>
" name="d[]
" value="<?php
ehe(
$val[
"id"]); ?>
" />
151 <td class="<?php echo $grey; ?>
">
152 <div class="ina edit
"><a href="mail_edit.php?mail_id=<?php echo
$val[
"id"] ?>
"><?php __("Edit
"); ?></a></div></td>
153 <td class="<?php echo $grey; ?>
"><?php if ($val["enabled"] ) { ?>
154 <img src="images/check_ok.png
" alt="<?php
__(
"Enabled"); ?>
" />
156 <img src="images/check_no.png
" alt="<?php
__(
"Disabled"); ?>
" />
157 <?php } // if enabled ?>
160 <td colspan="3
"></td>
162 <td class="<?php echo $grey; ?>
" style="text-align:right
"><?php echo $val["address
"]."@".$domain ?></td>
163 <?php if ($val["type
"]) { ?>
164 <td colspan="3
"><?php echo $val["typedata
"]; ?></td>
166 <td class="<?php echo $grey; ?>
"><?php if ($val["islocal
"]) echo format_size($val["used
"]).( ($val["quotabytes
"]==0)?'':"/
".format_size($val["quotabytes
"])) ; else __("No
"); ?></td>
167 <td class="<?php echo $grey; ?>
"><?php echo $val["recipients
"]; /* TODO : if >60chars, use "...
" + js close/open */ ?></td>
168 <td class="<?php echo $grey; ?>
"><?php if ($val["islocal
"]) {
169 if (date("Y-m-
d")==substr($val["lastlogin
"],0,10)) echo substr($val["lastlogin
"],11,5); else if (substr($val["lastlogin
"],0,10)=="0000-00-00
") __("Never
"); else echo format_date(_('%3$d-%2$d-%1$d'),$val["lastlogin
"]);
180 <p><input type="submit
" class="inb
delete" name="submit
" value="<?php
__(
"Delete the checked email addresses"); ?>
" /></p>
184 } } // end if no mail for this domain
188 <h3><?php __("Mails configuration information
");?></h3>
190 <?php __("Here are some configuration information you will need to configure your mail application.
");?>
194 <div id="tabs-mailhelp
">
197 <li class="help
"><a href="#tabs-mailhelp-out
"><?php __("Outgoing mail (SMTP)
"); ?></a></li>
198 <li class="help
"><a href="#tabs-mailhelp-in
"><?php __("Incoming mail
"); ?></a></li>
201 <div id="tabs-mailhelp-out
">
203 <?php __("Which protocol shall you use?
"); ?>
204 <div id="accordion-mailout
">
205 <h4><?php __("Submission
");?></h4>
208 <li><b><?php __("Server name:
");?></b> <?php __($mail->srv_submission); ?></li>
209 <li><b><?php __("Username:
");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>
");?></li>
210 <li><b><?php __("Port:
");?></b> 587</li>
211 <li><b><?php __("Authentication:
");?></b><?php __("Yes
")?></li>
212 <li><b><?php __("Authentication method:
");?></b><?php __("Normal password
")?></li>
213 <li><b><?php __("Connection security:
");?></b> STARTTLS</li>
216 <h4><?php __("SMTP
");?></h4>
219 <li><b><?php __("Server name:
");?></b> <?php __($mail->srv_smtp); ?></li>
220 <li><b><?php __("Username:
");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>
");?></li>
221 <li><b><?php __("Port:
");?></b> 25</li>
222 <li><b><?php __("Authentication:
");?></b><?php __("Yes
")?></li>
223 <li><b><?php __("Authentication method:
");?></b><?php __("Normal Password
")?></li>
224 <li><b><?php __("Connection security:
");?></b> STARTTLS</li>
227 <h4><?php __("SMTPS
");?></h4>
230 <li><b><?php __("Server name:
");?></b> <?php __($mail->srv_smtps); ?></li>
231 <li><b><?php __("Username:
");?></b> <?php __("The mail address you want to access <i>(example : myuser@example.tld)</i>
");?></li>
232 <li><b><?php __("Port:
");?></b> 465</li>
233 <li><b><?php __("Authentication:
");?></b><?php __("Yes
")?></li>
234 <li><b><?php __("Authentication method:
");?></b><?php __("Normal Password
")?></li>
235 <li><b><?php __("Connection security:
");?></b> SSL</li>
238 </div><!-- accordion-mailout -->
240 </div><!-- tabs-mailhelp-out -->
242 <div id="tabs-mailhelp-in
">
244 <?php __("Which protocol shall you use?
"); ?>
245 <div id="accordion-mailin
">
246 <h4><?php __("IMAP
");?></h4>
249 <li><b><?php __("Server name:
");?></b> <?php __($mail->srv_imap); ?></li>
250 <li><b><?php __("Port:
");?></b> 143</li>
251 <li><b><?php __("Authentication:
");?></b><?php __("Yes
")?></li>
252 <li><b><?php __("Authentication method:
");?></b><?php __("Normal password
")?></li>
253 <li><b><?php __("Connection security:
");?></b> STARTTLS</li>
257 <h4><?php __("IMAPS
");?></h4>
260 <li><b><?php __("Server name:
");?></b> <?php __($mail->srv_imaps); ?></li>
261 <li><b><?php __("Port:
");?></b> 993</li>
262 <li><b><?php __("Authentication:
");?></b><?php __("Yes
")?></li>
263 <li><b><?php __("Authentication method:
")?></b><?php __("Normal password
")?></li>
264 <li><b><?php __("Connection security:
");?></b> SSL</li>
268 <h4><?php __("POP3
");?></h4>
271 <li><b><?php __("Server name:
");?></b> <?php __($mail->srv_pop3); ?></li>
272 <li><b><?php __("Port:
");?></b> 110</li>
273 <li><b><?php __("Authentication:
");?></b><?php __("Yes
")?></li>
274 <li><b><?php __("Authentication method:
");?></b><?php __("Normal password
")?></li>
275 <li><b><?php __("Connection security:
");?></b> STARTTLS</li>
279 <h4><?php __("POP3S
");?></h4>
282 <li><b><?php __("Server name:
");?></b> <?php __($mail->srv_pop3s); ?></li>
283 <li><b><?php __("Port:
");?></b> 995</li>
284 <li><b><?php __("Authentication:
");?></b><?php __("Yes
")?></li>
285 <li><b><?php __("Authentication method:
");?></b><?php __("Normal password
")?></li>
286 <li><b><?php __("Connection security:
");?></b> SSL</li>
290 </div><!-- tabs-mailhelp-in -->
291 </div><!-- tabs-mailhelp -->
294 <script type="text/javascript
">
297 $( "#accordion-mailout
" ).accordion({
298 collapsible: true, active: false, header: "h4
", heightStyle: "content
"
303 $( "#accordion-mailin
" ).accordion({
304 collapsible: true, active: false, header: "h4
", heightStyle: "content
"
309 $(function() {$( "#tabs-mailhelp
" ).tabs();});
314 <?php include_once("foot.php
"); ?>