示例#1
0
<?php

include 'PxpRestClient.php';
$pxpRestClient = PxpRestClient::connect('127.0.0.1', 'kerp/pxp/lib/rest/')->setCredentialsPxp('jrivera', 'Mund0libre.');
echo $pxpRestClient->doPost('tesoreria/CuentaDocumentadaEndesis/enviarfondoAvanceCorreo', array("id_cuenta_documentada" => '1711'));
echo "llega";
exit;
示例#2
0
$aPostData = $objPostData->getData();
$_SESSION["_PETICION"] = serialize($aPostData);
$objParam = new CTParametro($aPostData['p'], null, $aPostFiles);
////////////////
$objParam->defecto('ordenacion', 'id_documento_wf');
$objParam->defecto('dir_ordenacion', 'asc');
$objFunc = new MODDocumentoWf($objParam);
$res = $objFunc->listaDocumentosFirma();
if ($res->getTipo() == 'ERROR') {
    echo 'Se ha producido un error-> Mensaje Técnico:' . $res->getMensajeTec();
    exit;
}
foreach ($res->datos as $d) {
    if ($d['accion_pendiente'] == 'firmar') {
        //Generamos el documento con REST
        $pxpRestClient = PxpRestClient::connect('127.0.0.1', substr($_SESSION["_FOLDER"], 1) . 'pxp/lib/rest/')->setCredentialsPxp($_GET['user'], $_GET['pw']);
        $url_final = str_replace('sis_', '', $d['action']);
        $url_final = str_replace('/control', '', $url_final);
        $res = $pxpRestClient->doPost($url_final, array("id_proceso_wf" => $d['id_proceso_wf'], "firmar" => 'si', "fecha_firma" => $d["fecha_firma"], "usuario_firma" => $d["usuario_firma"], "nombre_usuario_firma" => $d["nombre_usuario_firma"]));
        $res_json = json_decode($res);
        $objParam->addParametro('archivo_generado', $res_json->ROOT->detalle->archivo_generado);
        $objParam->addParametro('hash_firma', $res_json->ROOT->datos->hash);
        $objParam->addParametro('datos_firma', json_encode($res_json->ROOT->datos->datos_documento));
        $objParam->addParametro('id_documento_wf', $d['id_documento_wf']);
        //Si la generacion del documento fue exitosa, movemos el documento para que sea guardado
        //y actualizamos los datos del documento firmado dentro de un pdo
        $objFunc = new MODDocumentoWf($objParam);
        $res = $objFunc->firmarDocumento();
    } else {
        if ($d['accion_pendiente'] == 'eliminar_firma') {
            $objParam->addParametro('url', $d['url']);
示例#3
0
#!/usr/bin/php -q
<?php 
set_time_limit(30);
require_once "phpagi.php";
require_once "PxpRestClient.php";
include_once '/var/www/html/libs/JSON.php';
error_reporting(E_ALL);
$agi = new AGI();
$agi->answer();
//agi(googletts.agi,"Esta es una simple prueba de google",es)
$agi->exec("AGI", "googletts.agi,\"Bienvenido a la aplicación para inactivar roles en el servidor vps de estados unidos .\",es,#,1.28");
$pxpRestClient = PxpRestClient::connect('gema.kplian.com', 'pxp/lib/rest/')->setCredentialsPxp('admin', 'admin');
$jsonString = $pxpRestClient->doGet('seguridad/Rol/listarRol', array('start' => '0', 'limit' => '10'));
$jsonString = str_replace('(', '', $jsonString);
$jsonString = str_replace(')', '', $jsonString);
$json = new Services_JSON();
$array = $json->decode($jsonString);
$id = 1;
foreach ($array->datos as $value) {
    $valor = $value->rol;
    $agi->exec("AGI", "googletts.agi,\" {$id}  Rol  {$valor}.\",es,#,1.28");
    $id++;
}
$agi->exec("AGI", "googletts.agi,\" Ingrese el número de rol a eliminar despues del tono \",es,#,1.28");
$resultado = $agi->get_data('beep', 3000, 20);
$numero = $resultado['result'];
$id_rol = $array->datos[$numero - 1]->id_rol;
$agi->exec("AGI", "googletts.agi,\" El id del rol seleccionado es  {$id_rol}\",es,#,1.28");
$jsonString = $pxpRestClient->doPost('seguridad/Rol/eliminarRol', array('_tipo' => 'matriz', 'row' => "{\"0\":{\"id_rol\":\"{$id_rol}\",\"_fila\":{$numero}}}"));
$agi->exec("AGI", "googletts.agi,\" El rol ha sido inactivado exitosamente \",es,#,1.28");
$agi->hangup();