Beispiel #1
0
	function get_transactions()
	{
		$eidsrc = TransMgmt_SecuritySystem::get_user_eid();
		$transar = TransMgmt_EntityManagementSystems::get_unrealized_transactions_by_eidsrc($eidsrc);
		$doc = new DOMDocument('1.0', 'UTF-8');
		$doc->formatOutput = true;
		$transactions = $doc->createElement('transactions');
		$transactions = $doc->appendChild($transactions);
		foreach ($transar as $trans)
		{
			$eiddst = "";
			$transaction = $doc->createElement('transaction');
			$transaction = $transactions->appendChild($transaction);
			foreach($trans as $colname => $val)
			{
				$transaction->setAttribute($colname,$val);
				if ($colname == "eiddst")
				{
					$eiddst = $val;
				}
			}
			$doc2 = new DOMDocument('1.0','UTF-8');
			$filter_properties = array(1,10,15,16,17,33,57); 
			$eiddst_rec_xml = TransMgmt_RecordsSystem::get_record_xml_filtered($eiddst,$filter_properties);
			$doc2->loadXML($eiddst_rec_xml);
			$node = $doc->importNode($doc2->firstChild,true);
			$transaction->appendChild($node);
		}
		$xml_string = $doc->saveXML();
		return $xml_string;
		
	}