$obstr = $logged["name"]; array_push($datlog, array($obstr . " " . $langfile["was"] . " " . $actstr, $logged["datum"], $logged["username"])); } } $pdf->table($headers, $datlog); $pdf->Output("project-{$id}-log.pdf", "D"); } elseif ($action == "projectlogxls") { if (!$userpermissions["admin"]["add"]) { $template->assign("errortext", "Permission denied."); $template->display("error.tpl"); die; } $excelFile = fopen(CL_ROOT . "/files/" . CL_CONFIG . "/ics/project-{$id}-log.csv", "w"); $headline = array(" ", $strtext, $straction, $strdate, $struser); fputcsv($excelFile, $headline); $thelog = new mylog(); $datlog = array(); $tlog = $thelog->getProjectLog($id, 100000); $tlog = $thelog->formatdate($tlog, CL_DATEFORMAT); if (!empty($tlog)) { foreach ($tlog as $logged) { if ($logged["type"] == "datei") { $logged["type"] = "file"; } elseif ($logged["type"] == "projekt") { $logged["type"] = "project"; } elseif ($logged["type"] == "track") { $logged["type"] = "timetracker"; } $icon = utf8_decode($langfile[$logged["type"]]); if ($logged["action"] == 1) { $actstr = utf8_decode($langfile["added"]);
$pdf->writeHTML($htmltable, true, 0, true, 0); $pdf->lastPage(); $pdf->Output("project-$id-log.pdf", "D"); } elseif ($action == "projectlogxls") { if (!$userpermissions["admin"]["add"]) { $template->assign("errortext", "Permission denied."); $template->display("error.tpl"); die(); } $excel = new xls(CL_ROOT . "/files/" . CL_CONFIG . "/ics/project-$id-log.xls"); $headline = array(" ", $strtext, $straction, $strdate, $struser); $excel->writeHeadLine($headline, "128"); $thelog = new mylog(); $datlog = array(); $tlog = $thelog->getProjectLog($id, 100000); $tlog = $thelog->formatdate($tlog, "d.m.y"); if (!empty($tlog)) { foreach($tlog as $logged) { if ($logged["type"] == "datei") { $logged["type"] = "file"; } elseif ($logged["type"] == "projekt") { $logged["type"] = "project"; } elseif ($logged["type"] == "track") { $logged["type"] = "timetracker"; } $icon = utf8_decode($langfile[$logged["type"]]); if ($logged["action"] == 1) {