Tryag File Manager
Home
-
Turbo Force
Current Path :
/
home
/
cluster1
/
data
/
bu01
/
1121861
/
html
/
jlex
/
php4
/
Upload File :
New :
File
Dir
//home/cluster1/data/bu01/1121861/html/jlex/php4/query_result.php4
<?php header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past include_once("mysql_to_xml.php4"); include_once("project_defaults.php4"); include_once("query_object.php4"); class query_result { /******************************* get_project_defaults ****************************/ function get_project_defaults($defaults_xml) { $pd = new project_defaults(); $defaults = $pd->get_project_defaults($defaults_xml); return $defaults; } /**********************************************************************************************************/ function query_database($form_vars) { if(array_key_exists("query_object",$_SESSION)) { $query_object = $_SESSION["query_object"]; if($query_object->get_project() != $form_vars["project"]) $query_object = new query_object(); } else { $query_object = new query_object(); } $project = $form_vars["project"]; $defaults_file = "../$project/defaults.xml"; $defaults = array(); if(file_exists($defaults_file)) { $defaults = $this->get_project_defaults($defaults_file); } if(array_key_exists("pre_processing_script",$defaults)) { $pre_processing_script = $defaults["pre_processing_script"]; if(($pre_processing_script != "") && file_exists("../$project/".$pre_processing_script)) { include("../$project/".$pre_processing_script); } } $query_object->fill_query_object($form_vars,$defaults); $converter = new mysql_to_xml(); $page = $query_object->get_page(); if($page == "") { $query_object = $converter->query_database($query_object); } $query_object = $converter->convert_resultset_to_xml($query_object); $_SESSION["query_object"] = $query_object; $post_processing_script = "../$project/".$query_object->get_post_processing_script(); if($post_processing_script != "../$project/") { include($post_processing_script); //$query_object->print_values(); } else { header("Content-Type: application/xml"); echo $query_object->get_xml(); //$query_object->print_values(); } } } //error_reporting(0); session_start(); $form_vars = array_merge($_POST, $_GET); $qr = new query_result(); $qr->query_database($form_vars); ?>