diff --git a/lam/tests/module_pdf-test.php b/lam/tests/module_pdf-test.php deleted file mode 100644 index 566c3b85..00000000 --- a/lam/tests/module_pdf-test.php +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/php -q - array("Test keyTest value"),"First name" => array("

Test p

"),"User quotas" => array("User quotasMountpointSoft blockSoft inodeHard blockHard inode","/usr1010015150")); - $structure = getPDFStructureDefinitions("user"); - - $pdf = new LamPDF("user", array('filename' => 'none'), 'BitstreamVeraSans-Roman'); - - // Loop over each account and add a new page in the PDF file for it - // Start a new page for each account - $pdf->AddPage(); - - // Get PDF entries for the current account - //$entries = $account->get_pdfEntries($account_type); - - // Now create the PDF file acording to the structure with the submitted values - foreach($structure as $entry) { - // We have a new section to start - $name = $entry['attributes']['NAME']; - if($entry['tag'] == "SECTION" && $entry['type'] == "open") { - if(preg_match("/^\_[a-z]+/",$name)) { - $section_headline = $entries[ucwords(substr($name,1))][0]; - } - else { - $section_headline = $name; - } - $pdf->setFont("arial","B",12); - $pdf->Write(5,"- " . _($section_headline) . ":"); - $pdf->Ln(6); - } - // We have a section to end - elseif($entry['tag'] == "SECTION" && $entry['type'] == "close") { - $pdf->Ln(9); - } - // We have to include a static text. - elseif($entry['tag'] == "TEXT") { - - } - // We have to include an entry from the account - elseif($entry['tag'] == "ENTRY") { - // Get current entry - $entry = $entries[$name]; - - // Loop over all rows of this entry (most of the time this will be just one) - if($entry != null) { - foreach($entry as $line) { - // Substitue XML syntax with valid FPDF methods - $methods = processLine($line); - // Call every method - foreach($methods as $method) { - call_user_method_array ($method[0],$pdf,$method[1]); - } - } - $key = false; - } - } - } - $pdf->Close(); - $pdf->Output('/tmp/test.pdf','F'); -?> \ No newline at end of file