dolibarr  16.0.5
member.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
4  * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
5  * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
6  * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
7  * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
8  * Copyright (C) 2011-2012 Juanjo Menent <jmenent@2byte.es>
9  * Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
10  * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
11  * Copyright (C) 2020-2021 Frédéric France <frederic.france@netlogic.fr>
12  *
13  * This program is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 3 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program. If not, see <https://www.gnu.org/licenses/>.
25  */
26 
33 require '../../main.inc.php';
34 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
35 require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
36 
37 // Load translation files required by the page
38 $langs->loadLangs(array("admin", "members"));
39 
40 if (!$user->admin) {
42 }
43 
44 
45 $choices = array('yesno', 'texte', 'chaine');
46 
47 $value = GETPOST('value', 'alpha');
48 $label = GETPOST('label', 'alpha');
49 $scandir = GETPOST('scandir', 'alpha');
50 $type = 'member';
51 
52 $action = GETPOST('action', 'aZ09');
53 
54 
55 /*
56  * Actions
57  */
58 
59 include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
60 
61 if ($action == 'set_default') {
62  $ret = addDocumentModel($value, $type, $label, $scandir);
63  $res = true;
64 } elseif ($action == 'del_default') {
65  $ret = delDocumentModel($value, $type);
66  if ($ret > 0) {
67  if (getDolGlobalString('MEMBER_ADDON_PDF_ODT') == "$value") {
68  dolibarr_del_const($db, 'MEMBER_ADDON_PDF_ODT', $conf->entity);
69  }
70  }
71  $res = true;
72 } elseif ($action == 'setdoc') {
73  // Set default model
74  if (dolibarr_set_const($db, "MEMBER_ADDON_PDF_ODT", $value, 'chaine', 0, '', $conf->entity)) {
75  // The constant that was read ahead of the new set
76  // we therefore go through a variable to have a consistent display
77  $conf->global->MEMBER_ADDON_PDF_ODT = $value;
78  }
79 
80  // We activate the model
81  $ret = delDocumentModel($value, $type);
82  if ($ret > 0) {
83  $ret = addDocumentModel($value, $type, $label, $scandir);
84  }
85  $res = true;
86 } elseif (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) {
87  $code = $reg[1];
88  if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) {
89  header("Location: ".$_SERVER["PHP_SELF"]);
90  exit;
91  } else {
92  dol_print_error($db);
93  }
94 } elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) {
95  $code = $reg[1];
96  if (dolibarr_del_const($db, $code, $conf->entity) > 0) {
97  header("Location: ".$_SERVER["PHP_SELF"]);
98  exit;
99  } else {
100  dol_print_error($db);
101  }
102 } elseif ($action == 'updateall') {
103  $db->begin();
104  $res1 = $res2 = $res3 = $res4 = $res5 = $res6 = $res7 = 0;
105  $res1 = dolibarr_set_const($db, 'ADHERENT_LOGIN_NOT_REQUIRED', GETPOST('ADHERENT_LOGIN_NOT_REQUIRED', 'alpha') ? 0 : 1, 'chaine', 0, '', $conf->entity);
106  $res2 = dolibarr_set_const($db, 'ADHERENT_MAIL_REQUIRED', GETPOST('ADHERENT_MAIL_REQUIRED', 'alpha'), 'chaine', 0, '', $conf->entity);
107  $res3 = dolibarr_set_const($db, 'ADHERENT_DEFAULT_SENDINFOBYMAIL', GETPOST('ADHERENT_DEFAULT_SENDINFOBYMAIL', 'alpha'), 'chaine', 0, '', $conf->entity);
108  $res3 = dolibarr_set_const($db, 'ADHERENT_CREATE_EXTERNAL_USER_LOGIN', GETPOST('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', 'alpha'), 'chaine', 0, '', $conf->entity);
109  $res4 = dolibarr_set_const($db, 'ADHERENT_BANK_USE', GETPOST('ADHERENT_BANK_USE', 'alpha'), 'chaine', 0, '', $conf->entity);
110  // Use vat for invoice creation
111  if (isModEnabled('facture')) {
112  $res4 = dolibarr_set_const($db, 'ADHERENT_VAT_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_VAT_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
113  $res5 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
114  if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
115  $res6 = dolibarr_set_const($db, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', GETPOST('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', 'alpha'), 'chaine', 0, '', $conf->entity);
116  }
117  }
118  if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0) {
119  setEventMessages('ErrorFailedToSaveDate', null, 'errors');
120  $db->rollback();
121  } else {
122  setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
123  $db->commit();
124  }
125 }
126 
127 // Action to update or add a constant
128 if ($action == 'update' || $action == 'add') {
129  $constname = GETPOST('constname', 'alpha');
130  $constvalue = (GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
131 
132  if (($constname == 'ADHERENT_CARD_TYPE' || $constname == 'ADHERENT_ETIQUETTE_TYPE' || $constname == 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && $constvalue == -1) {
133  $constvalue = '';
134  }
135  if ($constname == 'ADHERENT_LOGIN_NOT_REQUIRED') { // Invert choice
136  if ($constvalue) {
137  $constvalue = 0;
138  } else {
139  $constvalue = 1;
140  }
141  }
142 
143  $consttype = GETPOST('consttype', 'alpha');
144  $constnote = GETPOST('constnote');
145  $res = dolibarr_set_const($db, $constname, $constvalue, $choices[$consttype], 0, $constnote, $conf->entity);
146 
147  if (!($res > 0)) {
148  $error++;
149  }
150 
151  if (!$error) {
152  setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
153  } else {
154  setEventMessages($langs->trans("Error"), null, 'errors');
155  }
156 }
157 
158 // Action to enable of a submodule of the adherent module
159 if ($action == 'set') {
160  $result = dolibarr_set_const($db, GETPOST('name', 'alpha'), GETPOST('value'), '', 0, '', $conf->entity);
161  if ($result < 0) {
162  print $db->error();
163  }
164 }
165 
166 // Action to disable a submodule of the adherent module
167 if ($action == 'unset') {
168  $result = dolibarr_del_const($db, GETPOST('name', 'alpha'), $conf->entity);
169  if ($result < 0) {
170  print $db->error();
171  }
172 }
173 
174 
175 
176 /*
177  * View
178  */
179 
180 $form = new Form($db);
181 
182 $help_url = 'EN:Module_Foundations|FR:Module_Adh&eacute;rents|ES:M&oacute;dulo_Miembros|DE:Modul_Mitglieder';
183 
184 llxHeader('', $langs->trans("MembersSetup"), $help_url);
185 
186 
187 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
188 print load_fiche_titre($langs->trans("MembersSetup"), $linkback, 'title_setup');
189 
190 
191 $head = member_admin_prepare_head();
192 
193 print dol_get_fiche_head($head, 'general', $langs->trans("Members"), -1, 'user');
194 
195 print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
196 print '<input type="hidden" name="token" value="'.newToken().'">';
197 print '<input type="hidden" name="action" value="updateall">';
198 
199 
200 // Mains options
201 
202 print load_fiche_titre($langs->trans("MemberMainOptions"), '', '');
203 
204 print '<div class="div-table-responsive-no-min">';
205 print '<table class="noborder centpercent">';
206 print '<tr class="liste_titre">';
207 print '<td>'.$langs->trans("Description").'</td>';
208 print '<td>'.$langs->trans("Value").'</td>';
209 print "</tr>\n";
210 
211 // Mail required for members
212 print '<tr class="oddeven"><td>'.$langs->trans("AdherentMailRequired").'</td><td>';
213 print $form->selectyesno('ADHERENT_MAIL_REQUIRED', (!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? $conf->global->ADHERENT_MAIL_REQUIRED : 0), 1);
214 print "</td></tr>\n";
215 
216 // Login/Pass required for members
217 print '<tr class="oddeven"><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
218 print $form->selectyesno('ADHERENT_LOGIN_NOT_REQUIRED', (!empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED) ? 0 : 1), 1);
219 print "</td></tr>\n";
220 
221 // Send mail information is on by default
222 print '<tr class="oddeven"><td>'.$langs->trans("MemberSendInformationByMailByDefault").'</td><td>';
223 print $form->selectyesno('ADHERENT_DEFAULT_SENDINFOBYMAIL', (!empty($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL) ? $conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL : 0), 1);
224 print "</td></tr>\n";
225 
226 // Create an external user login for each new member subscription validated
227 print '<tr class="oddeven"><td>'.$langs->trans("MemberCreateAnExternalUserForSubscriptionValidated").'</td><td>';
228 print $form->selectyesno('ADHERENT_CREATE_EXTERNAL_USER_LOGIN', (!empty($conf->global->ADHERENT_CREATE_EXTERNAL_USER_LOGIN) ? $conf->global->ADHERENT_CREATE_EXTERNAL_USER_LOGIN : 0), 1);
229 print "</td></tr>\n";
230 
231 // Allow members to change type on renewal forms
232 /* To test during next beta
233 print '<tr class="oddeven"><td>'.$langs->trans("MemberAllowchangeOfType").'</td><td>';
234 print $form->selectyesno('MEMBER_ALLOW_CHANGE_OF_TYPE', (!empty($conf->global->MEMBER_ALLOW_CHANGE_OF_TYPE) ? 0 : 1), 1);
235 print "</td></tr>\n";
236 */
237 
238 // Insert subscription into bank account
239 print '<tr class="oddeven"><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
240 $arraychoices = array('0'=>$langs->trans("None"));
241 if (!empty($conf->banque->enabled)) {
242  $arraychoices['bankdirect'] = $langs->trans("MoreActionBankDirect");
243 }
244 if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
245  $arraychoices['invoiceonly'] = $langs->trans("MoreActionInvoiceOnly");
246 }
247 if (!empty($conf->banque->enabled) && !empty($conf->societe->enabled) && isModEnabled('facture')) {
248  $arraychoices['bankviainvoice'] = $langs->trans("MoreActionBankViaInvoice");
249 }
250 print '<td>';
251 print $form->selectarray('ADHERENT_BANK_USE', $arraychoices, getDolGlobalString('ADHERENT_BANK_USE'), 0);
252 if (getDolGlobalString('ADHERENT_BANK_USE') == 'bankdirect' || getDolGlobalString('ADHERENT_BANK_USE') == 'bankviainvoice') {
253  print '<br><div style="padding-top: 5px;"><span class="opacitymedium">'.$langs->trans("ABankAccountMustBeDefinedOnPaymentModeSetup").'</span></div>';
254 }
255 print '</td>';
256 print "</tr>\n";
257 
258 // Use vat for invoice creation
259 if (isModEnabled('facture')) {
260  print '<tr class="oddeven"><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
261  if (!empty($conf->banque->enabled)) {
262  print '<td>';
263  print $form->selectarray('ADHERENT_VAT_FOR_SUBSCRIPTIONS', array('0'=>$langs->trans("NoVatOnSubscription"), 'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) ? '0' : $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
264  print '</td>';
265  } else {
266  print '<td class="right">';
267  print $langs->trans("WarningModuleNotActive", $langs->transnoentities("Module85Name"));
268  print '</td>';
269  }
270  print "</tr>\n";
271 
272  if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) {
273  print '<tr class="oddeven"><td>'.$langs->trans("ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS").'</td>';
274  print '<td>';
275  $selected = (empty($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS) ? '' : $conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS);
276  print img_picto('', 'product', 'class="pictofixedwidth"');
277  $form->select_produits($selected, 'ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS', '', 0);
278  print '</td>';
279  }
280  print "</tr>\n";
281 }
282 
283 print '</table>';
284 print '</div>';
285 
286 print '<div class="center">';
287 print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
288 print '</div>';
289 
290 print '</form>';
291 
292 
293 print '<br>';
294 
295 
296 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
297 
298 // Defined model definition table
299 $def = array();
300 $sql = "SELECT nom as name";
301 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
302 $sql .= " WHERE type = '".$db->escape($type)."'";
303 $sql .= " AND entity = ".$conf->entity;
304 $resql = $db->query($sql);
305 if ($resql) {
306  $i = 0;
307  $num_rows = $db->num_rows($resql);
308  while ($i < $num_rows) {
309  $obj = $db->fetch_object($resql);
310  array_push($def, $obj->name);
311  $i++;
312  }
313 } else {
314  dol_print_error($db);
315 }
316 
317 
318 print load_fiche_titre($langs->trans("MembersDocModules"), '', '');
319 
320 print '<div class="div-table-responsive-no-min">';
321 print '<table class="noborder centpercent">';
322 print '<tr class="liste_titre">';
323 print '<td>'.$langs->trans("Name").'</td>';
324 print '<td>'.$langs->trans("Description").'</td>';
325 print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
326 print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
327 print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
328 print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
329 print "</tr>\n";
330 
331 clearstatcache();
332 
333 foreach ($dirmodels as $reldir) {
334  foreach (array('', '/doc') as $valdir) {
335  $dir = dol_buildpath($reldir."core/modules/member".$valdir);
336  if (is_dir($dir)) {
337  $handle = opendir($dir);
338  if (is_resource($handle)) {
339  while (($file = readdir($handle)) !== false) {
340  $filelist[] = $file;
341  }
342  closedir($handle);
343  arsort($filelist);
344  foreach ($filelist as $file) {
345  if (preg_match('/\.class\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
346  if (file_exists($dir.'/'.$file)) {
347  $name = substr($file, 4, dol_strlen($file) - 14);
348  $classname = substr($file, 0, dol_strlen($file) - 10);
349 
350  require_once $dir.'/'.$file;
351  $module = new $classname($db);
352 
353  $modulequalified = 1;
354  if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
355  $modulequalified = 0;
356  }
357  if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
358  $modulequalified = 0;
359  }
360 
361  if ($modulequalified) {
362  print '<tr class="oddeven"><td width="100">';
363  print (empty($module->name) ? $name : $module->name);
364  print "</td><td>\n";
365  if (method_exists($module, 'info')) {
366  print $module->info($langs);
367  } else {
368  print $module->description;
369  }
370  print '</td>';
371 
372  // Active
373  if (in_array($name, $def)) {
374  print '<td class="center">'."\n";
375  print '<a href="'.$_SERVER["PHP_SELF"].'?action=del_default&token='.newToken().'&value='.$name.'">';
376  print img_picto($langs->trans("Enabled"), 'switch_on');
377  print '</a>';
378  print '</td>';
379  } else {
380  print '<td class="center">'."\n";
381  print '<a href="'.$_SERVER["PHP_SELF"].'?action=set_default&token='.newToken().'&value='.$name.'&scandir='.(!empty($module->scandir) ? $module->scandir : '').'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
382  print "</td>";
383  }
384 
385  // Defaut
386  print '<td class="center">';
387  if (getDolGlobalString('MEMBER_ADDON_PDF') == $name) {
388  print img_picto($langs->trans("Default"), 'on');
389  } else {
390  print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scandir='.(!empty($module->scandir) ? $module->scandir : '').'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
391  }
392  print '</td>';
393 
394  // Info
395  $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
396  $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
397  if ($module->type == 'pdf') {
398  $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
399  }
400  $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
401  $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn(!empty($module->option_logo) ? $module->option_logo : 0, 1, 1);
402  $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn(!empty($module->option_multilang) ? $module->option_multilang : 0, 1, 1);
403 
404 
405  print '<td class="center">';
406  print $form->textwithpicto('', $htmltooltip, 1, 0);
407  print '</td>';
408 
409  // Preview
410  print '<td class="center">';
411  if ($module->type == 'pdf') {
412  print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>';
413  } else {
414  print img_object($langs->trans("PreviewNotAvailable"), 'generic');
415  }
416  print '</td>';
417 
418  print "</tr>\n";
419  }
420  }
421  }
422  }
423  }
424  }
425  }
426 }
427 
428 print '</table>';
429 print '</div>';
430 
431 
432 
433 /*
434 TODO Use a global form instead of embeded form into table
435 print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
436 print '<input type="hidden" name="token" value="'.newToken().'">';
437 print '<input type="hidden" name="action" value="updateall">';
438 */
439 
440 /*
441  * Edit info of model document
442  */
443 $constantes = array(
444  'ADHERENT_CARD_TYPE',
445  //'ADHERENT_CARD_BACKGROUND',
446  'ADHERENT_CARD_HEADER_TEXT',
447  'ADHERENT_CARD_TEXT',
448  'ADHERENT_CARD_TEXT_RIGHT',
449  'ADHERENT_CARD_FOOTER_TEXT'
450 );
451 
452 print load_fiche_titre($langs->trans("MembersCards"), '', '');
453 
454 $helptext = '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
455 $helptext .= '__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, ';
456 $helptext .= '__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, ';
457 $helptext .= '__YEAR__, __MONTH__, __DAY__';
458 
459 form_constantes($constantes, 0, $helptext);
460 
461 print '<br>';
462 
463 
464 /*
465  * Edit info of model document
466  */
467 $constantes = array('ADHERENT_ETIQUETTE_TYPE', 'ADHERENT_ETIQUETTE_TEXT');
468 
469 print load_fiche_titre($langs->trans("MembersTickets"), '', '');
470 
471 $helptext = '*'.$langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
472 $helptext .= '__DOL_MAIN_URL_ROOT__, __ID__, __FIRSTNAME__, __LASTNAME__, __FULLNAME__, __LOGIN__, __PASSWORD__, ';
473 $helptext .= '__COMPANY__, __ADDRESS__, __ZIP__, __TOWN__, __COUNTRY__, __EMAIL__, __BIRTH__, __PHOTO__, __TYPE__, ';
474 $helptext .= '__YEAR__, __MONTH__, __DAY__';
475 
476 form_constantes($constantes, 0, $helptext);
477 
478 //print '</form>';
479 
480 print "<br>";
481 
482 print dol_get_fiche_end();
483 
484 // End of page
485 llxFooter();
486 $db->close();
yn
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
Definition: functions.lib.php:6491
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
dolibarr_del_const
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
Definition: admin.lib.php:552
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
dol_print_error
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
Definition: functions.lib.php:4844
member_admin_prepare_head
member_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: member.lib.php:183
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:116
img_picto
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
Definition: functions.lib.php:3880
delDocumentModel
delDocumentModel($name, $type)
Delete document model used by doc generator.
Definition: admin.lib.php:1894
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
getDolGlobalString
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
Definition: functions.lib.php:80
dol_strlen
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
Definition: functions.lib.php:3747
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
isModEnabled
isModEnabled($module)
Is Dolibarr module enabled.
Definition: functions.lib.php:105
dolibarr_set_const
dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
Definition: admin.lib.php:627
addDocumentModel
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
Definition: admin.lib.php:1863
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
form_constantes
form_constantes($tableau, $strictw3c=0, $helptext='', $text='Value')
Show array with constants to edit.
Definition: admin.lib.php:1619
img_object
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
Definition: functions.lib.php:4211
$resql
if(isModEnabled('facture') &&!empty($user->rights->facture->lire)) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->rights->fournisseur->facture->lire)||(isModEnabled('supplier_invoice') && $user->rights->supplier_invoice->lire)) if(isModEnabled('don') &&!empty($user->rights->don->lire)) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $resql
Social contributions to pay.
Definition: index.php:742
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59