source: alternc/trunk/bureau/admin/mail_list.php @ 2843

Revision 2843, 4.4 KB checked in by benjamin, 2 years ago (diff)

translation fr_FR for new features and misc translation fixes

Line 
1<?php
2/*
3 $Id: mail_list.php,v 1.8 2005/04/01 16:05:26 benjamin 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: Show the mail account list on domain $dom
28 ----------------------------------------------------------------------
29*/
30require_once("../class/config.php");
31include_once("head.php");
32
33$fields = array (
34        "domain"    => array ("request", "string", ""),
35
36        "letter"    => array ("get", "string", ""),
37);
38getFields($fields);
39
40if(!$domain)
41{
42        include("main.php");
43        exit();
44}
45
46if(!$res=$mail->enum_doms_mails($domain,1,$letter)) {
47  $error=$err->errstr();
48?>
49<h3><?php printf(_("Email addresses of the domain %s"),$domain); ?> : </h3>
50<?php
51if ($error) {
52  echo "<p class=\"error\">$error</p>";
53}
54?>
55<hr id="topbar"/>
56<br />
57<p>
58  <span class="inb"><a href="mail_add.php?domain=<?php echo $domain; ?>"><?php printf(_("Add a mailbox on <b>%s</b>"),$domain); ?></a></span>
59  <span class="inb"><a href="mail_add.php?many=1&amp;domain=<?php echo $domain; ?>"><?php printf(_("Add many mailboxes on <b>%s</b>"),$domain); ?></a></span>
60</p>
61<?
62}
63else
64{
65
66?>
67<h3><?php printf(_("Email addresses of the domain %s"),$domain); ?> : </h3>
68<?php
69if ($error) {
70  echo "<p class=\"error\">$error</p>";
71}
72?>
73<hr id="topbar"/>
74<br />
75<p>
76  <span class="inb"><a href="mail_add.php?domain=<?php echo $domain; ?>"><?php printf(_("Add a mailbox on <b>%s</b>"),$domain); ?></a></span>
77  <span class="inb"><a href="mail_add.php?many=1&amp;domain=<?php echo $domain; ?>"><?php printf(_("Add many mailboxes on <b>%s</b>"),$domain); ?></a></span>
78</p>
79<?php
80
81if(!$letters=$mail->enum_doms_mails_letters($domain))
82  $error=$err->errstr();
83else{
84  echo "<p>";
85  __("Show only mail starting by:"); 
86  echo " ";
87  for($i=0;$i<count($letters);$i++){
88    $val=$letters[$i];
89    echo "   <a href=\"mail_list.php?domain=$domain&amp;letter=$val\">$val&nbsp;</a>";
90  }
91  echo "   <a href=\"mail_list.php?domain=$domain\">".sprintf(_("All"))."</a>";
92  echo "</p>";
93}
94
95 if ($res["count"]) {
96?>
97<form method="post" action="mail_del.php" id="main">
98
99<table class="tlist">
100
101<tr><th colspan="2"><input type="hidden" name="domain" value="<?php echo $domain ?>"/> </th>
102<th><?php __("Email address"); ?></th><th><?php __("Size"); ?></th><th> </th></tr>
103<?php
104$col=1;
105for($i=0;$i<$res["count"];$i++) {
106        $col=3-$col;
107        $val=$res[$i];
108        echo "<tr class=\"lst$col\">";
109        echo "<td align=\"center\"><input class=\"inc\" type=\"checkbox\" id=\"del_$i\" name=\"d[]\" value=\"".$val["mail"]."\" /></td>";
110?>
111<td><div class="ina"><a href="mail_edit.php?email=<?php echo urlencode($val["mail"]);  ?>&amp;domain=<?php echo urlencode($domain); ?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
112
113<?php
114        echo "<td><label for=\"del_$i\">".$val["mail"]."</label></td>";
115        if ($val["pop"]) {
116                echo "<td>".format_size($val["size"])."</td>";
117        } else {
118                echo "<td>&nbsp;</td>";
119        }
120    echo "<td>";
121    if (! is_null($val['expiration_date'])) {
122        // It's a temporary account
123        echo __("Manage this temporary account");
124    } else {
125        // It's a normal account
126        echo "<a href='mail_add.php?domain=".urlencode($domain)."&dst_mail=".urlencode($val["mail"])."'>";
127        echo __("Create alias");
128        echo "</a>";
129    }
130    echo "</td>";
131        echo "</tr>";
132
133}
134?>
135</table>
136<br />
137<input type="submit" class="inb" name="submit" value="<?php __("Delete the checked email addresses"); ?>" />
138</form>
139
140<?php
141   }
142}
143?>
144<?php include_once("foot.php"); ?>
Note: See TracBrowser for help on using the repository browser.