<?php
include('../../../php/sessionStart.php');
include('../../../php/db/dbExec.php');
include('../../../php/functions.php');

echo buscar();

function buscar() {
    $empCod=$_SESSION['empCod'];
    $numCodsus=$_SESSION['numCodsus'];

	# QUERYS
	$sSuspen = "SELECT *, TRIM(sus_obs) AS sus_obs
				FROM suspen WHERE sus_emp='$empCod' AND sus_cod = '$numCodsus' ORDER BY sus_del,sus_al";
	# EJECUCION DE QUERYS
	$db = new dbExec();
	$resp["suspen"] = $db->sFetchAll($sSuspen);
	$db->close();

	$func = new functions();
	return $func->jsonEncodeArray($resp, "suspen");
}
?>