<?php ViewResponse::getInstance()->setMethodAjax();
$o_class = new Cr_cliente_fileFN();
$o_class->setIdCliente( $id );
$o_class->setEliminado( -1 );


$tamanioPag = 10;
if( !isset( $page ) ) $page = 1;
$limitInf = ( $page - 1 ) * $tamanioPag;

$a_ObjectBean = $o_class->select( $limitInf, $tamanioPag );
$i_NumReg     = $o_class->selectNumRows();

$o_navigation = new navigation();
$o_navigation->setPaginaActual( $page );
$o_navigation->setTamanioPagina( $tamanioPag );
$o_navigation->setTotalRegistros( $i_NumReg );

//print_r($a_ObjectBean);
?>


<link href="index.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/carlin/web/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/carlin/web/nivo-slider/themes/light/light.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/carlin/web/nivo-slider/themes/dark/dark.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/carlin/web/nivo-slider/themes/bar/bar.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/carlin/web/nivo-slider/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/carlin/web/nivo-slider/demo/style.css" type="text/css" media="screen" />
</head>
<body>


<div class="slider-wrapper theme-default">
<div id="slider" class="nivoSlider"> 

<?php if( $a_ObjectBean ){ ?>
<?php foreach ( $a_ObjectBean as $i_Key => $o_Cr_cliente_fileBN ){ ?>
	<?php
	$i_IdClienteFile = $o_Cr_cliente_fileBN->getIdClienteFile();
	$i_IdTipoFile = $o_Cr_cliente_fileBN->getIdClienteFile();
	$i_IdTipoFile2 = $o_Cr_cliente_fileBN->getIdTipoFile();
	
	$s_EstadoDes = $o_Cr_cliente_fileBN->getEstado()=="A"?"Activo":"Anulado";
	$s_DirImages = "/images/uploadFiles/";
	$s_NombreFile = $o_Cr_cliente_fileBN->getNombreFile();
	$s_Destino = $s_DirImages.$s_NombreFile
	?>
	<img src="<?php echo $s_Destino;?>" data-thumb="<?php echo $s_Destino;?>" alt="" alt="" title="#htmlcaption_<?php echo $i_IdClienteFile?>"/> 
	
		
<?php } ?>

<?php } ?>
</div>
<?php 
if( $a_ObjectBean ){
	foreach ( $a_ObjectBean as $i_Key => $o_Cr_cliente_fileBN ){ 
		$i_IdClienteFile = $o_Cr_cliente_fileBN->getIdClienteFile();
		$i_IdTipoFile2 = $o_Cr_cliente_fileBN->getIdTipoFile();
		$o_Cr_tipo_fileFN = new Cr_tipo_fileFN();
		$o_Cr_tipo_fileBN = $o_Cr_tipo_fileFN->selectByPK( $i_IdTipoFile2 );
		if( $o_Cr_tipo_fileBN )
		{
			$s_Descripcion = $o_Cr_tipo_fileBN->getDescripcion();
		}
		?>
		<div id="htmlcaption_<?php echo $i_IdClienteFile?>" class="nivo-html-caption"><strong><?php echo $s_Descripcion ?></strong></div>
<?php } 
}?>

</div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> 
<script type="text/javascript" src="/carlin/web/nivo-slider/jquery.nivo.slider.js"></script> 
<script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script> 

