29if (!defined(
'NOTOKENRENEWAL')) {
30 define(
'NOTOKENRENEWAL', 1);
32if (!defined(
'NOREQUIREMENU')) {
33 define(
'NOREQUIREMENU',
'1');
35if (!defined(
'NOREQUIREHTML')) {
36 define(
'NOREQUIREHTML',
'1');
41require
'../../main.inc.php';
42require_once DOL_DOCUMENT_ROOT.
'/blockedlog/class/blockedlog.class.php';
47if ((!$user->admin && !$user->hasRight(
'blockedlog',
'read')) || empty($conf->blockedlog->enabled)) {
51$langs->loadLangs(array(
"admin"));
60print
'<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>';
63if ($block->fetch($id) > 0) {
64 $objtoshow = $block->object_data;
65 print formatObject($objtoshow,
'');
67 print
'Error, failed to get unalterable log with id '.$id;
71print
'</table></div>';
84function formatObject($objtoshow, $prefix)
88 $newobjtoshow = $objtoshow;
90 if (is_object($newobjtoshow) || is_array($newobjtoshow)) {
92 foreach ($newobjtoshow as $key => $val) {
93 if (!is_object($val) && !is_array($val)) {
95 $s .=
'<tr><td>'.($prefix ? $prefix.
' > ' :
'').$key.
'</td>';
97 if (in_array($key, array(
'date',
'datef',
'dateh',
'datec',
'datem',
'datep'))) {
108 } elseif (is_array($val)) {
109 $s .= formatObject($val, ($prefix ? $prefix.
' > ' :
'').$key);
110 } elseif (is_object($val)) {
111 $s .= formatObject($val, ($prefix ? $prefix.
' > ' :
'').$key);
Class to manage Blocked Log.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.