dolibarr  17.0.4
html.formmailing.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2014 Florian Henry florian.henry@open-concept.pro
3  *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
23 require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
24 
28 class FormMailing extends Form
29 {
33  public $errors = array();
34 
35 
44  public function selectDestinariesStatus($selectedid = '', $htmlname = 'dest_status', $show_empty = 0)
45  {
46  global $langs;
47 
48  $langs->load("mails");
49 
50  require_once DOL_DOCUMENT_ROOT.'/comm/mailing/class/mailing.class.php';
51  $mailing = new Mailing($this->db);
52 
53  $options = array();
54 
55  $options = $options + $mailing->statut_dest;
56 
57  // Note -1 is used for error, so we use -2 for tempty value
58  return Form::selectarray($htmlname, $options, $selectedid, ($show_empty ? -2 : 0), 0, 0, '', 1);
59  }
60 }
Class to manage generation of HTML components Only common components must be here.
static selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $moreparam='', $translate=0, $maxlen=0, $disabled=0, $sort='', $morecss='minwidth75', $addjscombo=1, $moreparamonempty='', $disablebademail=0, $nohtmlescape=0)
Return a HTML select string, built from an array of key+value.
Class to offer components to list and upload files.
selectDestinariesStatus($selectedid='', $htmlname='dest_status', $show_empty=0)
Output a select with destinaries status.
Class to manage emailings module.
$conf db
API class for accounts.
Definition: inc.php:41