示例#1
0
	function preprocess_output($xml_string, $xslt_file, $params)
	{
		//echo microtime()." starting OutputProcessor::preprocess_output<br>";
		//print_r($_SERVER);
		foreach ($_REQUEST as $getkey => $getval)
		{
			if (!in_array($getkey,array_keys($_COOKIE)))
			{
				if (is_array($getval))
				{
					$getval = array_pop($getval);
				}
				$params[$getkey] = $getval;
			}
		}
				
		$logged_in_user = AppEntities_Facade::get_user_instance();
		$logged_in_user_id = $logged_in_user->user_id;
		$logged_in_user_full_name = $logged_in_user->full_name;
		
		if ($_REQUEST['eid'])
		{
			$entity = RecordsSys_EntityManagementSystems::get_entity($_REQUEST['eid']);
			$params['date_last_modified'] = $entity->date_last_modified;
			$params['date_added'] = $entity->date_added;
			$params['user_last_modified'] = $entity->user_last_modified;
			$params['user_added'] = $entity->user_added;
		}
		else
		{
			$params['date_last_modified'] = "";
			$params['date_added'] = "";
			$params['user_last_modified'] = "";
			$params['user_added'] = "";
		}

		$params['php_self'] = $_SERVER['PHP_SELF'];
		$params['httphost'] = $_SERVER['HTTP_HOST'];
		$params['logged_in_user_full_name'] = $logged_in_user_full_name;
		$params['cur_user'] = Output_SecuritySystem::get_user_eid(); 
		$params['auth_level'] = Output_SecuritySystem::get_user_auth_level(); 
		$params['app_root_client'] =  URL_APP_ROOT;
		$params['current_date_time'] = date("F j, Y, g:i a");                 // March 10, 2001, 5:16 pm
		
		//echo microtime()." OutputProcessor::preprocess_output, calling MyEDB_XSLTProcessor::output_template<br>";
		MyEDB_XSLTProcessor::output_template($xml_string, $xslt_file, $params);
		//echo microtime()." ending OutputProcessor::preprocess_output<br>";
	}