function get_properties_change_history_records_xml() { $eids = array(); $xml_string = ""; $sql = "select eid from view_int_prop_to_e_p_to_e\nwhere type_id in (select type_id from type where type_name like '%_history') and prop_id = 40 and int_val = " . $this->eid; $result = mysql_query($sql) or die("Error in RecordHistory...3lkd0skdjskfklk" . mysql_error()); while ($row = mysql_fetch_assoc($result)) { $eids[] = $row['eid']; } $doc = new DOMDocument('1.0', 'UTF-8'); $doc->formatOutput = true; $recs = $doc->createElement('records'); $recs = $doc->appendChild($recs); foreach ($eids as $eid) { $type_id = RecordsSys_EntityManagementSystems::get_type_id($eid); $rec = new Record($eid, $type_id); $rec->initialize(); $xml_string = $rec->xml_string; $doc2 = new DOMDocument('1.0', 'UTF-8'); $doc2->loadXML($xml_string); $node = $doc->importNode($doc2->firstChild, true); $recs->appendChild($node); } // $rec->glu->prop_ids_num_extra[6] = 1; // $rec->glu->set_prop_ids_num_extra_by_group_id(1); //$rec->glu->set_prop_ids_num_extra_by_group_id(1); // $xslt_file = $_SERVER['DOCUMENT_ROOT']."/XSLTemplates/testrecs.xsl"; $xml_string = $doc->saveXML(); return $xml_string; }
function get_record_xml($eid) { $type_id = RecordsSys_EntityManagementSystems::get_type_id($eid); $rec = new Record($eid, $type_id); $rec->initialize(); $xml_string = $rec->xml_string; return $xml_string; }
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 get_record_xml_filtered($eid, $filter_properties) { $type_id = RecordsSys_EntityManagementSystems::get_type_id($eid); $rec = new Record($eid, $type_id); $rec->filter_properties = $filter_properties; $rec->initialize(); $xml_string = $rec->xml_string; return $xml_string; }