X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=topdf.php;h=68a1eb5c376b19ca7d389f6c748ce6b4577974ac;hb=6753e281196a94e8a50d9c98d5195093e61fcefb;hp=f0fdb6023483437e1997652820bd8a9ce6c381db;hpb=b0f22cc10650051b1b7d58a33a6d4d603f936f0b;p=timetracker.git diff --git a/topdf.php b/topdf.php index f0fdb602..68a1eb5c 100644 --- a/topdf.php +++ b/topdf.php @@ -35,6 +35,12 @@ import('form.Form'); import('form.ActionForm'); import('ttReportHelper'); +// Access check. +if (!ttAccessAllowed('view_own_reports')) { + header('Location: access_denied.php'); + exit(); +} + // Check whether TCPDF library is available. if (!file_exists('WEB-INF/lib/tcpdf/')) die('TCPDF library is not found in WEB-INF/lib/tcpdf/'); @@ -42,12 +48,6 @@ if (!file_exists('WEB-INF/lib/tcpdf/')) // Include TCPDF library. require_once('WEB-INF/lib/tcpdf/tcpdf.php'); -// Access check. -if (!ttAccessCheck(right_view_reports)) { - header('Location: access_denied.php'); - exit(); -} - // Use custom fields plugin if it is enabled. if ($user->isPluginEnabled('cf')) { require_once('plugins/CustomFields.class.php'); @@ -160,6 +160,7 @@ if ($totals_only) { if ($bean->getAttribute('chnote')) { $colspan++; $html .= ''.$i18n->getKey('label.note').''; } if ($bean->getAttribute('chcost')) { $colspan++; $html .= "".$i18n->getKey('label.cost').''; } if ($bean->getAttribute('chpaid')) { $colspan++; $html .= "".$i18n->getKey('label.paid').''; } + if ($bean->getAttribute('chip')) { $colspan++; $html .= "".$i18n->getKey('label.ip').''; } if ($bean->getAttribute('chinvoice')) { $colspan++; $html .= ''.$i18n->getKey('label.invoice').''; } $html .= ''; $html .= ''; @@ -210,6 +211,7 @@ if ($totals_only) { $html .= ''; } if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; $html .= ' '; @@ -242,6 +244,11 @@ if ($totals_only) { $html .= $item['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no'); $html .= ''; } + if ($bean->getAttribute('chip')) { + $html .= ''; + $html .= $item['modified'] ? $item['modified_ip'].' '.$item['modified'] : $item['created_ip'].' '.$item['created']; + $html .= ''; + } if ($bean->getAttribute('chinvoice')) $html .= ''.htmlspecialchars($item['invoice']).''; $html .= ''; @@ -291,6 +298,7 @@ if ($totals_only) { $html .= ''; } if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; } @@ -317,6 +325,7 @@ if ($totals_only) { $html .= ''; } if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; $html .= '';