27require
"../../main.inc.php";
28require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
29require_once DOL_DOCUMENT_ROOT.
'/projet/class/task.class.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/project.lib.php';
31require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
32require_once DOL_DOCUMENT_ROOT.
'/core/class/extrafields.class.php';
33require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
34require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
35require_once DOL_DOCUMENT_ROOT.
'/core/modules/project/task/modules_task.php';
38$langs->loadlangs(array(
'projects',
'companies'));
40$action =
GETPOST(
'action',
'aZ09');
41$confirm =
GETPOST(
'confirm',
'alpha');
44$ref =
GETPOST(
"ref",
'alpha', 1);
45$taskref =
GETPOST(
"taskref",
'alpha');
46$withproject =
GETPOST(
'withproject',
'int');
47$project_ref =
GETPOST(
'project_ref',
'alpha');
48$planned_workload = ((
GETPOST(
'planned_workloadhour',
'int') !=
'' ||
GETPOST(
'planned_workloadmin',
'int') !=
'') ? (
GETPOST(
'planned_workloadhour',
'int') > 0 ?
GETPOST(
'planned_workloadhour',
'int') * 3600 : 0) + (
GETPOST(
'planned_workloadmin',
'int') > 0 ?
GETPOST(
'planned_workloadmin',
'int') * 60 : 0) :
'');
49$mode =
GETPOST(
'mode',
'alpha');
52$hookmanager->initHooks(array(
'projecttaskcard',
'globalcard'));
54$object =
new Task($db);
56$projectstatic =
new Project($db);
59$extrafields->fetch_name_optionals_label($object->table_element);
61$parameters = array(
'id'=>$id);
62$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action);
68 $object->fetch($id, $ref);
74restrictedArea($user,
'projet', $object->fk_project,
'projet&project');
82if ($action ==
'update' && !
GETPOST(
"cancel") && $user->hasRight(
'projet',
'creer')) {
85 if (empty($taskref)) {
87 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")),
null,
'errors');
91 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Label")),
null,
'errors');
94 $object->oldcopy = clone $object;
96 $tmparray = explode(
'_',
GETPOST(
'task_parent'));
97 $task_parent = $tmparray[1];
98 if (empty($task_parent)) {
102 $object->ref = $taskref ? $taskref :
GETPOST(
"ref",
'alpha', 2);
103 $object->label =
GETPOST(
"label",
"alphanohtml");
105 $object->description =
GETPOST(
'description',
"alphanohtml");
107 $object->description =
GETPOST(
'description',
"restricthtml");
109 $object->fk_task_parent = $task_parent;
110 $object->planned_workload = $planned_workload;
111 $object->date_start =
dol_mktime(
GETPOST(
'dateohour',
'int'),
GETPOST(
'dateomin',
'int'), 0,
GETPOST(
'dateomonth',
'int'),
GETPOST(
'dateoday',
'int'),
GETPOST(
'dateoyear',
'int'));
112 $object->date_end =
dol_mktime(
GETPOST(
'dateehour',
'int'),
GETPOST(
'dateemin',
'int'), 0,
GETPOST(
'dateemonth',
'int'),
GETPOST(
'dateeday',
'int'),
GETPOST(
'dateeyear',
'int'));
114 $object->budget_amount =
price2num(
GETPOST(
'budget_amount',
'alphanohtml'));
117 $ret = $extrafields->setOptionalsFromPost(
null, $object,
'@GETPOSTISSET');
123 $result = $object->update($user);
136if ($action ==
'confirm_clone' && $confirm ==
'yes') {
138 $clone_prog =
GETPOST(
'clone_prog') ? 1 : 0;
139 $clone_time =
GETPOST(
'clone_time') ? 1 : 0;
140 $clone_affectation =
GETPOST(
'clone_affectation') ? 1 : 0;
141 $clone_change_dt =
GETPOST(
'clone_change_dt') ? 1 : 0;
142 $clone_notes =
GETPOST(
'clone_notes') ? 1 : 0;
143 $clone_file =
GETPOST(
'clone_file') ? 1 : 0;
144 $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);
149 $newobject =
new Task($db);
150 $newobject->fetch($result);
151 $newobject->fetch_optionals();
152 $newobject->fetch_thirdparty();
153 $object = $newobject;
158if ($action ==
'confirm_delete' && $confirm ==
"yes" && $user->hasRight(
'projet',
'supprimer')) {
159 $result = $projectstatic->fetch($object->fk_project);
160 $projectstatic->fetch_thirdparty();
162 if ($object->delete($user) > 0) {
163 header(
'Location: '.DOL_URL_ROOT.
'/projet/tasks.php?restore_lastsearch_values=1&id='.$projectstatic->id.($withproject ?
'&withproject=1' :
''));
172if (!empty($project_ref) && !empty($withproject)) {
173 if ($projectstatic->fetch(
'', $project_ref) > 0) {
174 $tasksarray = $object->getTasksArray(0, 0, $projectstatic->id, $socid, 0);
175 if (count($tasksarray) > 0) {
176 $id = $tasksarray[0]->id;
178 header(
"Location: ".DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.(empty($mode) ?
'' :
'&mode='.$mode));
184if ($action ==
'builddoc' && $user->hasRight(
'projet',
'creer')) {
187 $object->setDocModel($user,
GETPOST(
'model',
'alpha'));
190 $outputlangs = $langs;
191 if (
GETPOST(
'lang_id',
'aZ09')) {
193 $outputlangs->setDefaultLang(
GETPOST(
'lang_id',
'aZ09'));
195 $result = $object->generateDocument($object->model_pdf, $outputlangs);
203if ($action ==
'remove_file' && $user->hasRight(
'projet',
'creer')) {
204 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
206 $langs->load(
"other");
207 $upload_dir = $conf->project->dir_output;
222$form =
new Form($db);
225$result = $projectstatic->fetch($object->fk_project);
227$title = $object->ref;
228if (!empty($withproject)) {
229 $title .=
' | ' . $langs->trans(
"Project") . (!empty($projectstatic->ref) ?
': '.$projectstatic->ref :
'') ;
236if ($id > 0 || !empty($ref)) {
237 $res = $object->fetch_optionals();
238 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_TASK') && method_exists($object,
'fetchComments') && empty($object->comments)) {
239 $object->fetchComments();
243 if (
getDolGlobalString(
'PROJECT_ALLOW_COMMENT_ON_PROJECT') && method_exists($projectstatic,
'fetchComments') && empty($projectstatic->comments)) {
244 $projectstatic->fetchComments();
246 if (!empty($projectstatic->socid)) {
247 $projectstatic->fetch_thirdparty();
250 $object->project = clone $projectstatic;
254 if (!empty($withproject)) {
258 print
dol_get_fiche_head($head, $tab, $langs->trans(
"Project"), -1, ($projectstatic->public ?
'projectpub' :
'project'), 0,
'',
'');
260 $param = ($mode ==
'mine' ?
'&mode=mine' :
'');
264 $linkback =
'<a href="'.DOL_URL_ROOT.
'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>';
266 $morehtmlref =
'<div class="refidno">';
268 $morehtmlref .= $projectstatic->title;
270 if (!empty($projectstatic->thirdparty->id) &&$projectstatic->thirdparty->id > 0) {
271 $morehtmlref .=
'<br>'.$projectstatic->thirdparty->getNomUrl(1,
'project');
273 $morehtmlref .=
'</div>';
276 if (!$user->hasRight(
'projet',
'all',
'lire')) {
277 $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0);
278 $projectstatic->next_prev_filter =
"rowid IN (".$db->sanitize(count($objectsListId) ? join(
',', array_keys($objectsListId)) :
'0').
")";
281 dol_banner_tab($projectstatic,
'project_ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
283 print
'<div class="fichecenter">';
284 print
'<div class="fichehalfleft">';
285 print
'<div class="underbanner clearboth"></div>';
287 print
'<table class="border tableforfield centpercent">';
291 print
'<tr><td class="tdtop">';
292 print $langs->trans(
"Usage");
296 print
'<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET(
'usage_opportunity') ? (
GETPOST(
'usage_opportunity',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_opportunity ?
' checked="checked"' :
'')).
'"> ';
297 $htmltext = $langs->trans(
"ProjectFollowOpportunity");
298 print $form->textwithpicto($langs->trans(
"ProjectFollowOpportunity"), $htmltext);
302 print
'<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET(
'usage_task') ? (
GETPOST(
'usage_task',
'alpha') !=
'' ?
' checked="checked"' :
'') : ($projectstatic->usage_task ?
' checked="checked"' :
'')).
'"> ';
303 $htmltext = $langs->trans(
"ProjectFollowTasks");
304 print $form->textwithpicto($langs->trans(
"ProjectFollowTasks"), $htmltext);
308 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"' :
'')).
'"> ';
309 $htmltext = $langs->trans(
"ProjectBillTimeDescription");
310 print $form->textwithpicto($langs->trans(
"BillTime"), $htmltext);
313 if (isModEnabled(
'eventorganization')) {
314 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"' :
'')).
'"> ';
315 $htmltext = $langs->trans(
"EventOrganizationDescriptionLong");
316 print $form->textwithpicto($langs->trans(
"ManageOrganizeEvent"), $htmltext);
322 print
'<tr><td class="titlefield">'.$langs->trans(
"Visibility").
'</td><td>';
323 if ($projectstatic->public) {
324 print
img_picto($langs->trans(
'SharedProject'),
'world',
'class="paddingrightonly"');
325 print $langs->trans(
'SharedProject');
327 print
img_picto($langs->trans(
'PrivateProject'),
'private',
'class="paddingrightonly"');
328 print $langs->trans(
'PrivateProject');
333 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
334 if (strcmp($projectstatic->budget_amount,
'')) {
335 print
'<span class="amount">'.price($projectstatic->budget_amount,
'', $langs, 1, 0, 0, $conf->currency).
'</span>';
340 print
'<tr><td>'.$langs->trans(
"Dates").
'</td><td>';
342 print($start ? $start :
'?');
345 print($end ? $end :
'?');
346 if ($projectstatic->hasDelay()) {
359 print
'<div class="fichehalfright">';
360 print
'<div class="underbanner clearboth"></div>';
362 print
'<table class="border tableforfield centpercent">';
365 print
'<td class="titlefield tdtop">'.$langs->trans(
"Description").
'</td><td>';
366 print nl2br($projectstatic->description);
370 if (isModEnabled(
'categorie')) {
371 print
'<tr><td class="valignmiddle">'.$langs->trans(
"Categories").
'</td><td>';
372 print $form->showCategories($projectstatic->id,
'project', 1);
381 print
'<div class="clearboth"></div>';
416 if ($action ==
'clone') {
417 $formquestion = array(
418 'text' => $langs->trans(
"ConfirmClone"),
420 array(
'type' =>
'checkbox',
'name' =>
'clone_change_dt',
'label' => $langs->trans(
"CloneChanges"),
'value' =>
true),
421 array(
'type' =>
'checkbox',
'name' =>
'clone_affectation',
'label' => $langs->trans(
"CloneAffectation"),
'value' =>
true),
422 array(
'type' =>
'checkbox',
'name' =>
'clone_prog',
'label' => $langs->trans(
"CloneProgression"),
'value' =>
true),
423 array(
'type' =>
'checkbox',
'name' =>
'clone_time',
'label' => $langs->trans(
"CloneTimes"),
'value' =>
true),
424 array(
'type' =>
'checkbox',
'name' =>
'clone_file',
'label' => $langs->trans(
"CloneFile"),
'value' =>
true),
428 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".$object->id, $langs->trans(
"ToClone"), $langs->trans(
"ConfirmCloneTask"),
"confirm_clone", $formquestion,
'', 1, 300, 590);
434 if ($action ==
'edit' && $user->hasRight(
'projet',
'creer')) {
435 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
436 print
'<input type="hidden" name="token" value="'.newToken().
'">';
437 print
'<input type="hidden" name="action" value="update">';
438 print
'<input type="hidden" name="withproject" value="'.$withproject.
'">';
439 print
'<input type="hidden" name="id" value="'.$object->id.
'">';
441 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), 0,
'projecttask', 0,
'',
'');
443 print
'<table class="border centpercent">';
446 print
'<tr><td class="titlefield fieldrequired">'.$langs->trans(
"Ref").
'</td>';
447 print
'<td><input class="minwidth100" name="taskref" value="'.$object->ref.
'"></td></tr>';
450 print
'<tr><td class="fieldrequired">'.$langs->trans(
"Label").
'</td>';
451 print
'<td><input class="minwidth500" name="label" value="'.$object->label.
'"></td></tr>';
454 if (empty($withproject)) {
455 print
'<tr><td>'.$langs->trans(
"Project").
'</td><td colspan="3">';
456 print $projectstatic->getNomUrl(1);
460 print
'<td>'.$langs->trans(
"ThirdParty").
'</td><td colspan="3">';
461 if ($projectstatic->thirdparty->id) {
462 print $projectstatic->thirdparty->getNomUrl(1);
470 print
'<tr><td>'.$langs->trans(
"ChildOfProjectTask").
'</td><td>';
471 $formother->selectProjectTasks($object->fk_task_parent, $projectstatic->id,
'task_parent', ($user->admin ? 0 : 1), 0, 0, 0, $object->id);
475 print
'<tr><td>'.$langs->trans(
"DateStart").
'</td><td>';
476 print $form->selectDate($object->date_start,
'dateo', 1, 1, 0,
'', 1, 0);
480 print
'<tr><td>'.$langs->trans(
"Deadline").
'</td><td>';
481 print $form->selectDate($object->date_end ? $object->date_end : -1,
'datee', 1, 1, 0,
'', 1, 0);
485 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td>';
486 print $form->select_duration(
'planned_workload', $object->planned_workload, 0,
'text');
490 print
'<tr><td>'.$langs->trans(
"ProgressDeclared").
'</td><td>';
491 print $formother->select_percent($object->progress,
'progress', 0, 5, 0, 100, 1);
495 print
'<tr><td class="tdtop">'.$langs->trans(
"Description").
'</td>';
499 include_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
500 $cked_enabled = (
getDolGlobalString(
'FCKEDITOR_ENABLE_SOCIETE') ? $conf->global->FCKEDITOR_ENABLE_SOCIETE : 0);
502 $doleditor =
new DolEditor(
'description', $object->description,
'', 80,
'dolibarr_details',
'',
false,
true, $cked_enabled, $nbrows);
503 print $doleditor->Create();
506 print
'<tr><td>'.$langs->trans(
"Budget").
'</td>';
507 print
'<td><input size="5" type="text" name="budget_amount" value="'.dol_escape_htmltag(GETPOSTISSET(
'budget_amount') ?
GETPOST(
'budget_amount') :
price2num($object->budget_amount)).
'"></td>';
511 $parameters = array();
512 $reshook = $hookmanager->executeHooks(
'formObjectOptions', $parameters, $object, $action);
513 print $hookmanager->resPrint;
514 if (empty($reshook)) {
515 print $object->showOptionals($extrafields,
'edit');
522 print $form->buttonsSaveCancel(
"Modify");
529 $param = ($withproject ?
'&withproject=1' :
'');
530 $linkback = $withproject ?
'<a href="'.DOL_URL_ROOT.
'/projet/tasks.php?id='.$projectstatic->id.
'&restore_lastsearch_values=1">'.$langs->trans(
"BackToList").
'</a>' :
'';
532 print
dol_get_fiche_head($head,
'task_task', $langs->trans(
"Task"), -1,
'projecttask', 0,
'',
'reposition');
534 if ($action ==
'delete') {
535 print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
GETPOST(
"id",
'int').
'&withproject='.$withproject, $langs->trans(
"DeleteATask"), $langs->trans(
"ConfirmDeleteATask"),
"confirm_delete");
538 if (!
GETPOST(
'withproject') || empty($projectstatic->id)) {
539 $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1);
540 $object->next_prev_filter =
"fk_projet IN (".$db->sanitize($projectsListId).
")";
542 $object->next_prev_filter =
"fk_projet = ".((int) $projectstatic->id);
548 if (empty($withproject)) {
549 $morehtmlref .=
'<div class="refidno">';
550 $morehtmlref .= $langs->trans(
"Project").
': ';
551 $morehtmlref .= $projectstatic->getNomUrl(1);
552 $morehtmlref .=
'<br>';
555 $morehtmlref .= $langs->trans(
"ThirdParty").
': ';
556 if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) {
557 $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1);
559 $morehtmlref .=
'</div>';
562 dol_banner_tab($object,
'ref', $linkback, 1,
'ref',
'ref', $morehtmlref, $param);
564 print
'<div class="fichecenter">';
565 print
'<div class="fichehalfleft">';
567 print
'<div class="underbanner clearboth"></div>';
568 print
'<table class="border centpercent tableforfield">';
571 print
'<tr><td>'.$langs->trans(
"ChildOfTask").
'</td><td>';
572 if ($object->fk_task_parent > 0) {
573 $tasktmp =
new Task($db);
574 $tasktmp->fetch($object->fk_task_parent);
575 print $tasktmp->getNomUrl(1);
580 print
'<tr><td class="titlefield">'.$langs->trans(
"DateStart").
' - '.$langs->trans(
"Deadline").
'</td><td colspan="3">';
582 print($start ? $start :
'?');
585 print($end ? $end :
'?');
586 if ($object->hasDelay()) {
592 print
'<tr><td>'.$langs->trans(
"PlannedWorkload").
'</td><td colspan="3">';
593 if ($object->planned_workload !=
'') {
599 print
'<td class="tdtop">'.$langs->trans(
"Description").
'</td><td colspan="3">';
606 print
'<div class="fichehalfright">';
608 print
'<div class="underbanner clearboth"></div>';
609 print
'<table class="border centpercent tableforfield">';
612 print
'<tr><td class="titlefield">'.$langs->trans(
"ProgressDeclared").
'</td><td colspan="3">';
613 if ($object->progress !=
'') {
614 print $object->progress.
' %';
619 print
'<tr><td>'.$langs->trans(
"ProgressCalculated").
'</td><td colspan="3">';
620 if ($object->planned_workload !=
'') {
621 $tmparray = $object->getSummaryOfTimeSpent();
622 if ($tmparray[
'total_duration'] > 0 && !empty($object->planned_workload)) {
623 print round($tmparray[
'total_duration'] / $object->planned_workload * 100, 2).
' %';
628 print
'<span class="opacitymedium">'.$langs->trans(
"WorkloadNotDefined").
'</span>';
633 print
'<tr><td>'.$langs->trans(
"Budget").
'</td><td>';
634 if (!is_null($object->budget_amount) && strcmp($object->budget_amount,
'')) {
635 print
'<span class="amount">'.price($object->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).
'</span>';
641 $parameters = array(
'socid'=>$socid);
642 include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
649 print
'<div class="clearboth"></div>';
655 if ($action !=
'edit') {
660 print
'<div class="tabsAction">';
662 $parameters = array();
663 $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action);
665 if (empty($reshook)) {
667 if ($user->hasRight(
'projet',
'creer')) {
668 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=edit&token='.newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Modify').
'</a>';
669 print
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.$object->id.
'&action=clone&token='.newToken().
'&withproject='.((int) $withproject).
'">'.$langs->trans(
'Clone').
'</a>';
671 print
'<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans(
"NotAllowed").
'">'.$langs->trans(
'Modify').
'</a>';
675 $permissiontodelete = $user->hasRight(
'projet',
'supprimer');
676 if ($permissiontodelete) {
677 if (!$object->hasChildren() && !$object->hasTimeSpent()) {
678 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=delete&token='.newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
680 print
dolGetButtonAction($langs->trans(
"TaskHasChild"), $langs->trans(
"Delete"),
'delete', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=delete&token='.newToken().
'&withproject='.((
int) $withproject),
'delete', 0);
683 print
dolGetButtonAction($langs->trans(
"Delete"),
'',
'delete', $_SERVER[
"PHP_SELF"].
'?id='.$object->id.
'&action=delete&token='.newToken().
'&withproject='.((
int) $withproject),
'delete', $permissiontodelete);
689 print
'<div class="fichecenter"><div class="fichehalfleft">';
690 print
'<a name="builddoc"></a>';
697 $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".$object->id;
698 $genallowed = ($user->rights->projet->lire);
699 $delallowed = ($user->hasRight(
'projet',
'creer'));
701 print $formfile->showdocuments(
'project_task', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf);
703 print
'</div><div class="fichehalfright">';
706 include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
708 $formactions->showactions($object,
'project_task', 0, 1,
'', 10,
'withproject='.$withproject);
710 print
'</div></div>';
if(preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if(preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if($action=='set') elseif( $action=='specimen') elseif($action=='setmodel') elseif( $action=='del') elseif($action=='setdoc') $formactions
View.
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_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='')
Show tab footer of a card.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
img_warning($titlealt='default', $moreatt='', $morecss='pictowarning')
Show warning logo.
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.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
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.
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.