本文整理汇总了PHP中ew_ExportDocument函数的典型用法代码示例。如果您正苦于以下问题:PHP ew_ExportDocument函数的具体用法?PHP ew_ExportDocument怎么用?PHP ew_ExportDocument使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ew_ExportDocument函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ExportData
function ExportData()
{
$utf8 = strtolower(EW_CHARSET) == "utf-8";
$bSelectLimit = EW_SELECT_LIMIT;
// Load recordset
if ($bSelectLimit) {
$this->TotalRecs = $this->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset()) {
$this->TotalRecs = $rs->RecordCount();
}
}
$this->StartRec = 1;
// Export all
if ($this->ExportAll) {
set_time_limit(EW_EXPORT_ALL_TIME_LIMIT);
$this->DisplayRecs = $this->TotalRecs;
$this->StopRec = $this->TotalRecs;
} else {
// Export one page only
$this->SetUpStartRec();
// Set up start record position
// Set the last record to display
if ($this->DisplayRecs <= 0) {
$this->StopRec = $this->TotalRecs;
} else {
$this->StopRec = $this->StartRec + $this->DisplayRecs - 1;
}
}
if ($bSelectLimit) {
$rs = $this->LoadRecordset($this->StartRec - 1, $this->DisplayRecs <= 0 ? $this->TotalRecs : $this->DisplayRecs);
}
if (!$rs) {
header("Content-Type:");
// Remove header
header("Content-Disposition:");
$this->ShowMessage();
return;
}
$ExportDoc = ew_ExportDocument($this, "h");
$ParentTable = "";
if ($bSelectLimit) {
$StartRec = 1;
$StopRec = $this->DisplayRecs <= 0 ? $this->TotalRecs : $this->DisplayRecs;
} else {
$StartRec = $this->StartRec;
$StopRec = $this->StopRec;
}
$sHeader = $this->PageHeader;
$this->Page_DataRendering($sHeader);
$ExportDoc->Text .= $sHeader;
$this->ExportDocument($ExportDoc, $rs, $StartRec, $StopRec, "");
$sFooter = $this->PageFooter;
$this->Page_DataRendered($sFooter);
$ExportDoc->Text .= $sFooter;
// Close recordset
$rs->Close();
// Export header and footer
$ExportDoc->ExportHeaderAndFooter();
// Clean output buffer
if (!EW_DEBUG_ENABLED && ob_get_length()) {
ob_end_clean();
}
// Write debug message if enabled
if (EW_DEBUG_ENABLED) {
echo ew_DebugMsg();
}
// Output data
if ($this->Export == "email") {
echo $this->ExportEmail($ExportDoc->Text);
} else {
$ExportDoc->Export();
}
}
示例2: ExportData
function ExportData()
{
$utf8 = strtolower(EW_CHARSET) == "utf-8";
$bSelectLimit = EW_SELECT_LIMIT;
// Load recordset
if ($bSelectLimit) {
$this->TotalRecs = $this->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset()) {
$this->TotalRecs = $rs->RecordCount();
}
}
$this->StartRec = 1;
// Export all
if ($this->ExportAll) {
set_time_limit(EW_EXPORT_ALL_TIME_LIMIT);
$this->DisplayRecs = $this->TotalRecs;
$this->StopRec = $this->TotalRecs;
} else {
// Export one page only
$this->SetUpStartRec();
// Set up start record position
// Set the last record to display
if ($this->DisplayRecs <= 0) {
$this->StopRec = $this->TotalRecs;
} else {
$this->StopRec = $this->StartRec + $this->DisplayRecs - 1;
}
}
if ($bSelectLimit) {
$rs = $this->LoadRecordset($this->StartRec - 1, $this->DisplayRecs <= 0 ? $this->TotalRecs : $this->DisplayRecs);
}
if (!$rs) {
header("Content-Type:");
// Remove header
header("Content-Disposition:");
$this->ShowMessage();
return;
}
$this->ExportDoc = ew_ExportDocument($this, "h");
$Doc =& $this->ExportDoc;
if ($bSelectLimit) {
$this->StartRec = 1;
$this->StopRec = $this->DisplayRecs <= 0 ? $this->TotalRecs : $this->DisplayRecs;
} else {
//$this->StartRec = $this->StartRec;
//$this->StopRec = $this->StopRec;
}
// Call Page Exporting server event
$this->ExportDoc->ExportCustom = !$this->Page_Exporting();
$ParentTable = "";
// Export master record
if (EW_EXPORT_MASTER_RECORD && $this->GetMasterFilter() != "" && $this->getCurrentMasterTable() == "tramites") {
global $tramites;
if (!isset($tramites)) {
$tramites = new ctramites();
}
$rsmaster = $tramites->LoadRs($this->DbMasterFilter);
// Load master record
if ($rsmaster && !$rsmaster->EOF) {
$ExportStyle = $Doc->Style;
$Doc->SetStyle("v");
// Change to vertical
if ($this->Export != "csv" || EW_EXPORT_MASTER_RECORD_FOR_CSV) {
$tramites->ExportDocument($Doc, $rsmaster, 1, 1);
$Doc->ExportEmptyRow();
}
$Doc->SetStyle($ExportStyle);
// Restore
$rsmaster->Close();
}
}
$sHeader = $this->PageHeader;
$this->Page_DataRendering($sHeader);
$Doc->Text .= $sHeader;
$this->ExportDocument($Doc, $rs, $this->StartRec, $this->StopRec, "");
$sFooter = $this->PageFooter;
$this->Page_DataRendered($sFooter);
$Doc->Text .= $sFooter;
// Close recordset
$rs->Close();
// Export header and footer
$Doc->ExportHeaderAndFooter();
// Call Page Exported server event
$this->Page_Exported();
// Clean output buffer
if (!EW_DEBUG_ENABLED && ob_get_length()) {
ob_end_clean();
}
// Write debug message if enabled
if (EW_DEBUG_ENABLED) {
echo ew_DebugMsg();
}
// Output data
if ($this->Export == "email") {
echo $this->ExportEmail($Doc->Text);
} else {
$Doc->Export();
}
}
示例3: ExportData
function ExportData()
{
$utf8 = strtolower(EW_CHARSET) == "utf-8";
$bSelectLimit = FALSE;
// Load recordset
if ($bSelectLimit) {
$this->TotalRecs = $this->SelectRecordCount();
} else {
if ($rs = $this->LoadRecordset()) {
$this->TotalRecs = $rs->RecordCount();
}
}
$this->StartRec = 1;
$this->SetUpStartRec();
// Set up start record position
// Set the last record to display
if ($this->DisplayRecs <= 0) {
$this->StopRec = $this->TotalRecs;
} else {
$this->StopRec = $this->StartRec + $this->DisplayRecs - 1;
}
if (!$rs) {
header("Content-Type:");
// Remove header
header("Content-Disposition:");
$this->ShowMessage();
return;
}
$this->ExportDoc = ew_ExportDocument($this, "v");
$Doc =& $this->ExportDoc;
if ($bSelectLimit) {
$this->StartRec = 1;
$this->StopRec = $this->DisplayRecs <= 0 ? $this->TotalRecs : $this->DisplayRecs;
} else {
//$this->StartRec = $this->StartRec;
//$this->StopRec = $this->StopRec;
}
// Call Page Exporting server event
$this->ExportDoc->ExportCustom = !$this->Page_Exporting();
$ParentTable = "";
$sHeader = $this->PageHeader;
$this->Page_DataRendering($sHeader);
$Doc->Text .= $sHeader;
$this->ExportDocument($Doc, $rs, $this->StartRec, $this->StopRec, "view");
// Export detail records (detalle_deudas)
if (EW_EXPORT_DETAIL_RECORDS && in_array("detalle_deudas", explode(",", $this->getCurrentDetailTable()))) {
global $detalle_deudas;
if (!isset($detalle_deudas)) {
$detalle_deudas = new cdetalle_deudas();
}
$rsdetail = $detalle_deudas->LoadRs($detalle_deudas->GetDetailFilter());
// Load detail records
if ($rsdetail && !$rsdetail->EOF) {
$ExportStyle = $Doc->Style;
$Doc->SetStyle("h");
// Change to horizontal
if ($this->Export != "csv" || EW_EXPORT_DETAIL_RECORDS_FOR_CSV) {
$Doc->ExportEmptyRow();
$detailcnt = $rsdetail->RecordCount();
$detalle_deudas->ExportDocument($Doc, $rsdetail, 1, $detailcnt);
}
$Doc->SetStyle($ExportStyle);
// Restore
$rsdetail->Close();
}
}
// Export detail records (pagos)
if (EW_EXPORT_DETAIL_RECORDS && in_array("pagos", explode(",", $this->getCurrentDetailTable()))) {
global $pagos;
if (!isset($pagos)) {
$pagos = new cpagos();
}
$rsdetail = $pagos->LoadRs($pagos->GetDetailFilter());
// Load detail records
if ($rsdetail && !$rsdetail->EOF) {
$ExportStyle = $Doc->Style;
$Doc->SetStyle("h");
// Change to horizontal
if ($this->Export != "csv" || EW_EXPORT_DETAIL_RECORDS_FOR_CSV) {
$Doc->ExportEmptyRow();
$detailcnt = $rsdetail->RecordCount();
$pagos->ExportDocument($Doc, $rsdetail, 1, $detailcnt);
}
$Doc->SetStyle($ExportStyle);
// Restore
$rsdetail->Close();
}
}
$sFooter = $this->PageFooter;
$this->Page_DataRendered($sFooter);
$Doc->Text .= $sFooter;
// Close recordset
$rs->Close();
// Export header and footer
$Doc->ExportHeaderAndFooter();
// Call Page Exported server event
$this->Page_Exported();
// Clean output buffer
if (!EW_DEBUG_ENABLED && ob_get_length()) {
ob_end_clean();
//.........这里部分代码省略.........
示例4: ExportData
function ExportData()
{
$utf8 = strtolower(EW_CHARSET) == "utf-8";
$bSelectLimit = FALSE;
// Load recordset
if ($bSelectLimit) {
$this->TotalRecs = $this->SelectRecordCount();
} else {
if (!$this->Recordset) {
$this->Recordset = $this->LoadRecordset();
}
$rs =& $this->Recordset;
if ($rs) {
$this->TotalRecs = $rs->RecordCount();
}
}
$this->StartRec = 1;
$this->SetUpStartRec();
// Set up start record position
// Set the last record to display
if ($this->DisplayRecs <= 0) {
$this->StopRec = $this->TotalRecs;
} else {
$this->StopRec = $this->StartRec + $this->DisplayRecs - 1;
}
if (!$rs) {
header("Content-Type:");
// Remove header
header("Content-Disposition:");
$this->ShowMessage();
return;
}
$this->ExportDoc = ew_ExportDocument($this, "v");
$Doc =& $this->ExportDoc;
if ($bSelectLimit) {
$this->StartRec = 1;
$this->StopRec = $this->DisplayRecs <= 0 ? $this->TotalRecs : $this->DisplayRecs;
} else {
//$this->StartRec = $this->StartRec;
//$this->StopRec = $this->StopRec;
}
// Call Page Exporting server event
$this->ExportDoc->ExportCustom = !$this->Page_Exporting();
$ParentTable = "";
$sHeader = $this->PageHeader;
$this->Page_DataRendering($sHeader);
$Doc->Text .= $sHeader;
$this->ExportDocument($Doc, $rs, $this->StartRec, $this->StopRec, "view");
$sFooter = $this->PageFooter;
$this->Page_DataRendered($sFooter);
$Doc->Text .= $sFooter;
// Close recordset
$rs->Close();
// Call Page Exported server event
$this->Page_Exported();
// Export header and footer
$Doc->ExportHeaderAndFooter();
// Clean output buffer
if (!EW_DEBUG_ENABLED && ob_get_length()) {
ob_end_clean();
}
// Write debug message if enabled
if (EW_DEBUG_ENABLED && $this->Export != "pdf") {
echo ew_DebugMsg();
}
// Output data
$Doc->Export();
}