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