dolibarr 25.0.0-alpha
supplier_proposal.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) 2015 Jean-François Ferry <jfefe@aternatik.fr>
11 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
12 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
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';
36require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
37require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
38require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
39require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php';
40
50// Load translation files required by the page
51$langs->loadLangs(array("admin", "other", "supplier_proposal"));
52
53if (!$user->admin) {
55}
56
57$action = GETPOST('action', 'aZ09');
58$value = GETPOST('value', 'alpha');
59$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
60
61$label = GETPOST('label', 'alpha');
62$scandir = GETPOST('scan_dir', 'alpha');
63$type = 'supplier_proposal';
64
65$error = 0;
66
67
68/*
69 * Actions
70 */
71
72include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
73
74if ($action == 'updateMask') {
75 $maskconstsupplier_proposal = GETPOST('maskconstsupplier_proposal', 'aZ09');
76 $masksupplier_proposal = GETPOST('masksupplier_proposal', 'alpha');
77
78 $res = 0;
79
80 if ($maskconstsupplier_proposal && preg_match('/_MASK$/', $maskconstsupplier_proposal)) {
81 $res = dolibarr_set_const($db, $maskconstsupplier_proposal, $masksupplier_proposal, '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}
94
95if ($action == 'specimen') {
96 $modele = GETPOST('module', 'alpha');
97
98 $supplier_proposal = new SupplierProposal($db);
99 $supplier_proposal->initAsSpecimen();
100
101 // Search template files
102 $file = '';
103 $classname = '';
104 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
105 foreach ($dirmodels as $reldir) {
106 $file = dol_buildpath($reldir."core/modules/supplier_proposal/doc/pdf_".$modele.".modules.php");
107 if (file_exists($file)) {
108 $classname = "pdf_".$modele;
109 break;
110 }
111 }
112
113 if ($classname !== '') {
114 require_once $file;
115
116 $module = new $classname($db);
117 '@phan-var-force ModelePDFSupplierProposal $module';
118
119 if ($module->write_file($supplier_proposal, $langs) > 0) {
120 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf");
121 return;
122 } else {
123 setEventMessages($module->error, null, 'errors');
124 dol_syslog($module->error, LOG_ERR);
125 }
126 } else {
127 $langs->load('errors');
128 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
129 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
130 }
131}
132
133if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK') {
134 $draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK', 'alpha');
135
136 $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
137 if (!($res > 0)) {
138 $error++;
139 }
140
141 if (!$error) {
142 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
143 } else {
144 setEventMessages($langs->trans("Error"), null, 'errors');
145 }
146}
147
148if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') {
149 $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
150
151 $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
152
153 if (!($res > 0)) {
154 $error++;
155 }
156
157 if (!$error) {
158 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
159 } else {
160 setEventMessages($langs->trans("Error"), null, 'errors');
161 }
162}
163
164if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') {
165 $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
166
167 if (!($res > 0)) {
168 $error++;
169 }
170
171 if (!$error) {
172 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
173 } else {
174 setEventMessages($langs->trans("Error"), null, 'errors');
175 }
176}
177
178// Activate a model
179$reg = array();
180if ($action == 'set') {
181 $ret = addDocumentModel($value, $type, $label, $scandir);
182} elseif ($action == 'del') {
183 $ret = delDocumentModel($value, $type);
184 if ($ret > 0) {
185 if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF') == "$value") {
186 dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF', $conf->entity);
187 }
188 }
189} elseif ($action == 'setdoc') {
190 dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF", empty($value) ? '' : $value, 'chaine', 0, '', $conf->entity);
191
192 // On active le modele
193 $ret = delDocumentModel($value, $type);
194 if ($ret > 0) {
195 $ret = addDocumentModel($value, $type, $label, $scandir);
196 }
197} elseif ($action == 'setmod') {
198 // TODO Verify if the chosen numbering module can be activated
199 // by calling method canBeActivated
200
201 dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON", $value, 'chaine', 0, '', $conf->entity);
202} elseif (preg_match('/set_(.*)/', $action, $reg)) {
203 $code = $reg[1];
204 if ($code == "SUPPLIER_PROPOSAL_FREE_TEXT") {
205 $value = (GETPOST($code, 'restricthtml') ? GETPOST($code, 'restricthtml') : 1);
206 } else {
207 $value = (GETPOST($code) ? GETPOST($code) : 1);
208 }
209 $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
210 if (!($res > 0)) {
211 $error++;
212 }
213
214 if ($error) {
215 setEventMessages($langs->trans('Error'), null, 'errors');
216 } else {
217 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
218 header("Location: " . $_SERVER["PHP_SELF"]);
219 exit();
220 }
221} elseif (preg_match('/del_(.*)/', $action, $reg)) {
222 $code = $reg[1];
223 $res = dolibarr_del_const($db, $code, $conf->entity);
224
225 if (!($res > 0)) {
226 $error++;
227 }
228
229 if ($error) {
230 setEventMessages($langs->trans('Error'), null, 'errors');
231 } else {
232 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
233 header("Location: " . $_SERVER["PHP_SELF"]);
234 exit();
235 }
236}
237
238
239/*
240 * Affiche page
241 */
242
243$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
244
245
246llxHeader('', $langs->trans("SupplierProposalSetup"), '', '', 0, 0, '', '', '', 'mod-admin page-supplier_proposal');
247
248$form = new Form($db);
249
250$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>';
251
252print load_fiche_titre($langs->trans("SupplierProposalSetup"), $linkback, 'title_setup');
253
255
256print dol_get_fiche_head($head, 'general', $langs->trans("CommRequests"), -1, 'supplier_proposal');
257
258/*
259 * Module numerotation
260 */
261$supplier_proposal = new SupplierProposal($db);
262$supplier_proposal->initAsSpecimen();
263
264printNumberingModuleList('supplier_proposal', 'mod_supplier_proposal_', 'SUPPLIER_PROPOSAL_ADDON', $langs->trans("SupplierProposalNumberingModules"), $supplier_proposal);
265
266print '<br>';
267
268
269/*
270 * Document templates generators
271 */
272
273print load_fiche_titre($langs->trans("SupplierProposalPDFModules"), '', '');
274
275// Load array def with activated templates
276$def = array();
277$sql = "SELECT nom";
278$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
279$sql .= " WHERE type = '".$db->escape($type)."'";
280$sql .= " AND entity = ".((int) $conf->entity);
281$resql = $db->query($sql);
282if ($resql) {
283 $i = 0;
284 $num_rows = $db->num_rows($resql);
285 while ($i < $num_rows) {
286 $array = $db->fetch_array($resql);
287 if (is_array($array)) {
288 array_push($def, $array[0]);
289 }
290 $i++;
291 }
292} else {
293 dol_print_error($db);
294}
295
296
297print "<table class=\"noborder\" width=\"100%\">\n";
298print "<tr class=\"liste_titre\">\n";
299print " <td>".$langs->trans("Name")."</td>\n";
300print " <td>".$langs->trans("Description")."</td>\n";
301print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
302print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
303print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
304print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
305print "</tr>\n";
306
307clearstatcache();
308
309foreach ($dirmodels as $reldir) {
310 foreach (array('', '/doc') as $valdir) {
311 $realpath = $reldir."core/modules/supplier_proposal".$valdir;
312 $dir = dol_buildpath($realpath);
313
314 if (is_dir($dir)) {
315 $handle = opendir($dir);
316 if (is_resource($handle)) {
317 $filelist = array();
318 while (($file = readdir($handle)) !== false) {
319 $filelist[] = $file;
320 }
321 closedir($handle);
322 arsort($filelist);
323
324 foreach ($filelist as $file) {
325 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
326 if (file_exists($dir.'/'.$file)) {
327 $name = dol_substr($file, 4, dol_strlen($file) - 16);
328 $classname = dol_substr($file, 0, dol_strlen($file) - 12);
329
330 require_once $dir.'/'.$file;
331 $module = new $classname($db);
332 '@phan-var-force CommonDocGenerator $module';
333
334 $modulequalified = 1;
335 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
336 $modulequalified = 0;
337 }
338 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
339 $modulequalified = 0;
340 }
341
342 if ($modulequalified) {
343 print '<tr class="oddeven"><td width="100">';
344 print(empty($module->name) ? $name : $module->name);
345 print "</td><td>\n";
346 if (method_exists($module, 'info')) {
347 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
348 } else {
349 print $module->description;
350 }
351 print '</td>';
352
353 // Active
354 if (in_array($name, $def)) {
355 print '<td class="center">'."\n";
356 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
357 print img_picto($langs->trans("Enabled"), 'switch_on');
358 print '</a>';
359 print '</td>';
360 } else {
361 print '<td align="center">'."\n";
362 print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
363 print "</td>";
364 }
365
366 // Default
367 print '<td align="center">';
368 if (getDolGlobalString('SUPPLIER_PROPOSAL_ADDON_PDF') == "$name") {
369 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value=0&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Default"), 'on').'</a>';
370 } else {
371 print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Disabled").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
372 }
373 print '</td>';
374
375 // Info
376 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
377 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
378 if ($module->type == 'pdf') {
379 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
380 }
381 $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
382
383 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
384 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
385 $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
386 $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
387 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
388 //$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
389 //$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
390 $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1);
391
392
393 print '<td class="center">';
394 print $form->textwithpicto('', $htmltooltip, 1, 'info');
395 print '</td>';
396
397 // Preview
398 print '<td class="center">';
399 if ($module->type == 'pdf') {
400 print '<a href="'.dolBuildUrl($_SERVER["PHP_SELF"], ['action' => 'specimen', 'module' => $name], true).'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
401 } else {
402 print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
403 }
404 print '</td>';
405
406 print "</tr>\n";
407 }
408 }
409 }
410 }
411 }
412 }
413 }
414}
415
416print '</table>';
417print '<br>';
418
419
420/*
421 * Other options
422 *
423 */
424print load_fiche_titre($langs->trans("OtherOptions"), '', '');
425
426print "<table class=\"noborder\" width=\"100%\">";
427print "<tr class=\"liste_titre\">";
428print "<td>".$langs->trans("Parameter")."</td>\n";
429print '<td></td>'."\n";
430print "<td>&nbsp;</td>\n";
431print "</tr>";
432
433$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
434$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
435$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
436foreach ($substitutionarray as $key => $val) {
437 $htmltext .= $key.'<br>';
438}
439$htmltext .= '</i>';
440
441print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
442print '<input type="hidden" name="token" value="'.newToken().'">';
443print '<input type="hidden" name="action" value="set_SUPPLIER_PROPOSAL_FREE_TEXT">';
444print '<tr class="oddeven"><td colspan="2">';
445print $form->textwithpicto($langs->trans("FreeLegalTextOnSupplierProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
446$variablename = 'SUPPLIER_PROPOSAL_FREE_TEXT';
447if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
448 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
449} else {
450 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
451 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
452 print $doleditor->Create();
453}
454print '</td><td class="right">';
455print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
456print "</td></tr>\n";
457print '</form>';
458
459
460print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
461print '<input type="hidden" name="token" value="'.newToken().'">';
462print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK\">";
463print '<tr class="oddeven"><td>';
464print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
465print '</td><td>';
466print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SUPPLIER_PROPOSAL_DRAFT_WATERMARK')).'">';
467print '</td><td class="right">';
468print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
469print "</td></tr>\n";
470print '</form>';
471
472if (isModEnabled('bank')) {
473 print '<tr class="oddeven"><td>';
474 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>';
475 print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
476 print '</td>';
477 print '<td></td>';
478 print '</tr>';
479} else {
480 print '<tr class="oddeven"><td>';
481 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
482}
483
484// Allow external download
485print '<tr class="oddeven">';
486print '<td>'.$langs->trans("AllowExternalDownload").'</td>';
487print '<td>';
488print ajax_constantonoff('PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1);
489print '</td>';
490print '<td></td>';
491print '</tr>';
492
493// Notifications
494print '<tr class="oddeven">';
495print '<td>'.img_picto('', 'email', 'class="pictofixedwidth"').$langs->trans("Notifications").'</td>';
496print '<td colspan="2">';
497print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification");
498print '</td></tr>';
499
500// More PDF options
501print '<tr class="oddeven">';
502print '<td>'.img_picto('', 'pdf', 'class="pictofixedwidth"').$langs->trans("MoreOptionsRelatedToPDF").'</td>';
503print '<td colspan="2">';
504print img_picto('', 'url', 'class="pictofixedwidth"').'<a href="'.DOL_URL_ROOT.'/admin/pdf_other.php">'.$langs->trans("SeeInPDFSetupPage").'</a>';
505print '</td></tr>';
506
507
508print '</table>';
509
510
511
512// End of page
513llxFooter();
514$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 price ask supplier.
if(! $sortfield) if(! $sortorder) $module
Definition list.php:193
dol_strlen($string, $stringencoding='UTF-8', $binarycount=0)
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
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_substr($string, $start, $length=null, $stringencoding='', $trunconbytes=0)
Make a substring.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:165
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
supplier_proposal_admin_prepare_head()
Return array head with list of tabs to view object information.