function set_last_modified_date($eid) { $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; $user_mod = $logged_in_user_full_name . " (" . $logged_in_user_id . ")"; $sql = sprintf("update entity set last_modified = NOW(), user_last_modified = '%s' where eid = %s", $user_mod, $eid); mysql_query($sql) or die("Error: Entity::set_last_modified_date lake39dkwle;"); }
function add_standard_additions() { $logged_in_user = AppEntities_Facade::get_user_instance(); $logged_in_user_id = $logged_in_user->user_id; $rec = new Record($logged_in_user_id,3); $rec->initialize(); $xml_string = $rec->xml_string; $this->append_child_from_xml($xml_string, "logged_in_user_record"); //echo $xml_string; }
function __construct() { //include_once ($_SERVER['DOCUMENT_ROOT'].'/serverspfc/dbstup.php'); $this->AC_server = GI_SERVER; $this->AC_user = GI_USER; $this->AC_pass = GI_PASS; $this->AC_db = GI_DB; $logged_in_user = AppEntities_Facade::get_user_instance(); $results_per_page = $logged_in_user->results_per_page; if ($results_per_page) { $this->default_rows_per_page = $results_per_page; } }
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>"; }
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(); }
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"]); }
function finalize_order() { $eid = $_REQUEST['rec_eid']; //should be current user's eid. $logged_in_user = AppEntities_Facade::get_user_instance(); $logged_in_user_id = $logged_in_user->user_id; if ($eid != $logged_in_user_id) die("Security error: 3390kflsi33"); TransactionMgmt::get_transactions(); $details_xml = "'<details_xml><order><blah></blah></order></details_xml>'"; //placeholder $doc = new DOMDocument('1.0', 'UTF-8'); $doc->formatOutput = true; //create root node $order_info = $doc->createElement('order_info'); $order_info = $doc->appendChild($order_info); //insert transactions $doc2 = new DOMDocument('1.0','UTF-8'); $trans_xml = TransactionMgmt::get_transactions(); $doc2->loadXML($trans_xml); $node = $doc->importNode($doc2->firstChild,true); $order_info->appendChild($node); //insert ship address $ship_info = $doc->createElement('ship_info'); $ship_info = $order_info->appendChild($ship_info); $ship_dest = $doc->createElement('ship_dest'); $ship_dest = $ship_info->appendChild($ship_dest); $ship_dest->setAttribute('pgiron',$_REQUEST['order_ship_addr']); $doc3 = new DOMDocument('1.0','UTF-8'); $eidsrc_rec_xml = TransMgmt_RecordsSystem::get_record_xml($eid); $doc3->loadXML($eidsrc_rec_xml); $node2 = $doc->importNode($doc3->firstChild,true); $order_info->appendChild($node2); //insert credit card info /*$cc_info = $doc->createElement('cc_info'); $cc_info = $order_info->appendChild($cc_info); $cc_number = $doc->createTextNode($_REQUEST['CCinfo']); $cc_info->appendChild($cc_number); $order_info->appendChild($cc_info); */ $check_out_elements = array( //"cc_info", //"CCexpdate", //"CChldrname", "co_account_number", "co_business_name", "co_name", "chkout_order_phone", "order_ship_addr","shipaddr_addr1","shipaddr_addr2", "shipaddr_city", "shipaddr_state","shipaddr_zip", "chkout_special_requests"); foreach ($check_out_elements as $elem) { $ship_elem = $doc->createElement($elem); $ship_elem = $order_info->appendChild($ship_elem); $ship_elem_txt = $doc->createTextNode($_REQUEST[$elem]); $ship_elem->appendChild($ship_elem_txt); $order_info->appendChild($ship_elem); } $details_xml = $doc->saveXML(); $details_xml = "'".addslashes($details_xml)."'"; TransMgmt_EntityManagementSystems::finalize_order($eid, $details_xml); if (!isset($_SESSION['finalized_order_id'])) { die("Transaction failed. error: 2kdjs;aii3i3"); } $order_id = $_SESSION['finalized_order_id']; $doc = new DOMDocument('1.0', 'UTF-8'); $order_id_elem = $doc->createElement('final_order_id',$order_id); $doc->appendChild($order_id_elem); return $doc->saveXML(); }