/
home2
/
reumatologia
/
public_html
/
admin
/
Upload File
HOME
<?php error_reporting(E_ERROR | E_PARSE); require_once('../library/class.educaciones.php'); /* obtenemos datos enviados */ $filter = array(); $filter['Titulo'] = trim($_REQUEST['Titulo']); $filter['FechaDesde'] = strval($_REQUEST['Fecha']); $filter['Disponible'] = strval($_REQUEST['Disponible']); $filter['Unisar'] = ($_REQUEST['Unisar']); $filter['IGG4'] = ($_REQUEST['IGG4']); $orderCol = isset($_REQUEST['sortField'])? strval($_REQUEST['sortField']) : 'Fecha'; $orderDir = isset($_REQUEST['sortOrder'])? strval($_REQUEST['sortOrder']) : 'desc'; $Page = intval($_REQUEST['pageIndex']); $PageSize = intval($_REQUEST['pageSize']); if ($filter['FechaDesde'] == 1) { $filter['FechaDesde'] = date('d-m-Y'); } /* declaramos e instanciamos variables necesarias */ $arrData = array(); $oEducaciones = new Educaciones(); $oPage = new Page($Page, $PageSize); $arrData = $oEducaciones->GetAll($filter, $oPage, $orderCol, $orderDir); $count = $oEducaciones->GetCountRows($filter); $arrResult = array("data" => $arrData, "itemsCount" => $count); header('Content-type: application/json'); echo json_encode($arrResult); ?>