Location: PHPKode > projects > Serveur Multicartes IPX800 > multicardipx800/run.php
<?php
require_once ('LoadConfig.php');
session_name((string)$GLOBALS["config"]->general->namesession);
session_start();
require_once('class/'.$_REQUEST["class"].'.php');
require_once('fctphp/function.php');
require_once("connect_mysql.php");
trace("http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],"xml");
$start_time = microtime(true);
echo '<?xml version="1.0" encoding="UTF-8" ?>';
echo '<root>';
echo "<debug>".$GLOBALS["config"]->general->debug."</debug>";
echo "<debit>".$_SESSION['debit']."</debit>";
echo '<jour>'.date("d/m/Y").'</jour>';
echo '<time>'.date("G:i:s").'</time>';
if ( isset($GLOBALS["config"]->{$_REQUEST["class"]."s"}) )
{
        foreach($GLOBALS["config"]->{$_REQUEST["class"]."s"}->{$_REQUEST["class"]} as $info)
        {
                if ( (string)$info->attributes()->numero == $_REQUEST["numero"] )
				{
					$current = new $_REQUEST["class"]($_REQUEST["numero"], $info);
					if ( GetAuth($_SESSION["AuthId"], $_REQUEST["class"], $current->numero) )
					{
							echo "<message>";
							eval($current->code);
							echo "</message>";
					}
					else
					{
							echo "<erreur>Vous ne disposez pas des droits sur la class ".$_REQUEST["class"]." numero ".$_REQUEST["numero"].".</erreur>";
					}
				}
        }
}
else
{
        echo "<erreur>Impossible de trouver la class ".$_REQUEST["class"].".</erreur>";
}
$current_time = microtime(true);
echo "<debugtime>".ceil(($current_time - $start_time)*1000)." ms</debugtime>";
echo "</root>";
?>
Return current item: Serveur Multicartes IPX800