wefra-odoo11/custom/scripts/ajax/current_real_gain.php

18 lines
609 B
PHP
Raw Normal View History

2019-10-02 21:28:58 +00:00
<?php
session_start();
require('../../../modules/InterfacePostgreSQL.php');
require('../../../modules/InterfaceConfig.php');
require('../../../modules/ClassConfig.php');
require('../../modules/ClassXMLRPC.php');
$url = $_SESSION['erp']['url'];
$db_name = $_SESSION['erp']['db'];
//$username = $_SESSION['user']['email'];
//$password = $_SESSION['user']['password'];
$xmlrpc = new ClassXMLRPC($url, $db_name, "admin", "admin");
$user_id = $_SESSION['user']['ext_id'];
$current_real_gain = $xmlrpc->execute("globsi.stats", "get_current_currency_gauge", [$user_id], []);
echo json_encode($current_real_gain);