<?php require_once 'src/PHPRtfLite.php'; PHPRtfLite::registerAutoloader(); require_once 'includes/cars_pdo.php'; if (isset($_POST['download'])) { try { $rtf = new PHPRtfLite(); // Установить свойства страницы $rtf->setMargins(2.54, 2.54, 2.54, 2.54); $rtf->setPaperFormat(PHPRtfLite::PAPER_LETTER); // Добавить футер $footer = $rtf->addFooter(); $fontFooter = new PHPRtfLite_Font(8, 'Arial', '#000000'); $alignFooter = new PHPRtfLite_ParFormat(PHPRtfLite_ParFormat::TEXT_ALIGN_CENTER); $footer->writeText('Used cars for sale - <pagenum>', $fontFooter, $alignFooter); // Определить шрифты $fontH1 = new PHPRtfLite_Font(16, 'Arial', '#4E9C93'); $fontH2 = new PHPRtfLite_Font(14, 'Arial', '#4E9C93'); $fontP = new PHPRtfLite_Font(12, 'Helvetica', '#000000'); // Вертикальное форматирование текста $formatH1 = new PHPRtfLite_ParFormat(); $formatH1->setSpaceAfter(8); $formatH2 = new PHPRtfLite_ParFormat(); $formatH2->setSpaceAfter(6); $formatP = new PHPRtfLite_ParFormat(); $formatP->setSpaceAfter(3); // Содержание страницы $section = $rtf->addSection(); $section->writeText('Used Cars for Sale', $fontH1, $formatH1); while ($row = getRow($result)) {
}*/ /*$project_id = $_GET["project_id"]; $ps_id = $_GET["ps_id"]; $qup = mysql_query("select * from t_project where project_id = $project_id"); $project_info = mysql_fetch_object($qup); $qup = mysql_query("select *,date_format(ps_test_tanggal,'%d-%b-%Y') ps_test_tanggal2 from t_project_source where ps_id = $ps_id"); $project_source_info = mysql_fetch_object($qup);*/ } // Init $null = null; PHPRtfLite::registerAutoloader(); $parFormat = new PHPRtfLite_ParFormat(); $rtf = new PHPRtfLite(); //setLandscape() $rtf->setLandscape(); //$rtf->setMargins(3,2,3,2); //_createHeader($project_info); $rtf->setMargins(3, 2, 3, 2); $sect =& $rtf->addSection(); //_createTitle($project_info); _createTable(); // /*$sect = &$rtf->addSection(); _createTable(3,3); // $sect = &$rtf->addSection(); _createUraian();*/ $namafile = "Schedule.rtf"; $rtf->sendRtf($namafile);