dolibarr 20.0.2
new.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2001-2002 Jean-Louis Bergamo <jlb@j1b.org>
4 * Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
5 * Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
6 * Copyright (C) 2012 J. Fernando Lagrange <fernando@demo-tic.org>
7 * Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr>
8 * Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
9 * Copyright (C) 2021 Waël Almoman <info@almoman.com>
10 * Copyright (C) 2022 Udo Tamm <dev@dolibit.de>
11 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
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
34if (!defined('NOLOGIN')) {
35 define("NOLOGIN", 1); // This means this output page does not require to be logged.
36}
37if (!defined('NOCSRFCHECK')) {
38 define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
39}
40if (!defined('NOBROWSERNOTIF')) {
41 define('NOBROWSERNOTIF', '1');
42}
43
44
45// For MultiCompany module.
46// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
47// Because 2 entities can have the same ref
48$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
49if (is_numeric($entity)) {
50 define("DOLENTITY", $entity);
51}
52
53
54// Load Dolibarr environment
55require '../../main.inc.php';
56require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
57require_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php';
58require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
59require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
60require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
61require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php';
62require_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php';
63require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
64require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php';
65// Init vars
66$backtopage = GETPOST('backtopage', 'alpha');
67$action = GETPOST('action', 'aZ09');
68
69$errmsg = '';
70$num = 0;
71$error = 0;
72
73// Load translation files
74$langs->loadLangs(array("main", "members", "companies", "install", "other", "errors"));
75
76// Security check
77if (!isModEnabled('societe')) {
78 httponly_accessforbidden('Module Thirdparty not enabled');
79}
80
81if (!getDolGlobalString('SOCIETE_ENABLE_PUBLIC')) {
82 httponly_accessforbidden("Online form for contact for public visitors has not been enabled");
83}
84
85
86//permissions
87
88$permissiontoadd = $user->hasRight('societe', 'creer');
89
90// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
91$hookmanager->initHooks(array('publicnewmembercard', 'globalcard'));
92
93$extrafields = new ExtraFields($db);
94
95$objectsoc = new Societe($db);
96$user->loadDefaultValues();
97
98$extrafields->fetch_name_optionals_label($objectsoc->table_element); // fetch optionals attributes and labels
99
100
112function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
113{
114 global $conf, $langs, $mysoc;
115
116 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers
117
118 print '<body id="mainbody" class="publicnewmemberform">';
119
120 // Define urllogo
121 $urllogo = DOL_URL_ROOT . '/theme/common/login_logo.png';
122
123 if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output . '/logos/thumbs/' . $mysoc->logo_small)) {
124 $urllogo = DOL_URL_ROOT . '/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file=' . urlencode('logos/thumbs/' . $mysoc->logo_small);
125 } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output . '/logos/' . $mysoc->logo)) {
126 $urllogo = DOL_URL_ROOT . '/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file=' . urlencode('logos/' . $mysoc->logo);
127 } elseif (is_readable(DOL_DOCUMENT_ROOT . '/theme/dolibarr_logo.svg')) {
128 $urllogo = DOL_URL_ROOT . '/theme/dolibarr_logo.svg';
129 }
130
131 print '<header class="center">';
132
133 // Output html code for logo
134 if ($urllogo) {
135 print '<div class="backgreypublicpayment">';
136 print '<div class="logopublicpayment">';
137 print '<img id="dolpaymentlogo" src="' . $urllogo . '">';
138 print '</div>';
139 if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) {
140 print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">' . $langs->trans("PoweredBy") . '<br><img class="poweredbyimg" src="' . DOL_URL_ROOT . '/theme/dolibarr_logo.svg" width="80px"></a></div>';
141 }
142 print '</div>';
143 }
144
145 if (getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION')) {
146 print '<div class="backimagepublicregistration">';
147 print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('MEMBER_IMAGE_PUBLIC_REGISTRATION') . '">';
148 print '</div>';
149 }
150
151 print '</header>';
152
153 print '<div class="divmainbodylarge">';
154}
155
162{
163 global $conf, $langs;
164
165 $ext = '';
166
167 print '</div>';
168
169 printCommonFooter('public');
170
171 if (!empty($conf->use_javascript_ajax)) {
172 print "\n" . '<!-- Includes JS Footer of Dolibarr -->' . "\n";
173 print '<script src="' . DOL_URL_ROOT . '/core/js/lib_foot.js.php?lang=' . $langs->defaultlang . (!empty($ext) ? '&' . $ext : '') . '"></script>' . "\n";
174 }
175
176 print "</body>\n";
177 print "</html>\n";
178}
179
180
181
182/*
183 * Actions
184 */
185
186$parameters = array();
187// Note that $action and $object may have been modified by some hooks
188$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);
189if ($reshook < 0) {
190 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
191}
192
193// Action called when page is submitted
194if (empty($reshook) && $action == 'add') {
195 $error = 0;
196 $urlback = '';
197
198 $db->begin();
199
200 if (!GETPOST('name')) {
201 setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Company")), null, 'errors');
202 $error++;
203 }
204
205 // Check Captcha code if is enabled
206 if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA')) {
207 $sessionkey = 'dol_antispam_value';
208 $ok = (array_key_exists($sessionkey, $_SESSION) === true && (strtolower($_SESSION[$sessionkey]) == strtolower(GETPOST('code'))));
209 if (!$ok) {
210 $error++;
211 $errmsg .= $langs->trans("ErrorBadValueForCode") . "<br>\n";
212 $action = '';
213 }
214 }
215
216 if (!$error) {
217 $societe = new Societe($db);
218
219 // TODO Support MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS
220
221
222 $societe->name = GETPOST('name', 'alphanohtml');
223 $societe->client = GETPOSTINT('client') ? GETPOSTINT('client') : $societe->client;
224 $societe->address = GETPOST('address', 'alphanohtml');
225 $societe->country_id = GETPOSTINT('country_id');
226 $societe->phone = GETPOST('phone', 'alpha');
227 $societe->fax = GETPOST('fax', 'alpha');
228 $societe->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
229 $societe->client = 2 ; // our client is a prospect
230 $societe->code_client = '-1';
231 $societe->name_alias = GETPOST('name_alias', 'alphanohtml');
232 $societe->note_private = GETPOST('note_private', 'alphanohtml');
233
234 // Fill array 'array_options' with data from add form
235 /*
236 $extrafields->fetch_name_optionals_label($societe->table_element);
237 $ret = $extrafields->setOptionalsFromPost(null, $societe);
238 if ($ret < 0) {
239 $error++;
240 $errmsg .= $societe->error;
241 }
242 */
243
244 if (!$error) {
245 $result = $societe->create($user);
246 if ($result > 0) {
247 require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
248 $objectsoc = $societe;
249
250 if (!empty($backtopage)) {
251 $urlback = $backtopage;
252 } elseif (getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION')) {
253 $urlback = getDolGlobalString('MEMBER_URL_REDIRECT_SUBSCRIPTION');
254 // TODO Make replacement of __AMOUNT__, etc...
255 } else {
256 $urlback = $_SERVER["PHP_SELF"] . "?action=added&token=" . newToken();
257 }
258 } else {
259 $error++;
260 $errmsg .= implode('<br>', $societe->errors);
261 }
262 }
263 }
264
265 if (!$error) {
266 $db->commit();
267
268 header("Location: " . $urlback);
269 exit;
270 } else {
271 $db->rollback();
272 $action = "create";
273 }
274}
275
276// Action called after a submitted was send and prospect created successfully
277// If MEMBER_URL_REDIRECT_SUBSCRIPTION is set to an url, we never go here because a redirect was done to this url. Same if we ask to redirect to the payment page.
278// backtopage parameter with an url was set on prospect submit page, we never go here because a redirect was done to this url.
279
280if (empty($reshook) && $action == 'added') {
281 llxHeaderVierge("newSocieteAdded");
282
283 // If we have not been redirected
284 print '<br><br>';
285 print '<div class="center">';
286 print $langs->trans("newSocieteAdded");
287 print '</div>';
288
290 exit;
291}
292
293
294
295/*
296 * View
297 */
298
299$form = new Form($db);
300$formcompany = new FormCompany($db);
301$adht = new AdherentType($db);
302$formadmin = new FormAdmin($db);
303
304
305llxHeaderVierge($langs->trans("ContactUs"));
306
307print '<br>';
308print load_fiche_titre(img_picto('', 'member_nocolor', 'class="pictofixedwidth"') . ' &nbsp; ' . $langs->trans("ContactUs"), '', '', 0, 0, 'center');
309
310
311print '<div align="center">';
312print '<div id="divsubscribe">';
313
314print '<div class="center subscriptionformhelptext opacitymedium justify">';
315if (getDolGlobalString('COMPANY_NEWFORM_TEXT')) {
316 print $langs->trans(getDolGlobalString('COMPANY_NEWFORM_TEXT')) . "<br>\n";
317} else {
318 print $langs->trans("ContactUsDesc", getDolGlobalString("MAIN_INFO_SOCIETE_MAIL")) . "<br>\n";
319}
320print '</div>';
321
322dol_htmloutput_errors($errmsg);
324
325// Print form
326print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="newprospect">' . "\n";
327print '<input type="hidden" name="token" value="' . newToken() . '" / >';
328print '<input type="hidden" name="entity" value="' . $entity . '" />';
329print '<input type="hidden" name="action" value="add" />';
330print '<br>';
331
332$messagemandatory = '<span class="">' . $langs->trans("FieldsWithAreMandatory", '*') . '</span>';
333//print '<br><span class="opacitymedium">'.$langs->trans("FieldsWithAreMandatory", '*').'</span><br>';
334//print $langs->trans("FieldsWithIsForPublic",'**').'<br>';
335
336print dol_get_fiche_head();
337
338print '<script type="text/javascript">
339jQuery(document).ready(function () {
340 jQuery(document).ready(function () {
341 function initmorphy()
342 {
343 console.log("Call initmorphy");
344 if (jQuery("#morphy").val() == \'phy\') {
345 jQuery("#trcompany").hide();
346 }
347 if (jQuery("#morphy").val() == \'mor\') {
348 jQuery("#trcompany").show();
349 }
350 }
351 initmorphy();
352 jQuery("#morphy").change(function() {
353 initmorphy();
354 });
355 jQuery("#selectcountry_id").change(function() {
356 document.newprospect.action.value="create";
357 document.newprospect.submit();
358 });
359 jQuery("#typeid").change(function() {
360 document.newprospect.action.value="create";
361 document.newprospect.submit();
362 });
363 });
364});
365</script>';
366
367
368print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n";
369//Third party name
370/*
371if ($objectsoc->particulier || $private) {
372 print '<span id="TypeName" class="fieldrequired">'.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName', 'name').'</span>';
373} else {
374 print '<span id="TypeName" class="fieldrequired">'.$form->editfieldkey('ThirdPartyName', 'name', '', $objectsoc, 0).'</span>';
375}
376*/
377print '<tr class="tr-field-thirdparty-name"><td class="titlefieldcreate">'; // text appreas left
378print '<input type="hidden" name="ThirdPartyName" value="' . $langs->trans('ThirdPartyName') . '">';
379print '<span id="TypeName" class="fieldrequired" title="' .dol_escape_htmltag($langs->trans("FieldsWithAreMandatory", '*')) . '" >' . $form->editfieldkey('Company', 'name', '', $objectsoc, 0) . '<span class="star"> *</span></span>';
380print '</td><td>'; // inline input
381print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="' . dol_escape_htmltag($objectsoc->name) . '" autofocus="autofocus">';
382//
383
384// Name and lastname
385print '<tr><td class="classfortooltip" title="' . dol_escape_htmltag($messagemandatory) . '">' . $langs->trans("Firstname") . ' <span class="star">*</span></td><td><input type="text" name="firstname" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('firstname')) . '"></td></tr>' . "\n";
386
387print '<tr><td class="classfortooltip" title="' . dol_escape_htmltag($messagemandatory) . '">' . $langs->trans("Lastname") . ' <span class="star">*</span></td><td><input type="text" name="lastname" class="minwidth150" value="' . dol_escape_htmltag(GETPOST('lastname')) . '"></td></tr>' . "\n";
388
389// Address
390print '<tr><td class="tdtop">';
391print $form->editfieldkey('Address', 'address', '', $objectsoc, 0);
392print '</td>';
393print '<td>';
394print '<textarea name="address" id="address" class="quatrevingtpercent" rows="' . ROWS_2 . '" wrap="soft">';
395print dol_escape_htmltag($objectsoc->address, 0, 1);
396print '</textarea>';
397print $form->widgetForTranslation("address", $objectsoc, $permissiontoadd, 'textarea', 'alphanohtml', 'quatrevingtpercent');
398print '</td></tr>';
399
400// Country
401print '<tr><td>' . $form->editfieldkey('Country', 'selectcountry_id', '', $objectsoc, 0) . '</td><td class="maxwidthonsmartphone">';
402print img_picto('', 'country', 'class="pictofixedwidth"');
403print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $objectsoc->country_id), 'country_id', '', 0, 'minwidth300 maxwidth500 widthcentpercentminusx');
404if ($user->admin) {
405 print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
406}
407print '</td></tr>';
408
409// Phone / Fax
410print '<tr><td>' . $form->editfieldkey('Phone', 'phone', '', $objectsoc, 0) . '</td>';
411print '<td>' . img_picto('', 'object_phoning', 'class="pictofixedwidth"') . ' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="' . (GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $objectsoc->phone) . '"></td>';
412print '</tr>';
413
414print '<tr>';
415print '<td>' . $form->editfieldkey('Fax', 'fax', '', $objectsoc, 0) . '</td>';
416print '<td>' . img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"') . ' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="' . (GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $objectsoc->fax) . '"></td>';
417print '</tr>';
418
419// Email / Web
420print '<tr><td>' . $form->editfieldkey('EMail', 'email', '', $objectsoc, 0, 'string', '', !getDolGlobalString('SOCIETE_EMAIL_MANDATORY') ? '' : $conf->global->SOCIETE_EMAIL_MANDATORY) . '</td>';
421print '<td>' . img_picto('', 'object_email', 'class="pictofixedwidth"') . ' <input type="text" class="maxwidth200 widthcentpercentminusx" name="email" id="email" value="' . $objectsoc->email . '"></td>';
422if (isModEnabled('mailing') && getDolGlobalString('THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION')) {
423 if ($conf->browser->layout == 'phone') {
424 print '</tr><tr>';
425 }
426 print '<td class="individualline noemail">' . $form->editfieldkey($langs->trans('No_Email') . ' (' . $langs->trans('Contact') . ')', 'contact_no_email', '', $objectsoc, 0) . '</td>';
427 print '<td class="individualline" ' . (($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '') . '>' . $form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($objectsoc->no_email) ? 0 : 1)), 1, false, 1) . '</td>';
428}
429print '</tr>';
430
431print '<tr><td>' . $form->editfieldkey('Web', 'url', '', $objectsoc, 0) . '</td>';
432print '<td>' . img_picto('', 'globe', 'class="pictofixedwidth"') . ' <input type="text" class="maxwidth500 widthcentpercentminusx" name="url" id="url" value="' . $objectsoc->url . '"></td></tr>';
433
434
435// Comments
436print '<tr>';
437print '<td class="tdtop">' . $langs->trans("Comments") . '</td>';
438print '<td class="tdtop"><textarea name="note_private" id="note_private" wrap="soft" class="quatrevingtpercent" rows="' . ROWS_3 . '">' . dol_escape_htmltag(GETPOST('note_private', 'restricthtml'), 0, 1) . '</textarea></td>';
439print '</tr>' . "\n";
440
441
442// Other attributes
443$parameters['tpl_context'] = 'public'; // define template context to public
444include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
445
446
447// TODO Move this into generic feature.
448
449// Display Captcha code if is enabled
450if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA')) {
451 require_once DOL_DOCUMENT_ROOT . '/core/lib/security2.lib.php';
452 print '<tr><td class="titlefield"><label for="email"><span class="fieldrequired">' . $langs->trans("SecurityCode") . '</span></label></td><td>';
453 print '<span class="span-icon-security inline-block">';
454 print '<input id="securitycode" placeholder="' . $langs->trans("SecurityCode") . '" class="flat input-icon-security width150" type="text" maxlength="5" name="code" tabindex="3" />';
455 print '</span>';
456 print '<span class="nowrap inline-block">';
457 print '<img class="inline-block valignmiddle" src="' . DOL_URL_ROOT . '/core/antispamimage.php" border="0" width="80" height="32" id="img_securitycode" />';
458 print '<a class="inline-block valignmiddle" href="' . $php_self . '" tabindex="4" data-role="button">' . img_picto($langs->trans("Refresh"), 'refresh', 'id="captcha_refresh_img"') . '</a>';
459 print '</span>';
460 print '</td></tr>';
461}
462
463print "</table>\n";
464
465print dol_get_fiche_end();
466
467// Save / Submit
468print '<div class="center">';
469print '<input type="submit" value="' . $langs->trans("Send") . '" id="submitsave" class="button">';
470if (!empty($backtopage)) {
471 print ' &nbsp; &nbsp; <input type="submit" value="' . $langs->trans("Cancel") . '" id="submitcancel" class="button button-cancel">';
472}
473print '</div>';
474
475
476print "</form>\n";
477print "<br>";
478print '</div></div>';
479
480
481
483
484$db->close();
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:58
if(!defined( 'NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined( 'NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined( 'NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined( 'NOIPCHECK')) llxHeaderVierge()
Header function.
Class to manage members type.
Class to manage standard extra fields.
Class to generate html code for admin pages.
Class to build HTML component for third parties management Only common components are here.
Class to manage generation of HTML components Only common components must be here.
Class to manage third parties objects (customers, suppliers, prospects...)
llxFooterVierge()
Show footer for new societe.
Definition new.php:161
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
printCommonFooter($zone='private')
Print common footer : conf->global->MAIN_HTML_FOOTER js for switch of menu hider js for conf->global-...
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_htmloutput_events($disabledoutputofmessages=0)
Print formatted messages to output (Used to show messages on html output).
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formatted error messages to output (Used to show messages on html output).
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs=array(), $arrayofcss=array(), $disableforlogin=0, $disablenofollow=0, $disablenoindex=0)
Output html header of a page.
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.