dolibarr  16.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 Alexandre Spangaro <aspangaro@open-dsi.fr>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
25 require '../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
27 require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
28 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
29 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
30 
31 // Load translation files required by the page
32 $langs->loadLangs(array("assets", "other"));
33 
34 // Get parameters
35 $id = GETPOST('id', 'int');
36 $ref = GETPOST('ref', 'alpha');
37 $action = GETPOST('action', 'aZ09');
38 $confirm = GETPOST('confirm', 'alpha');
39 $cancel = GETPOST('cancel', 'aZ09');
40 $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'assetcard'; // To manage different context of search
41 $backtopage = GETPOST('backtopage', 'alpha');
42 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
43 
44 // Initialize technical objects
45 $object = new Asset($db);
46 $extrafields = new ExtraFields($db);
47 $diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id;
48 $hookmanager->initHooks(array('assetcard', 'globalcard')); // Note that conf->hooks_modules contains array
49 
50 // Fetch optionals attributes and labels
51 $extrafields->fetch_name_optionals_label($object->table_element);
52 
53 $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
54 
55 // Initialize array of search criterias
56 $search_all = GETPOST("search_all", 'alpha');
57 $search = array();
58 foreach ($object->fields as $key => $val) {
59  if (GETPOST('search_'.$key, 'alpha')) {
60  $search[$key] = GETPOST('search_'.$key, 'alpha');
61  }
62 }
63 
64 if (empty($action) && empty($id) && empty($ref)) {
65  $action = 'view';
66 }
67 
68 // Load object
69 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once.
70 
71 $permissiontoread = $user->rights->asset->read;
72 $permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
73 $permissiontodelete = $user->rights->asset->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT);
74 $permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php
75 $permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php
76 $upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1];
77 
78 // Security check (enable the most restrictive one)
79 if ($user->socid > 0) accessforbidden();
80 if ($user->socid > 0) $socid = $user->socid;
81 $isdraft = (($object->status == $object::STATUS_DRAFT) ? 1 : 0);
82 restrictedArea($user, $object->element, $object->id, $object->table_element, '', 'fk_soc', 'rowid', $isdraft);
83 if (empty($conf->asset->enabled)) accessforbidden();
84 if (!$permissiontoread) accessforbidden();
85 
86 
87 /*
88  * Actions
89  */
90 
91 $parameters = array();
92 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
93 if ($reshook < 0) {
94  setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
95 }
96 
97 if (empty($reshook)) {
98  $error = 0;
99 
100  $backurlforlist = DOL_URL_ROOT.'/asset/list.php';
101 
102  if (empty($backtopage) || ($cancel && empty($id))) {
103  if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
104  if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
105  $backtopage = $backurlforlist;
106  } else {
107  $backtopage = DOL_URL_ROOT.'/asset/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
108  }
109  }
110  }
111 
112  $object->oldcopy = dol_clone($object);
113  $triggermodname = 'ASSET_MODIFY'; // Name of trigger action code to execute when we modify record
114 
115  // Action dispose object
116  if ($action == 'confirm_disposal' && $confirm == 'yes' && $permissiontoadd) {
117  $object->disposal_date = dol_mktime(12, 0, 0, GETPOST('disposal_datemonth', 'int'), GETPOST('disposal_dateday', 'int'), GETPOST('disposal_dateyear', 'int')); // for date without hour, we use gmt
118  $object->disposal_amount_ht = GETPOST('disposal_amount', 'int');
119  $object->fk_disposal_type = GETPOST('fk_disposal_type', 'int');
120  $disposal_invoice_id = GETPOST('disposal_invoice_id', 'int');
121  $object->disposal_depreciated = ((GETPOST('disposal_depreciated') == '1' || GETPOST('disposal_depreciated') == 'on') ? 1 : 0);
122  $object->disposal_subject_to_vat = ((GETPOST('disposal_subject_to_vat') == '1' || GETPOST('disposal_subject_to_vat') == 'on') ? 1 : 0);
123 
124  $result = $object->dispose($user, $disposal_invoice_id);
125  if ($result < 0) {
126  setEventMessages($object->error, $object->errors, 'errors');
127  }
128  $action = '';
129  } elseif ($action == "add") {
130  $object->supplier_invoice_id = GETPOST('supplier_invoice_id', 'int');
131  }
132 
133  // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
134  include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
135 
136  // Actions when linking object each other
137  include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
138 
139  // Actions when printing a doc from card
140  include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
141 
142  // Action to move up and down lines of object
143  //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';
144 
145  // Action to build doc
146  include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
147 
148  // Actions to send emails
149  $triggersendname = 'ASSET_SENTBYMAIL';
150  $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO';
151  $trackid = 'asset'.$object->id;
152  include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
153 }
154 
155 
156 /*
157  * View
158  *
159  */
160 
161 $form = new Form($db);
162 $formfile = new FormFile($db);
163 
164 $title = $langs->trans("Asset").' - '.$langs->trans("Card");
165 $help_url = '';
166 llxHeader('', $title, $help_url);
167 
168 // Part to create
169 if ($action == 'create') {
170  print load_fiche_titre($langs->trans("NewObject", $langs->transnoentitiesnoconv("Asset")), '', 'object_'.$object->picto);
171 
172  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
173  print '<input type="hidden" name="token" value="'.newToken().'">';
174  print '<input type="hidden" name="action" value="add">';
175  if ($backtopage) {
176  print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
177  }
178  if ($backtopageforcancel) {
179  print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
180  }
181  if (GETPOSTISSET('supplier_invoice_id')) {
182  $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',);
183  print '<input type="hidden" name="supplier_invoice_id" value="' . GETPOST('supplier_invoice_id', 'int') . '">';
184  }
185 
186  print dol_get_fiche_head(array(), '');
187 
188  // Set some default values
189  //if (! GETPOSTISSET('fieldname')) $_POST['fieldname'] = 'myvalue';
190 
191  print '<table class="border centpercent tableforfieldcreate">'."\n";
192 
193  // Common attributes
194  include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php';
195 
196  // Other attributes
197  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
198 
199  print '</table>'."\n";
200 
201  print dol_get_fiche_end();
202 
203  print $form->buttonsSaveCancel("Create");
204 
205  print '</form>';
206 
207  //dol_set_focus('input[name="ref"]');
208 }
209 
210 // Part to edit record
211 if (($id || $ref) && $action == 'edit') {
212  print load_fiche_titre($langs->trans("Asset"), '', 'object_'.$object->picto);
213 
214  print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
215  print '<input type="hidden" name="token" value="'.newToken().'">';
216  print '<input type="hidden" name="action" value="update">';
217  print '<input type="hidden" name="id" value="'.$object->id.'">';
218  if ($backtopage) {
219  print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
220  }
221  if ($backtopageforcancel) {
222  print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
223  }
224 
225  print dol_get_fiche_head();
226 
227  print '<table class="border centpercent tableforfieldedit">'."\n";
228 
229  // Common attributes
230  include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php';
231 
232  // Other attributes
233  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php';
234 
235  print '</table>';
236 
237  print dol_get_fiche_end();
238 
239  print $form->buttonsSaveCancel();
240 
241  print '</form>';
242 }
243 
244 // Part to show record
245 if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
246  $res = $object->fetch_optionals();
247 
248  $head = assetPrepareHead($object);
249  print dol_get_fiche_head($head, 'card', $langs->trans("Asset"), -1, $object->picto);
250 
251  $formconfirm = '';
252 
253  // Confirmation to delete
254  if ($action == 'delete') {
255  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteAsset'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
256  } elseif ($action == 'disposal') {
257  // Disposal
258  $langs->load('bills');
259 
260  $disposal_date = dol_mktime(12, 0, 0, GETPOST('disposal_datemonth', 'int'), GETPOST('disposal_dateday', 'int'), GETPOST('disposal_dateyear', 'int')); // for date without hour, we use gmt
261  $disposal_amount = GETPOST('disposal_amount', 'int');
262  $fk_disposal_type = GETPOST('fk_disposal_type', 'int');
263  $disposal_invoice_id = GETPOST('disposal_invoice_id', 'int');
264  $disposal_depreciated = GETPOSTISSET('disposal_depreciated') ? GETPOST('disposal_depreciated') : 1;
265  $disposal_depreciated = !empty($disposal_depreciated) ? 1 : 0;
266  $disposal_subject_to_vat = GETPOSTISSET('disposal_subject_to_vat') ? GETPOST('disposal_subject_to_vat') : 1;
267  $disposal_subject_to_vat = !empty($disposal_subject_to_vat) ? 1 : 0;
268 
269  $object->fields['fk_disposal_type']['visible'] = 1;
270  $disposal_type_form = $object->showInputField(null, 'fk_disposal_type', $fk_disposal_type, '', '', '', 0);
271  $object->fields['fk_disposal_type']['visible'] = -2;
272 
273  $object->fields['disposal_invoice_id'] = array('type' => 'integer:Facture:compta/facture/class/facture.class.php::entity IN (__SHARED_ENTITIES__)', 'enabled' => '1', 'notnull' => 1, 'visible' => 1, 'index' => 1, 'validate' => '1',);
274  $disposal_invoice_form = $object->showInputField(null, 'disposal_invoice_id', $disposal_invoice_id, '', '', '', 0);
275  unset($object->fields['disposal_invoice_id']);
276 
277  // Create an array for form
278  $formquestion = array(
279  array('type' => 'date', 'name' => 'disposal_date', 'tdclass' => 'fieldrequired', 'label' => $langs->trans("AssetDisposalDate"), 'value' => $disposal_date),
280  array('type' => 'text', 'name' => 'disposal_amount', 'tdclass' => 'fieldrequired', 'label' => $langs->trans("AssetDisposalAmount"), 'value' => $disposal_amount),
281  array('type' => 'other', 'name' => 'fk_disposal_type', 'tdclass' => 'fieldrequired', 'label' => $langs->trans("AssetDisposalType"), 'value' => $disposal_type_form),
282  array('type' => 'other', 'name' => 'disposal_invoice_id', 'label' => $langs->trans("InvoiceCustomer"), 'value' => $disposal_invoice_form),
283  array('type' => 'checkbox', 'name' => 'disposal_depreciated', 'label' => $langs->trans("AssetDisposalDepreciated"), 'value' => $disposal_depreciated),
284  array('type' => 'checkbox', 'name' => 'disposal_subject_to_vat', 'label' => $langs->trans("AssetDisposalSubjectToVat"), 'value' => $disposal_subject_to_vat),
285  );
286  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AssetDisposal'), $langs->trans('AssetConfirmDisposalAsk', $object->ref . ' - ' . $object->label), 'confirm_disposal', $formquestion, 'yes', 1);
287  } elseif ($action == 'reopen') {
288  // Re-open
289  // Create an array for form
290  $formquestion = array();
291  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('AssetConfirmReOpenAsk', $object->ref), 'confirm_reopen', $formquestion, 'yes', 1);
292  }
293  // Clone confirmation
294  /* elseif ($action == 'clone') {
295  // Create an array for form
296  $formquestion = array();
297  $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
298  }*/
299 
300  // Call Hook formConfirm
301  $parameters = array('formConfirm' => $formconfirm);
302  $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
303  if (empty($reshook)) {
304  $formconfirm .= $hookmanager->resPrint;
305  } elseif ($reshook > 0) {
306  $formconfirm = $hookmanager->resPrint;
307  }
308 
309  // Print form confirm
310  print $formconfirm;
311 
312 
313  // Object card
314  // ------------------------------------------------------------
315  $linkback = '<a href="'.DOL_URL_ROOT.'/asset/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
316 
317  $morehtmlref = '<div class="refidno">';
318  $morehtmlref .= '</div>';
319 
320 
321  dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
322 
323 
324  print '<div class="fichecenter">';
325  print '<div class="fichehalfleft">';
326  print '<div class="underbanner clearboth"></div>';
327  print '<table class="border centpercent tableforfield">'."\n";
328 
329  // Common attributes
330  $keyforbreak='date_acquisition'; // We change column just before this field
331  //unset($object->fields['fk_project']); // Hide field already shown in banner
332  //unset($object->fields['fk_soc']); // Hide field already shown in banner
333  include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
334 
335  // Other attributes. Fields from hook formObjectOptions and Extrafields.
336  include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
337 
338  print '</table>';
339  print '</div>';
340  print '</div>';
341 
342  print '<div class="clearboth"></div>';
343 
344  print dol_get_fiche_end();
345 
346  // Buttons for actions
347  if ($action != 'presend' && $action != 'editline') {
348  print '<div class="tabsAction">' . "\n";
349  $parameters = array();
350  $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
351  if ($reshook < 0) {
352  setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
353  }
354 
355  if (empty($reshook)) {
356  // Send
357  if (empty($user->socid)) {
358  print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle');
359  }
360 
361  if ($object->status == $object::STATUS_DRAFT) {
362  print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
363  }
364 
365  // Clone
366  //print dolGetButtonAction($langs->trans('ToClone'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=clone&token=' . newToken(), '', false && $permissiontoadd);
367 
368  if ($object->status == $object::STATUS_DRAFT) {
369  print dolGetButtonAction($langs->trans('AssetDisposal'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=disposal&token=' . newToken(), '', $permissiontoadd);
370  } else {
371  print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=reopen&token=' . newToken(), '', $permissiontoadd);
372  }
373 
374  // Delete (need delete permission, or if draft, just need create/modify permission)
375  print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=delete&token=' . newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd));
376  }
377  print '</div>' . "\n";
378  }
379 
380  // Select mail models is same action as presend
381  if (GETPOST('modelselected')) {
382  $action = 'presend';
383  }
384 
385  if ($action != 'presend') {
386  print '<div class="fichecenter"><div class="fichehalfleft">';
387  print '<a name="builddoc"></a>'; // ancre
388 
389  $includedocgeneration = 0;
390 
391  // Documents
392  if ($includedocgeneration) {
393  $objref = dol_sanitizeFileName($object->ref);
394  $relativepath = $objref.'/'.$objref.'.pdf';
395  $filedir = $conf->asset->dir_output.'/'.$objref;
396  $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id;
397  $genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content
398  $delallowed = $user->rights->asset->write; // If you can create/edit, you can remove a file on card
399  print $formfile->showdocuments('asset:Asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang);
400  }
401 
402  // Show links to link elements
403  $linktoelem = $form->showLinkToObjectBlock($object, null, array('asset'));
404  $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
405 
406 
407  print '</div><div class="fichehalfright">';
408 
409  $MAXEVENT = 10;
410 
411  $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/asset/agenda.php?id='.$object->id);
412 
413  // List of actions on element
414  include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
415  $formactions = new FormActions($db);
416  $somethingshown = $formactions->showactions($object, $object->element, 0, 1, '', $MAXEVENT, '', $morehtmlright);
417 
418  print '</div></div>';
419  }
420 
421  //Select mail models is same action as presend
422  if (GETPOST('modelselected')) {
423  $action = 'presend';
424  }
425 
426  // Presend form
427  $modelmail = 'asset';
428  $defaulttopic = 'InformationMessage';
429  $diroutput = $conf->asset->dir_output;
430  $trackid = 'asset'.$object->id;
431 
432  include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
433 }
434 
435 // End of page
436 llxFooter();
437 $db->close();
Asset
Class for Asset.
Definition: asset.class.php:30
dol_sanitizeFileName
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
Definition: functions.lib.php:1226
restrictedArea
restrictedArea($user, $features, $objectid=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.
Definition: security.lib.php:234
llxFooter
llxFooter()
Empty footer.
Definition: wrapper.php:73
load_fiche_titre
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
Definition: functions.lib.php:5204
GETPOST
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Definition: functions.lib.php:484
FormActions
Class to manage building of HTML components.
Definition: html.formactions.class.php:30
$form
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
Definition: card.php:142
dolGetButtonAction
dolGetButtonAction($label, $html='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
Definition: functions.lib.php:10450
dol_clone
dol_clone($object, $native=0)
Create a clone of instance of object (new instance with same value for each properties) With native =...
Definition: functions.lib.php:1158
dol_banner_tab
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.
Definition: functions.lib.php:2046
$help_url
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
Definition: agenda.php:116
$formactions
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.
Definition: agenda_other.php:178
$formconfirm
$formconfirm
if ($action == 'delbookkeepingyear') {
Definition: listbyaccount.php:576
FormFile
Class to offer components to list and upload files.
Definition: html.formfile.class.php:36
dolGetButtonTitle
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.
Definition: functions.lib.php:10605
dol_get_fiche_head
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='')
Show tabs of a record.
Definition: functions.lib.php:1822
newToken
newToken()
Return the value of token currently saved into session with name 'newtoken'.
Definition: functions.lib.php:10878
dol_get_fiche_end
dol_get_fiche_end($notab=0)
Return tab footer of a card.
Definition: functions.lib.php:2018
GETPOSTISSET
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
Definition: functions.lib.php:386
ExtraFields
Class to manage standard extra fields.
Definition: extrafields.class.php:39
Form
Class to manage generation of HTML components Only common components must be here.
Definition: html.form.class.php:52
assetPrepareHead
assetPrepareHead(Asset $object)
Prepare array of tabs for Asset.
Definition: asset.lib.php:74
$parameters
$parameters
Actions.
Definition: card.php:78
setEventMessages
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='')
Set event messages in dol_events session object.
Definition: functions.lib.php:8137
accessforbidden
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
Definition: security.lib.php:933
dol_mktime
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...
Definition: functions.lib.php:2757
llxHeader
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOCSRFCHECK')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:59