dolibarr 25.0.0-alpha
propal.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
5 * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
6 * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
7 * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
8 * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
9 * Copyright (C) 2011-2013 Juanjo Menent <jmenent@2byte.es>
10 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
11 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
12 * Copyright (C) 2025 William Mead <william@m34d.com>
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <https://www.gnu.org/licenses/>.
26 */
27
34// Load Dolibarr environment
35require '../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
45require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
46require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
47require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
48
49// Load translation files required by the page
50$langs->loadLangs(array("admin", "other", "errors", "propal"));
51
52if (!$user->admin) {
54}
55
56$action = GETPOST('action', 'aZ09');
57$value = GETPOST('value', 'alpha');
58$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
59
60$label = GETPOST('label', 'alpha');
61$scandir = GETPOST('scan_dir', 'alpha');
62$type = 'propal';
63
64$propal = new Propal($db);
65
66
67/*
68 * Actions
69 */
70
71include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
72
73$error = 0;
74if ($action == 'updateMask') {
75 $maskconstpropal = GETPOST('maskconstpropal', 'aZ09');
76 $maskpropal = GETPOST('maskpropal', 'alpha');
77
78 $res = 0;
79
80 if ($maskconstpropal && preg_match('/_MASK$/', $maskconstpropal)) {
81 $res = dolibarr_set_const($db, $maskconstpropal, $maskpropal, 'chaine', 0, '', $conf->entity);
82 }
83
84 if (!($res > 0)) {
85 $error++;
86 }
87
88 if (!$error) {
89 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
90 } else {
91 setEventMessages($langs->trans("Error"), null, 'errors');
92 }
93} elseif ($action == 'specimen') {
94 $modele = GETPOST('module', 'alpha');
95
96 $propal->initAsSpecimen();
97
98 // Search template files
99 $file = '';
100 $classname = '';
101 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
102 foreach ($dirmodels as $reldir) {
103 $file = dol_buildpath($reldir."core/modules/propale/doc/pdf_".$modele.".modules.php");
104 if (file_exists($file)) {
105 $classname = "pdf_".$modele;
106 break;
107 }
108 }
109
110 if ($classname !== '') {
111 require_once $file;
112
113 $module = new $classname($db);
114 '@phan-var-force ModelePDFPropales $module';
115
117 if ($module->write_file($propal, $langs) > 0) {
118 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=propal&file=SPECIMEN.pdf");
119 return;
120 } else {
121 setEventMessages($module->error, $module->errors, 'errors');
122 dol_syslog($module->error, LOG_ERR);
123 }
124 } else {
125 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
126 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
127 }
128} elseif ($action == 'setribchq') {
129 $rib = GETPOST('rib', 'alpha');
130 $chq = GETPOST('chq', 'alpha');
131
132 $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
133 $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
134
135 if (!($res > 0)) {
136 $error++;
137 }
138
139 if (!$error) {
140 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
141 } else {
142 setEventMessages($langs->trans("Error"), null, 'errors');
143 }
144} elseif ($action == 'update') {
145 if (GETPOSTISSET('PROPALE_VALIDITY_DURATION')) {
146 $value = GETPOST('PROPALE_VALIDITY_DURATION');
147 $res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity);
148 if (!($res > 0)) {
149 $error++;
150 }
151 }
152 if (GETPOSTISSET('PROPALE_DRAFT_WATERMARK')) {
153 $draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha');
154 $res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
155 if (!($res > 0)) {
156 $error++;
157 }
158 }
159 if (GETPOSTISSET('PROPOSAL_FREE_TEXT')) {
160 $freetext = GETPOST('PROPOSAL_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
161 $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
162 if (!($res > 0)) {
163 $error++;
164 }
165 }
166 if (GETPOSTISSET('PROPOSAL_ALLOW_ONLINESIGN')) {
167 $result = dolibarr_set_const($db, "PROPOSAL_ALLOW_ONLINESIGN", GETPOST('PROPOSAL_ALLOW_ONLINESIGN', 'alpha'), 'chaine', 0, '', $conf->entity);
168 if (!($result > 0)) {
169 $error++;
170 }
171 }
172 if (GETPOSTISSET('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN')) {
173 $result = dolibarr_set_const($db, "PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN", GETPOST('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN', 'alpha'), 'chaine', 0, '', $conf->entity);
174 if (!($result > 0)) {
175 $error++;
176 }
177 }
178
179 if (!$error) {
180 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
181 } else {
182 setEventMessages($langs->trans("Error"), null, 'errors');
183 }
184} elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') {
185 $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
186
187 if (!($res > 0)) {
188 $error++;
189 }
190
191 if (!$error) {
192 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
193 } else {
194 setEventMessages($langs->trans("Error"), null, 'errors');
195 }
196} elseif ($action == 'set') {
197 // Activate a model
198 $ret = addDocumentModel($value, $type, $label, $scandir);
199} elseif ($action == 'del') {
200 $ret = delDocumentModel($value, $type);
201 if ($ret > 0) {
202 if (getDolGlobalString('PROPALE_ADDON_PDF') == "$value") {
203 dolibarr_del_const($db, 'PROPALE_ADDON_PDF', $conf->entity);
204 }
205 }
206} elseif ($action == 'setdoc') {
207 if (dolibarr_set_const($db, "PROPALE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
208 $conf->global->PROPALE_ADDON_PDF = $value;
209 }
210
211 // On active le modele
212 $ret = delDocumentModel($value, $type);
213 if ($ret > 0) {
214 $ret = addDocumentModel($value, $type, $label, $scandir);
215 }
216} elseif ($action == 'setmod') {
217 // TODO Verify if the chosen numbering module can be active
218 // by calling method canBeActivated
219
220 dolibarr_set_const($db, "PROPALE_ADDON", $value, 'chaine', 0, '', $conf->entity);
221} elseif (preg_match('/set_(.*)/', $action, $reg)) {
222 $code = $reg[1];
223 $value = (GETPOST($code) ? GETPOST($code) : 1);
224
225 $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
226 if (!($res > 0)) {
227 $error++;
228 }
229
230 if ($error) {
231 setEventMessages($langs->trans('Error'), null, 'errors');
232 } else {
233 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
234 header("Location: " . $_SERVER["PHP_SELF"]);
235 exit();
236 }
237} elseif (preg_match('/del_(.*)/', $action, $reg)) {
238 $code = $reg[1];
239 $res = dolibarr_del_const($db, $code, $conf->entity);
240
241 if (!($res > 0)) {
242 $error++;
243 }
244
245 if ($error) {
246 setEventMessages($langs->trans('Error'), null, 'errors');
247 } else {
248 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
249 header("Location: " . $_SERVER["PHP_SELF"]);
250 exit();
251 }
252}
253
254
255/*
256 * View
257 */
258
259$form = new Form($db);
260
261$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
262
263llxHeader('', $langs->trans("PropalSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-propal');
264
265//if ($mesg) print $mesg;
266
267$linkback = '<a href="'.dolBuildUrl(DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
268
269print load_fiche_titre($langs->trans("PropalSetup"), $linkback, 'title_setup');
270
272
273print dol_get_fiche_head($head, 'general', $langs->trans("Proposals"), -1, 'propal');
274
275/*
276 * Module numerotation
277 */
278$propal = new Propal($db);
279$propal->initAsSpecimen();
280$propal->type = 0;
281
282printNumberingModuleList('propale', 'mod_propale_', 'PROPALE_ADDON', $langs->trans("ProposalsNumberingModules"), $propal);
283
284
285/*
286 * Document templates generators
287 */
288
289printDocumentModelList($type, 'propale', 'PROPALE_ADDON_PDF', $langs->trans("ProposalsPDFModules"), array(
290 'Logo' => 'option_logo',
291 'PaymentMode' => 'option_modereg',
292 'PaymentConditions' => 'option_condreg',
293 'MultiLanguage' => 'option_multilang',
294 'WatermarkOnDraftProposal' => 'option_draft_watermark',
295));
296
297
298/*
299 * Payment mode
300 */
301
302print '<br>';
303print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
304
305print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" spellcheck="false">';
306print '<input type="hidden" name="token" value="'.newToken().'" />';
307
308print '<table class="noborder centpercent">';
309
310print '<tr class="liste_titre">';
311print '<td>';
312print '<input type="hidden" name="action" value="setribchq">';
313print $langs->trans("PaymentMode").'</td>';
314print '<td align="right">';
315if (!isModEnabled('invoice')) {
316 print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
317}
318print '</td>';
319print "</tr>\n";
320
321print '<tr class="oddeven">';
322print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
323print "<td>";
324if (!isModEnabled('invoice')) {
325 if (isModEnabled("bank")) {
326 $sql = "SELECT rowid, label";
327 $sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
328 $sql .= " WHERE clos = 0";
329 $sql .= " AND courant = 1";
330 $sql .= " AND entity IN (".getEntity('bank_account').")";
331 $resql = $db->query($sql);
332 if ($resql) {
333 $num = $db->num_rows($resql);
334 $i = 0;
335 if ($num > 0) {
336 print '<select name="rib" class="flat" id="rib">';
337 print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
338 while ($i < $num) {
339 $row = $db->fetch_row($resql);
340
341 print '<option value="'.$row[0].'"';
342 print getDolGlobalString('FACTURE_RIB_NUMBER') == $row[0] ? ' selected' : '';
343 print '>'.$row[1].'</option>';
344
345 $i++;
346 }
347 print "</select>";
348 } else {
349 print "<i>".$langs->trans("NoActiveBankAccountDefined")."</i>";
350 }
351 }
352 } else {
353 print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
354 }
355} else {
356 print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
357}
358print "</td></tr>";
359
360print '<tr class="oddeven">';
361print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
362print "<td>";
363if (!isModEnabled('invoice')) {
364 print '<select class="flat" name="chq" id="chq">';
365 print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
366 print '<option value="-1"'.(getDolGlobalString('FACTURE_CHQ_NUMBER') ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
367
368 $sql = "SELECT rowid, label";
369 $sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
370 $sql .= " WHERE clos = 0";
371 $sql .= " AND courant = 1";
372 $sql .= " AND entity IN (".getEntity('bank_account').")";
373
374 $resql = $db->query($sql);
375 if ($resql) {
376 $num = $db->num_rows($resql);
377 $i = 0;
378 while ($i < $num) {
379 $row = $db->fetch_row($resql);
380
381 print '<option value="'.$row[0].'"';
382 print getDolGlobalString('FACTURE_CHQ_NUMBER') == $row[0] ? ' selected' : '';
383 print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
384
385 $i++;
386 }
387 }
388 print "</select>";
389} else {
390 print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
391}
392print "</td></tr>";
393print "</table>";
394print "</form>";
395
396
397print '<br>';
398
399
400/*
401 * Other options
402 */
403
404print load_fiche_titre($langs->trans("OtherOptions"), '', '');
405
406print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'" spellcheck="false">';
407print '<input type="hidden" name="token" value="'.newToken().'">';
408print '<input type="hidden" name="page_y" value="">';
409print '<input type="hidden" name="action" value="update">';
410
411print '<table class="noborder centpercent">';
412print "<tr class=\"liste_titre\">";
413print "<td>".$langs->trans("Parameter")."</td>\n";
414print '<td class="center"></td>'."\n";
415print "</tr>";
416
417print '<tr class="oddeven">';
418print '<td>'.$langs->trans("DefaultProposalDurationValidity").'</td>';
419print '<td>';
420print "<input size=\"3\" class=\"flat\" type=\"text\" name=\"PROPALE_VALIDITY_DURATION\" value=\"" . getDolGlobalString('PROPALE_VALIDITY_DURATION')."\"></td>";
421print '</tr>';
422
423$substitutionarray = pdf_getSubstitutionArray($langs, null, $propal, 2);
424$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
425$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
426foreach ($substitutionarray as $key => $val) {
427 $htmltext .= $key.'<br>';
428}
429$htmltext .= '</i>';
430
431print '<tr class="oddeven"><td colspan="2">';
432print $form->textwithpicto($langs->trans("FreeLegalTextOnProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
433$variablename = 'PROPOSAL_FREE_TEXT';
434if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
435 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
436} else {
437 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
438 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
439 print $doleditor->Create();
440}
441print '</td>';
442print "</tr>\n";
443
444
445print '<tr class="oddeven"><td>';
446print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
447print '</td><td>';
448print '<input class="flat minwidth200" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('PROPALE_DRAFT_WATERMARK')).'">';
449print '</td>';
450print "</tr>\n";
451
452
453// Allow external download
454print '<tr class="oddeven">';
455print '<td>'.$langs->trans("AllowExternalDownload").'</td>';
456print '<td>';
457print ajax_constantonoff('PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1);
458print '</td></tr>';
459
460// Allow OnLine Sign
461print '<tr class="oddeven">';
462print '<td>'.$langs->trans("AllowOnLineSign").'</td>';
463print '<td>';
464print ajax_constantonoff('PROPOSAL_ALLOW_ONLINESIGN', array(), null, 0, 0, 1, 2, 0, 1, '', '', 'inline-block', 0, $langs->transnoentitiesnoconv("WarningOnlineSignature", "https://www.dolistore.com"));
465print '</td></tr>';
466
467// Refuse the online signature once the validity date of the proposal is over
468if (getDolGlobalString('PROPOSAL_ALLOW_ONLINESIGN')) {
469 print '<tr class="oddeven">';
470 print '<td>'.$form->textwithpicto($langs->trans("RefuseOnlineSignAfterValidityDate"), $langs->trans("RefuseOnlineSignAfterValidityDateHelp")).'</td>';
471 print '<td>';
472 print ajax_constantonoff('PROPOSAL_ONLINESIGN_REFUSE_IF_VALIDITY_DATE_PASSED');
473 print '</td></tr>';
474}
475
476/*
477if (getDolGlobalString('PROPOSAL_ALLOW_ONLINESIGN')) {
478 print '<tr class="oddeven"><td>';
479 print $langs->trans("SecurityToken").'</td><td>';
480 print '<input class="minwidth300" type="text" id="PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN" name="PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN" value="' . getDolGlobalString('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN').'" spellcheck="false">';
481 if (!empty($conf->use_javascript_ajax)) {
482 print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
483 }
484 print '</td></tr>';
485}
486*/
487
488// Notifications
489print '<tr class="oddeven">';
490print '<td>'.img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("Notifications").'</td>';
491print '<td>';
492print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification");
493print '</td></tr>';
494
495// More PDF options
496print '<tr class="oddeven">';
497print '<td>'.img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("MoreOptionsRelatedToPDF").'</td>';
498print '<td>';
499print img_picto('', 'url', 'class="pictofixedwidth"').'<a href="'.DOL_URL_ROOT.'/admin/pdf_other.php">'.$langs->trans("SeeInPDFSetupPage").'</a>';
500print '</td></tr>';
501
502
503print '</table>';
504
505print '<center><input type="submit" class="button button-edit reposition" value="'.$langs->trans("Modify").'"></center>';
506
507print '</form>';
508
509print "</table>\n<br>";
510
511$constname = 'PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN';
512
513// Add button to autosuggest a key
514include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
515print dolJSToSetRandomPassword($constname);
516
517
518// End of page
519llxFooter();
520$db->close();
addDocumentModel($name, $type, $label='', $description='')
Add document model used by doc generator.
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).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
delDocumentModel($name, $type)
Delete document model used by doc generator.
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class to manage a WYSIWYG editor.
Class to manage generation of HTML components Only common components must be here.
Class to manage proposals.
if(! $sortfield) if(! $sortorder) $module
Definition list.php:193
global $mysoc
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0, $morecssdiv='')
Show tabs of a record.
Definition html.lib.php:540
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='', $morecssonpicto='widthpictotitle')
Load a title with picto.
pdf_getSubstitutionArray($outputlangs, $exclude=null, $object=null, $onlykey=0, $include=null)
Return array of possible substitutions for PDF content (without external module substitutions).
Definition pdf.lib.php:1180
propal_admin_prepare_head()
Return array head with list of tabs to view object information.
dolJSToSetRandomPassword($htmlname, $htmlnameofbutton='generate_token', $generic=1)
Output javascript to autoset a generated password using default module into a HTML element.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.