コード例 #1
0
ファイル: LookupTableEditOps.php プロジェクト: awgtek/myedb
 function set_lookuptable_xml()
 {
     $lookuptable = new LookupTable($_REQUEST["table_name"]);
     $table_hash = $lookuptable->get_table();
     $doc = new DOMDocument('1.0', 'UTF-8');
     $doc->formatOutput = true;
     $lookup_item_group = $doc->createElement('lookup_item_group');
     $lookup_item_group = $doc->appendChild($lookup_item_group);
     $lookup_item_group->setAttribute('lookup_table_name', $_REQUEST["table_name"]);
     foreach ($table_hash as $cat_id => $catval_ar) {
         $lookup_item = $doc->createElement('lookup_item');
         $lookup_item = $lookup_item_group->appendChild($lookup_item);
         $lookup_item->setAttribute('prim_key_col', $cat_id);
         $lookup_item->setAttribute('lookup_value_col', $catval_ar[0]);
         $lookup_item->setAttribute('is_disabled', $catval_ar["disabled"]);
     }
     $this->lookuptable_xml = $doc->saveXML();
 }
コード例 #2
0
ファイル: category.php プロジェクト: awgtek/myedb
 function get_list()
 {
     $lookup_table = new LookupTable("category");
     return $lookup_table->get_table();
 }
コード例 #3
0
ファイル: ClientServerDataOps.php プロジェクト: awgtek/myedb
 function get_table_DS($table_name)
 {
     $lookup_table = new LookupTable($table_name);
     return $lookup_table->get_table();
 }
コード例 #4
0
ファイル: XMLProcessor.php プロジェクト: awgtek/myedb
	function add_category_list()
	{//return;
		//$category_hash = OutputSys_EntityManagementSystems::get_category_list();
		$lookuptable = new LookupTable("category");
		$category_hash = $lookuptable->get_table();
		$category_type_matrix = OutputSys_EntityManagementSystems::get_category_type_mapping();
		/*
		$doc = new DOMDocument('1.0','UTF-8');
		$doc->formatOutput = true;
		$root = $doc->createElement('myedbroot');
		$root = $doc->appendChild($root);
			*/	
		
		$cats = $this->doc->createElement('categories');
		$this->doc_root->appendChild($cats);
		
		foreach ($category_hash as $cat_id => $cat_name_ar)
		{
			$cat_name = $cat_name_ar[0];
			$cat = $this->doc->createElement('category');
			$cats->appendChild($cat);
			$cat->setAttribute("cat_id",$cat_id);
			$cat->setAttribute("is_disabled",$cat_name_ar['disabled']);
			//add elements showing which types are associated with this category
			$types = $this->doc->createElement('cattypes');
			$cat->appendChild($types);
			if (is_array($category_type_matrix[$cat_id]))//if not set, means no records associated with category
			{
				foreach($category_type_matrix[$cat_id] as $type_id)
				{
					$type = $this->doc->createElement('cattype');
					$types->appendChild($type);
					$type_id_txt = $this->doc->createTextNode($type_id);
					$type->appendChild($type_id_txt);
				}
			}
			//add category text node
			$catval = $this->doc->createElement('catval');
			$cat->appendChild($catval);
			$catnm_node = $this->doc->createTextNode($cat_name);
			$catval->appendChild($catnm_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();
		
	}