dolibarr 19.0.3
supplier_proposal.php
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 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <https://www.gnu.org/licenses/>.
24 */
25
26// Load Dolibarr environment
27require '../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/lib/supplier_proposal.lib.php';
32
33// Load translation files required by the page
34$langs->loadLangs(array("admin", "errors", "other", "supplier_proposal"));
35
36if (!$user->admin) {
38}
39
40$action = GETPOST('action', 'aZ09');
41$value = GETPOST('value', 'alpha');
42$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
43
44$label = GETPOST('label', 'alpha');
45$scandir = GETPOST('scan_dir', 'alpha');
46$type = 'supplier_proposal';
47
48$error = 0;
49
50
51/*
52 * Actions
53 */
54
55include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
56
57if ($action == 'updateMask') {
58 $maskconstsupplier_proposal = GETPOST('maskconstsupplier_proposal', 'aZ09');
59 $masksupplier_proposal = GETPOST('masksupplier_proposal', 'alpha');
60 if ($maskconstsupplier_proposal && preg_match('/_MASK$/', $maskconstsupplier_proposal)) {
61 $res = dolibarr_set_const($db, $maskconstsupplier_proposal, $masksupplier_proposal, 'chaine', 0, '', $conf->entity);
62 }
63
64 if (!($res > 0)) {
65 $error++;
66 }
67
68 if (!$error) {
69 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
70 } else {
71 setEventMessages($langs->trans("Error"), null, 'errors');
72 }
73}
74
75if ($action == 'specimen') {
76 $modele = GETPOST('module', 'alpha');
77
78 $supplier_proposal = new SupplierProposal($db);
79 $supplier_proposal->initAsSpecimen();
80
81 // Search template files
82 $file = '';
83 $classname = '';
84 $filefound = 0;
85 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
86 foreach ($dirmodels as $reldir) {
87 $file = dol_buildpath($reldir."core/modules/supplier_proposal/doc/pdf_".$modele.".modules.php");
88 if (file_exists($file)) {
89 $filefound = 1;
90 $classname = "pdf_".$modele;
91 break;
92 }
93 }
94
95 if ($filefound) {
96 require_once $file;
97
98 $module = new $classname($db);
99
100 if ($module->write_file($supplier_proposal, $langs) > 0) {
101 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf");
102 return;
103 } else {
104 setEventMessages($module->error, null, 'errors');
105 dol_syslog($module->error, LOG_ERR);
106 }
107 } else {
108 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
109 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
110 }
111}
112
113if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK') {
114 $draft = GETPOST('SUPPLIER_PROPOSAL_DRAFT_WATERMARK', 'alpha');
115
116 $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
117 if (!($res > 0)) {
118 $error++;
119 }
120
121 if (!$error) {
122 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
123 } else {
124 setEventMessages($langs->trans("Error"), null, 'errors');
125 }
126}
127
128if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') {
129 $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string
130
131 $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
132
133 if (!($res > 0)) {
134 $error++;
135 }
136
137 if (!$error) {
138 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
139 } else {
140 setEventMessages($langs->trans("Error"), null, 'errors');
141 }
142}
143
144if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') {
145 $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL", $value, 'chaine', 0, '', $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// Activate a model
159if ($action == 'set') {
160 $ret = addDocumentModel($value, $type, $label, $scandir);
161} elseif ($action == 'del') {
162 $ret = delDocumentModel($value, $type);
163 if ($ret > 0) {
164 if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") {
165 dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF', $conf->entity);
166 }
167 }
168} elseif ($action == 'setdoc') {
169 if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
170 $conf->global->SUPPLIER_PROPOSAL_ADDON_PDF = $value;
171 }
172
173 // On active le modele
174 $ret = delDocumentModel($value, $type);
175 if ($ret > 0) {
176 $ret = addDocumentModel($value, $type, $label, $scandir);
177 }
178} elseif ($action == 'setmod') {
179 // TODO Verifier si module numerotation choisi peut etre active
180 // par appel methode canBeActivated
181
182 dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON", $value, 'chaine', 0, '', $conf->entity);
183} elseif (preg_match('/set_(.*)/', $action, $reg)) {
184 $code = $reg[1];
185 $value = (GETPOST($code) ? GETPOST($code) : 1);
186
187 $res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
188 if (!($res > 0)) {
189 $error++;
190 }
191
192 if ($error) {
193 setEventMessages($langs->trans('Error'), null, 'errors');
194 } else {
195 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
196 header("Location: " . $_SERVER["PHP_SELF"]);
197 exit();
198 }
199} elseif (preg_match('/del_(.*)/', $action, $reg)) {
200 $code = $reg[1];
201 $res = dolibarr_del_const($db, $code, $conf->entity);
202
203 if (!($res > 0)) {
204 $error++;
205 }
206
207 if ($error) {
208 setEventMessages($langs->trans('Error'), null, 'errors');
209 } else {
210 setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
211 header("Location: " . $_SERVER["PHP_SELF"]);
212 exit();
213 }
214}
215
216
217/*
218 * Affiche page
219 */
220
221$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
222
223
224llxHeader('', $langs->trans("SupplierProposalSetup"));
225
226$form = new Form($db);
227
228//if ($mesg) print $mesg;
229
230$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
231print load_fiche_titre($langs->trans("SupplierProposalSetup"), $linkback, 'title_setup');
232
233$head = supplier_proposal_admin_prepare_head();
234
235print dol_get_fiche_head($head, 'general', $langs->trans("CommRequests"), -1, 'supplier_proposal');
236
237/*
238 * Module numerotation
239 */
240print load_fiche_titre($langs->trans("SupplierProposalNumberingModules"), '', '');
241
242print '<table class="noborder centpercent">';
243print '<tr class="liste_titre">';
244print '<td>'.$langs->trans("Name")."</td>\n";
245print '<td>'.$langs->trans("Description")."</td>\n";
246print '<td class="nowrap">'.$langs->trans("Example")."</td>\n";
247print '<td align="center" width="60">'.$langs->trans("Status").'</td>';
248print '<td align="center" width="16">'.$langs->trans("ShortInfo").'</td>';
249print '</tr>'."\n";
250
251clearstatcache();
252foreach ($dirmodels as $reldir) {
253 $dir = dol_buildpath($reldir."core/modules/supplier_proposal");
254
255 if (is_dir($dir)) {
256 $handle = opendir($dir);
257 if (is_resource($handle)) {
258 while (($file = readdir($handle)) !== false) {
259 if (substr($file, 0, 22) == 'mod_supplier_proposal_' && substr($file, dol_strlen($file) - 3, 3) == 'php') {
260 $file = substr($file, 0, dol_strlen($file) - 4);
261
262 require_once $dir.'/'.$file.'.php';
263
264 $module = new $file();
265
266 // Show modules according to features level
267 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
268 continue;
269 }
270 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
271 continue;
272 }
273
274 if ($module->isEnabled()) {
275 print '<tr class="oddeven"><td>'.$module->nom."</td><td>\n";
276 print $module->info($langs);
277 print '</td>';
278
279 // Show example of numbering module
280 print '<td class="nowrap">';
281 $tmp = $module->getExample();
282 if (preg_match('/^Error/', $tmp)) {
283 $langs->load("errors");
284 print '<div class="error">'.$langs->trans($tmp).'</div>';
285 } elseif ($tmp == 'NotConfigured') {
286 print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
287 } else {
288 print $tmp;
289 }
290 print '</td>'."\n";
291
292 print '<td class="center">';
293 if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") {
294 print img_picto($langs->trans("Activated"), 'switch_on');
295 } else {
296 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.urlencode($file).'">';
297 print img_picto($langs->trans("Disabled"), 'switch_off');
298 print '</a>';
299 }
300 print '</td>';
301
302 $supplier_proposal = new SupplierProposal($db);
303 $supplier_proposal->initAsSpecimen();
304
305 // Info
306 $htmltooltip = '';
307 $htmltooltip .= ''.$langs->trans("Version").': <b>'.$module->getVersion().'</b><br>';
308 $nextval = $module->getNextValue($mysoc, $supplier_proposal);
309 if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
310 $htmltooltip .= ''.$langs->trans("NextValue").': ';
311 if ($nextval) {
312 if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') {
313 $nextval = $langs->trans($nextval);
314 }
315 $htmltooltip .= $nextval.'<br>';
316 } else {
317 $htmltooltip .= $langs->trans($module->error).'<br>';
318 }
319 }
320
321 print '<td class="center">';
322 print $form->textwithpicto('', $htmltooltip, 1, 0);
323 print '</td>';
324
325 print "</tr>\n";
326 }
327 }
328 }
329 closedir($handle);
330 }
331 }
332}
333print "</table><br>\n";
334
335
336/*
337 * Document templates generators
338 */
339
340print load_fiche_titre($langs->trans("SupplierProposalPDFModules"), '', '');
341
342// Load array def with activated templates
343$def = array();
344$sql = "SELECT nom";
345$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
346$sql .= " WHERE type = '".$db->escape($type)."'";
347$sql .= " AND entity = ".$conf->entity;
348$resql = $db->query($sql);
349if ($resql) {
350 $i = 0;
351 $num_rows = $db->num_rows($resql);
352 while ($i < $num_rows) {
353 $array = $db->fetch_array($resql);
354 array_push($def, $array[0]);
355 $i++;
356 }
357} else {
358 dol_print_error($db);
359}
360
361
362print "<table class=\"noborder\" width=\"100%\">\n";
363print "<tr class=\"liste_titre\">\n";
364print " <td>".$langs->trans("Name")."</td>\n";
365print " <td>".$langs->trans("Description")."</td>\n";
366print '<td align="center" width="40">'.$langs->trans("Status")."</td>\n";
367print '<td align="center" width="40">'.$langs->trans("Default")."</td>\n";
368print '<td align="center" width="40">'.$langs->trans("ShortInfo").'</td>';
369print '<td align="center" width="40">'.$langs->trans("Preview").'</td>';
370print "</tr>\n";
371
372clearstatcache();
373
374foreach ($dirmodels as $reldir) {
375 foreach (array('', '/doc') as $valdir) {
376 $realpath = $reldir."core/modules/supplier_proposal".$valdir;
377 $dir = dol_buildpath($realpath);
378
379 if (is_dir($dir)) {
380 $handle = opendir($dir);
381 if (is_resource($handle)) {
382 while (($file = readdir($handle)) !== false) {
383 $filelist[] = $file;
384 }
385 closedir($handle);
386 arsort($filelist);
387
388 foreach ($filelist as $file) {
389 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
390 if (file_exists($dir.'/'.$file)) {
391 $name = substr($file, 4, dol_strlen($file) - 16);
392 $classname = substr($file, 0, dol_strlen($file) - 12);
393
394 require_once $dir.'/'.$file;
395 $module = new $classname($db);
396
397 $modulequalified = 1;
398 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
399 $modulequalified = 0;
400 }
401 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
402 $modulequalified = 0;
403 }
404
405 if ($modulequalified) {
406 print '<tr class="oddeven"><td width="100">';
407 print(empty($module->name) ? $name : $module->name);
408 print "</td><td>\n";
409 if (method_exists($module, 'info')) {
410 print $module->info($langs);
411 } else {
412 print $module->description;
413 }
414 print '</td>';
415
416 // Active
417 if (in_array($name, $def)) {
418 print '<td class="center">'."\n";
419 print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">';
420 print img_picto($langs->trans("Enabled"), 'switch_on');
421 print '</a>';
422 print '</td>';
423 } else {
424 print '<td align="center">'."\n";
425 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>';
426 print "</td>";
427 }
428
429 // Defaut
430 print '<td align="center">';
431 if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") {
432 print img_picto($langs->trans("Default"), 'on');
433 } else {
434 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("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
435 }
436 print '</td>';
437
438 // Info
439 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
440 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
441 if ($module->type == 'pdf') {
442 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
443 }
444 $htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
445
446 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
447 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
448 $htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
449 $htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
450 $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
451 //$htmltooltip.='<br>'.$langs->trans("Discounts").': '.yn($module->option_escompte,1,1);
452 //$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
453 $htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark, 1, 1);
454
455
456 print '<td class="center">';
457 print $form->textwithpicto('', $htmltooltip, 1, 0);
458 print '</td>';
459
460 // Preview
461 print '<td class="center">';
462 if ($module->type == 'pdf') {
463 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
464 } else {
465 print img_object($langs->trans("PreviewNotAvailable"), 'generic');
466 }
467 print '</td>';
468
469 print "</tr>\n";
470 }
471 }
472 }
473 }
474 }
475 }
476 }
477}
478
479print '</table>';
480print '<br>';
481
482
483/*
484 * Other options
485 *
486 */
487print load_fiche_titre($langs->trans("OtherOptions"), '', '');
488
489print "<table class=\"noborder\" width=\"100%\">";
490print "<tr class=\"liste_titre\">";
491print "<td>".$langs->trans("Parameter")."</td>\n";
492print '<td width="60" align="center">'.$langs->trans("Value")."</td>\n";
493print "<td>&nbsp;</td>\n";
494print "</tr>";
495
496$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
497$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
498$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
499foreach ($substitutionarray as $key => $val) {
500 $htmltext .= $key.'<br>';
501}
502$htmltext .= '</i>';
503
504print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
505print '<input type="hidden" name="token" value="'.newToken().'">';
506print '<input type="hidden" name="action" value="set_SUPPLIER_PROPOSAL_FREE_TEXT">';
507print '<tr class="oddeven"><td colspan="2">';
508print $form->textwithpicto($langs->trans("FreeLegalTextOnSupplierProposal"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
509$variablename = 'SUPPLIER_PROPOSAL_FREE_TEXT';
510if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
511 print '<textarea name="'.$variablename.'" class="flat" cols="120">'.getDolGlobalString($variablename).'</textarea>';
512} else {
513 include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
514 $doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
515 print $doleditor->Create();
516}
517print '</td><td class="right">';
518print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
519print "</td></tr>\n";
520print '</form>';
521
522
523print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
524print '<input type="hidden" name="token" value="'.newToken().'">';
525print "<input type=\"hidden\" name=\"action\" value=\"set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK\">";
526print '<tr class="oddeven"><td>';
527print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
528print '</td><td>';
529print '<input class="flat minwidth200" type="text" name="SUPPLIER_PROPOSAL_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('SUPPLIER_PROPOSAL_DRAFT_WATERMARK')).'">';
530print '</td><td class="right">';
531print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
532print "</td></tr>\n";
533print '</form>';
534
535if (isModEnabled('banque')) {
536 print '<tr class="oddeven"><td>';
537 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td class="right">';
538 print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');
539 print '</td></tr>';
540} else {
541 print '<tr class="oddeven"><td>';
542 print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td align="center">'.$langs->trans('NotAvailable').'</td></tr>';
543}
544
545// Allow external download
546print '<tr class="oddeven">';
547print '<td>'.$langs->trans("AllowExternalDownload").'</td><td>&nbsp;</td>';
548print '<td class="right">';
549print ajax_constantonoff('PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD', array(), null, 0, 0, 0, 2, 0, 1);
550print '</td></tr>';
551
552print '</table>';
553
554
555
556/*
557 * Directory
558 */
559print '<br>';
560print load_fiche_titre($langs->trans("PathToDocuments"), '', '');
561
562print "<table class=\"noborder\" width=\"100%\">\n";
563print "<tr class=\"liste_titre\">\n";
564print " <td>".$langs->trans("Name")."</td>\n";
565print " <td>".$langs->trans("Value")."</td>\n";
566print "</tr>\n";
567print "<tr class=\"oddeven\">\n <td width=\"140\">".$langs->trans("PathDirectory")."</td>\n <td>".$conf->supplier_proposal->dir_output."</td>\n</tr>\n";
568print "</table>\n<br>";
569
570// End of page
571llxFooter();
572$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.
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Definition wrapper.php:55
llxFooter()
Empty footer.
Definition wrapper.php:69
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.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
yn($yesno, $case=1, $color=0)
Return yes or no in current language.
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_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0)
Show a picto called object_picto (generic function)
dol_strlen($string, $stringencoding='UTF-8')
Make a strlen call.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
dol_syslog($message, $level=LOG_INFO, $ident=0, $suffixinfilename='', $restricttologhandler='', $logcontext=null)
Write log message into outputs.
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:762
$conf db name
Only used if Module[ID]Name translation string is not found.
Definition repair.php:124
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.