<?php
function fn_append_aa($aql)
{
	$list = $aql->Consume(2);
	
	//Find assets and properties that mix...
	global $db;
	global $assets;
	global $siteroot;
	$apool = array();
	
	foreach($list[0]->value as $v)
	{
		$apool[] = $v;
	}
	
	foreach($list[1]->value as $v)
	{
		if (!in_array($v,$apool))
			$apool[] = $v;
	}
	
	//print_r($list[0]->value);
	//print_r($list[1]->value);
	
	$a = new AQLStackElement();
	$a->typename = "assetlist";
	$a->islist = true;
	$a->value = $apool;
	array_push($aql->stack,$a);
	
	return;
}

function fn_append_pp($aql)
{
	$list = $aql->Consume(2);
	
	//Find assets and properties that mix...
	global $db;
	global $assets;
	global $siteroot;
	$apool = array();
	
	foreach($list[0]->value as $v)
	{
		$apool[] = $v;
	}

	
	foreach($list[1]->value as $v)
	{
		if (!in_array($v,$apool))
			$apool[] = $v;
	}
	
	$a = new AQLStackElement();
	$a->typename = "proplist";
	$a->islist = true;
	$a->value = $apool;
	array_push($aql->stack,$a);
	
	return;
}

function fn_append_tt($aql)
{
	$list = $aql->Consume(2);
	
	//Find assets and properties that mix...
	global $db;
	global $assets;
	global $siteroot;
	$apool = array();
	
	foreach($list[0]->value as $v)
	{
		$apool[] = $v;
	}
	
	foreach($list[1]->value as $v)
	{
		if (!in_array($v,$apool))
			$apool[] = $v;
	}
	
	$a = new AQLStackElement();
	$a->typename = "pointlist";
	$a->islist = true;
	$a->value = $apool;
	array_push($aql->stack,$a);
	
	return;
}

function fn_append_mm($aql)
{
	$list = $aql->Consume(2);
	
	//Find assets and properties that mix...
	global $db;
	global $assets;
	global $siteroot;
	$apool = array();
	
	foreach($list[0]->value as $v)
	{
		$apool[] = $v;
	}
	
	foreach($list[1]->value as $v)
	{
		if (!in_array($v,$apool))
			$apool[] = $v;
	}
	
	$a = new AQLStackElement();
	$a->typename = "map";
	$a->islist = true;
	$a->value = $apool;
	array_push($aql->stack,$a);
	
	return;
}

?>