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