<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="sr-RS">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<?php

/*
 * Demo: demo_info.php
 * 
 * Primer poziva API funkcije 'info' koja vraca osnovne podatke o API okruzenju. 
 *  
 */
 

include_once 'infoapi/infoapi.php';

$miapiHandler = new iapiHandler;
$miapiHandler->APIServerURL = SERVER_URL; // definisano u apitest/config.php

$miapiHandler->DebugLevel = DEBUG_LEVEL;
$miapiHandler->DebugSections = DEBUG_SECTIONS;


// naziv API funkcije koja se poziva
$mAPIFunctionName = 'COMPLEXERROR';

$mQueryEnvelope = new iapiQueryEnvelope ($mAPIFunctionName);
$mQueryEnvelope->username = USERNAME; // definisano u apitest/config.php
$mQueryEnvelope->password = PASSWORD; // definisano u apitest/config.php


$mQuery = $mQueryEnvelope;
$mResponse  = $miapiHandler->Execute($mQuery);

?>
<p>Status poruke: <?php echo $mResponse->error_state; ?> - <?php echo $mResponse->error_message; ?></p>
<p>Status funkcije: <?php echo $mResponse->data->error_state; ?> - <?php echo $mResponse->data->error_message; ?></p>

<hr />

<?php
if (isset ($mResponse->data->error_data)) {
?>
<pre>
mResponse->data->error_data:
<?php print_r ($mResponse->data->error_data); ?>
</pre>

<hr />

<?php
}  //  if (!$m_error) 
?>

<?php include_once 'inc_sysinfo.php'; ?>

</body>
</html>