Esempio n. 1
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();
		
	}
Esempio n. 2
0
	function run()
	{
	//	echo date('h:i:s A')." - just entered run<br>";
		//echo microtime()."Main:run just entered run() <br>";
		//$output_function = "output_template";
		//echo "<br>Main,  searcresrowcount".$_SESSION['search_res_row_cnt'];
		if ($_REQUEST['er'])
		{
			$un_encrypted_request = myedb_decrypt($_REQUEST['er']);
			if (!strstr($un_encrypted_request,"check_activation_password")) die ("error: bad link");
			eval($un_encrypted_request); //echo $_REQUEST['id']." -yooo- ".$_REQUEST['activate'];
		}
		
		$mss = new Main_SecuritySystem();

		$bypass_auth = in_array($_REQUEST['target_function'][0],$this->non_auth_target_functions)
			|| in_array($_REQUEST['OF_passthru'],$this->non_auth_output_functions);
		
		if (!$mss->passed_security_check($this->xml_string) 
			&& !$bypass_auth) 
		{//echo "didn't pass";
			$output_function = $mss->output_function;
		}
		//if (SecurityOperationsFacade::passed_security_check($this->xml_string, $this->xslt_file))
		else
		{// echo "did pass";
			if (!isset($_REQUEST['target_component']))
			{ 
				if (isset($_REQUEST['ntctf']))
				{
					$this->setup_for_no_server_side_content();
				}
				else if (isset($_REQUEST['pl']))
				{
					$this->set_product_lookup_page();
				}
				else
				{
					$this->set_default_site_page();
				}
			}
		
			//echo microtime()."Main:run before new RequestProcessor() <br>"; flush();
			$rp = new RequestProcessor();
			//echo microtime()."Main:run after new RequestProcessor() <br>"; flush();
			$output_function = $rp->process_request($this->xml_string, $this->xslt_file);
			//echo microtime()."Main:run after RequestProcessor::process_request <br>"; flush();
		}

		//echo microtime()."Main:run before user_authorized_output_function_check <br>";
		//	echo date('h:i:s A')." - just got output function<br>";
		if (!$mss->user_authorized_output_function_check($output_function))
		{
			
			$cur_user_eid = Main_SecuritySystem::get_user_eid();
			$subject = "unauthorized access attempt";
			$message = "user with eid ".$cur_user_eid." attempted to access ".$output_function; 
			NotificationSys::email_developer($subject,$message);
			die ("Unauthorized Access Attempt!");
		}
		$oof = new OutputOperationsFacade;
		//echo microtime()."Main:run before output_function <br>";
		if ($_REQUEST['OF_passthru'] && 
			($mss->authenticated || $bypass_auth))
		{
			$oof->output_function_passthru($this->xml_string, $_REQUEST['OF_passthru']); 
			//echo "<br>output function:".$_REQUEST['OF_passthru'];
		}
		else
		{
			$oof->$output_function($this->xml_string, $this->xslt_file);
		}
		//echo microtime()."Main:run after output_function <br>";
		//echo date('h:i:s A')." - just exec'd output function<br>";
	}
Esempio n. 3
0
 function send_user_activation_email()
 {
     $app_entities = AppEntities_Facade::getAppEntitiesInstance();
     $email_info = AppEntities_Facade::get_email_info($app_entities->user_registration_approval_email);
     NotificationSys::email_user_by_eid($_REQUEST['eid'], $email_info["email_subject"], $email_info["email_message"]);
 }
Esempio n. 4
0
 function send_mail($user_eid, $message_no, $subject_no)
 {
     return NotificationSys::email_user_by_eid($user_eid, $this->messages($subject_no), $this->messages($message_no));
 }