<?
////////////////////////////////////////////////////
// Conciliación: gestión de conciliación de activos
// Version: 1.0
//
// Copyright (C) 2014  Eustotem Multimedia, S.L.
//
// License: MIT, see LICENSE
////////////////////////////////////////////////////


include("../conf/preferences.php");
include("../conf/preferences.php");
session_name(SYS_APP_SESSNAME);
session_start();
include("../conf/langs/".$langs[$_SESSION['userlang']][0]."/MAIN.php");
include("../conf/connections.php");
include("../phplib/auth.php");
require_once("../phplib/utils.php");
require_once("../phplib/phpmailer/class.phpmailer.php");
require_once("../core/plugins.php");

$resId=$_SESSION['currentRes'];
$master=simplexml_load_file("../conf/resources/".$langs[$_SESSION['userlang']][0]."/".$_SESSION['conf'][$resId]->masterview);
$detail=simplexml_load_file("../conf/forms/".$langs[$_SESSION['userlang']][0]."/".$_SESSION['conf'][$resId]->detailview);

$_SESSION['imgproc_control']=isset($_GET['control'])? $_GET['control'] : "imagen";

$tempnodo=$detail->xpath("//control[@name='".$_SESSION['imgproc_control']."']");
$nodo=$tempnodo[0];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script type="text/javascript" src="../jslib/swfobject2.js"></script>

<script type="text/javascript">
function updateControl(param){
	var temp=param.split("/");
	param=temp.pop();
	window.opener.updateFileControl('<? echo $_SESSION['imgproc_control'] ?>',param,'11');
	window.close();
}
</script>
</head>

<body>
<form name="form1" id="form1" method="post">
<div id="headercontent"></div>
<script type="text/javascript">
<?
$cadena='<config>';
if(isset($nodo->maxfilesize)) $cadena.='<maxfilesize>'.$nodo->maxfilesize.'</maxfilesize>';
if(isset($nodo->sizetransform)) $cadena.='<sizetransform>'.$nodo->sizetransform.'</sizetransform>';
if(isset($nodo->colortransform)) $cadena.='<colortransform>'.$nodo->colortransform.'</colortransform>';
if(isset($nodo->imageresize)) $cadena.='<imageresize>'.$nodo->imageresize.'</imageresize>';
if(isset($nodo->vportresize)) $cadena.='<vportresize>'.$nodo->vportresize.'</vportresize>';
if(isset($nodo->vportwidth)) $cadena.='<vportwidth>'.$nodo->vportwidth.'</vportwidth>';
if(isset($nodo->vportheight)) $cadena.='<vportheight>'.$nodo->vportheight.'</vportheight>';
if(isset($nodo->field)) $cadena.='<field>'.$nodo->field.'</field>';
$cadena.='</config>';
?>
var config='<? echo $cadena ?>';
var flashvars = {config:config};
var params = {};
var attributes = {};
swfobject.embedSWF("imgageprocess.swf", "headercontent", "100%", "100%", "9.0.0","inc/expressInstall.swf", flashvars, params, attributes);
</script>
<noscript>
</noscript>
<input type="hidden" name="fotico" id="fotico" />
</form>
</body>
</html>
