-
Notifications
You must be signed in to change notification settings - Fork 0
/
card_tab_follow.php
executable file
·108 lines (83 loc) · 4 KB
/
card_tab_follow.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
/**
* \file flightlog/bbcvols_card.php
* \ingroup flightlog
* \brief This file is an example of a php page
* Initialy built by build_class_from_table on 2017-02-09 11:10
*/
// Change this following line to use the correct relative path (../, ../../, etc)
$res = 0;
if (!$res && file_exists("../main.inc.php")) {
$res = @include '../main.inc.php';
} // to work if your module directory is into dolibarr root htdocs directory
if (!$res && file_exists("../../main.inc.php")) {
$res = @include '../../main.inc.php';
} // to work if your module directory is into a subdir of root htdocs directory
if (!$res && file_exists("../../../dolibarr/htdocs/main.inc.php")) {
$res = @include '../../../dolibarr/htdocs/main.inc.php';
} // Used on dev env only
if (!$res && file_exists("../../../../dolibarr/htdocs/main.inc.php")) {
$res = @include '../../../../dolibarr/htdocs/main.inc.php';
} // Used on dev env only
if (!$res) {
die("Include of main fails");
}
// Change this following line to use the correct relative path from htdocs
include_once(DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php');
dol_include_once('/flightlog/class/bbcvols.class.php');
dol_include_once('/flightlog/class/bbctypes.class.php');
dol_include_once('/flightlog/lib/flightLog.lib.php');
dol_include_once('/flightlog/lib/card.lib.php');
dol_include_once('/flightlog/lib/PilotService.php');
dol_include_once('/flightballoon/bbc_ballons.class.php');
dol_include_once('/user/class/usergroup.class.php');
global $langs, $user;
// Load traductions files requiredby by page
$langs->load("mymodule@flightlog");
$langs->load("other");
$id = GETPOST('id', 'int') ?: GETPOST('idBBC_vols', 'int');
$action = GETPOST('action', 'alpha');
$permissiondellink = $user->rights->flightlog->vol->financial;
$object = new Bbcvols($db);
$extrafields = new ExtraFields($db);
$receiver = new User($db);
$pilotService = new PilotService($db);
$pilot = new User($db);
$organisator = new User($db);
$flightType = new Bbctypes($db);
$balloon = new Bbc_ballons($db);
// fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label($object->table_element);
// Load object
include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';
// Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array('bbcvols'));
$object->ref = $object->idBBC_vols;
$receiver->fetch($object->fk_receiver);
$pilot->fetch($object->fk_pilot);
$organisator->fetch($object->fk_organisateur);
$flightType->fetch($object->fk_type);
$balloon->fetch($object->BBC_ballons_idBBC_ballons);
llxHeader('', $langs->trans('financial of flight'), '');
$head = prepareFlightTabs($object);
dol_fiche_head($head, 'follow', $langs->trans("Vol"));
$linkback = '<a href="' . DOL_URL_ROOT . '/flightlog/list.php">' . $langs->trans("BackToList") . '</a>';
print $form->showrefnav($object, "idBBC_vols", $linkback, true, "idBBC_vols");
print '<table class="border centpercent">' . "\n";
print '<tr><td class="fieldrequired">' . $langs->trans("FieldidBBC_vols") . '</td><td>' . $object->idBBC_vols . '</td></tr>';
print '<tr><td class="fieldrequired">' . $langs->trans("FieldDateCreation") . '</td><td>' . dol_print_date($object->date_creation) . '</td></tr>';
print '<tr><td class="fieldrequired">' . $langs->trans("FieldDateUpdate") . '</td><td>' . dol_print_date($object->date_update) . '</td></tr>';
print '</table>';
dol_fiche_end();
// Buttons
print '<div class="tabsAction">' . "\n";
print '</div>' . "\n";
if ($user->rights->flightlog->vol->financial) {
print '<div class="fichecenter"><div class="fichehalfleft">';
$form->showLinkedObjectBlock($object);
print '</div></div>';
}
// End of page
llxFooter();
$db->close();