18 lines
609 B
PHP
18 lines
609 B
PHP
|
<?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);
|