31if (!defined(
'NOTOKENRENEWAL')) {
32 define(
'NOTOKENRENEWAL', 1);
34if (!defined(
'NOREQUIREMENU')) {
35 define(
'NOREQUIREMENU',
'1');
37if (!defined(
'NOREQUIREHTML')) {
38 define(
'NOREQUIREHTML',
'1');
43require
'../../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
56if ((!$user->admin && !$user->hasRight(
'blockedlog',
'read')) || empty(
$conf->blockedlog->enabled)) {
60$langs->loadLangs(array(
"admin"));
69print
'<div id="pop-info"><table height="80%" class="border centpercent"><thead><th width="50%" class="left">'.$langs->trans(
'Field').
'</th><th class="left">'.$langs->trans(
'Value').
'</th></thead>';
72if ($block->fetch($id) > 0) {
73 $objtoshow = $block->object_data;
74 print formatObject($objtoshow,
'');
76 print
'Error, failed to get unalterable log with id '.$id;
80print
'</table></div>';
93function formatObject($objtoshow, $prefix)
97 $newobjtoshow = $objtoshow;
99 if (is_object($newobjtoshow) || is_array($newobjtoshow)) {
101 foreach ($newobjtoshow as $key => $val) {
102 if (!is_object($val) && !is_array($val)) {
104 $s .=
'<tr><td>'.($prefix ? $prefix.
' > ' :
'').$key.
'</td>';
106 if (in_array($key, array(
'date',
'datef',
'dateh',
'datec',
'datem',
'datep'))) {
117 } elseif (is_array($val)) {
118 $s .= formatObject($val, ($prefix ? $prefix.
' > ' :
'').$key);
119 } elseif (is_object($val)) {
120 $s .= formatObject($val, ($prefix ? $prefix.
' > ' :
'').$key);
Class to manage Blocked Log.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.