2005-02-04 15:30:38 +01:00
< ? php
2017-06-16 17:01:43 +02:00
/* Copyright ( C ) 2002 - 2005 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
* Copyright ( C ) 2002 - 2003 Jean - Louis Bergamo < jlb @ j1b . org >
* Copyright ( C ) 2004 - 2015 Laurent Destailleur < eldy @ users . sourceforge . net >
* Copyright ( C ) 2004 Eric Seigne < eric . seigne @ ryxeo . com >
* Copyright ( C ) 2005 - 2017 Regis Houssin < regis . houssin @ capnetworks . com >
* Copyright ( C ) 2012 Juanjo Menent < jmenent @ 2 byte . es >
2005-02-04 15:30:38 +01:00
*
* This program is free software ; you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
2013-01-16 15:36:08 +01:00
* the Free Software Foundation ; either version 3 of the License , or
2005-02-04 15:30:38 +01:00
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2011-08-01 01:19:04 +02:00
* along with this program . If not , see < http :// www . gnu . org / licenses />.
2005-02-04 15:30:38 +01:00
*/
2005-03-06 16:39:32 +01:00
/**
2008-08-19 22:09:53 +02:00
* \file htdocs / user / perms . php
* \brief Onglet user et permissions de la fiche utilisateur
*/
2005-02-04 15:30:38 +01:00
2012-08-22 23:24:21 +02:00
require '../main.inc.php' ;
2012-08-22 23:11:24 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/usergroups.lib.php' ;
2013-01-10 08:27:12 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php' ;
2005-02-04 15:30:38 +01:00
2018-05-26 16:24:54 +02:00
// Load translation files required by page
$langs -> loadLangs ( array ( 'users' , 'admin' ));
2005-02-04 15:30:38 +01:00
2012-01-11 15:07:17 +01:00
$id = GETPOST ( 'id' , 'int' );
$action = GETPOST ( 'action' , 'alpha' );
$confirm = GETPOST ( 'confirm' , 'alpha' );
2012-10-20 09:33:39 +02:00
$module = GETPOST ( 'module' , 'alpha' );
$rights = GETPOST ( 'rights' , 'int' );
2018-03-31 18:48:27 +02:00
$contextpage = GETPOST ( 'contextpage' , 'aZ' ) ? GETPOST ( 'contextpage' , 'aZ' ) : 'userperms' ; // To manage different context of search
2005-02-04 15:30:38 +01:00
2011-08-21 02:20:43 +02:00
if ( ! isset ( $id ) || empty ( $id )) accessforbidden ();
2006-11-26 20:19:46 +01:00
2010-10-28 21:31:11 +02:00
// Defini si peux lire les permissions
2010-11-08 12:40:52 +01:00
$canreaduser = ( $user -> admin || $user -> rights -> user -> user -> lire );
2010-10-28 21:31:11 +02:00
// Defini si peux modifier les autres utilisateurs et leurs permisssions
2005-10-22 15:48:19 +02:00
$caneditperms = ( $user -> admin || $user -> rights -> user -> user -> creer );
2010-11-08 12:40:52 +01:00
// Advanced permissions
if ( ! empty ( $conf -> global -> MAIN_USE_ADVANCED_PERMS ))
{
$canreaduser = ( $user -> admin || ( $user -> rights -> user -> user -> lire && $user -> rights -> user -> user_advance -> readperms ));
2011-08-21 02:20:43 +02:00
$caneditselfperms = ( $user -> id == $id && $user -> rights -> user -> self_advance -> writeperms );
2012-05-07 11:15:14 +02:00
$caneditperms = (( $caneditperms || $caneditselfperms ) ? 1 : 0 );
2010-11-08 12:40:52 +01:00
}
2010-10-28 21:31:11 +02:00
2009-08-06 15:07:25 +02:00
// Security check
$socid = 0 ;
2012-07-10 13:20:53 +02:00
if ( isset ( $user -> societe_id ) && $user -> societe_id > 0 ) $socid = $user -> societe_id ;
2009-08-06 15:07:25 +02:00
$feature2 = (( $socid && $user -> rights -> user -> self -> creer ) ? '' : 'user' );
2012-03-23 00:27:12 +01:00
if ( $user -> id == $id && ( empty ( $conf -> global -> MAIN_USE_ADVANCED_PERMS ) || $user -> rights -> user -> self_advance -> readperms )) // A user can always read its own card if not advanced perms enabled, or if he has advanced perms
2009-08-17 19:32:38 +02:00
{
$feature2 = '' ;
$canreaduser = 1 ;
}
2013-05-03 16:10:28 +02:00
2015-05-13 09:32:54 +02:00
$result = restrictedArea ( $user , 'user' , $id , 'user&user' , $feature2 );
2011-08-21 02:20:43 +02:00
if ( $user -> id <> $id && ! $canreaduser ) accessforbidden ();
2005-10-22 15:48:19 +02:00
2015-09-16 09:37:49 +02:00
$object = new User ( $db );
2017-05-06 12:43:45 +02:00
$object -> fetch ( $id , '' , '' , 1 );
2015-09-16 09:37:49 +02:00
$object -> getrights ();
2017-06-06 07:57:03 +02:00
$entity = $conf -> entity ;
2017-06-10 12:56:28 +02:00
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
2018-03-31 18:48:27 +02:00
$hookmanager -> initHooks ( array ( 'usercard' , 'userperms' , 'globalcard' ));
2005-02-04 15:30:38 +01:00
2016-05-30 20:50:49 +02:00
2005-02-04 15:30:38 +01:00
/**
* Actions
*/
2012-07-27 18:41:52 +02:00
2015-09-16 09:37:49 +02:00
$parameters = array ( 'id' => $socid );
$reshook = $hookmanager -> executeHooks ( 'doActions' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
if ( $reshook < 0 ) setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
if ( empty ( $reshook )) {
if ( $action == 'addrights' && $caneditperms ) {
$edituser = new User ( $db );
2017-06-06 07:57:03 +02:00
$edituser -> fetch ( $object -> id );
$edituser -> addrights ( $rights , $module , '' , $entity );
2015-09-16 09:37:49 +02:00
// Si on a touche a ses propres droits, on recharge
2017-06-06 07:57:03 +02:00
if ( $object -> id == $user -> id ) {
2015-09-16 09:37:49 +02:00
$user -> clearrights ();
$user -> getrights ();
$menumanager -> loadMenu ();
}
2006-11-26 20:19:46 +01:00
}
2005-02-04 15:30:38 +01:00
2015-09-16 09:37:49 +02:00
if ( $action == 'delrights' && $caneditperms ) {
$edituser = new User ( $db );
2017-06-06 07:57:03 +02:00
$edituser -> fetch ( $object -> id );
$edituser -> delrights ( $rights , $module , '' , $entity );
2015-09-16 09:37:49 +02:00
// Si on a touche a ses propres droits, on recharge
2017-06-06 07:57:03 +02:00
if ( $object -> id == $user -> id ) {
2015-09-16 09:37:49 +02:00
$user -> clearrights ();
$user -> getrights ();
$menumanager -> loadMenu ();
}
2006-11-26 20:19:46 +01:00
}
2005-02-04 15:30:38 +01:00
}
2012-07-27 18:41:52 +02:00
/**
* View
*/
2005-02-04 15:30:38 +01:00
2008-01-06 13:57:09 +01:00
llxHeader ( '' , $langs -> trans ( " Permissions " ));
$form = new Form ( $db );
2015-06-26 15:26:08 +02:00
$head = user_prepare_head ( $object );
2005-03-06 16:39:32 +01:00
2009-05-05 02:25:14 +02:00
$title = $langs -> trans ( " User " );
2017-04-14 13:00:39 +02:00
dol_fiche_head ( $head , 'rights' , $title , - 1 , 'user' );
2005-03-06 17:01:38 +01:00
2005-02-04 15:30:38 +01:00
2006-11-26 20:19:46 +01:00
$db -> begin ();
2005-04-09 19:52:38 +02:00
2010-07-15 10:42:05 +02:00
// Search all modules with permission and reload permissions def.
2006-11-26 20:19:46 +01:00
$modules = array ();
2012-05-08 22:49:03 +02:00
$modulesdir = dolGetModulesDirs ();
2009-05-05 02:25:14 +02:00
2011-08-01 15:15:53 +02:00
foreach ( $modulesdir as $dir )
{
2012-05-08 22:49:03 +02:00
$handle =@ opendir ( dol_osencode ( $dir ));
2015-03-09 21:20:56 +01:00
if ( is_resource ( $handle ))
{
while (( $file = readdir ( $handle )) !== false )
{
if ( is_readable ( $dir . $file ) && substr ( $file , 0 , 3 ) == 'mod' && substr ( $file , dol_strlen ( $file ) - 10 ) == '.class.php' )
{
$modName = substr ( $file , 0 , dol_strlen ( $file ) - 10 );
if ( $modName )
{
include_once $dir . $file ;
$objMod = new $modName ( $db );
2011-08-24 00:25:37 +02:00
2011-03-14 13:00:42 +01:00
// Load all lang files of module
if ( isset ( $objMod -> langfiles ) && is_array ( $objMod -> langfiles ))
{
foreach ( $objMod -> langfiles as $domain )
{
$langs -> load ( $domain );
}
}
// Load all permissions
2011-08-24 00:25:37 +02:00
if ( $objMod -> rights_class )
{
2017-06-06 07:57:03 +02:00
$ret = $objMod -> insert_permissions ( 0 , $entity );
2010-12-15 19:15:08 +01:00
$modules [ $objMod -> rights_class ] = $objMod ;
//print "modules[".$objMod->rights_class."]=$objMod;";
}
}
}
}
}
2006-11-26 20:19:46 +01:00
}
2005-04-09 19:52:38 +02:00
2006-11-26 20:19:46 +01:00
$db -> commit ();
2005-02-04 15:30:38 +01:00
2006-11-26 20:19:46 +01:00
// Lecture des droits utilisateurs
$permsuser = array ();
2005-03-06 16:39:32 +01:00
2018-03-05 08:45:40 +01:00
$sql = " SELECT DISTINCT ur.fk_id " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " user_rights as ur " ;
$sql .= " WHERE ur.entity = " . $entity ;
2015-06-26 15:26:08 +02:00
$sql .= " AND ur.fk_user = " . $object -> id ;
2006-11-26 20:19:46 +01:00
2014-06-12 11:31:53 +02:00
dol_syslog ( " get user perms " , LOG_DEBUG );
2006-11-26 20:19:46 +01:00
$result = $db -> query ( $sql );
if ( $result )
{
2015-03-09 21:20:56 +01:00
$num = $db -> num_rows ( $result );
$i = 0 ;
while ( $i < $num )
{
$obj = $db -> fetch_object ( $result );
2018-03-05 08:45:40 +01:00
array_push ( $permsuser , $obj -> fk_id );
2015-03-09 21:20:56 +01:00
$i ++ ;
}
$db -> free ( $result );
2006-11-26 20:19:46 +01:00
}
else
{
2015-03-09 21:20:56 +01:00
dol_print_error ( $db );
2006-11-26 20:19:46 +01:00
}
2005-03-06 16:39:32 +01:00
2006-11-26 20:19:46 +01:00
// Lecture des droits groupes
2012-09-27 11:54:51 +02:00
$permsgroupbyentity = array ();
2005-02-04 15:30:38 +01:00
2018-03-05 08:45:40 +01:00
$sql = " SELECT DISTINCT gr.fk_id, gu.entity " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " usergroup_rights as gr, " ;
2009-04-27 22:37:50 +02:00
$sql .= " " . MAIN_DB_PREFIX . " usergroup_user as gu " ;
2018-03-05 08:45:40 +01:00
$sql .= " WHERE gr.entity = " . $entity ;
2009-04-27 22:37:50 +02:00
$sql .= " AND gr.fk_usergroup = gu.fk_usergroup " ;
2015-06-26 15:26:08 +02:00
$sql .= " AND gu.fk_user = " . $object -> id ;
2005-02-04 15:30:38 +01:00
2014-06-12 11:31:53 +02:00
dol_syslog ( " get user perms " , LOG_DEBUG );
2006-11-26 20:19:46 +01:00
$result = $db -> query ( $sql );
if ( $result )
{
2015-03-09 21:20:56 +01:00
$num = $db -> num_rows ( $result );
$i = 0 ;
while ( $i < $num )
{
$obj = $db -> fetch_object ( $result );
if ( ! isset ( $permsgroupbyentity [ $obj -> entity ]))
$permsgroupbyentity [ $obj -> entity ] = array ();
2018-03-05 08:45:40 +01:00
array_push ( $permsgroupbyentity [ $obj -> entity ], $obj -> fk_id );
2015-03-09 21:20:56 +01:00
$i ++ ;
}
$db -> free ( $result );
2006-11-26 20:19:46 +01:00
}
else
{
2015-03-09 21:20:56 +01:00
dol_print_error ( $db );
2006-11-26 20:19:46 +01:00
}
2005-02-04 15:30:38 +01:00
2006-11-26 20:19:46 +01:00
/*
* Ecran ajout / suppression permission
2015-10-11 16:12:12 +02:00
*/
2007-09-01 00:06:14 +02:00
2017-04-09 14:09:33 +02:00
$linkback = '' ;
if ( $user -> rights -> user -> user -> lire || $user -> admin ) {
2018-10-09 14:20:53 +02:00
$linkback = '<a href="' . DOL_URL_ROOT . '/user/list.php?restore_lastsearch_values=1">' . $langs -> trans ( " BackToList " ) . '</a>' ;
2017-04-09 14:09:33 +02:00
}
2007-09-01 00:06:14 +02:00
2015-11-04 15:45:35 +01:00
dol_banner_tab ( $object , 'id' , $linkback , $user -> rights -> user -> user -> lire || $user -> admin );
2007-09-01 00:06:14 +02:00
2016-05-30 20:50:49 +02:00
//print '<div class="underbanner clearboth"></div>';
2007-09-01 00:06:14 +02:00
2015-03-09 21:20:56 +01:00
if ( $user -> admin ) print info_admin ( $langs -> trans ( " WarningOnlyPermissionOfActivatedModules " ));
2013-06-05 16:12:07 +02:00
// Show warning about external users
2015-03-09 21:20:56 +01:00
if ( empty ( $user -> societe_id )) print info_admin ( showModulesExludedForExternal ( $modules )) . " \n " ;
2007-09-01 00:06:14 +02:00
2017-06-06 07:57:03 +02:00
$parameters = array ( 'permsgroupbyentity' => $permsgroupbyentity );
$reshook = $hookmanager -> executeHooks ( 'insertExtraHeader' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
if ( $reshook < 0 ) setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
2012-09-27 11:54:51 +02:00
2010-12-27 19:03:02 +01:00
print " \n " ;
2006-11-26 20:19:46 +01:00
print '<table width="100%" class="noborder">' ;
print '<tr class="liste_titre">' ;
print '<td>' . $langs -> trans ( " Module " ) . '</td>' ;
2012-09-30 21:26:58 +02:00
if ( $caneditperms ) print '<td> </td>' ;
2006-11-26 20:19:46 +01:00
print '<td align="center" width="24"> </td>' ;
print '<td>' . $langs -> trans ( " Permissions " ) . '</td>' ;
2010-12-27 19:03:02 +01:00
print '</tr>' . " \n " ;
2006-11-26 20:19:46 +01:00
2011-05-05 09:02:22 +02:00
//print "xx".$conf->global->MAIN_USE_ADVANCED_PERMS;
2009-04-27 22:37:50 +02:00
$sql = " SELECT r.id, r.libelle, r.module " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " rights_def as r " ;
$sql .= " WHERE r.libelle NOT LIKE 'tou%' " ; // On ignore droits "tous"
2017-06-06 07:57:03 +02:00
$sql .= " AND r.entity = " . $entity ;
2010-11-08 12:40:52 +01:00
if ( empty ( $conf -> global -> MAIN_USE_ADVANCED_PERMS )) $sql .= " AND r.perms NOT LIKE '%_advance' " ; // Hide advanced perms if option is disable
2009-04-27 22:37:50 +02:00
$sql .= " ORDER BY r.module, r.id " ;
2006-11-26 20:19:46 +01:00
$result = $db -> query ( $sql );
if ( $result )
{
2015-03-09 21:20:56 +01:00
$num = $db -> num_rows ( $result );
$i = 0 ;
$oldmod = '' ;
2011-08-24 00:25:37 +02:00
2015-03-09 21:20:56 +01:00
while ( $i < $num )
{
$obj = $db -> fetch_object ( $result );
2005-02-04 15:30:38 +01:00
2015-03-09 21:20:56 +01:00
// Si la ligne correspond a un module qui n'existe plus (absent de includes/module), on l'ignore
if ( empty ( $modules [ $obj -> module ]))
{
$i ++ ;
continue ;
}
if ( isset ( $obj -> module ) && ( $oldmod <> $obj -> module ))
{
$oldmod = $obj -> module ;
2012-09-30 21:26:58 +02:00
2017-12-15 15:15:14 +01:00
// Break detected, we get objMod
2015-03-09 21:20:56 +01:00
$objMod = $modules [ $obj -> module ];
$picto = ( $objMod -> picto ? $objMod -> picto : 'generic' );
2012-09-30 21:26:58 +02:00
2017-12-15 15:15:14 +01:00
// Show break line
print '<tr class="oddeven trforbreak">' ;
print '<td class="maxwidthonsmartphone tdoverflowonsmartphone">' . img_object ( '' , $picto , 'class="pictoobjectwidth"' ) . ' ' . $objMod -> getName ();
print '<a name="' . $objMod -> getName () . '"></a></td>' ;
print '<td align="center" class="nowrap">' ;
if ( $caneditperms && empty ( $objMod -> rights_admin_allowed ) || empty ( $object -> admin ))
{
print '<a class="reposition" title="' . dol_escape_htmltag ( $langs -> trans ( " All " )) . '" alt="' . dol_escape_htmltag ( $langs -> trans ( " All " )) . '" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=addrights&entity=' . $entity . '&module=' . $obj -> module . '">' . $langs -> trans ( " All " ) . " </a> " ;
print '/' ;
print '<a class="reposition" title="' . dol_escape_htmltag ( $langs -> trans ( " None " )) . '" alt="' . dol_escape_htmltag ( $langs -> trans ( " None " )) . '" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=delrights&entity=' . $entity . '&module=' . $obj -> module . '">' . $langs -> trans ( " None " ) . " </a> " ;
}
print '</td>' ;
print '<td colspan="2"> </td>' ;
print '</tr>' . " \n " ;
2006-11-26 20:19:46 +01:00
}
2005-03-06 16:39:32 +01:00
2017-12-15 15:15:14 +01:00
print '<tr class="oddeven">' ;
2005-04-02 00:30:25 +02:00
2015-03-09 21:20:56 +01:00
// Picto and label of permission
2017-06-09 11:31:08 +02:00
print '<td class="maxwidthonsmartphone tdoverflowonsmartphone">' . img_object ( '' , $picto , 'class="pictoobjectwidth"' ) . ' ' . $objMod -> getName () . '</td>' ;
2012-09-27 11:54:51 +02:00
2012-09-30 21:26:58 +02:00
// Permission and tick
2017-12-15 15:15:14 +01:00
if ( ! empty ( $object -> admin ) && ! empty ( $objMod -> rights_admin_allowed )) // Permission granted because admin
2012-09-30 21:26:58 +02:00
{
if ( $caneditperms )
{
print '<td align="center">' . img_picto ( $langs -> trans ( " Administrator " ), 'star' ) . '</td>' ;
}
2013-04-25 01:13:13 +02:00
print '<td align="center" class="nowrap">' ;
2012-09-30 21:26:58 +02:00
print img_picto ( $langs -> trans ( " Active " ), 'tick' );
print '</td>' ;
}
2017-12-15 15:15:14 +01:00
else if ( in_array ( $obj -> id , $permsuser )) // Permission granted by user
2012-09-30 21:26:58 +02:00
{
if ( $caneditperms )
{
2017-06-06 07:57:03 +02:00
print '<td align="center"><a class="reposition" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=delrights&entity=' . $entity . '&rights=' . $obj -> id . '">' . img_edit_remove ( $langs -> trans ( " Remove " )) . '</a></td>' ;
2012-09-30 21:26:58 +02:00
}
2013-04-25 01:13:13 +02:00
print '<td align="center" class="nowrap">' ;
2012-09-30 21:26:58 +02:00
print img_picto ( $langs -> trans ( " Active " ), 'tick' );
print '</td>' ;
}
2013-01-02 18:43:59 +01:00
2012-10-04 18:40:05 +02:00
else if ( is_array ( $permsgroupbyentity [ $entity ]))
2012-09-30 21:26:58 +02:00
{
2017-12-15 15:15:14 +01:00
if ( in_array ( $obj -> id , $permsgroupbyentity [ $entity ])) // Permission granted by group
2012-10-04 18:40:05 +02:00
{
if ( $caneditperms )
{
print '<td align="center">' ;
2016-03-25 15:24:57 +01:00
print $form -> textwithtooltip ( $langs -> trans ( " Inherited " ), $langs -> trans ( " PermissionInheritedFromAGroup " ));
2012-10-04 18:40:05 +02:00
print '</td>' ;
}
2013-04-25 01:13:13 +02:00
print '<td align="center" class="nowrap">' ;
2012-10-04 18:40:05 +02:00
print img_picto ( $langs -> trans ( " Active " ), 'tick' );
print '</td>' ;
}
2013-01-16 18:58:39 +01:00
else
{
// Do not own permission
if ( $caneditperms )
{
2017-06-06 07:57:03 +02:00
print '<td align="center"><a class="reposition" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=addrights&entity=' . $entity . '&rights=' . $obj -> id . '">' . img_edit_add ( $langs -> trans ( " Add " )) . '</a></td>' ;
2013-01-16 18:58:39 +01:00
}
print '<td> </td>' ;
}
2012-09-30 21:26:58 +02:00
}
else
{
// Do not own permission
if ( $caneditperms )
{
2017-06-06 07:57:03 +02:00
print '<td align="center"><a class="reposition" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=addrights&entity=' . $entity . '&rights=' . $obj -> id . '">' . img_edit_add ( $langs -> trans ( " Add " )) . '</a></td>' ;
2012-09-30 21:26:58 +02:00
}
print '<td> </td>' ;
2006-11-26 20:19:46 +01:00
}
2005-03-06 16:39:32 +01:00
2015-08-12 23:12:15 +02:00
$permlabel = ( $conf -> global -> MAIN_USE_ADVANCED_PERMS && ( $langs -> trans ( " PermissionAdvanced " . $obj -> id ) != ( " PermissionAdvanced " . $obj -> id )) ? $langs -> trans ( " PermissionAdvanced " . $obj -> id ) : (( $langs -> trans ( " Permission " . $obj -> id ) != ( " Permission " . $obj -> id )) ? $langs -> trans ( " Permission " . $obj -> id ) : $langs -> trans ( $obj -> libelle )));
2016-11-11 12:55:03 +01:00
print '<td class="maxwidthonsmartphone">' . $permlabel . '</td>' ;
2005-03-06 16:39:32 +01:00
2015-03-09 21:20:56 +01:00
print '</tr>' . " \n " ;
2005-03-06 16:39:32 +01:00
2015-03-09 21:20:56 +01:00
$i ++ ;
}
2005-02-04 15:30:38 +01:00
}
2011-08-24 00:25:37 +02:00
else dol_print_error ( $db );
2006-11-26 20:19:46 +01:00
print '</table>' ;
2005-03-06 16:39:32 +01:00
2017-06-06 07:57:03 +02:00
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'insertExtraFooter' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
if ( $reshook < 0 ) setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
2015-10-11 16:12:12 +02:00
2005-02-04 15:30:38 +01:00
2012-07-27 18:41:52 +02:00
dol_fiche_end ();
2011-08-27 16:24:16 +02:00
llxFooter ();
2012-03-23 00:27:12 +01:00
$db -> close ();