本文整理汇总了PHP中Export::SendExport方法的典型用法代码示例。如果您正苦于以下问题:PHP Export::SendExport方法的具体用法?PHP Export::SendExport怎么用?PHP Export::SendExport使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Export
的用法示例。
在下文中一共展示了Export::SendExport方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
}
$export->LSTableFoot();
break;
case "xml_tables":
$export->LSTableHead();
foreach ($_POST["table"] as $key => $value) {
if ($key) {
$export->ExportTable($key, $_POST["e_struct"], $_POST["e_cont"]);
}
}
$export->LSTableFoot();
break;
case "csv_complete":
$output = $export->ExportCSVComplete(";");
$export->SendExport($output, "lansuite.csv");
break;
case "csv_sticker":
$output = $export->ExportCSVSticker(";");
$export->SendExport($output, "lansuite_sticker.csv");
break;
case "csv_card":
$output = $export->ExportCSVCard(";");
$export->SendExport($output, "lansuite_card.csv");
break;
case "ext_inc_data":
$export->ExportExtInc('lansuite_data.tgz');
break;
default:
$func->information(t('Der von dir angegebene Dateityp wird nicht unterstützt. Bitte wählen dir eine Datei vom Typ *.xml, oder *.csv aus oder überspringe den Dateiimport.'), "index.php?mod=install&action=import");
break;
示例2: PrintSearch
//.........这里部分代码省略.........
$TargetPage = 0;
}
if (strpos($arr['link'], '%id%')) {
$arr['link'] = str_replace('%id%', $line[$select_id_field], $arr['link']);
} else {
$arr['link'] .= $line[$select_id_field];
}
if (strpos($arr['link'], '%page%')) {
$arr['link'] = str_replace('%page%', $TargetPage, $arr['link']);
}
$arr['name'] = $current_field['icon_name'];
$arr['title'] = $current_field['tooltipp'];
$displayed++;
$body[$x]['icons'][$y] = $arr;
$y++;
}
}
if ($y > $maxIcons) {
$maxIcons = $y;
}
$x++;
}
// End: Row
$smarty->assign('maxIcons', $maxIcons);
$smarty->assign('head', $head);
$smarty->assign('body', $body);
// Multi-Select Dropdown
$MultiOptions = array();
if (count($this->multi_select_action) > 0) {
$smarty->assign('MultiCaption', t('Bitte auswählen'));
$z = 0;
foreach ($this->multi_select_action as $current_action) {
$arr = array();
if ($z == 0) {
$multi_select_actions = '"' . $current_action['action'] . '"';
} else {
$multi_select_actions .= ', "' . $current_action['action'] . '"';
}
if ($z == 0) {
$security_questions = '"' . $current_action['security_question'] . '"';
} else {
$security_questions .= ', "' . $current_action['security_question'] . '"';
}
$arr['BGIcon'] = $current_action['icon'];
$arr['caption'] = $current_action['caption'];
$arr['value'] = $z;
$MultiOptions[] = $arr;
$z++;
}
$smarty->assign('multi_select_actions', $multi_select_actions);
$smarty->assign('security_questions', $security_questions);
$smarty->assign('MultiOptions', $MultiOptions);
}
$db->free_result($res);
$smarty->assign('ms_number', $this->ms_number);
if (!$this->isExport) {
$dsp->AddContentLine($smarty->fetch('modules/mastersearch2/templates/result_case.htm'));
}
}
// Generate Exports
if ($this->isExport) {
switch ($this->isExport) {
case 'csv':
include "modules/install/class_export.php";
$export = new Export();
$output = '';
$y = 0;
foreach ($head as $field) {
if ($field['type'] != 'input' and $field['type'] != 'space') {
$y++;
if ($y > 1) {
$output .= ';';
}
if ($field['entry'] == ' ') {
$field['entry'] = '';
}
$output .= '"' . str_replace('"', '""', strip_tags(utf8_decode($field['entry']))) . '"';
}
}
foreach ($body as $row) {
$y = 0;
$output .= "\n";
foreach ($row['line'] as $field) {
if ($field['type'] != 'input' and $field['type'] != 'space') {
$y++;
if ($y > 1) {
$output .= ';';
}
if ($field['entry'] == ' ') {
$field['entry'] = '';
}
$output .= '"' . str_replace('"', '""', strip_tags(utf8_decode($field['entry']))) . '"';
}
}
}
$export->SendExport($output, 'lansuite-' . $_GET['mod'] . '.csv');
break;
}
}
}