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

View File

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

View File

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