dolibarr 25.0.0-alpha
project.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@inodbox.com>
3 * Copyright (C) 2011-2016 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2011-2015 Juanjo Menent <jmenent@2byte.es>
5 * Copyright (C) 2011-2018 Philippe Grand <philippe.grand@atoo-net.com>
6 * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
7 * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
8 * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
9 * Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
10 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.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
32// Load Dolibarr environment
33require '../../main.inc.php';
34require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
35require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
36require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
37require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
38
48// Load translation files required by the page
49$langs->loadLangs(array('admin', 'other', 'projects'));
50
51if (!$user->admin) {
53}
54
55$action = GETPOST('action', 'aZ09');
56$modulepart = GETPOST('modulepart', 'aZ09');
57
58$value = GETPOST('value', 'alpha');
59$label = GETPOST('label', 'alpha');
60$scandir = GETPOST('scan_dir', 'alpha');
61$type = 'project';
62
63
64/*
65 * Actions
66 */
67$error = 0;
68include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
69
70if ($action == 'updateMask') {
71 $maskconstproject = GETPOST('maskconstproject', 'aZ09');
72 $maskproject = GETPOST('maskproject', 'alpha');
73
74 $res = -1;
75 if ($maskconstproject && preg_match('/_MASK$/', $maskconstproject)) {
76 $res = dolibarr_set_const($db, $maskconstproject, $maskproject, 'chaine', 0, '', $conf->entity);
77 }
78
79 if (!($res > 0)) {
80 $error++;
81 }
82
83 if (!$error) {
84 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
85 } else {
86 setEventMessages($langs->trans("Error"), null, 'errors');
87 }
88}
89
90if ($action == 'updateMaskTask') {
91 $maskconstmasktask = GETPOST('maskconsttask', 'aZ09');
92 $masktaskt = GETPOST('masktask', 'alpha');
93 $res = 0;
94 if ($maskconstmasktask && preg_match('/_MASK$/', $maskconstmasktask)) {
95 $res = dolibarr_set_const($db, $maskconstmasktask, $masktaskt, 'chaine', 0, '', $conf->entity);
96 }
97
98 if (!($res > 0)) {
99 $error++;
100 }
101
102 if (!$error) {
103 setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
104 } else {
105 setEventMessages($langs->trans("Error"), null, 'errors');
106 }
107} elseif ($action == 'specimen') {
108 $modele = GETPOST('module', 'alpha');
109
110 $project = new Project($db);
111 $project->initAsSpecimen();
112
113 // Search template files
114 $file = '';
115 $classname = '';
116 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
117 foreach ($dirmodels as $reldir) {
118 $file = dol_buildpath($reldir."core/modules/project/doc/pdf_".$modele.".modules.php", 0);
119 if (file_exists($file)) {
120 $classname = "pdf_".$modele;
121 break;
122 }
123 }
124
125 if ($classname !== '') {
126 require_once $file;
127
128 $module = new $classname($db);
129 '@phan-var-force ModelePDFProjects $module';
132 if ($module->write_file($project, $langs) > 0) {
133 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=project&file=SPECIMEN.pdf");
134 return;
135 } else {
136 setEventMessages($module->error, $module->errors, 'errors');
137 dol_syslog($module->error, LOG_ERR);
138 }
139 } else {
140 $langs->load('errors');
141 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
142 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
143 }
144} elseif ($action == 'specimentask') {
145 $modele = GETPOST('module', 'alpha');
146
147 $project = new Project($db);
148 $project->initAsSpecimen();
149
150 // Search template files
151 $file = '';
152 $classname = '';
153 $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
154 foreach ($dirmodels as $reldir) {
155 $file = dol_buildpath($reldir."core/modules/project/task/doc/pdf_".$modele.".modules.php", 0);
156 if (file_exists($file)) {
157 $classname = "pdf_".$modele;
158 break;
159 }
160 }
161
162 if ($classname !== '') {
163 require_once $file;
164
165 $module = new $classname($db);
166 '@phan-var-force ModelePDFTask $module';
169 if ($module->write_file($project, $langs) > 0) {
170 header("Location: ".DOL_URL_ROOT."/document.php?modulepart=project_task&file=SPECIMEN.pdf");
171 return;
172 } else {
173 setEventMessages($module->error, $module->errors, 'errors');
174 dol_syslog($module->error, LOG_ERR);
175 }
176 } else {
177 $langs->load('errors');
178 setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors');
179 dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
180 }
181} elseif ($action == 'set') {
182 // Activate a model
183 $ret = addDocumentModel($value, $type, $label, $scandir);
184} elseif ($action == 'settask') {
185 // Activate a model for task
186 $ret = addDocumentModel($value, 'project_task', $label, $scandir);
187} elseif ($action == 'del') {
188 $ret = delDocumentModel($value, $type);
189 if ($ret > 0) {
190 if (getDolGlobalString('PROJECT_ADDON_PDF') == "$value") {
191 dolibarr_del_const($db, 'PROJECT_ADDON_PDF', $conf->entity);
192 }
193 }
194} elseif ($action == 'deltask') {
195 $ret = delDocumentModel($value, 'project_task');
196 if ($ret > 0) {
197 if (getDolGlobalString('PROJECT_TASK_ADDON_PDF') == "$value") {
198 dolibarr_del_const($db, 'PROJECT_TASK_ADDON_PDF', $conf->entity);
199 }
200 }
201} elseif ($action == 'setdoc') {
202 // Set default model
203 dolibarr_set_const($db, "PROJECT_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity);
204
205 // We also enable the template
206 $ret = delDocumentModel($value, $type);
207 if ($ret > 0) {
208 $ret = addDocumentModel($value, $type, $label, $scandir);
209 }
210} elseif ($action == 'unsetdoc') {
211 // Set default model
212 dolibarr_del_const($db, "PROJECT_ADDON_PDF", $conf->entity);
213} elseif ($action == 'setdoctask') {
214 if (dolibarr_set_const($db, "PROJECT_TASK_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) {
215 // The constant that was read before the new set
216 // so we go through a variable to get a consistent display
217 $conf->global->PROJECT_TASK_ADDON_PDF = $value;
218 }
219
220 // On active le modele
221 $ret = delDocumentModel($value, 'project_task');
222 if ($ret > 0) {
223 $ret = addDocumentModel($value, 'project_task', $label, $scandir);
224 }
225} elseif ($action == 'unsetdoctask') {
226 // Set default model
227 dolibarr_del_const($db, "PROJECT_TASK_ADDON_PDF", $conf->entity);
228} elseif ($action == 'setmod') {
229 // TODO Verifier si module numerotation choisi peut etre active
230 // par appel methode canBeActivated
231
232 dolibarr_set_const($db, "PROJECT_ADDON", $value, 'chaine', 0, '', $conf->entity);
233} elseif ($action == 'setmodtask') {
234 // TODO Verifier si module numerotation choisi peut etre active
235 // par appel methode canBeActivated
236
237 dolibarr_set_const($db, "PROJECT_TASK_ADDON", $value, 'chaine', 0, '', $conf->entity);
238} elseif ($action == 'updateoptions') {
239 if (GETPOST('PROJECT_USE_SEARCH_TO_SELECT')) {
240 $companysearch = GETPOST('activate_PROJECT_USE_SEARCH_TO_SELECT', 'alpha');
241 if (dolibarr_set_const($db, "PROJECT_USE_SEARCH_TO_SELECT", $companysearch, 'chaine', 0, '', $conf->entity)) {
242 $conf->global->PROJECT_USE_SEARCH_TO_SELECT = $companysearch;
243 }
244 }
245 if (GETPOST('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY')) {
246 $projectToSelect = GETPOST('projectToSelect', 'alpha');
247 dolibarr_set_const($db, 'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect, 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value
248 }
249 if (GETPOST('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS')) {
250 $timesheetFreezeDuration = GETPOST('timesheetFreezeDuration', 'alpha');
251 dolibarr_set_const($db, 'PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS', intval($timesheetFreezeDuration), 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value
252 }
253} elseif (preg_match('/^(set|del)_?([A-Z_]+)$/', $action, $reg)) {
254 // Set boolean (on/off) constants
255 if (!dolibarr_set_const($db, $reg[2], ($reg[1] === 'set' ? '1' : '0'), 'chaine', 0, '', $conf->entity) > 0) {
256 dol_print_error($db);
257 }
258}
259
260/*
261 * View
262 */
263
264$form = new Form($db);
265
266$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']);
267
268llxHeader("", $langs->trans("ProjectsSetup"), '', '', 0, 0, '', '', '', 'mod-project page-admin');
269
270$form = new Form($db);
271
272$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>';
273print load_fiche_titre($langs->trans("ProjectsSetup"), $linkback, 'title_setup');
274
276
277print dol_get_fiche_head($head, 'project', $langs->trans("Projects"), -1, 'project');
278
279print '<br>';
280
281// Main options
282
283print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
284print '<input type="hidden" name="token" value="'.newToken().'">';
285print '<input type="hidden" name="action" value="setmainoptions">';
286
287print '<table class="noborder centpercent">';
288print '<tr class="liste_titre">';
289print "<td>".$langs->trans("Parameters")."</td>\n";
290print '<td class="right" width="60">'.$langs->trans("Value").'</td>'."\n";
291print '<td width="80">&nbsp;</td></tr>'."\n";
292
293print '<tr class="oddeven">';
294print '<td width="80%">'.$langs->trans("ManageOpportunitiesStatus").'</td>';
295print '<td width="60" class="right">';
296print ajax_constantonoff("PROJECT_USE_OPPORTUNITIES", array(), null, 0, 0, 1);
297print '</td><td class="right">';
298print "</td>";
299print '</tr>';
300
301
302print '<tr class="oddeven">';
303print '<td width="80%">'.$langs->trans("ManageTasks").'</td>';
304print '<td width="60" class="right">';
305print ajax_constantonoff("PROJECT_HIDE_TASKS", array(), null, 1);
306print '</td><td class="right">';
307print "</td>";
308print '</tr>';
309
310print '</table></form>';
311
312print '<br>';
313
314
315
316/*
317 * Projects Numbering model
318 */
319
320$project = new Project($db);
321$project->initAsSpecimen();
322
323printNumberingModuleList('project', 'mod_project_', 'PROJECT_ADDON', $langs->trans("ProjectsNumberingModules"), $project);
324
325print '<br>';
326
327if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
328 // Task numbering module
329 $project = new Project($db);
330 $project->initAsSpecimen();
331
332 printNumberingModuleList('project/task', 'mod_task_', 'PROJECT_TASK_ADDON', $langs->trans("TasksNumberingModules"), $project, 'setmodtask');
333
334 print '<br>';
335}
336
337
338/*
339 * Document templates generators
340 */
341
342printDocumentModelList($type, 'project', 'PROJECT_ADDON_PDF', $langs->trans("ProjectsModelModule"), array(
343 'Logo' => 'option_logo',
344), false, '', 1, 'unsetdoc');
345print '<br>';
346
347
348
349if (!getDolGlobalString('PROJECT_HIDE_TASKS')) {
350 /*
351 * Modeles documents for Task
352 */
353
354 print load_fiche_titre($langs->trans("TaskModelModule"), '', '');
355
356 // Define array def of model
357 $type = 'project_task';
358 $def = array();
359
360 $sql = "SELECT nom";
361 $sql .= " FROM ".MAIN_DB_PREFIX."document_model";
362 $sql .= " WHERE type = '".$db->escape($type)."'";
363 $sql .= " AND entity = ".((int) $conf->entity);
364
365 $resql = $db->query($sql);
366 if ($resql) {
367 $i = 0;
368 $num_rows = $db->num_rows($resql);
369 while ($i < $num_rows) {
370 $array = $db->fetch_array($resql);
371 if (is_array($array)) {
372 array_push($def, $array[0]);
373 }
374 $i++;
375 }
376 } else {
377 dol_print_error($db);
378 }
379
380 print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
381 print '<table class="noborder" width="100%">'."\n";
382 print '<tr class="liste_titre">'."\n";
383 print ' <td width="100">'.$langs->trans("Name")."</td>\n";
384 print " <td>".$langs->trans("Description")."</td>\n";
385 print '<td class="center" width="60">'.$langs->trans("Activated")."</td>\n";
386 print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n";
387 print '<td class="center" width="80">'.$langs->trans("ShortInfo").'</td>';
388 print '<td class="center" width="80">'.$langs->trans("Preview").'</td>';
389 print "</tr>\n";
390
391 clearstatcache();
392
393 foreach ($dirmodels as $reldir) {
394 foreach (array('', '/doc') as $valdir) {
395 $dir = dol_buildpath($reldir."core/modules/project/task/".$valdir);
396
397 if (is_dir($dir)) {
398 $handle = opendir($dir);
399 if (is_resource($handle)) {
400 $filelist = array();
401 while (($file = readdir($handle)) !== false) {
402 $filelist[] = $file;
403 }
404 closedir($handle);
405 arsort($filelist);
406
407 foreach ($filelist as $file) {
408 if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
409 if (file_exists($dir.'/'.$file)) {
410 $name = dol_substr($file, 4, dol_strlen($file) - 16);
411 $classname = dol_substr($file, 0, dol_strlen($file) - 12);
412
413 require_once $dir.'/'.$file;
414 $module = new $classname($db);
415 '@phan-var-force ModelePDFTask $module';
416
417 $modulequalified = 1;
418 if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
419 $modulequalified = 0;
420 }
421 if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
422 $modulequalified = 0;
423 }
424
425 if ($modulequalified) {
426 print '<tr class="oddeven"><td width="100">';
427 print(empty($module->name) ? $name : $module->name);
428 print "</td><td>\n";
429 if (method_exists($module, 'info')) {
430 print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod
431 } else {
432 print $module->description;
433 }
434 print "</td>\n";
435
436 // Active
437 if (in_array($name, $def)) {
438 print '<td class="center">'."\n";
439 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=deltask&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">';
440 print img_picto($langs->trans("Enabled"), 'switch_on');
441 print '</a>';
442 print "</td>";
443 } else {
444 print '<td class="center">'."\n";
445 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=settask&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
446 print "</td>";
447 }
448
449 // Default
450 print '<td class="center">';
451 if (getDolGlobalString("PROJECT_TASK_ADDON_PDF", $name)) {
452 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=unsetdoctask&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'on').'</a>';
453 } else {
454 print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoctask&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>';
455 }
456 print '</td>';
457
458 // Info
459 $htmltooltip = ''.$langs->trans("Name").': '.$module->name;
460 $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
461 if ($module->type == 'pdf') {
462 $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
463 }
464 $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
465 $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
466
467 print '<td class="center">';
468 print $form->textwithpicto('', $htmltooltip, 1, 'info');
469 print '</td>';
470
471 // Preview
472 print '<td class="center">';
473 if ($module->type == 'pdf') {
474 print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimentask&token='.newToken().'&module='.$name.'">'.img_object($langs->trans("Preview"), 'bill').'</a>';
475 } else {
476 print img_object($langs->transnoentitiesnoconv("PreviewNotAvailable"), 'generic');
477 }
478 print '</td>';
479 print "</tr>\n";
480 }
481 }
482 }
483 }
484 }
485 }
486 }
487 }
488
489 print '</table>';
490 print '</div>';
491 print '<br>';
492}
493
494
495print load_fiche_titre($langs->trans("Other"), '', '');
496
497// Other options
498$form = new Form($db);
499
500print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
501print '<input type="hidden" name="token" value="'.newToken().'">';
502print '<input type="hidden" name="action" value="updateoptions">';
503print '<input type="hidden" name="page_y" value="">';
504
505print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
506print '<table class="noborder centpercent">';
507print '<tr class="liste_titre">';
508print "<td>".$langs->trans("Parameters")."</td>\n";
509print '<td></td>';
510print '</tr>'."\n";
511
512print '<tr class="oddeven">';
513print '<td>'.$langs->trans("UseSearchToSelectProject").'</td>';
514if (!$conf->use_javascript_ajax) {
515 print '<td class="nowrap right">';
516 print $langs->trans("NotAvailableWhenAjaxDisabled");
517 print "</td>";
518} else {
519 print '<td class="right">';
520 $arrval = array(
521 0 => array('label' => $langs->trans("No")),
522 1 => array('label' => $langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 1).')', 'labelhtml' => $langs->trans("Yes").' <span class="opacitymedium small">('.$langs->trans("NumberOfKeyToSearch", 1).')</span>'),
523 2 => array('label' => $langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 2).')', 'labelhtml' => $langs->trans("Yes").' <span class="opacitymedium small">('.$langs->trans("NumberOfKeyToSearch", 2).')</span>'),
524 3 => array('label' => $langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 3).')', 'labelhtml' => $langs->trans("Yes").' <span class="opacitymedium small">('.$langs->trans("NumberOfKeyToSearch", 3).')</span>'),
525 );
526 print $form->selectarray("activate_PROJECT_USE_SEARCH_TO_SELECT", $arrval, getDolGlobalString("PROJECT_USE_SEARCH_TO_SELECT"));
527 print '<input type="submit" class="button small reposition" name="PROJECT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">';
528 print "</td>";
529}
530print '</tr>';
531
532print '<tr class="oddeven">';
533print '<td>'.$langs->trans("AllowToSelectProjectFromOtherCompany").'</td>';
534print '<td class="right">';
535print '<input type="text" id="projectToSelect" name="projectToSelect" value="' . getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').'"/>&nbsp;';
536print $form->textwithpicto('', $langs->trans('AllowToLinkFromOtherCompany'));
537print '<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans("Modify").'">';
538print '</td>';
539print '</tr>';
540
541$key = 'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE';
542echo '<tr class="oddeven">',
543'<td class="left">',
544$form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key . '_help')),
545'</td>',
546'<td class="right">',
547ajax_constantonoff($key),
548'</td>',
549'</tr>';
550
551print '<tr class="oddeven">';
552print '<td>'.$langs->trans("TimesheetPreventAfterFollowingMonths").'</td>';
553print '<td class="right">';
554print '<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="' . getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').'"/>&nbsp;';
555print '<input type="submit" class="button small reposition" name="PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS" value="'.$langs->trans("Modify").'">';
556print '</td>';
557print '</tr>';
558
559/* Generates a lot of confusion for users. Not visible by default.
560print '<tr class="oddeven">';
561print '<td class="left">';
562print $form->textwithpicto($langs->transnoentities('PROJECT_DISPLAY_LINKED_BY_CONTACT'), $langs->transnoentities('PROJECT_DISPLAY_LINKED_BY_CONTACT_help'));
563print '</td>';
564print '<td class="right">';
565print ajax_constantonoff('PROJECT_DISPLAY_LINKED_BY_CONTACT');
566print '</td>';
567print '</tr>';
568*/
569
570print '</table>';
571print '</div>';
572
573print '</form>';
574
575// End of page
576llxFooter();
577$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 generation of HTML components Only common components must be here.
Class to manage projects.
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.
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.
project_admin_prepare_head()
Prepare array with list of tabs.
$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.