28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
32 $langs->loadLangs(array(
"bookcal@bookcal"));
34 $action =
GETPOST(
'action',
'aZ09');
41 $socid =
GETPOST(
'socid',
'int');
42 if (isset($user->socid) && $user->socid > 0) {
44 $socid = $user->socid;
65 llxHeader(
"", $langs->trans(
"BookCalArea"));
67 print
load_fiche_titre($langs->trans(
"BookCalArea"),
'',
'bookcal.png@bookcal');
69 print
'<div class="fichecenter"><div class="fichethirdleft">';
74 if ($user->rights->bookcal->availabilities->read && !empty($conf->bookcal->enabled)) {
75 $langs->load(
"orders");
77 $sql =
"SELECT rowid, `ref`, fk_soc, fk_project, description, note_public, note_private, date_creation, tms, fk_user_creat, fk_user_modif, last_main_doc, import_key, model_pdf, status, firstname, lastname, email, `start`, duration";
78 $sql .=
" FROM ". MAIN_DB_PREFIX .
'bookcal_booking';
83 $num = $db->num_rows(
$resql);
85 print
'<table class="noborder centpercent">';
86 print
'<tr class="liste_titre">';
87 print
'<th colspan="21">'.$langs->trans(
"Bookings").($num?
'<span class="badge marginleftonlyshort">'.$num.
'</span>':
'').
'</th></tr>';
92 <th colspan="3">id</th>
93 <th colspan="3">ref</th>
94 <th colspan="3">name</th>
95 <th colspan="3">date</th>
96 <th colspan="3">hour</th>
97 <th colspan="3">duration</th>
98 <th colspan="3">description</th>
103 $obj = $db->fetch_object(
$resql);
104 print
'<tr class="oddeven">';
106 $myobjectstatic->id=$obj->rowid;
107 $myobjectstatic->ref=$obj->ref;
108 $myobjectstatic->date = $obj->start;
109 $myobjectstatic->firstname = $obj->firstname;
110 $myobjectstatic->lastname = $obj->lastname;
111 $myobjectstatic->start = $obj->start;
112 $myobjectstatic->duration = $obj->duration;
113 $myobjectstatic->description = $obj->description;
116 print
'<td colspan="3" class="nowrap">' . $myobjectstatic->id .
"</td>";
117 print
'<td colspan="3" class="nowrap">' . $myobjectstatic->ref .
"</td>";
118 print
'<td colspan="3" class="nowrap">' . $myobjectstatic->firstname .
" " . $myobjectstatic->lastname .
"</td>";
119 print
'<td colspan="3" class="nowrap">' . $myobjectstatic->start .
"</td>";
120 print
'<td colspan="3" class="nowrap">' . $myobjectstatic->duration .
"</td>";
121 print
'<td colspan="3" class="nowrap">' . $myobjectstatic->description .
"</td>";
125 print
'<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans(
"NoOrder").
'</td></tr>';
127 print
"</table><br>";
138 print
'</div><div class="fichetwothirdright">';
141 $NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
142 $max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
194 print
'</div></div>';