$connect_fracc = new TConeccion();
$query_fracc = "SELECT * FROM pan_transparencia_03_fracciones WHERE id = ".$_GET['id'];
$connect_fracc->Gestion($query_fracc);
$fracc = mysqli_fetch_array($connect_fracc->Query,MYSQLI_ASSOC);
?>
$connect_art = new TConeccion();
$query_art = "SELECT * FROM pan_transparencia_02_articulos WHERE id = ".$fracc['art_id'];
$connect_art->Gestion($query_art);
$art = mysqli_fetch_array($connect_art->Query,MYSQLI_ASSOC);
?>
$connect_law = new TConeccion();
$query_law = "SELECT * FROM pan_transparencia_01_leyes WHERE id = ".$art['ley_id'];
$connect_law->Gestion($query_law);
$law = mysqli_fetch_array($connect_law->Query,MYSQLI_ASSOC);
?>
echo utf8_encode($fracc['nombre']); ?>
echo nl2br(utf8_encode($fracc['descripcion'])); ?>
if ($fracc['periodicidad'] != 'no aplica') { ?>
if (date('m-d') >= "04-15" ) { $actual = date('Y'); } else { $actual = date('Y')-1; } ?>
for ($year = $actual; $year >= 2017; $year--) { ?>
if ($year == 2017) { echo "
2015 - 2017
"; } else { echo "
".$year."
"; } ?>
$connect_informe = new TConeccion();
$query_informe = "SELECT * FROM pan_transparencia_04_informes WHERE fracc_id = ".$_GET['id']." AND fecha_update <= '".$year."-12-31 23:59:00' AND fecha_update >= '".$year."-01-01 00:00:00' ORDER BY trimestre DESC, inciso ASC";
$connect_informe->Gestion($query_informe);
while($informe = mysqli_fetch_array($connect_informe->Query,MYSQLI_ASSOC)){
?>
$year = substr($informe['trimestre'],0,4); ?>
$desc = substr($informe['trimestre'],5,1);
if ($desc == '4') { echo "".$desc."to."; }
if ($desc == '2') { echo "".$desc."do."; }
if ($desc == '1') { echo "".$desc."er."; }
if ($desc == '3') { echo "".$desc."er."; }
if ($desc == '') { echo ""; }
if ($fracc['periodicidad'] == 'mensual') { echo " trimestre"; }
if ($fracc['periodicidad'] == 'trimestral') { echo " trimestre"; }
if ($fracc['periodicidad'] == 'semestral') { echo " semestre"; }
if ($fracc['periodicidad'] == 'anual') { echo "".substr($informe['trimestre'],0,4).""; }
?>
if ($informe['inciso'] != '') { echo " - Inciso ".$informe['inciso'].")"; } ?>
echo $informe['archivo']; ?>
echo "Formato: ".$informe['formato']; ?>
if ($informe['file_size'] < 1000000) { $peso = $informe['file_size']/1000; echo "Tamaño: ".number_format($peso,1)." kB"; } else { $peso = $informe['file_size']/1000000; echo "Tamaño: ".number_format($peso,1)." MB"; } ?>
} ?>
} ?>
} ?>