28require
"../../main.inc.php";
29require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
36require_once DOL_DOCUMENT_ROOT.
'/core/modules/project/task/modules_task.php';
37require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
40$langs->loadlangs(array(
'projects',
'companies'));
42$action =
GETPOST(
'action',
'aZ09');
43$confirm =
GETPOST(
'confirm',
'alpha');
51$ref =
GETPOST(
"ref",
'alpha', 1);
52$taskref =
GETPOST(
"taskref",
'alpha');
54$project_ref =
GETPOST(
'project_ref',
'alpha');
55$planned_workload = ((
GETPOST(
'planned_workloadhour') !=
'' ||
GETPOST(
'planned_workloadmin') !=
'') ? (
GETPOSTINT(
'planned_workloadhour') > 0 ?
GETPOSTINT(
'planned_workloadhour') * 3600 : 0) + (
GETPOSTINT(
'planned_workloadmin') > 0 ?
GETPOSTINT(
'planned_workloadmin') * 60 : 0) :
'');
56$mode =
GETPOST(
'mode',
'alpha');
59$hookmanager->initHooks(array(
'projecttaskcard',
'globalcard'));
63$projectstatic =
new Project($db);
66$extrafields->fetch_name_optionals_label(
$object->table_element);
68$parameters = array(
'id' => $id);
69$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
89if ($action ==
'update' && !
GETPOST(
"cancel") && $user->hasRight(
'projet',
'creer')) {
92 if (empty($taskref)) {
94 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")),
null,
'errors');
98 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Label")),
null,
'errors');
103 $tmparray = explode(
'_',
GETPOST(
'task_parent'));
104 $task_parent = $tmparray[1];
105 if (empty($task_parent)) {
116 $object->fk_task_parent = $task_parent;
117 $object->planned_workload = $planned_workload;
124 $ret = $extrafields->setOptionalsFromPost(
null, $object,
'@GETPOSTISSET');
130 $result =
$object->update($user);
143if ($action ==
'confirm_merge' && $confirm ==
'yes' && $user->hasRight(
'projet',
'creer')) {
145 $task_origin =
new Task($db);
147 if ($task_origin_id <= 0) {
148 $langs->load(
'errors');
149 setEventMessages($langs->trans(
'ErrorTaskIdIsMandatory', $langs->transnoentitiesnoconv(
'MergeOriginTask')),
null,
'errors');
151 if (!$error && $task_origin->fetch($task_origin_id) < 1) {
156 $result =
$object->mergeTask($task_origin_id);
167if ($action ==
'confirm_clone' && $confirm ==
'yes') {
169 $clone_prog =
GETPOST(
'clone_prog') ? 1 : 0;
170 $clone_time =
GETPOST(
'clone_time') ? 1 : 0;
171 $clone_affectation =
GETPOST(
'clone_affectation') ? 1 : 0;
172 $clone_change_dt =
GETPOST(
'clone_change_dt') ? 1 : 0;
173 $clone_notes =
GETPOST(
'clone_notes') ? 1 : 0;
174 $clone_file =
GETPOST(
'clone_file') ? 1 : 0;
175 $result =
$object->createFromClone($user,
$object->id,
$object->fk_project,
$object->fk_task_parent, $clone_change_dt, $clone_affectation, $clone_time, $clone_file, $clone_notes, $clone_prog);
180 $newobject =
new Task($db);
181 $newobject->fetch($result);
182 $newobject->fetch_optionals();
183 $newobject->fetch_thirdparty();
189if ($action ==
'confirm_delete' && $confirm ==
"yes" && $user->hasRight(
'projet',
'supprimer')) {
190 $result = $projectstatic->fetch(
$object->fk_project);
191 $projectstatic->fetch_thirdparty();
193 if (
$object->delete($user) > 0) {
194 header(
'Location: '.DOL_URL_ROOT.
'/projet/tasks.php?restore_lastsearch_values=1&id='.$projectstatic->id.($withproject ?
'&withproject=1' :
''));
203if (!empty($project_ref) && !empty($withproject)) {
204 if ($projectstatic->fetch(
'', $project_ref) > 0) {
205 $tasksarray =
$object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
206 if (count($tasksarray) > 0) {
207 $id = $tasksarray[0]->id;
209 header(
"Location: ".DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.(empty($mode) ?
'' :
'&mode='.$mode));
215if ($action ==
'builddoc' && $user->hasRight(
'projet',
'creer')) {
221 $outputlangs = $langs;
222 if (
GETPOST(
'lang_id',
'aZ09')) {
224 $outputlangs->setDefaultLang(
GETPOST(
'lang_id',
'aZ09'));
226 $result =
$object->generateDocument(
$object->model_pdf, $outputlangs);
234if ($action ==
'remove_file' && $user->hasRight(
'projet',
'creer')) {
235 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
237 $langs->load(
"other");
238 $upload_dir = $conf->project->dir_output;
253$form =
new Form($db);
257$result = $projectstatic->fetch(
$object->fk_project);
260if (!empty($withproject)) {
261 $title .=
' | ' . $langs->trans(
"Project") . (!empty($projectstatic->ref) ?
': '.$projectstatic->ref :
'') ;
268if ($id > 0 || !empty($ref)) {
269 $res =
$object->fetch_optionals();
270 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_TASK') && method_exists($object,
'fetchComments') && empty(
$object->comments)) {
275 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
276 $projectstatic->fetchComments();
278 if (!empty($projectstatic->socid)) {
279 $projectstatic->fetch_thirdparty();
282 $object->project = clone $projectstatic;
286 if (!empty($withproject)) {
290 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
292 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
296 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
298 $morehtmlref =
'<div class="refidno">';
300 $morehtmlref .= $projectstatic->title;
302 if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) {
303 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
305 $morehtmlref .=
'</div>';
308 if (!$user->hasRight(
'projet',
'all',
'lire')) {
309 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
310 $projectstatic->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? implode(
',', array_keys($objectsListId)) :
'0').
")";
313 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
315 print
'<div class="fichecenter">';
316 print
'<div class="fichehalfleft">';
317 print
'<div class="underbanner clearboth"></div>';
319 print
'<table class="border tableforfield centpercent">';
323 print
'<tr><td class="tdtop">';
324 print $langs->trans(
"Usage");
328 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
329 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
330 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
334 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
335 $htmltext = $langs->trans(
"ProjectFollowTasks");
336 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
340 print
'<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET(
'usage_bill_time') ? (
GETPOST(
'usage_bill_time',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_bill_time ?
' checked="checked"' :
'')).
'"> ';
341 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
342 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
345 if (isModEnabled(
'eventorganization')) {
346 print
'<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET(
'usage_organize_event') ? (
GETPOST(
'usage_organize_event',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_organize_event ?
' checked="checked"' :
'')).
'"> ';
347 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
348 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
354 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
355 if ($projectstatic->public) {
356 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
357 print $langs->trans(
'SharedProject');
359 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
360 print $langs->trans(
'PrivateProject');
365 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
366 if (isset($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount,
'')) {
367 print
'<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
372 print
'<tr><td>'.$langs->trans(
"Dates").
'</td><td>';
374 print($start ? $start :
'?');
377 print($end ? $end :
'?');
378 if ($projectstatic->hasDelay()) {
391 print
'<div class="fichehalfright">';
392 print
'<div class="underbanner clearboth"></div>';
394 print
'<table class="border tableforfield centpercent">';
397 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
398 print nl2br($projectstatic->description);
402 if (isModEnabled(
'category')) {
403 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
404 print $form->showCategories($projectstatic->id,
'project', 1);
413 print
'<div class="clearboth"></div>';
451 if ($action ==
'edit' && $user->hasRight(
'projet',
'creer')) {
452 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
453 print
'<input type="hidden" name="token" value="'.newToken().
'">';
454 print
'<input type="hidden" name="action" value="update">';
455 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
456 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
458 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), 0,
'projecttask', 0,
'',
'');
460 print
'<table class="border centpercent">';
463 print
'<tr><td class="titlefield fieldrequired">'.$langs->trans(
"Ref").
'</td>';
464 print
'<td><input class="minwidth100" name="taskref" value="'.$object->ref.
'"></td></tr>';
467 print
'<tr><td class="fieldrequired">'.$langs->trans(
"Label").
'</td>';
468 print
'<td><input class="minwidth500" name="label" value="'.$object->label.
'"></td></tr>';
471 if (empty($withproject)) {
472 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td>';
473 print $projectstatic->getNomUrl(1);
477 print
'<td>'.$langs->trans(
"ThirdParty").
'</td><td>';
478 if ($projectstatic->thirdparty->id) {
479 print $projectstatic->thirdparty->getNomUrl(1);
487 print
'<tr><td>'.$langs->trans(
"ChildOfProjectTask").
'</td><td>';
489 $formother->selectProjectTasks(
$object->fk_task_parent, $projectstatic->id,
'task_parent', ($user->admin ? 0 : 1), 0, 0, 0,
$object->id,
'',
'minwidth100 widthcentpercentminusxx maxwidth500');
493 print
'<tr><td>'.$langs->trans(
"DateStart").
'</td><td>';
494 print $form->selectDate(
$object->date_start,
'date_start', 1, 1, 0,
'', 1, 0);
498 print
'<tr><td>'.$langs->trans(
"Deadline").
'</td><td>';
499 print $form->selectDate(
$object->date_end ?
$object->date_end : -1,
'date_end', 1, 1, 0,
'', 1, 0);
503 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td>';
504 print $form->select_duration(
'planned_workload',
$object->planned_workload, 0,
'text');
508 print
'<tr><td>'.$langs->trans(
"ProgressDeclared").
'</td><td>';
509 print $formother->select_percent(
$object->progress,
'progress', 0, 5, 0, 100, 1);
514 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td>';
518 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
520 $doleditor =
new DolEditor(
'description',
$object->description,
'', 80,
'dolibarr_details',
'',
false,
true,
getDolGlobalInt(
'FCKEDITOR_ENABLE_SOCIETE'), $nbrows,
'90%');
521 print $doleditor->Create();
526 print
'<tr><td>'.$langs->trans(
"Budget").
'</td>';
527 print
'<td><input class="with75" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET(
'budget_amount') ?
GETPOST(
'budget_amount') :
price2num(
$object->budget_amount)).
'"></td>';
531 $parameters = array();
532 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
533 print $hookmanager->resPrint;
534 if (empty($reshook)) {
535 print
$object->showOptionals($extrafields,
'edit');
542 print $form->buttonsSaveCancel(
"Modify");
549 $param = ($withproject ?
'&withproject=1' :
'');
550 $linkback = $withproject ?
'<a href="'.DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.
'&restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>' :
'';
552 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), -1,
'projecttask', 0,
'',
'reposition');
554 if ($action ==
'clone') {
555 $formquestion = array(
556 'text' => $langs->trans(
"ConfirmClone"),
558 0 => array(
'type' =>
'checkbox',
'name' =>
'clone_change_dt',
'label' => $langs->trans(
"CloneChanges"),
'value' =>
true),
559 1 => array(
'type' =>
'checkbox',
'name' =>
'clone_affectation',
'label' => $langs->trans(
"CloneAffectation"),
'value' =>
true),
560 2 => array(
'type' =>
'checkbox',
'name' =>
'clone_prog',
'label' => $langs->trans(
"CloneProgression"),
'value' =>
true),
561 3 => array(
'type' =>
'checkbox',
'name' =>
'clone_time',
'label' => $langs->trans(
"CloneTimes"),
'value' =>
true),
562 4 => array(
'type' =>
'checkbox',
'name' =>
'clone_file',
'label' => $langs->trans(
"CloneFile"),
'value' =>
true),
565 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
$object->id, $langs->trans(
"ToClone"), $langs->trans(
"ConfirmCloneTask"),
"confirm_clone", $formquestion,
'', 1, 300, 590);
568 if ($action ==
'merge') {
569 $formquestion = array(
571 'name' =>
'task_origin',
572 'label' => $langs->trans(
'MergeOriginTask'),
574 'value' => $formproject->selectTasks(-1,
'',
'task_origin', 24, 0, $langs->trans(
'SelectTask'), 0, 0, 0,
'maxwidth500 minwidth200',
'',
'',
null, 1)
577 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
$object->id.(GETPOST(
'withproject') ?
"&withproject=1" :
""), $langs->trans(
"MergeTasks"), $langs->trans(
"ConfirmMergeTasks"),
"confirm_merge", $formquestion,
'yes', 1, 250);
580 if ($action ==
'delete') {
581 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
GETPOSTINT(
"id").
'&withproject='.$withproject, $langs->trans(
"DeleteATask"), $langs->trans(
"ConfirmDeleteATask"),
"confirm_delete");
584 if (!
GETPOST(
'withproject') || empty($projectstatic->id)) {
585 $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
586 $object->next_prev_filter =
"fk_projet IN (".$db->sanitize($projectsListId).
")";
588 $object->next_prev_filter =
"fk_projet = ".((int) $projectstatic->id);
594 if (empty($withproject)) {
595 $morehtmlref .=
'<div class="refidno">';
596 $morehtmlref .= $langs->trans(
"Project").
': ';
597 $morehtmlref .= $projectstatic->getNomUrl(1);
598 $morehtmlref .=
'<br>';
601 $morehtmlref .= $langs->trans(
"ThirdParty").
': ';
602 if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
603 $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
605 $morehtmlref .=
'</div>';
608 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
610 print
'<div class="fichecenter">';
611 print
'<div class="fichehalfleft">';
613 print
'<div class="underbanner clearboth"></div>';
614 print
'<table class="border centpercent tableforfield">';
617 print
'<tr><td>'.$langs->trans(
"ChildOfTask").
'</td><td>';
618 if (
$object->fk_task_parent > 0) {
619 $tasktmp =
new Task($db);
620 $tasktmp->fetch(
$object->fk_task_parent);
621 print $tasktmp->getNomUrl(1);
626 print
'<tr><td class="titlefield">'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"Deadline").
'</td><td colspan="3">';
628 print($start ? $start :
'?');
631 print($end ? $end :
'?');
638 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td colspan="3">';
639 if (
$object->planned_workload !=
'') {
645 print
'<td class="tdtop">'.$langs->trans(
"Description").
'</td><td colspan="3">';
652 print
'<div class="fichehalfright">';
654 print
'<div class="underbanner clearboth"></div>';
655 print
'<table class="border centpercent tableforfield">';
658 print
'<tr><td class="titlefield">'.$langs->trans(
"ProgressDeclared").
'</td><td colspan="3">';
665 print
'<tr><td>'.$langs->trans(
"ProgressCalculated").
'</td><td colspan="3">';
666 if (
$object->planned_workload !=
'') {
667 $tmparray =
$object->getSummaryOfTimeSpent();
668 if ($tmparray[
'total_duration'] > 0 && !empty(
$object->planned_workload)) {
669 print round($tmparray[
'total_duration'] /
$object->planned_workload * 100, 2).
' %';
674 print
'<span class="opacitymedium">'.$langs->trans(
"WorkloadNotDefined").
'</span>';
679 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
680 if (!is_null(
$object->budget_amount) && strcmp((
string)
$object->budget_amount,
'')) {
681 print
'<span class="amount">'.price(
$object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
687 $parameters = array(
'socid' => $socid);
688 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
695 print
'<div class="clearboth"></div>';
701 if ($action !=
'edit') {
706 print
'<div class="tabsAction">';
708 $parameters = array();
709 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
711 if (empty($reshook)) {
713 if ($user->hasRight(
'projet',
'creer')) {
714 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=edit&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Modify').
'</a>';
715 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=clone&token='.
newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Clone').
'</a>';
716 print
'<a class="butActionDelete classfortooltip" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=merge&token='.
newToken().
'&withproject='.((int) $withproject).
'" title="'.$langs->trans(
"MergeTasks").
'">'.$langs->trans(
'Merge').
'</a>';
718 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"NotAllowed").
'">'.$langs->trans(
'Modify').
'</a>';
722 $permissiontodelete = $user->hasRight(
'projet',
'supprimer');
723 if ($permissiontodelete) {
725 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
727 print
dolGetButtonAction($langs->trans(
"TaskHasChild"), $langs->trans(
"Delete"),
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', 0);
730 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
736 print
'<div class="fichecenter"><div class="fichehalfleft">';
737 print
'<a name="builddoc"></a>';
744 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
745 $genallowed = ($user->hasRight(
'projet',
'lire'));
746 $delallowed = ($user->hasRight(
'projet',
'creer'));
748 print $formfile->showdocuments(
'project_task', $filename, $filedir, $urlsource, $genallowed, $delallowed,
$object->model_pdf);
750 print
'</div><div class="fichehalfright">';
753 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
755 $formactions->showactions($object,
'project_task', 0, 1,
'', 10,
'withproject='.$withproject);
757 print
'</div></div>';
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage a WYSIWYG editor.
Class to manage projects.
Class to manage translations.
convertSecondToTime($iSecond, $format='all', $lengthOfDay=86400, $lengthOfWeek=7)
Return, in clear text, value of a number of seconds in days, hours and minutes.
dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1, $nolog=0)
Remove a file or several files with a mask.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
price2num($amount, $rounding='', $option=0)
Function that return a number with universal decimal format (decimal separator is '.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
GETPOSTFLOAT($paramname, $rounding='')
Return the value of a $_GET or $_POST supervariable, converted into float.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
dol_htmlentitiesbr($stringtoencode, $nl2brmode=0, $pagecodefrom='UTF-8', $removelasteolbr=1)
This function is called to encode a string into a HTML string but differs from htmlentities because a...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
task_prepare_head($object)
Prepare array with list of tabs.
project_prepare_head(Project $project, $moreparam='')
Prepare array with list of tabs.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.