示例#1
0
require_once 'class/class.FctSearchScreen.php';
ob_end_clean();
header("Content-type: text/csv");
header("Cache-Control: no-store, no-cache");
header('Content-Disposition: attachment; filename="filename.csv"');
$page = $_REQUEST['page'];
$arr = array();
$options = array();
$op = $_REQUEST['options'];
foreach ($_REQUEST as $n => $v) {
    if (strtolower(substr($n, 0, 7)) == 'search_') {
        $options[substr($n, 7)] = $v;
    }
}
switch ($page) {
    case "bucket_search":
        $fct = new FctSearchScreen();
        $arr = $fct->display_flowchart_task2($options, array('return_csv' => true, 'user_id' => $_SESSION['user_id']));
        break;
    case "case_search":
        $case = new cases();
        $arr = $case->display_search($options, array('return_csv' => true, 'user_id' => $_SESSION["user_id"]));
        break;
}
foreach ($arr['body'] as $row) {
    $clean_row = array();
    foreach ($row as $name => $col) {
        $clean_row[$name] = $col;
    }
    echo '"' . trim(str_replace("\n", '', implode('","', $clean_row) . '"')) . "\n";
}
示例#2
0
$page->setPageStyle($page_style);
$page->displayPageTop('full');
$ajax->Run('phplivex.js');
// Must be called inside the 'html' or 'body' tags
// **********************Start html for content column ****************************//
$notify->Notify();
?>
<div id="prl" style="display:none;"><img  id="prl_image" src="images/spinner.gif"  /></div>
<div id="content_column_header" style="background-color:#3F3F3F;">
    
	  <?php 
echo $fctsearch->search_flowchart_tasks2();
?>
  <div align="right"> <a href="#" onclick="table2CSV($('#search_table')); return false;"> <img src="images/csv.png"  alt="Export to CSV" /> </a> </div>	
</div>
	
<div id="form_main">
    <div id="bucket_search">
 <?php 
echo $fctsearch->display_flowchart_task2();
?>
    </div>

<?php 
// **********************Closes the Content Column and begins Info Column ****************************//
$page->printContentColumnEnd();
// **********************Start code for Info Column ****************************//
?>

<?php 
$page->displayPageBottom();
<?php

require_once 'app_code/global.config.php';
require_once 'class/config.inc.php';
require_once 'class/class.FctSearchScreen.php';
$fctsearch = new FctSearchScreen();
?>
    
	  <?php 
//echo $fctsearch->search_flowchart_tasks2();
echo $fctsearch->display_search_bar(array(), array('user_id' => $_SESSION['user_id']));
?>

	
<div id="form_main" class="bucket_search_screen_results">
    
    <div id="search_result" >
 <?php 
echo $fctsearch->display_flowchart_task2(array(), array('user_id' => $_SESSION['user_id']));
?>
    </div>
  
</div>