Example #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>";
	}
Example #2
0
	function confirm_travel_order()
	{
		//echo "<xmp>".$_SESSION['saved_res_info']."</xmp>"; die();
		$eidsrc = TransMgmt_SecuritySystem::get_user_eid();
		$details_xml = "'".sanitize_trim_mysqli_escape($_SESSION['mysqli_link'],$_SESSION['saved_res_info'])."'"; 
		//standalone: doesn't sit in cart
		TransMgmt_EntityManagementSystems::create_standalone_order($details_xml,$eidsrc,$_POST['eiddst'],$_POST['type_id']);
		$doc = new DOMDocument('1.0','UTF-8');
		$travel_order_confirmation = $doc->createElement('travel_order_confirmation');
		$travel_order_confirmation = $doc->appendChild($travel_order_confirmation);

		$cur_user_eid = Output_SecuritySystem::get_user_eid();
		$email_info = AppEntities_Facade::get_travel_order_confirmation_email_info(); 
		NotificationSys::email_user_cc_admins($cur_user_eid,
			$email_info["confirm_travel_order_email_subject"],
				$email_info["confirm_travel_order_email_message"]);
		
	//	NotificationSys::email_developer(
	//		$email_info["confirm_travel_order_email_subject"],
	//			$email_info["confirm_travel_order_email_message"]);
				
		return $doc->saveXML();
		
	}