//date de génération du rapport $rs = mysql_query("select curdate()"); $date_MySQL = mysql_result($rs, $row); $tasks = new taches(); foreach ($tasks->types_taches as $type_tache) { if ($type_tache->id_type == $type_task_id) { require_once $base_path . "/admin/planificateur/" . $type_tache->name . "/" . $type_tache->name . ".class.php"; eval("\$conn=new " . $type_tache->name . "(\"" . $base_path . "/admin/planificateur/" . $type_tache->name . "\");"); $task_datas = $conn->get_report_datas($task_id); $ourPDF->addPage(); $ourPDF->SetXY(15, 8); $ourPDF->setFont($pmb_pdf_font, 'B', 9); $title = "Type : "; $ourPDF->setFont($pmb_pdf_font, '', 9); $title .= $type_tache->comment; $ourPDF->multiCell($largeur_page - $marge_page_droite - $ourPDF->GetX(), 6, $title, 0, 'L', 0); $ourPDF->SetXY(15, 20); $header = $msg["planificateur_task_name"] . " : " . stripslashes($task_datas["libelle_tache"]) . "\n" . $msg["tache_date_generation"] . " : " . formatdate($date_MySQL) . "\n" . $msg["tache_date_dern_exec"] . " : " . formatdate($task_datas['start_at'][0]) . "\n" . $msg["tache_heure_dern_exec"] . " : " . $task_datas['start_at'][1] . "\n" . $msg["tache_date_fin_exec"] . " : " . formatdate($task_datas['end_at'][0]) . "\n" . $msg["tache_heure_fin_exec"] . " : " . $task_datas['end_at'][1] . "\n" . $msg["tache_statut"] . " : " . $msg["planificateur_state_" . $task_datas["status"]] . " (" . $task_datas["indicat_progress"] . "%)\n"; // $ourPDF->SetTextColor(92, 92, 92); $ourPDF->multiCell($largeur_page - $marge_page_droite - $ourPDF->GetX(), 6, $msg["planificateur_task_name"] . " : " . stripslashes($task_datas["libelle_tache"]), 0, 'L', 0); // $ourPDF->SetFillColor(255, 255, 255); $ourPDF->multiCell($largeur_page - $marge_page_droite - $ourPDF->GetX(), 6, $msg["tache_date_generation"] . " : " . formatdate($date_MySQL) . "\n", 0, 'L', 0); // $ourPDF->SetDrawColor(127, 127, 127); $ourPDF->multiCell($largeur_page - $marge_page_droite - $ourPDF->GetX(), 6, $msg["tache_date_dern_exec"] . " : " . formatdate($task_datas['start_at'][0]) . "\n", 0, 'L', 0); // $ourPDF->SetDrawColor(255, 255, 255); $ourPDF->multiCell($largeur_page - $marge_page_droite - $ourPDF->GetX(), 6, $msg["tache_heure_dern_exec"] . " : " . $task_datas['start_at'][1] . "\n", 0, 'L', 0); // $ourPDF->SetDrawColor(127, 127, 127); $ourPDF->multiCell($largeur_page - $marge_page_droite - $ourPDF->GetX(), 6, $msg["tache_date_fin_exec"] . " : " . formatdate($task_datas['end_at'][0]) . "\n", 0, 'L', 0); // $ourPDF->SetDrawColor(255, 255, 255); $ourPDF->multiCell($largeur_page - $marge_page_droite - $ourPDF->GetX(), 6, $msg["tache_heure_fin_exec"] . " : " . $task_datas['end_at'][1] . "\n", 0, 'L', 0); // $ourPDF->SetDrawColor(127, 127, 127);
$pdf->AddPage(); $pdf->SetFillColor(0, 102, 0); ////// logo $size = "60"; $absx = (210 - $size) / 2; $pdf->Image('../image/hello_cash.jpg', $absx, 5, $size); /// $pdf->SetFont('Arial', 'B', 10); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(0, 10, '', 0, 1); $pdf->Cell(0, 10, '', 0, 1); // empty space $pdf->Cell(0, 5, '', 0, 1); $pdf->Cell(0, 10, 'Shop No. 441, Orchard Point, Mirpur Road, Dhanmondi-7, Dhaka.', 0, 1, "C"); $pdf->Cell(0, 0, 'Cell: +8801977677776, +8801717050090', 0, 1, "C"); $pdf->Image('../image/fblogo.png', $pdf->GetX() + 60, $pdf->GetY() + 2, 5); $pdf->Cell(0, 10, 'www.facebook.com/Helloelectronix', 0, 1, "C"); $pdf->Cell(0, 0, '', 0, 1); // empty space $pdf->SetTextColor(0, 0, 100); $pdf->SetFont('Arial', 'B', 14); $pdf->WriteHTML('<p><b>Bill To :</b></p><br>'); $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(0, 0, 'Invoice', 0, 1, "R"); $pdf->SetTextColor(0, 0, 0); $pdf->SetFont('Arial', '', 12); $pdf->WriteHTML($customer_name . '<br>Phone : ' . $customer_phone . '<br>'); $pdf->Cell(0, 0, 'Date : ' . $current_date, 0, 1, "R"); $pdf->Cell(0, 10, '', 0, 1); // empty space $pdf->SetFont('Arial', 'B', 12);