/
home2
/
reumatologia
/
public_html
/
admin
/
Upload File
HOME
<?php require_once('../library/class.registros.php'); /* obtenemos datos enviados */ $filter = array(); $filter['Titulo'] = trim($_REQUEST['Titulo']); $filter['IdCategoria'] = strval($_REQUEST['IdCategoria']); $filter['FechaDesde'] = strval($_REQUEST['Fecha']); $filter['Disponible'] = strval($_REQUEST['Disponible']); $Page = intval($_REQUEST['pageIndex']); $PageSize = intval($_REQUEST['pageSize']); $sortField = strval($_REQUEST['sortField']); $sortOrder = strval($_REQUEST['sortOrder']); if ($filter['FechaDesde'] == 1) { $filter['FechaDesde'] = date('d-m-Y'); } if (!$sortField) { $sortField = 'r.Fecha'; $sortOrder = 'DESC'; } /* declaramos e instanciamos variables necesarias */ $arrData = array(); $oRegistros = new Registros(); $oPage = new Page($Page, $PageSize); $arrData = $oRegistros->GetAll($filter, $oPage); $count = $oRegistros->GetCountRows($filter); $arrResult = array("data" => $arrData, "itemsCount" => $count); header('Content-type: application/json'); echo json_encode($arrResult); ?>