dolibarr 22.0.5
card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2018-2025 Alexandre Spangaro <alexandre@inovea-conseil.com>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 * Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <https://www.gnu.org/licenses/>.
19 */
20
27// Load Dolibarr environment
28require '../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
31require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
32require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
33
42// Load translation files required by the page
43$langs->loadLangs(array("assets", "other"));
44
45// Get parameters
46$id = GETPOSTINT('id');
47$ref = GETPOST('ref', 'alpha');
48$action = GETPOST('action', 'aZ09');
49$confirm = GETPOST('confirm', 'alpha');
50$cancel = GETPOST('cancel');
51$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'assetcard'; // To manage different context of search
52$backtopage = GETPOST('backtopage', 'alpha');
53$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
54
55// Initialize a technical objects
56$object = new Asset($db);
57$extrafields = new ExtraFields($db);
58$diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id;
59$hookmanager->initHooks(array('assetcard', 'globalcard')); // Note that conf->hooks_modules contains array
60
61// Fetch optionals attributes and labels
62$extrafields->fetch_name_optionals_label($object->table_element);
63
64$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
65
66// Initialize array of search criteria
67$search_all = GETPOST("search_all", 'alpha');
68$search = array();
69foreach ($object->fields as $key => $val) {
70 if (GETPOST('search_'.$key, 'alpha')) {
71 $search[$key] = GETPOST('search_'.$key, 'alpha');
72 }
73}
74
75if (empty($action) && empty($id) && empty($ref)) {
76 $action = 'view';
77}
78
79// Load object
80include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
81
82$permissiontoread = $user->hasRight('asset', 'read');
83$permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
84$permissiontodelete = $user->hasRight('asset', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
85$permissionnote = $user->hasRight('asset', 'write'); // Used by the include of actions_setnotes.inc.php
86$permissiondellink = $user->hasRight('asset', 'write'); // Used by the include of actions_dellink.inc.php
87$upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1];
88
89// Security check (enable the most restrictive one)
90if ($user->socid > 0) {
92}
93if ($user->socid > 0) {
94 $socid = $user->socid;
95}
96$isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
97restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
98if (!isModEnabled('asset')) {
100}
101if (!$permissiontoread) {
103}
104
105
106/*
107 * Actions
108 */
109
110$parameters = array();
111$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
112if ($reshook < 0) {
113 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
114}
115
116if (empty($reshook)) {
117 $error = 0;
118
119 $backurlforlist = DOL_URL_ROOT.'/asset/list.php';
120
121 if (empty($backtopage) || ($cancel && empty($id))) {
122 if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
123 if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
124 $backtopage = $backurlforlist;
125 } else {
126 $backtopage = DOL_URL_ROOT.'/asset/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
127 }
128 }
129 }
130
131 $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
132 $triggermodname = 'ASSET_MODIFY'; // Name of trigger action code to execute when we modify record
133
134 // Action dispose object
135 if ($action == 'confirm_disposal' && $confirm == 'yes' && $permissiontoadd) {
136 $object->disposal_date = dol_mktime(0, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear'), 'gmt'); // for date without hour, we use gmt
137 $object->disposal_amount_ht = GETPOSTINT('disposal_amount');
138 $object->fk_disposal_type = GETPOSTINT('fk_disposal_type');
139 $disposal_invoice_id = GETPOSTINT('disposal_invoice_id');
140 $object->disposal_depreciated = ((GETPOST('disposal_depreciated') == '1' || GETPOST('disposal_depreciated') == 'on') ? 1 : 0);
141 $object->disposal_subject_to_vat = ((GETPOST('disposal_subject_to_vat') == '1' || GETPOST('disposal_subject_to_vat') == 'on') ? 1 : 0);
142
143 $result = $object->dispose($user, $disposal_invoice_id);
144 if ($result < 0) {
145 setEventMessages($object->error, $object->errors, 'errors');
146 }
147 $action = '';
148 } elseif ($action == "add" && $permissiontoadd) {
149 $object->supplier_invoice_id = GETPOSTINT('supplier_invoice_id');
150 }
151
152 // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
153 include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
154
155 // Actions when linking object each other
156 include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
157
158 // Actions when printing a doc from card
159 include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
160
161 // Action to move up and down lines of object
162 //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
163
164 // Action to build doc
165 include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
166
167 // Actions to send emails
168 $triggersendname = 'ASSET_SENTBYMAIL';
169 $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO';
170 $trackid = 'asset'.$object->id;
171 include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
172}
173
174
175/*
176 * View
177 *
178 */
179
180$form = new Form($db);
181$formfile = new FormFile($db);
182
183$title = $langs->trans("Asset").' - '.$langs->trans("Card");
184$help_url = '';
185llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-asset page-card');
186
187// Part to create
188if ($action == 'create') {
189 print load_fiche_titre($langs->trans("NewAsset"), '', 'object_'.$object->picto);
190
191 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
192 print '<input type="hidden" name="token" value="'.newToken().'">';
193 print '<input type="hidden" name="action" value="add">';
194 if ($backtopage) {
195 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
196 }
197 if ($backtopageforcancel) {
198 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
199 }
200 if (GETPOSTISSET('supplier_invoice_id')) {
201 $object->fields['supplier_invoice_id'] = array('type' => 'integer:FactureFournisseur:fourn/class/fournisseur.facture.class.php:1:entity IN (__SHARED_ENTITIES__)', 'label' => 'SupplierInvoice', 'enabled' => '1', 'noteditable' => 1, 'position' => 280, 'notnull' => 0, 'visible' => 1, 'index' => 1, 'validate' => '1',);
202 print '<input type="hidden" name="supplier_invoice_id" value="' . GETPOSTINT('supplier_invoice_id') . '">';
203 }
204
205 print dol_get_fiche_head(array(), '');
206
207
208 print '<table class="border centpercent tableforfieldcreate">'."\n";
209
210 // Common attributes
211 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
212
213 // Other attributes
214 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
215
216 print '</table>'."\n";
217
218 print dol_get_fiche_end();
219
220 print $form->buttonsSaveCancel("Create");
221
222 print '</form>';
223
224 //dol_set_focus('input[name="ref"]');
225}
226
227// Part to edit record
228if (($id || $ref) && $action == 'edit') {
229 print load_fiche_titre($langs->trans("Asset"), '', 'object_'.$object->picto);
230
231 print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
232 print '<input type="hidden" name="token" value="'.newToken().'">';
233 print '<input type="hidden" name="action" value="update">';
234 print '<input type="hidden" name="id" value="'.$object->id.'">';
235 if ($backtopage) {
236 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
237 }
238 if ($backtopageforcancel) {
239 print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
240 }
241
242 print dol_get_fiche_head();
243
244 print '<table class="border centpercent tableforfieldedit">'."\n";
245
246 // Common attributes
247 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
248
249 // Other attributes
250 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
251
252 print '</table>';
253
254 print dol_get_fiche_end();
255
256 print $form->buttonsSaveCancel();
257
258 print '</form>';
259}
260
261// Part to show record
262if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
263 $res = $object->fetch_optionals();
264
265 $head = assetPrepareHead($object);
266 print dol_get_fiche_head($head, 'card', $langs->trans("Asset"), -1, $object->picto);
267
268 $formconfirm = '';
269
270 // Confirmation to delete
271 if ($action == 'delete') {
272 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteAsset'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
273 }
274
275 // Confirmation of validation
276 if ($action == 'validate') {
277 // We check that object has a temporary ref
278 $ref = substr($object->ref, 1, 4);
279 if ($ref == 'PROV') {
280 $numref = $object->getNextNumRef();
281 } else {
282 $numref = $object->ref;
283 }
284
285 $text = $langs->trans('ConfirmValidateAsset', $numref);
286 if (isModEnabled('notification')) {
287 require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php';
288 $notify = new Notify($db);
289 $text .= '<br>';
290 $text .= $notify->confirmMessage('ASSET_VALIDATE', 0, $object);
291 }
292
293 $formquestion = array();
294
295 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Validate'), $text, 'confirm_validate', $formquestion, 0, 1, 220);
296 }
297
298 // Confirmation of disposal
299 if ($action == 'disposal') {
300 // Disposal
301 $langs->load('bills');
302
303 $disposal_date = dol_mktime(0, 0, 0, GETPOSTINT('disposal_datemonth'), GETPOSTINT('disposal_dateday'), GETPOSTINT('disposal_dateyear'), 'gmt'); // for date without hour, we use gmt
304 $disposal_amount = GETPOSTINT('disposal_amount');
305 $fk_disposal_type = GETPOSTINT('fk_disposal_type');
306 $disposal_invoice_id = GETPOSTINT('disposal_invoice_id');
307 $disposal_depreciated = GETPOSTISSET('disposal_depreciated') ? GETPOST('disposal_depreciated') : 1;
308 $disposal_depreciated = !empty($disposal_depreciated) ? 1 : 0;
309 $disposal_subject_to_vat = GETPOSTISSET('disposal_subject_to_vat') ? GETPOST('disposal_subject_to_vat') : 1;
310 $disposal_subject_to_vat = !empty($disposal_subject_to_vat) ? 1 : 0;
311
312 $object->fields['fk_disposal_type']['visible'] = 1;
313 $disposal_type_form = $object->showInputField(null, 'fk_disposal_type', (string) $fk_disposal_type, '', '', '', 0);
314 $object->fields['fk_disposal_type']['visible'] = -2;
315
316 $disposal_invoice_form = $form->selectForForms('Facture:compta/facture/class/facture.class.php::(entity:IN:__SHARED_ENTITIES__)', 'disposal_invoice_id', $disposal_invoice_id);
317
318 // Create an array for form
319 $formquestion = array(
320 array('type' => 'date', 'name' => 'disposal_date', 'tdclass' => 'fieldrequired', 'label' => $langs->trans("AssetDisposalDate"), 'value' => $disposal_date),
321 array('type' => 'text', 'name' => 'disposal_amount', 'tdclass' => 'fieldrequired', 'label' => $langs->trans("AssetDisposalAmount"), 'value' => $disposal_amount, 'morecss' => 'maxwidth100'),
322 array('type' => 'other', 'name' => 'fk_disposal_type', 'tdclass' => 'fieldrequired', 'label' => $langs->trans("AssetDisposalType"), 'value' => $disposal_type_form),
323 array('type' => 'other', 'name' => 'disposal_invoice_id', 'label' => $langs->trans("InvoiceCustomer"), 'value' => $disposal_invoice_form),
324 array('type' => 'checkbox', 'name' => 'disposal_depreciated', 'label' => $langs->trans("AssetDisposalDepreciated"), 'value' => $disposal_depreciated),
325 array('type' => 'checkbox', 'name' => 'disposal_subject_to_vat', 'label' => $langs->trans("AssetDisposalSubjectToVat"), 'value' => $disposal_subject_to_vat),
326 );
327 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref . ' - ' . $object->label), 'confirm_disposal', $formquestion, 'yes', 1, 350);
328 }
329
330 // Confirmation of reopen
331 if ($action == 'reopen') {
332 // Re-open
333 // Create an array for form
334 $formquestion = array();
335 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('AssetConfirmReOpenAsk', $object->ref), 'confirm_reopen', $formquestion, 'yes', 1);
336 }
337
338 // Confirmation of setdraft
339 if ($action == 'setdraft') {
340 $text = $langs->trans('ConfirmSetToDraft', $object->ref);
341
342 $formquestion = array();
343 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220);
344 }
345
346 // Clone confirmation
347 /* elseif ($action == 'clone') {
348 // Create an array for form
349 $formquestion = array();
350 $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
351 }*/
352
353 // Call Hook formConfirm
354 $parameters = array('formConfirm' => $formconfirm);
355 $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
356 if (empty($reshook)) {
357 $formconfirm .= $hookmanager->resPrint;
358 } elseif ($reshook > 0) {
359 $formconfirm = $hookmanager->resPrint;
360 }
361
362 // Print form confirm
363 print $formconfirm;
364
365
366 // Object card
367 // ------------------------------------------------------------
368 $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
369
370 $morehtmlref = '<div class="refidno">';
371 $morehtmlref .= '</div>';
372
373
374 dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
375
376
377 print '<div class="fichecenter">';
378 print '<div class="fichehalfleft">';
379 print '<div class="underbanner clearboth"></div>';
380 print '<table class="border centpercent tableforfield">'."\n";
381
382 // Common attributes
383 $keyforbreak = 'date_acquisition'; // We change column just before this field
384 //unset($object->fields['fk_project']); // Hide field already shown in banner
385 //unset($object->fields['fk_soc']); // Hide field already shown in banner
386 include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
387
388 // Other attributes. Fields from hook formObjectOptions and Extrafields.
389 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
390
391 print '</table>';
392 print '</div>';
393 print '</div>';
394
395 print '<div class="clearboth"></div>';
396
397 print dol_get_fiche_end();
398
399 // Buttons for actions
400 if ($action != 'presend' && $action != 'editline') {
401 print '<div class="tabsAction">' . "\n";
402 $parameters = array();
403 $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
404 if ($reshook < 0) {
405 setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
406 }
407
408 if (empty($reshook)) {
409 // Send
410 if (empty($user->socid)) {
411 print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle');
412 }
413
414 // Back to draft
415 if ($object->status == $object::STATUS_VALIDATED) {
416 if ($permissiontoadd) {
417 print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=setdraft&token='.newToken().'">'.$langs->trans("SetToDraft").'</a>'."\n";
418 }
419 }
420
421 // Modify
422 if ($object->status == $object::STATUS_DRAFT) {
423 print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
424 }
425
426 // Validate
427 if ($object->status == $object::STATUS_DRAFT) {
428 print dolGetButtonAction($langs->trans('Validate'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=validate&token=' . newToken(), '', $permissiontoadd);
429 }
430
431 if ($object->status == $object::STATUS_VALIDATED) {
432 print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disposal&token=' . newToken(), '', $permissiontoadd);
433 }
434
435 // Re-open
436 if ($permissiontoadd && $object->status == $object::STATUS_DISPOSED) {
437 print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=reopen&token=' . newToken(), '', $permissiontoadd);
438 }
439
440 // Clone
441 //print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', false && $permissiontoadd);
442
443 // Delete (need delete permission, or if draft, just need create/modify permission)
444 print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
445 }
446 print '</div>' . "\n";
447 }
448
449 // Select mail models is same action as presend
450 if (GETPOST('modelselected')) {
451 $action = 'presend';
452 }
453
454 if ($action != 'presend') {
455 print '<div class="fichecenter"><div class="fichehalfleft">';
456 print '<a name="builddoc"></a>'; // ancre
457
458 $includedocgeneration = 0;
459
460 // Documents
461 if ($includedocgeneration) {
462 $objref = dol_sanitizeFileName($object->ref);
463 $relativepath = $objref.'/'.$objref.'.pdf';
464 $filedir = $conf->asset->dir_output.'/'.$objref;
465 $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
466 $genallowed = $user->hasRight('asset', 'read'); // If you can read, you can build the PDF to read content
467 $delallowed = $user->hasRight('asset', 'write'); // If you can create/edit, you can remove a file on card
468 print $formfile->showdocuments('asset:Asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
469 }
470
471 // Show links to link elements
472 $tmparray = $form->showLinkToObjectBlock($object, array(), array('asset'), 1);
473 $linktoelem = $tmparray['linktoelem'];
474 $htmltoenteralink = $tmparray['htmltoenteralink'];
475 print $htmltoenteralink;
476
477 $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
478
479
480 print '</div><div class="fichehalfright">';
481
482 $morehtmlcenter = '';
483 $MAXEVENT = 10;
484
485 $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/asset/agenda.php?id='.$object->id);
486
487 // List of actions on element
488 include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
489 $formactions = new FormActions($db);
490 $somethingshown = $formactions->showactions($object, $object->element, 0, 1, '', $MAXEVENT, '', $morehtmlcenter);
491
492 print '</div></div>';
493 }
494
495 //Select mail models is same action as presend
496 if (GETPOST('modelselected')) {
497 $action = 'presend';
498 }
499
500 // Presend form
501 $modelmail = 'asset';
502 $defaulttopic = 'InformationMessage';
503 $diroutput = $conf->asset->dir_output;
504 $trackid = 'asset'.$object->id;
505
506 include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
507}
508
509// End of page
510llxFooter();
511$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:67
assetPrepareHead(Asset $object)
Prepare array of tabs for Asset.
Definition asset.lib.php:89
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:73
Class for Asset.
Class to manage standard extra fields.
Class to manage building of HTML components.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
Class to manage the table of subscription to notifications.
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...
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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, $morecssdiv='')
Show tabs of a record.
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.
dol_clone($object, $native=2)
Create a clone of instance of object (new instance with same value for each properties) With native =...
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0)
Clean a string to use it as a file name.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.