Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
adm_email.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: Show a form to edit a member
23 ----------------------------------------------------------------------
24 */
25 require_once("../class/config.php");
26 
27 include("head.php");
28 
29 if (!$admin->enabled) {
30  __("This page is restricted to authorized staff");
31  exit();
32 }
33 
34 $fields = array (
35  "subject" => array ("post", "string", ""),
36  "message" => array ("post", "string", ""),
37  "from" => array ("post", "string", ""),
38  "submit" => array ("post", "string", ""),
39 );
41 
42 ?>
43 <h3><?php __("Send an email to all members"); ?></h3>
44 <?php
45 
46 if ( !empty($submit) ) {
47  if ($admin->mail_all_members($subject,$message,$from)) {
48  $error=_("The email was successfully sent");
49  } else {
50  $error=_("There was an error");
51  }
52 }
53 
54 if (isset($error) && $error) {
55  echo "<p class=\"alert alert-danger\">$error</p>";
56 }
57 
58 ?>
59 <form method="post" action="adm_email.php">
60 
61 <table cellspacing="1" cellpadding="4" border="0" align="center" class='tedit'>
62  <tr>
63  <th align="right"><b><?php __("From");?></b></th>
64  <td><span><input type="text" name="from" size="45" maxlength="100" tabindex="2" value="<?php echo "no-reply@$L_FQDN" ?>" /></span></td>
65  </tr>
66  <tr>
67  <th align="right"><b><?php __("Subject");?></b></th>
68  <td><span><input type="text" name="subject" size="45" maxlength="100" tabindex="2" value="" /></span></td>
69  </tr>
70  <tr>
71  <th align="right" valign="top"> <span><b><?php __("Mail"); ?></b></span></th>
72  <td><span> <textarea name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3"></textarea></span></td>
73  </tr>
74  <tr>
75  <td class="catBottom" align="center" colspan="2"><input type="submit" value="<?php __("Send");?>" name="submit" /></td>
76  </tr>
77 </table>
78 
79 </form>
80 
81 <?php include_once('foot.php');?>