Exemple #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";
}
<?php

//ini_set("display_errors",1);
require_once 'app_code/global.config.php';
require_once 'class/config.inc.php';
require_once 'class/class.FctSearchScreen.php';
$page = new basic_page();
/*******Checking Authentication****************/
$page->auth->Checklogin();
$user = new User();
$notify = new Notification();
$fctsearch = new FctSearchScreen();
$ajax = new PHPLiveX();
$ajax->AjaxifyObjects(array("fctsearch"));
$page->setPageKeywords('');
$page->setPageDescription('');
$page->setPageTitle("BUCKET SEARCH");
$page->setActiveButton('3');
$page->setInnerNav('');
//$page -> setImportCss1('main_style.css');
//$page -> setImportCss2('form.css'); // each page should have it's own .css sheet.  Link mulitple sheets here and below
$page->SetDynamicCSS_1('main_style.php');
$page->SetDynamicCSS_2('form.php');
$page->setImportCss3('src/css/jscal2.css');
$page->setImportCss4('src/css/border-radius.css');
//$page -> setImportCss5('src/css/win2k/win2k.css');
$page->setImportCss6('tablesort/themes/blue/style.css');
$page->setImportCss7('contact_profile.css');
$page->setImportCss8('css/JTip.css');
$page->setImportCss9('auto/style.css');
$page->setExtJavaScripts1('<script src="js/301a.js" type="text/javascript"></script>');
<?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>