You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
1.3 KiB

<?php
require_once "/var/www/html/pedvenesp/prgdmug/F_DMUG.php";
$v_suc = "";
$v_ped = "";
foreach($_POST as $campo => $valor)
{
if($campo=="suc")
$v_suc=$valor;
if($campo=="ped")
$v_ped=$valor;
}
error_log("---sucursal---: " . $v_suc ."---ped---:" . $v_ped);
$server= "localhost";
$port = 1030;
$hs = "DEMIURGO10-MCANET";
$user = "general";
$pass = "123456789";
error_log("Buscando productos por medio de filtros");
$pid = getmypid();
$limit = 100;
$veces_error_server = 0;
/* Crea un objeto para el manejo postgres */
$ConDMUG = new ConexDMUG( $server , $port , $hs ,$user , $pass );
$ConDMUG->SetProgram( "Detalle_pedesp" );
$ConDMUG->SetParameter( "sucursal" , $v_suc );
$ConDMUG->SetParameter( "pedido" , $v_ped);
if ( $ConDMUG->Execute_DMUG() < 0)
{
error_log("$veces_error_server".$veces_error_server);
$veces_error_server++;
if ( $veces_error_server > 2 )
{
error_log("exit();");
exit();
}
sleep(5);
continue;
}
error_log("XML: " . $ConDMUG->xmlraw);
$RESULTADO = $ConDMUG->GetChild( "STRERROR" );
echo json_encode($ConDMUG->xmlrequest);
$ConDMUG->CloseConex();
exit();
?>