Location: PHPKode > projects > PhpBlock > A9.8/script/information.php
<?php
include_once $PATH_TO_CODE."/script/connect.php";
include_once $PATH_TO_CODE."/script/fonction.php";
include_once $PATH_TO_CODE."/script/block.class.php";
include_once $PATH_TO_CODE."/script/zone.class.php";

function echoInformation() {
	
	$locPara = getGetPost("ask", false);
	if(!$locPara) {
		exit;
	}
	
    beginPhpSession($locPlayerId);
    closeCurrentSession();

    $locParaArray = explode(Constante::$SEP_URL_1, $locPara);
    $locType = $locParaArray[0];
    $locObjectId = $locParaArray[1];

    global $gloObjectManager;
    if($locType == 'o') {
        $locObject = $gloObjectManager->getRealObject($locObjectId);
	    if($locPlayerId == $locObject->playerId) {
	    	echo $locObject->toString();
	    } else {
	    	echo $locObject->toStringPublicInfo();
	    }
    } else {
    	$locPlayer = $gloObjectManager->getPlayer($locPlayerId);
        $locObject = $gloObjectManager->getZone($locObjectId);
	   	echo $locObject->toStringForAlliance($locPlayer->allianceId);
    }
}
?>
Return current item: PhpBlock