2005-02-26 15:23:54 +01:00
< ? php
2020-09-07 12:09:58 +02:00
/* Copyright ( C ) 2002 - 2005 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
* Copyright ( C ) 2002 - 2003 Jean - Louis Bergamo < jlb @ j1b . org >
* Copyright ( C ) 2004 - 2020 Laurent Destailleur < eldy @ users . sourceforge . net >
* Copyright ( C ) 2004 Eric Seigne < eric . seigne @ ryxeo . com >
* Copyright ( C ) 2005 - 2017 Regis Houssin < regis . houssin @ inodbox . com >
* Copyright ( C ) 2020 Tobias Sekan < tobias . sekan @ startmail . com >
2005-02-26 15:23:54 +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-26 15:23:54 +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
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2005-02-26 15:23:54 +01:00
*/
2005-03-06 16:39:32 +01:00
/**
2020-09-07 12:09:58 +02:00
* \file htdocs / user / group / perms . php
2021-08-08 12:04:21 +02:00
* \brief Page to set permissions of a user group record
2009-05-04 19:52:15 +02:00
*/
2005-02-26 15:23:54 +01:00
2021-08-08 12:04:21 +02:00
if ( ! defined ( 'CSRFCHECK_WITH_TOKEN' )) {
define ( 'CSRFCHECK_WITH_TOKEN' , '1' ); // Force use of CSRF protection with tokens even for GET
}
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 . '/user/class/usergroup.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/usergroups.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php' ;
2020-04-18 16:48:49 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php' ;
2005-02-26 15:23:54 +01:00
2018-05-26 16:24:54 +02:00
// Load translation files required by page
$langs -> loadLangs ( array ( 'users' , 'admin' ));
2005-02-26 15:23:54 +01:00
2019-11-13 19:35:39 +01:00
$id = GETPOST ( 'id' , 'int' );
2020-09-16 19:39:50 +02:00
$action = GETPOST ( 'action' , 'aZ09' );
2019-11-13 19:35:39 +01:00
$confirm = GETPOST ( 'confirm' , 'alpha' );
$module = GETPOST ( 'module' , 'alpha' );
$rights = GETPOST ( 'rights' , 'int' );
$contextpage = GETPOST ( 'contextpage' , 'aZ' ) ? GETPOST ( 'contextpage' , 'aZ' ) : 'groupperms' ; // To manage different context of search
2017-06-06 07:57:03 +02:00
2021-08-08 12:04:21 +02:00
if ( ! isset ( $id ) || empty ( $id )) {
accessforbidden ();
}
2020-04-18 16:48:49 +02:00
// Define if user can read permissions
2019-11-13 19:35:39 +01:00
$canreadperms = ( $user -> admin || $user -> rights -> user -> user -> lire );
2020-04-18 16:48:49 +02:00
// Define if user can modify group permissions
2019-11-13 19:35:39 +01:00
$caneditperms = ( $user -> admin || $user -> rights -> user -> user -> creer );
2010-11-08 12:40:52 +01:00
// Advanced permissions
2019-11-13 19:35:39 +01:00
$advancedpermsactive = false ;
2021-02-26 13:18:40 +01:00
if ( ! empty ( $conf -> global -> MAIN_USE_ADVANCED_PERMS )) {
2020-09-07 12:09:58 +02:00
$advancedpermsactive = true ;
$canreadperms = ( $user -> admin || ( $user -> rights -> user -> group_advance -> read && $user -> rights -> user -> group_advance -> readperms ));
$caneditperms = ( $user -> admin || $user -> rights -> user -> group_advance -> write );
2010-11-08 12:40:52 +01:00
}
2010-10-29 08:05:09 +02:00
2021-08-08 12:04:21 +02:00
// Security check
//$result = restrictedArea($user, 'user', $id, 'usergroup', '');
2021-02-26 13:18:40 +01:00
if ( ! $canreadperms ) {
accessforbidden ();
}
2010-10-29 08:05:09 +02:00
2017-06-06 07:57:03 +02:00
$object = new Usergroup ( $db );
$object -> fetch ( $id );
2021-08-08 12:04:21 +02:00
$object -> getrights ();
2005-02-26 15:23:54 +01:00
2019-11-13 19:35:39 +01:00
$entity = $conf -> entity ;
2005-02-26 15:23:54 +01:00
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
2019-11-13 19:35:39 +01:00
$hookmanager -> initHooks ( array ( 'groupperms' , 'globalcard' ));
2017-06-06 07:57:03 +02:00
/**
* Actions
*/
2017-12-02 14:57:27 +01:00
2019-11-13 19:35:39 +01:00
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'doActions' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
2021-02-26 13:18:40 +01:00
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
}
2017-06-06 07:57:03 +02:00
2019-11-22 15:21:21 +01:00
if ( empty ( $reshook )) {
if ( $action == 'addrights' && $caneditperms ) {
2017-06-06 07:57:03 +02:00
$editgroup = new Usergroup ( $db );
2021-08-08 12:04:21 +02:00
$result = $editgroup -> fetch ( $object -> id );
2019-11-22 15:21:21 +01:00
if ( $result > 0 ) {
2020-04-23 18:55:10 +02:00
$result = $editgroup -> addrights ( $rights , $module , '' , $entity );
2020-04-18 16:48:49 +02:00
if ( $result < 0 ) {
setEventMessages ( $editgroup -> error , $editgroup -> errors , 'errors' );
}
} else {
dol_print_error ( $db );
2017-12-15 15:15:14 +01:00
}
2021-08-08 12:09:18 +02:00
$user -> clearrights ();
$user -> getrights ();
2017-06-06 07:57:03 +02:00
}
2019-11-22 15:21:21 +01:00
if ( $action == 'delrights' && $caneditperms ) {
2017-06-06 07:57:03 +02:00
$editgroup = new Usergroup ( $db );
2019-11-13 19:35:39 +01:00
$result = $editgroup -> fetch ( $id );
2019-11-22 15:21:21 +01:00
if ( $result > 0 ) {
2020-04-18 16:48:49 +02:00
$result = $editgroup -> delrights ( $rights , $module , '' , $entity );
if ( $result < 0 ) {
setEventMessages ( $editgroup -> error , $editgroup -> errors , 'errors' );
}
} else {
dol_print_error ( $db );
2017-12-15 15:15:14 +01:00
}
2021-08-08 12:09:18 +02:00
$user -> clearrights ();
$user -> getrights ();
2017-06-06 07:57:03 +02:00
}
2005-02-26 15:23:54 +01:00
}
2021-08-08 12:04:21 +02:00
/*
2011-07-08 17:50:28 +02:00
* View
*/
2005-02-26 15:23:54 +01:00
2009-05-04 19:52:15 +02:00
$form = new Form ( $db );
2019-01-27 11:55:16 +01:00
llxHeader ( '' , $langs -> trans ( " Permissions " ));
2008-11-11 20:55:16 +01:00
2021-02-26 13:18:40 +01:00
if ( $object -> id > 0 ) {
2020-09-07 12:09:58 +02:00
$head = group_prepare_head ( $object );
$title = $langs -> trans ( " Group " );
2020-10-22 22:50:03 +02:00
print dol_get_fiche_head ( $head , 'rights' , $title , - 1 , 'group' );
2020-09-07 12:09:58 +02:00
// Charge les modules soumis a permissions
$modules = array ();
$modulesdir = dolGetModulesDirs ();
$db -> begin ();
2021-02-26 13:18:40 +01:00
foreach ( $modulesdir as $dir ) {
2020-09-07 12:09:58 +02:00
$handle = @ opendir ( dol_osencode ( $dir ));
2021-02-26 13:18:40 +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' ) {
2020-09-07 12:09:58 +02:00
$modName = substr ( $file , 0 , dol_strlen ( $file ) - 10 );
2021-02-26 13:18:40 +01:00
if ( $modName ) {
2020-09-07 12:09:58 +02:00
include_once $dir . $file ;
$objMod = new $modName ( $db );
// Load all lang files of module
2021-02-26 13:18:40 +01:00
if ( isset ( $objMod -> langfiles ) && is_array ( $objMod -> langfiles )) {
foreach ( $objMod -> langfiles as $domain ) {
2020-09-07 12:09:58 +02:00
$langs -> load ( $domain );
}
}
// Load all permissions
2021-02-26 13:18:40 +01:00
if ( $objMod -> rights_class ) {
2020-09-07 12:09:58 +02:00
$ret = $objMod -> insert_permissions ( 0 , $entity );
$modules [ $objMod -> rights_class ] = $objMod ;
}
}
}
}
}
}
$db -> commit ();
// Read permissions of group
$permsgroupbyentity = array ();
$sql = " SELECT DISTINCT r.id, r.libelle, r.module, gr.entity " ;
$sql .= " FROM " . MAIN_DB_PREFIX . " rights_def as r, " ;
$sql .= " " . MAIN_DB_PREFIX . " usergroup_rights as gr " ;
$sql .= " WHERE gr.fk_id = r.id " ;
2021-08-08 12:04:21 +02:00
$sql .= " AND gr.entity = " . (( int ) $entity );
$sql .= " AND gr.fk_usergroup = " . (( int ) $object -> id );
2020-09-07 12:09:58 +02:00
dol_syslog ( " get user perms " , LOG_DEBUG );
$result = $db -> query ( $sql );
2021-02-26 13:18:40 +01:00
if ( $result ) {
2020-09-07 12:09:58 +02:00
$num = $db -> num_rows ( $result );
$i = 0 ;
2021-02-26 13:18:40 +01:00
while ( $i < $num ) {
2020-09-07 12:09:58 +02:00
$obj = $db -> fetch_object ( $result );
2021-02-26 13:18:40 +01:00
if ( ! isset ( $permsgroupbyentity [ $obj -> entity ])) {
2020-09-07 12:09:58 +02:00
$permsgroupbyentity [ $obj -> entity ] = array ();
2021-02-26 13:18:40 +01:00
}
2020-09-07 12:09:58 +02:00
array_push ( $permsgroupbyentity [ $obj -> entity ], $obj -> id );
$i ++ ;
}
$db -> free ( $result );
} else {
dol_print_error ( $db );
}
2021-08-08 12:04:21 +02:00
/*
* Part to add / remove permissions
*/
2021-08-08 12:09:18 +02:00
2020-09-07 12:09:58 +02:00
$linkback = '<a href="' . DOL_URL_ROOT . '/user/group/list.php?restore_lastsearch_values=1">' . $langs -> trans ( " BackToList " ) . '</a>' ;
dol_banner_tab ( $object , 'id' , $linkback , $user -> rights -> user -> user -> lire || $user -> admin );
print '<div class="fichecenter">' ;
print '<div class="underbanner clearboth"></div>' ;
print '<table class="border centpercent tableforfield">' ;
// Name (already in dol_banner, we keep it to have the GlobalGroup picto, but we should move it in dol_banner)
2021-02-26 13:18:40 +01:00
if ( ! empty ( $conf -> mutlicompany -> enabled )) {
2020-09-07 12:09:58 +02:00
print '<tr><td class="titlefield">' . $langs -> trans ( " Name " ) . '</td>' ;
print '<td colspan="2">' . $object -> name . '' ;
2021-02-26 13:18:40 +01:00
if ( ! $object -> entity ) {
2020-09-07 12:09:58 +02:00
print img_picto ( $langs -> trans ( " GlobalGroup " ), 'redstar' );
}
print " </td></tr> \n " ;
}
// Note
print '<tr><td class="titlefield tdtop">' . $langs -> trans ( " Description " ) . '</td>' ;
print '<td class="valeur sensiblehtmlcontent">' ;
print dol_string_onlythesehtmltags ( dol_htmlentitiesbr ( $object -> note ));
print '</td>' ;
print " </tr> \n " ;
print '</table><br>' ;
2021-02-26 13:18:40 +01:00
if ( $user -> admin ) {
print info_admin ( $langs -> trans ( " WarningOnlyPermissionOfActivatedModules " ));
}
2020-09-07 12:09:58 +02:00
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'insertExtraHeader' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
2021-02-26 13:18:40 +01:00
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
}
2020-09-07 12:09:58 +02:00
print " \n " ;
print '<div class="div-table-responsive-no-min">' ;
print '<table class="noborder centpercent">' ;
print '<tr class="liste_titre">' ;
print '<td>' . $langs -> trans ( " Module " ) . '</td>' ;
2021-02-26 13:18:40 +01:00
if ( $caneditperms ) {
2020-09-07 12:09:58 +02:00
print '<td class="center nowrap">' ;
2021-10-02 12:58:15 +02:00
print '<a class="reposition commonlink" title="' . dol_escape_htmltag ( $langs -> trans ( " All " )) . '" alt="' . dol_escape_htmltag ( $langs -> trans ( " All " )) . '" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=addrights&token=' . newToken () . '&entity=' . $entity . '&module=allmodules&confirm=yes">' . $langs -> trans ( " All " ) . " </a> " ;
2020-09-07 12:09:58 +02:00
print '/' ;
2021-10-02 12:58:15 +02:00
print '<a class="reposition commonlink" title="' . dol_escape_htmltag ( $langs -> trans ( " None " )) . '" alt="' . dol_escape_htmltag ( $langs -> trans ( " None " )) . '" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=delrights&&token=' . newToken () . '&entity=' . $entity . '&module=allmodules&confirm=yes">' . $langs -> trans ( " None " ) . " </a> " ;
2020-09-07 12:09:58 +02:00
print '</td>' ;
}
print '<td class="center" width="24"> </td>' ;
print '<td>' . $langs -> trans ( " Permissions " ) . '</td>' ;
2021-02-26 13:18:40 +01:00
if ( $user -> admin ) {
2021-08-08 12:04:21 +02:00
print '<td class="right"></td>' ;
2021-02-26 13:18:40 +01:00
}
2020-09-07 12:09:58 +02:00
print '</tr>' . " \n " ;
2021-08-08 12:04:21 +02:00
$sql = " SELECT r.id, r.libelle as label, r.module, r.perms, r.subperms, r.module_position, r.bydefault " ;
2020-09-07 12:09:58 +02:00
$sql .= " FROM " . MAIN_DB_PREFIX . " rights_def as r " ;
$sql .= " WHERE r.libelle NOT LIKE 'tou%' " ; // On ignore droits "tous"
2021-08-08 12:04:21 +02:00
$sql .= " AND r.entity = " . (( int ) $entity );
2021-02-26 13:18:40 +01:00
if ( empty ( $conf -> global -> MAIN_USE_ADVANCED_PERMS )) {
$sql .= " AND r.perms NOT LIKE '%_advance' " ; // Hide advanced perms if option is disable
}
2021-08-08 12:04:21 +02:00
$sql .= " ORDER BY r.family_position, r.module_position, r.module, r.id " ;
2020-09-07 12:09:58 +02:00
$result = $db -> query ( $sql );
2021-02-26 13:18:40 +01:00
if ( $result ) {
2020-09-07 12:09:58 +02:00
$num = $db -> num_rows ( $result );
$i = 0 ;
$oldmod = '' ;
2021-02-26 13:18:40 +01:00
while ( $i < $num ) {
2020-09-07 12:09:58 +02:00
$obj = $db -> fetch_object ( $result );
2021-08-08 12:04:21 +02:00
// If line is for a module that does not exist anymore (absent of includes/module), we ignore it
2021-02-26 13:18:40 +01:00
if ( empty ( $modules [ $obj -> module ])) {
2020-09-07 12:09:58 +02:00
$i ++ ;
continue ;
}
2021-08-08 12:04:21 +02:00
$objMod = $modules [ $obj -> module ];
2021-08-08 12:09:18 +02:00
2021-08-08 12:04:21 +02:00
// Break found, it's a new module to catch
if ( isset ( $obj -> module ) && ( $oldmod <> $obj -> module )) {
2020-09-07 12:09:58 +02:00
$oldmod = $obj -> module ;
// Break detected, we get objMod
$objMod = $modules [ $obj -> module ];
$picto = ( $objMod -> picto ? $objMod -> picto : 'generic' );
// Show break line
print '<tr class="oddeven trforbreak">' ;
print '<td class="maxwidthonsmartphone tdoverflowonsmartphone">' ;
print img_object ( '' , $picto , 'class="pictoobjectwidth paddingright"' ) . ' ' . $objMod -> getName ();
print '<a name="' . $objMod -> getName () . '"></a>' ;
print '</td>' ;
2021-02-26 13:18:40 +01:00
if ( $caneditperms ) {
2020-09-07 12:09:58 +02:00
print '<td class="center nowrap">' ;
2021-10-02 12:58:15 +02:00
print '<a class="reposition" title="' . dol_escape_htmltag ( $langs -> trans ( " All " )) . '" alt="' . $langs -> trans ( " All " ) . '" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=addrights&entity=' . $entity . '&module=' . $obj -> module . '&token=' . newToken () . '">' . $langs -> trans ( " All " ) . " </a> " ;
2020-09-07 12:09:58 +02:00
print '/' ;
2021-10-02 12:58:15 +02:00
print '<a class="reposition" title="' . dol_escape_htmltag ( $langs -> trans ( " None " )) . '" alt="' . $langs -> trans ( " None " ) . '" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=delrights&entity=' . $entity . '&module=' . $obj -> module . '&token=' . newToken () . '">' . $langs -> trans ( " None " ) . " </a> " ;
2020-09-07 12:09:58 +02:00
print '</td>' ;
} else {
print '<td> </td>' ;
}
2021-08-08 12:04:21 +02:00
print '<td> </td>' ;
print '<td> </td>' ;
2021-08-08 12:09:18 +02:00
2020-09-27 17:53:17 +02:00
// Permission id
2021-02-26 13:18:40 +01:00
if ( $user -> admin ) {
print '<td class="right"></td>' ;
}
2020-09-07 12:09:58 +02:00
2021-08-08 12:04:21 +02:00
print '</tr>' . " \n " ;
2020-09-07 12:09:58 +02:00
}
2020-09-07 12:23:15 +02:00
2020-09-07 12:09:58 +02:00
print '<!-- ' . $obj -> module . '->' . $obj -> perms . ( $obj -> subperms ? '->' . $obj -> subperms : '' ) . ' -->' . " \n " ;
print '<tr class="oddeven">' ;
2020-09-07 12:23:15 +02:00
2020-09-07 12:09:58 +02:00
// Picto and label of module
print '<td class="maxwidthonsmartphone tdoverflowonsmartphone">' ;
//print img_object('', $picto, 'class="inline-block pictoobjectwidth"').' '.$objMod->getName();
print '</td>' ;
2022-05-08 15:18:34 +02:00
if ( ! empty ( $permsgroupbyentity [ $entity ]) && is_array ( $permsgroupbyentity [ $entity ])) {
2021-02-26 13:18:40 +01:00
if ( in_array ( $obj -> id , $permsgroupbyentity [ $entity ])) {
2020-09-07 12:09:58 +02:00
// Own permission by group
2021-02-26 13:18:40 +01:00
if ( $caneditperms ) {
2021-09-19 14:41:46 +02:00
print '<td class="center"><a class="reposition" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=delrights&token=' . newToken () . '&entity=' . $entity . '&rights=' . $obj -> id . '&confirm=yes">' ;
2020-09-27 17:53:17 +02:00
//print img_edit_remove($langs->trans("Remove"));
print img_picto ( $langs -> trans ( " Remove " ), 'switch_on' );
print '</a></td>' ;
2020-09-07 12:09:58 +02:00
}
print '<td class="center nowrap">' ;
print img_picto ( $langs -> trans ( " Active " ), 'tick' );
print '</td>' ;
} else {
// Do not own permission
2021-02-26 13:18:40 +01:00
if ( $caneditperms ) {
2021-09-19 14:41:46 +02:00
print '<td class="center"><a class="reposition" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=addrights&token=' . newToken () . '&entity=' . $entity . '&rights=' . $obj -> id . '&confirm=yes">' ;
2020-09-27 17:53:17 +02:00
//print img_edit_add($langs->trans("Add"));
print img_picto ( $langs -> trans ( " Add " ), 'switch_off' );
print '</a></td>' ;
2020-09-07 12:09:58 +02:00
}
2021-02-07 18:49:46 +01:00
print '<td> </td>' ;
2020-09-07 12:09:58 +02:00
}
} else {
// Do not own permission
2021-02-26 13:18:40 +01:00
if ( $caneditperms ) {
2021-10-02 12:58:15 +02:00
print '<td class="center"><a class="reposition" href="' . $_SERVER [ " PHP_SELF " ] . '?id=' . $object -> id . '&action=addrights&entity=' . $entity . '&rights=' . $obj -> id . '&confirm=yes&token=' . newToken () . '">' ;
2020-09-27 17:53:17 +02:00
//print img_edit_add($langs->trans("Add"));
print img_picto ( $langs -> trans ( " Add " ), 'switch_off' );
print '</a></td>' ;
2020-09-07 12:09:58 +02:00
}
2021-02-07 18:49:46 +01:00
print '<td> </td>' ;
2020-09-07 12:09:58 +02:00
}
2021-08-08 12:04:21 +02:00
// Description of permission
$permlabel = ( ! empty ( $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 -> label )));
print '<td>' ;
print $permlabel ;
if ( ! empty ( $conf -> global -> MAIN_USE_ADVANCED_PERMS )) {
if ( preg_match ( '/_advance$/' , $obj -> perms )) {
print ' <span class="opacitymedium">(' . $langs -> trans ( " AdvancedModeOnly " ) . ')</span>' ;
}
}
print '</td>' ;
2020-09-07 12:09:58 +02:00
// Permission id
2021-02-26 13:18:40 +01:00
if ( $user -> admin ) {
2021-08-08 12:04:21 +02:00
print '<td class="right">' ;
$htmltext = $langs -> trans ( " ID " ) . ': ' . $obj -> id ;
$htmltext .= '<br>' . $langs -> trans ( " Permission " ) . ': user->rights->' . $obj -> module . '->' . $obj -> perms . ( $obj -> subperms ? '->' . $obj -> subperms : '' );
print $form -> textwithpicto ( '' , $htmltext );
//print '<span class="opacitymedium">'.$obj->id.'</span>';
print '</td>' ;
2021-02-26 13:18:40 +01:00
}
2020-09-07 12:09:58 +02:00
print '</tr>' . " \n " ;
$i ++ ;
}
}
print '</table>' ;
print '</div>' ;
print '</div>' ;
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'insertExtraFooter' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
2021-02-26 13:18:40 +01:00
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
}
2020-09-07 12:09:58 +02:00
2020-10-27 18:19:31 +01:00
print dol_get_fiche_end ();
2005-02-26 15:23:54 +01:00
}
2005-03-06 16:39:32 +01:00
2018-08-04 15:58:05 +02:00
// End of page
2011-08-27 16:24:16 +02:00
llxFooter ();
2015-12-11 19:37:12 +01:00
$db -> close ();