<?php 
	require_once("../include/PlantillaMod.php");
	$obj_mod=new PlantillaMod();
	$val=$obj_mod->listarPlantilla();
?>
<style>
	.fila_0{background-color:#F0F0F9;}
	.fila_1{background-color:#FFFFFF;}
	.mel{ color:#3E4095;text-align: justify;margin-top: 10px; margin-bottom:6px; margin-left: 10px; float: left}
	.cla{ color:#489755;text-align: justify;margin-top: 10px; margin-bottom:6px; margin-left: 10px; float: left}
</style>
<table>
	<tbody>
		<?php if($val!=0){for($i=0;$i<count($val);$i++){ ?>
		<tr class="fila_<?php echo($i%2); ?>">
			<td style="width:22px">
				<?php
					if($val[$i]->getPrograma()=='mlp'){
						echo('<span class="mel"><span class="icon-text-document"></span><span>'); 
					}else{
						echo('<span class="cla"><span class="icon-text-document"></span><span>'); 
					}
				?>
			</td>
			<td style="width:81px">
				<?php
					if($val[$i]->getPrograma()=='mlp'){
						echo('<span class="mel">Melissa<span>'); 
					}else{
						echo('<span class="cla">Clarissa<span>'); 
					}
				?>
			</td>
			<td style="width:290px;text-align: justify; margin-top: 5px; margin-bottom:6px; float: left"><?php echo($val[$i]->getDescripcion()); ?></td>
			<td style="width:180px;"><?php echo($val[$i]->getAutor()); ?></td>
			<td style="width:60px">
				<span style="cursor: pointer" class="hint--top hint--small" data-hint="<?php echo($val[$i]->getNom_entidad()); ?>"><?php echo($val[$i]->getCod_entidad()); ?>
				</span>
			</td>
			<td style="width:22px">
				<a href="file/plantillas/<?php echo($val[$i]->getEnlace()); ?>" download="<?php echo($val[$i]->getEnlace()); ?>">
					<span class="icon-arrow-down"></span>
				</a>
			</td>
		</tr>
		<?php }}else{?>
		<tr>
			<td colspan="6">Sin Plantillas</td>
		</tr>
		<?php } ?>
	</tbody>
</table>