* * 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 * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. */ /** * \file idsconnect/log_list.php * \ingroup idsconnect * \brief Transaktionslog anzeigen */ // Dolibarr laden $res = 0; if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; } $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; } if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; } if (!$res && file_exists("../main.inc.php")) { $res = @include "../main.inc.php"; } if (!$res && file_exists("../../main.inc.php")) { $res = @include "../../main.inc.php"; } if (!$res) { die("Include of main fails"); } dol_include_once('/idsconnect/class/idslog.class.php'); dol_include_once('/idsconnect/class/idssupplier.class.php'); dol_include_once('/idsconnect/lib/idsconnect.lib.php'); /** * @var DoliDB $db * @var Translate $langs * @var User $user */ $langs->loadLangs(array("idsconnect@idsconnect")); if (!$user->hasRight('idsconnect', 'read')) { accessforbidden(); } $supplier_id = GETPOSTINT('supplier_id'); /* * View */ llxHeader('', $langs->trans("IdsconnectLogList"), '', '', 0, 0, '', '', '', 'mod-idsconnect page-log_list'); // Wenn für einen bestimmten Supplier: Tabs anzeigen if ($supplier_id > 0) { $supplier = new IdsSupplier($db); $supplier->fetch($supplier_id); if ($supplier->id > 0) { $head = idsconnectSupplierPrepareHead($supplier); print dol_get_fiche_head($head, 'log', $langs->trans("IdsconnectSupplierCard").' - '.htmlspecialchars($supplier->label), -1, 'fa-plug'); } } else { print load_fiche_titre($langs->trans("IdsconnectLogList"), '', 'fa-list-alt'); } $logObj = new IdsLog($db); $logs = $logObj->fetchLast(100, $supplier_id); print '
| '.$langs->trans("ID").' | '; print ''.$langs->trans("IdsconnectLogDate").' | '; print ''.$langs->trans("IdsconnectLogSupplier").' | '; print ''.$langs->trans("IdsconnectLogUser").' | '; print ''.$langs->trans("IdsconnectLogAction").' | '; print ''.$langs->trans("IdsconnectLogDirection").' | '; print ''.$langs->trans("IdsconnectLogStatus").' | '; print ''.$langs->trans("IP").' | '; print '
|---|---|---|---|---|---|---|---|
| '.$log->id.' | '; print ''.dol_print_date($log->date_creation, 'dayhour').' | '; print ''; if ($sup->id > 0) { print ''.htmlspecialchars($sup->label).''; } print ' | '; print ''.($userObj->id > 0 ? $userObj->getNomUrl(1) : '-').' | '; print ''.$log->getActionLabel().' | '; print ''.$log->direction.' | '; print ''.$log->getStatusLabel().' | '; print ''.htmlspecialchars($log->ip_address ?: '-').' | '; print '
| '; print 'Fehler: '.htmlspecialchars($log->error_message).''; print ' | |||||||
| '.$langs->trans("IdsconnectLogNoEntries").' | |||||||