25 require
'../../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/lib/agenda.lib.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/contact/class/contact.class.php';
29 require_once DOL_DOCUMENT_ROOT.
'/comm/action/class/cactioncomm.class.php';
30 require_once DOL_DOCUMENT_ROOT.
'/comm/action/class/actioncomm.class.php';
31 if (!empty($conf->projet->enabled)) {
32 require_once DOL_DOCUMENT_ROOT.
'/projet/class/project.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
37 $langs->load(
"commercial");
45 $socid = $user->socid;
48 $result =
restrictedArea($user,
'agenda', $id,
'actioncomm&societe',
'myactions|allactions',
'fk_soc',
'id');
55 $form =
new Form($db);
57 $help_url =
'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda';
58 llxHeader(
'', $langs->trans(
"Agenda"), $help_url);
62 $object->info($object->id);
67 $linkback =
img_picto($langs->trans(
"BackToList"),
'object_list',
'class="hideonsmartphone pictoactionview"');
68 $linkback .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php">'.$langs->trans(
"BackToList").
'</a>';
72 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewPerUser"),
'object_calendarperuser',
'class="hideonsmartphone pictoactionview"');
73 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/peruser.php?action=show_peruser&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">'.$langs->trans(
"ViewPerUser").
'</a>';
74 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewCal"),
'object_calendar',
'class="hideonsmartphone pictoactionview"');
75 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?action=show_month&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">'.$langs->trans(
"ViewCal").
'</a>';
76 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewWeek"),
'object_calendarweek',
'class="hideonsmartphone pictoactionview"');
77 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?action=show_day&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">'.$langs->trans(
"ViewWeek").
'</a>';
78 $out .=
'</li><li class="noborder litext">'.img_picto($langs->trans(
"ViewDay"),
'object_calendarday',
'class="hideonsmartphone pictoactionview"');
79 $out .=
'<a href="'.DOL_URL_ROOT.
'/comm/action/index.php?action=show_day&year='.
dol_print_date($object->datep,
'%Y').
'&month='.
dol_print_date($object->datep,
'%m').
'&day='.
dol_print_date($object->datep,
'%d').
'">'.$langs->trans(
"ViewDay").
'</a>';
83 $morehtmlref =
'<div class="refidno">';
87 if (!empty($conf->projet->enabled))
89 $langs->load(
"projects");
91 $morehtmlref .= $langs->trans(
'Project').
': ';
92 if (!empty($object->fk_project)) {
94 $proj->fetch($object->fk_project);
95 $morehtmlref .=
'<a href="'.DOL_URL_ROOT.
'/projet/card.php?id='.$object->fk_project.
'" title="'.$langs->trans(
'ShowProject').
'">';
96 $morehtmlref .= $proj->ref;
97 $morehtmlref .=
'</a>';
98 if ($proj->title) $morehtmlref .=
' - '.$proj->title;
103 $morehtmlref .=
'</div>';
105 dol_banner_tab($object,
'id', $linkback, ($user->socid ? 0 : 1),
'id',
'ref', $morehtmlref);
107 print '<div class="underbanner clearboth"></div>';
111 print '<table width="100%"><tr><td>';
113 print '</td></tr></table>';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage agenda events (actions)
dol_print_object_info($object, $usetable=0)
Show informations on an object TODO Move this into html.formother.
actions_prepare_head($object)
Prepare array with list of tabs.
Class to manage projects.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.