Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
mail_del.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  AlternC - Web Hosting System
5  Copyright (C) 2000-2012 by the AlternC Development Team.
6  https://alternc.org/
7  ----------------------------------------------------------------------
8  LICENSE
9 
10  This program is free software; you can redistribute it and/or
11  modify it under the terms of the GNU General Public License (GPL)
12  as published by the Free Software Foundation; either version 2
13  of the License, or (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  To read the license please visit http://www.gnu.org/copyleft/gpl.html
21  ----------------------------------------------------------------------
22  Purpose of file: Delete one or more mailboxes
23  ----------------------------------------------------------------------
24 */
25 require_once("../class/config.php");
26 
27 
28 $fields = array (
29  "d" => array ("request", "array", ""),
30  "domain_id" => array ("request", "integer", ""),
31  "confirm" => array("request", "string", "n"),
32 );
34 
35 if (!is_array($d)) {
36  $d[]=$d;
37 }
38 
39 reset($d);
40 
41 include_once ("head.php");
42 
43 if ($confirm=="y") {
44  $error="";
45  while (list($key,$val)=each($d)) {
46  $mail->delete($val);
47  $error.=$err->errstr()."<br />";
48  }
49  include("mail_list.php");
50  exit();
51 }
52 
53 ?>
54 <h3><?php __("Deleting mail accounts"); ?> : </h3>
55 <hr id="topbar"/>
56 <br />
57 <p><?php __("Please confirm the deletion of the following mail accounts:"); ?></p>
58 <form method="post" action="mail_del.php" id="main">
59 <p>
60 <input type="hidden" name="confirm" value="y" />
61 <input type="hidden" name="domain_id" value="<?php echo $domain_id; ?>" />
62 
63 <?php
64 
65 while (list($key,$val)=each($d)) {
66  $m=$mail->get_details($val);
67  echo "<input type=\"hidden\" name=\"d[]\" value=\"$val\" />";
68  echo $m["address"]."@".$m["domain"]."<br />";
69 }
70 
71 ?>
72 </p>
73 <p>
74 <input type="submit" class="inb" name="submit" value="<?php __("Confirm the deletion"); ?>" /> - <input type="button" name="cancel" id="cancel" onclick="window.history.go(-1);" class="inb" value="<?php __("Don't delete anything and go back to the email list"); ?>"/>
75 </p>
76 
77 <p class="warningmsg">
78 <?php __("Warning: Deleting an email address will destroy all the messages it contains! You will <b>NOT</b> be able to get it back!"); ?>
79 </p>
80 
81 </form>
82 <?php include_once("foot.php"); ?>