$tree = new Tree\NestedTree\NestedTree(prefix_table("nested_tree"), 'id', 'parent_id', 'title'); //Constant used $nbElements = 20; // Construction de la requ?te en fonction du type de valeur switch ($_POST['type']) { #CASE generating the log for passwords renewal case "log_generate": //Prepare the PDF file include $_SESSION['settings']['cpassman_dir'] . '/includes/libraries/Pdf/Tfpdf/tfpdf.class.php'; $pdf = new TFPDF(); //Add font for utf-8 $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true); $pdf->aliasNbPages(); $pdf->addPage(); $pdf->SetFont('DejaVu', '', 16); $pdf->Cell(0, 10, $LANG['pdf_del_title'], 0, 1, 'C', false); $pdf->SetFont('DejaVu', '', 12); $pdf->Cell(0, 10, $LANG['pdf_del_date'] . date($_SESSION['settings']['date_format'] . " " . $_SESSION['settings']['time_format'], time()), 0, 1, 'C', false); $pdf->SetFont('DejaVu', '', 10); $pdf->SetFillColor(15, 86, 145); $pdf->cell(80, 6, $LANG['label'], 1, 0, "C", 1); $pdf->cell(75, 6, $LANG['group'], 1, 0, "C", 1); $pdf->cell(21, 6, $LANG['date'], 1, 0, "C", 1); $pdf->cell(15, 6, $LANG['author'], 1, 1, "C", 1); $pdf->SetFont('DejaVu', '', 10); $rows = DB::query("SELECT u.login as login, i.label as label, i.id_tree as id_tree\n FROM " . prefix_table("log_items") . " as l\n INNER JOIN " . prefix_table("users") . " as u ON (u.id=l.id_user)\n INNER JOIN " . prefix_table("items") . " as i ON (i.id=l.id_item)\n WHERE l.action = %s AND l.raison = %s", "Modification", "Mot de passe changé"); foreach ($rows as $reccord) { if (date($_SESSION['settings']['date_format'], $reccord['date']) == $_POST['date']) { //get the tree grid $arbo = $tree->getPath($reccord['id_tree'], true); $arboTxt = "";
function Cell($w, $h = 0, $txt = '', $border = 0, $ln = 0, $align = '', $fill = false, $link = '') { $txt = str_replace("\\", "", $txt); return parent::Cell($w, $h, $txt, $border, $ln, $align, $fill, $link); }