/
home2
/
reumatologia
/
public_html
/
admin
/
Upload File
HOME
<?php error_reporting(E_ERROR | E_PARSE); require_once('../library/class.secciones.php'); /* obtenemos datos enviados */ $filter = array(); $filter['Nombre'] = trim($_REQUEST['Nombre']); $filter['IdCategoria'] = isset($_REQUEST['IdCategoria']) ? intval($_REQUEST['IdCategoria']) : ''; $Page = intval($_REQUEST['pageIndex']); $PageSize = isset($_REQUEST['pageSize']) ? intval($_REQUEST['pageSize']) : 200; /* declaramos e instanciamos variables necesarias */ $arrData = array(); $oSecciones = new Secciones(); $oPage = new Page($Page, $PageSize); $arrData = $oSecciones->GetAll($filter, $oPage); $count = $oSecciones->GetCountRows($filter); if ($arrData) { foreach ($arrData as $oSeccion) { $oSeccion->Nombre = utf8_encode($oSeccion->Nombre); } } $arrResult = array("data" => $arrData, "itemsCount" => $count); header('Content-type: application/json'); echo json_encode($arrResult); ?>