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