<?php
//define this module's name and path
$mn = basename(__FILE__ , ".php");
include("modules/modules.php");

/*
Available variables:
All system classes
All request variables
$p (the template path)
$mp (the module path)
$sufixID (id sufix for this module's divs)
*/

$position = $moduleParameters["position"];
$wmode = (empty($moduleParameters['wmode'])) ? false : true;
$_flashVars = explode("END_OF_LINE", $moduleParameters["flashVars"]);
$_attributes = explode("END_OF_LINE", $moduleParameters["attributes"]);
$flashVars = array();
$attributes = array();
foreach($_flashVars as $var){
	list($key, $value) = explode("VALUE_EQUAL_SIGN", $var);
	$flashVars[$key]  = $value;
}
if($wmode) $attributes['wmode'] = "transparent";
foreach($_attributes as $var){
	list($key, $value) = explode("VALUE_EQUAL_SIGN", $var);
	if($key != "wmode") $attributes[$key]  = $value; // wmode must be defined by checkbox
}
$flashVars = array_filter($flashVars);
$attributes = array_filter($attributes);
$sectionID = $system->getTableSectionID($section);
if($sectionID) { // only if a valid section

	global $langID;
	$id = (int)$_REQUEST['id']; // id of current record
	
	$flashFiles = $content->getFlashFiles($section, $id, $position);
	foreach($flashFiles as $ff){
		$content->displayFlash($ff->bankID, $attributes, $flashVars);
	}

}
?>


