correcion bug api

This commit is contained in:
humano 2020-03-31 07:29:14 -05:00
parent aae4b6c4df
commit 4298759904
3 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,5 @@
<?php
session_start();
//session_start();
ini_set('display_errors', 'On');
require ('xajax/xajax.inc.php');
@ -44,6 +44,8 @@ if(isset($_REQUEST['formato'])){
}else{
header('Content-Type: application/json');
//echo "hola /// $_REQUEST[id] // " ;
//echo " <pre>".print_r($datos)."</pre>";
echo json($datos);
}
?>

View File

@ -1,6 +1,10 @@
<?php
function Conectarse(){
@session_start();
if(!isset($_SESSION))
{
session_start();
}
if ( !isset ( $link ) ) {
@include("includes/datos.php");

View File

@ -12600,7 +12600,7 @@ function json($datos){
$limite="";
$w_rango="";
// $limite="limit 10";
$features="";
$features=array();
// if($datos['registros'] ==""){ $limite="";}else{$limite = " limit $datos[registros]";}
if(isset($datos['start']) AND isset($datos['end'])) {
@ -12699,7 +12699,7 @@ $limite= " limit $inicio,$datos[registros]";
$nuevos_datos["identificador"]="$row[control]";
$nuevos_datos["tipo"]="array";
// $features[$row['control']][] = datos_array($row["control"],"$datos[id]","") ;
$features[] = datos_array($row["control"],"$datos[id]","") ;
$features[] = datos_array($row["control"],$datos['id'],"") ;
//$features['consulta'] = $consulta;
}