dolibarr 21.0.0-beta
info.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26// Load Dolibarr environment
27require '../../main.inc.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
30require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
31
40// Load translation files required by the page
41$langs->load("trips");
42
43// Security check
44$id = GETPOSTINT('id');
45if ($user->socid) {
46 $socid = $user->socid;
47}
48$result = restrictedArea($user, 'deplacement', $id, '');
49
50
51/*
52 * View
53 */
54
55llxHeader();
56
57if ($id) {
58 $object = new Deplacement($db);
59 $object->fetch($id);
60 $object->info($id);
61
62 $head = trip_prepare_head($object);
63
64 print dol_get_fiche_head($head, 'info', $langs->trans("TripCard"), 0, 'trip');
65
66 print '<table width="100%"><tr><td>';
67 dol_print_object_info($object);
68 print '</td></tr></table>';
69
70 print '</div>';
71}
72
73// End of page
74llxFooter();
75$db->close();
$id
Definition account.php:48
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
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:71
Class to manage trips and working credit notes.
llxFooter()
Footer empty.
Definition document.php:107
dol_print_object_info($object, $usetable=0)
Show information on an object TODO Move this into html.formother.
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)
Show tabs of a record.
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.
trip_prepare_head(Deplacement $object)
Prepare array with list of tabs.
Definition trip.lib.php:31