ul {margin-bottom:0cm;} </style> <![endif]--> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026"/> </xml><![endif]--> <!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1"/> </o:shapelayout></xml><![endif]--> '; $doc->addText($style_t); //end head $doc->addText("</head>"); $doc->addText("<body lang=VI style='tab-interval:36.0pt'>"); $doc->addText("<div class=WordSection1>"); //body $doc->addText($printable); $doc->addText("</div>"); $doc->addText("</body></html>"); //require_once('XTemplate/xtpl.php'); // $xtpl=new XTemplate ('modules/AOS_PDF_Templates/hd_files/header.htm'); // $xtpl->assign("HEADER",$template->pdfheader); // $xtpl->assign("FOOTER",$template->pdffooter); // $xtpl->parse("main"); // $xtpl->out("main"); $file_name = "Contract.doc"; $doc->output("{$file_name}");
} elseif ($db->record['tipobici'] == 'V') { $strCol .= "Con cambio"; } elseif ($db->record['tipobici'] == 'C') { $strCol .= "Da città"; } else { $strCol .= "MTB"; } $cols[] = $strCol; $aligns = array('justify', 'center'); $doc->addTableRow($cols, $aligns, "", array('font-family' => 'Arial', 'width' => '10cm')); //$doc->addTableRow($cols, $aligns, "", array('font-weight' => 'bold')); unset($cols); $doc->endTable(); $doc->addParagraph('<br>'); } $doc->output('Lista gite approvate ' . date("Y") . '.doc'); exit; } if (is_numeric($_GET['evid'])) { makeHead("Evento", "", "onload=\"init();\""); vis_evento(); makeTail(); exit; } if (is_numeric($_GET['id'])) { vis_gita(); makeTail(); exit; } elseif (is_numeric($_GET['iscrid'])) { include_once "lib/db_mysql.php"; $db = new db_local();
</tr> <tr> <td>' . $stat[4] . '</td> <td><pre> </pre></td> <td>' . $stat_detail[4] . '</td> </tr> </table>'; //echo $table; $doc->addparagraph($table, $format); /* $doc->startTable(); for($row = 0; $row < 5; $row++){ $cols = array(); $cols[0] = $stat[$row]; $cols[1] = $stat_detail[$row]; $doc->addTableRow($cols); unset($cols); } $doc->endTable(); */ $doc->addParagraph(''); $doc->addParagraph(''); } header('Content-Disposition: attachment; filename="docName.doc"'); $doc->output(); ?> <table style="font-family: fantasy;font-size: 15;font-style: italic;color: blue;"></table>
public function export() { $map['id'] = array('in', $_REQUEST['id']); $orders = $this->dao->where($map)->select(); Vendor('MsDocGenerator'); $doc = new clsMsDocGenerator(); $doc->addParagraph('网站订单', array('text-align' => '"center"', 'font-size' => '16pt', 'font-weight' => 'bold')); $i = 0; $count = count($orders); $this->assign('all_count', $count); foreach ($orders as $o) { $this->assign('i', $i); $_GET['id'] = $o['id']; $this->orders(); $doc->addParagraph($this->fetch('Orders-word')); $i++; $doc->addParagraph("<br clear=all style='page-break-before:always;' />"); } $doc->output('订单列表'); }
function executeExportword() { global $controller, $ClassDir, $UploadDir; require_once $ClassDir . 'MsDocGenerator.class.php'; $doc = new clsMsDocGenerator(); $apf_contact = DB_DataObject::factory('ApfContact'); $apf_contact->get($apf_contact->escape($controller->getID())); $doc->setDocumentCharset("gbk"); $doc->setDocumentLang("setDocumentLang"); $doc->addParagraph($apf_contact->getName()); $apf_contact->getPhoto() ? $doc->addParagraph($doc->addImage($UploadDir . $apf_contact->getPhoto(), 80, 80)) : ""; $filename = date("Y_m_d") . $apf_contact->getName() . ".doc"; $doc->output($filename); exit; }