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