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", "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 $langs->load('errors');
126 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
127 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
128 }
129} elseif ($action == 'setribchq') {
130 $rib = GETPOST('rib', 'alpha');
131 $chq = GETPOST('chq', 'alpha');
132
133 $res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
134 $res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
135
136 if (!($res > 0)) {
137 $error++;
138 }
139
140 if (!$error) {
141 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
142 } else {
143 setEventMessages($langs->trans("Error"), null, 'errors');
144 }
145} elseif ($action == 'update') {
146 if (GETPOSTISSET('PROPALE_VALIDITY_DURATION')) {
147 $value = GETPOST('PROPALE_VALIDITY_DURATION');
148 $res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity);
149 if (!($res > 0)) {
150 $error++;
151 }
152 }
153 if (GETPOSTISSET('PROPALE_DRAFT_WATERMARK')) {
154 $draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha');
155 $res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
156 if (!($res > 0)) {
157 $error++;
158 }
159 }
160 if (GETPOSTISSET('PROPOSAL_FREE_TEXT')) {
161 $freetext = GETPOST('PROPOSAL_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
162 $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
163 if (!($res > 0)) {
164 $error++;
165 }
166 }
167 if (GETPOSTISSET('PROPOSAL_ALLOW_ONLINESIGN')) {
168 $result = dolibarr_set_const($db, "PROPOSAL_ALLOW_ONLINESIGN", GETPOST('PROPOSAL_ALLOW_ONLINESIGN', 'alpha'), 'chaine', 0, '', $conf->entity);
169 if (!($result > 0)) {
170 $error++;
171 }
172 }
173 if (GETPOSTISSET('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN')) {
174 $result = dolibarr_set_const($db, "PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN", GETPOST('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN', 'alpha'), 'chaine', 0, '', $conf->entity);
175 if (!($result > 0)) {
176 $error++;
177 }
178 }
179
180 if (!$error) {
181 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
182 } else {
183 setEventMessages($langs->trans("Error"), null, 'errors');
184 }
185} elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') {
186 $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
187
188 if (!($res > 0)) {
189 $error++;
190 }
191
192 if (!$error) {
193 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
194 } else {
195 setEventMessages($langs->trans("Error"), null, 'errors');
196 }
197} elseif ($action == 'set') {
198 // Activate a model
199 $ret = addDocumentModel($value, $type, $label, $scandir);
200} elseif ($action == 'del') {
201 $ret = delDocumentModel($value, $type);
202 if ($ret > 0) {
203 if (getDolGlobalString('PROPALE_ADDON_PDF') == "$value") {
204 dolibarr_del_const($db, 'PROPALE_ADDON_PDF', $conf->entity);
205 }
206 }
207} elseif ($action == 'setdoc') {
208 if (dolibarr_set_const($db, "PROPALE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
209 $conf->global->PROPALE_ADDON_PDF = $value;
210 }
211
212 // On active le modele
213 $ret = delDocumentModel($value, $type);
214 if ($ret > 0) {
215 $ret = addDocumentModel($value, $type, $label, $scandir);
216 }
217} elseif ($action == 'setmod') {
218 // TODO Verify if the chosen numbering module can be active
219 // by calling method canBeActivated
220
221 dolibarr_set_const($db, "PROPALE_ADDON", $value, 'chaine', 0, '', $conf->entity);
222} elseif (preg_match('/set_(.*)/', $action, $reg)) {
223 $code = $reg[1];
224 $value = (GETPOST($code) ? GETPOST($code) : 1);
225
226 $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
227 if (!($res > 0)) {
228 $error++;
229 }
230
231 if ($error) {
232 setEventMessages($langs->trans('Error'), null, 'errors');
233 } else {
234 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
235 header("Location: " . $_SERVER["PHP_SELF"]);
236 exit();
237 }
238} elseif (preg_match('/del_(.*)/', $action, $reg)) {
239 $code = $reg[1];
240 $res = dolibarr_del_const($db, $code, $conf->entity);
241
242 if (!($res > 0)) {
243 $error++;
244 }
245
246 if ($error) {
247 setEventMessages($langs->trans('Error'), null, 'errors');
248 } else {
249 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
250 header("Location: " . $_SERVER["PHP_SELF"]);
251 exit();
252 }
253}
254
255
256/*
257 * View
258 */
259
260$form = new Form($db);
261
262$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
263
264llxHeader('', $langs->trans("PropalSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-propal');
265
266//if ($mesg) print $mesg;
267
268$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>';
269
270print load_fiche_titre($langs->trans("PropalSetup"), $linkback, 'title_setup');
271
273
274print dol_get_fiche_head($head, 'general', $langs->trans("Proposals"), -1, 'propal');
275
276/*
277 * Module numerotation
278 */
279$propal = new Propal($db);
280$propal->initAsSpecimen();
281$propal->type = 0;
282
283printNumberingModuleList('propale', 'mod_propale_', 'PROPALE_ADDON', $langs->trans("ProposalsNumberingModules"), $propal);
284
285
286/*
287 * Document templates generators
288 */
289
290printDocumentModelList($type, 'propale', 'PROPALE_ADDON_PDF', $langs->trans("ProposalsPDFModules"), array(
291 'Logo' => 'option_logo',
292 'PaymentMode' => 'option_modereg',
293 'PaymentConditions' => 'option_condreg',
294 'MultiLanguage' => 'option_multilang',
295 'WatermarkOnDraftProposal' => 'option_draft_watermark',
296));
297
298
299/*
300 * Payment mode
301 */
302
303print '<br>';
304print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
305
306print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" spellcheck="false">';
307print '<input type="hidden" name="token" value="'.newToken().'" />';
308
309print '<table class="noborder centpercent">';
310
311print '<tr class="liste_titre">';
312print '<td>';
313print '<input type="hidden" name="action" value="setribchq">';
314print $langs->trans("PaymentMode").'</td>';
315print '<td align="right">';
316if (!isModEnabled('invoice')) {
317 print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
318}
319print '</td>';
320print "</tr>\n";
321
322print '<tr class="oddeven">';
323print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
324print "<td>";
325if (!isModEnabled('invoice')) {
326 if (isModEnabled("bank")) {
327 $sql = "SELECT rowid, label";
328 $sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
329 $sql .= " WHERE clos = 0";
330 $sql .= " AND courant = 1";
331 $sql .= " AND entity IN (".getEntity('bank_account').")";
332 $resql = $db->query($sql);
333 if ($resql) {
334 $num = $db->num_rows($resql);
335 $i = 0;
336 if ($num > 0) {
337 print '<select name="rib" class="flat" id="rib">';
338 print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
339 while ($i < $num) {
340 $row = $db->fetch_row($resql);
341
342 print '<option value="'.$row[0].'"';
343 print getDolGlobalString('FACTURE_RIB_NUMBER') == $row[0] ? ' selected' : '';
344 print '>'.$row[1].'</option>';
345
346 $i++;
347 }
348 print "</select>";
349 } else {
350 print "<i>".$langs->trans("NoActiveBankAccountDefined")."</i>";
351 }
352 }
353 } else {
354 print '<span class="opacitymedium">'.$langs->trans("BankModuleNotActive").'</span>';
355 }
356} else {
357 print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
358}
359print "</td></tr>";
360
361print '<tr class="oddeven">';
362print "<td>".$langs->trans("SuggestPaymentByChequeToAddress")."</td>";
363print "<td>";
364if (!isModEnabled('invoice')) {
365 print '<select class="flat" name="chq" id="chq">';
366 print '<option value="0">'.$langs->trans("DoNotSuggestPaymentMode").'</option>';
367 print '<option value="-1"'.(getDolGlobalString('FACTURE_CHQ_NUMBER') ? ' selected' : '').'>'.$langs->trans("MenuCompanySetup").' ('.($mysoc->name ? $mysoc->name : $langs->trans("NotDefined")).')</option>';
368
369 $sql = "SELECT rowid, label";
370 $sql .= " FROM ".MAIN_DB_PREFIX."bank_account";
371 $sql .= " WHERE clos = 0";
372 $sql .= " AND courant = 1";
373 $sql .= " AND entity IN (".getEntity('bank_account').")";
374
375 $resql = $db->query($sql);
376 if ($resql) {
377 $num = $db->num_rows($resql);
378 $i = 0;
379 while ($i < $num) {
380 $row = $db->fetch_row($resql);
381
382 print '<option value="'.$row[0].'"';
383 print getDolGlobalString('FACTURE_CHQ_NUMBER') == $row[0] ? ' selected' : '';
384 print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
385
386 $i++;
387 }
388 }
389 print "</select>";
390} else {
391 print '<span class="opacitymedium">'.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).'</span>';
392}
393print "</td></tr>";
394print "</table>";
395print "</form>";
396
397
398print '<br>';
399
400
401/*
402 * Other options
403 */
404
405print load_fiche_titre($langs->trans("OtherOptions"), '', '');
406
407print '<form method="POST" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'" spellcheck="false">';
408print '<input type="hidden" name="token" value="'.newToken().'">';
409print '<input type="hidden" name="page_y" value="">';
410print '<input type="hidden" name="action" value="update">';
411
412print '<table class="noborder centpercent">';
413print "<tr class=\"liste_titre\">";
414print "<td>".$langs->trans("Parameter")."</td>\n";
415print '<td class="center"></td>'."\n";
416print "</tr>";
417
418print '<tr class="oddeven">';
419print '<td>'.$langs->trans("DefaultProposalDurationValidity").'</td>';
420print '<td>';
421print "<input size=\"3\" class=\"flat\" type=\"text\" name=\"PROPALE_VALIDITY_DURATION\" value=\"" . getDolGlobalString('PROPALE_VALIDITY_DURATION')."\"></td>";
422print '</tr>';
423
424$substitutionarray = pdf_getSubstitutionArray($langs, null, $propal, 2);
425$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
426$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
427foreach ($substitutionarray as $key => $val) {
428 $htmltext .= $key.'<br>';
429}
430$htmltext .= '</i>';
431
432print '<tr class="oddeven"><td colspan="2">';
433print $form->textwithpicto($langs->trans("FreeLegalTextOnProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
434$variablename = 'PROPOSAL_FREE_TEXT';
435if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
436 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
437} else {
438 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
439 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
440 print $doleditor->Create();
441}
442print '</td>';
443print "</tr>\n";
444
445
446print '<tr class="oddeven"><td>';
447print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
448print '</td><td>';
449print '<input class="flat minwidth200" type="text" name="PROPALE_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('PROPALE_DRAFT_WATERMARK')).'">';
450print '</td>';
451print "</tr>\n";
452
453
454// Allow external download
455print '<tr class="oddeven">';
456print '<td>'.$langs->trans("AllowExternalDownload").'</td>';
457print '<td>';
458print ajax_constantonoff('PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1);
459print '</td></tr>';
460
461// Allow OnLine Sign
462print '<tr class="oddeven">';
463print '<td>'.$langs->trans("AllowOnLineSign").'</td>';
464print '<td>';
465print ajax_constantonoff('PROPOSAL_ALLOW_ONLINESIGN', array(), null, 0, 0, 1, 2, 0, 1, '', '', 'inline-block', 0, $langs->transnoentitiesnoconv("WarningOnlineSignature", "https://www.dolistore.com"));
466print '</td></tr>';
467
468// Refuse the online signature once the validity date of the proposal is over
469if (getDolGlobalString('PROPOSAL_ALLOW_ONLINESIGN')) {
470 print '<tr class="oddeven">';
471 print '<td>'.$form->textwithpicto($langs->trans("RefuseOnlineSignAfterValidityDate"), $langs->trans("RefuseOnlineSignAfterValidityDateHelp")).'</td>';
472 print '<td>';
473 print ajax_constantonoff('PROPOSAL_ONLINESIGN_REFUSE_IF_VALIDITY_DATE_PASSED');
474 print '</td></tr>';
475}
476
477/*
478if (getDolGlobalString('PROPOSAL_ALLOW_ONLINESIGN')) {
479 print '<tr class="oddeven"><td>';
480 print $langs->trans("SecurityToken").'</td><td>';
481 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">';
482 if (!empty($conf->use_javascript_ajax)) {
483 print '&nbsp;'.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"');
484 }
485 print '</td></tr>';
486}
487*/
488
489// Reminder by email before a commercial proposal expires
490if (isModEnabled('cron')) {
491 print '<tr class="oddeven">';
492 print '<td>'.$langs->trans("SendReminderForExpiringProposalsTitle").'</td>';
493 print '<td>';
494 print img_picto('', 'url', 'class="pictofixedwidth"').'<a href="'.DOL_URL_ROOT.'/cron/list.php?search_label=SendReminderForExpiringProposalsTitle&status=-1">'.$langs->trans("ConfigureContractReminderCronjobToSetFrequency").'</a>';
495 print '</td>';
496 print '</tr>';
497}
498
499// Notifications
500print '<tr class="oddeven">';
501print '<td>'.img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("Notifications").'</td>';
502print '<td>';
503print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification");
504print '</td></tr>';
505
506// More PDF options
507print '<tr class="oddeven">';
508print '<td>'.img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("MoreOptionsRelatedToPDF").'</td>';
509print '<td>';
510print img_picto('', 'url', 'class="pictofixedwidth"').'<a href="'.DOL_URL_ROOT.'/admin/pdf_other.php">'.$langs->trans("SeeInPDFSetupPage").'</a>';
511print '</td></tr>';
512
513
514print '</table>';
515
516print '<center><input type="submit" class="button button-edit reposition" value="'.$langs->trans("Modify").'"></center>';
517
518print '</form>';
519
520print "</table>\n<br>";
521
522$constname = 'PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN';
523
524// Add button to autosuggest a key
525include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
526print dolJSToSetRandomPassword($constname);
527
528
529// End of page
530llxFooter();
531$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
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
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
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:542
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.