1
0
forked from qwerty/milfs

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

14
api.php
View File

@ -1,5 +1,5 @@
<?php
session_start();
//session_start();
ini_set('display_errors', 'On');
require ('xajax/xajax.inc.php');
@ -21,11 +21,11 @@ require ("funciones/conex.php");
if($datos['proyecto']==""){
$proyecto= remplacetas('form_id','id',$datos['id'],'id_empresa',"") ;
$datos['proyecto']= $proyecto[0] ;
}
@$datos['formato']=$_REQUEST['formato'];
if(isset($_REQUEST['debug'])) {ini_set('display_errors', 'On');
}
}
if(isset($_REQUEST['formato'])){
// if($_REQUEST['formato']=='li'){
@ -33,17 +33,19 @@ if(isset($_REQUEST['formato'])){
//print_r($array);//echo "hola li";
$json= json($datos);
$array = json_decode($json);
echo array_linea($array,$_REQUEST['formato'],$_REQUEST['id'])." ";
//echo "".build_list($array,$_REQUEST['formato'],$_REQUEST['id']);
//echo $json;
//echo planilla($datos['id'],$datos['registros'],"dinamico");
// }
}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;
}