zeg1jeux/home.php

97 lines
1.5 KiB
PHP

<?php
require_once('config.php');
require_once('lib/Gchange.class.php');
require_once('lib/Keygen.class.php');
require_once('lib/Fred.class.php');
$bodyIds = 'home';
include_once('header.php');
$gchange = new Gchange();
$keygen = new Keygen();
// $ipfsHost = 'http://astroport.localhost:8080';
$ipfsHost = 'http://libra.copylaradio.com:8080';
try {
$player = $gchange->getUser($_SESSION['player_pubkey']);
} catch (Exception $errMsg) {
ErrorsHandler::kaput($errMsg);
}
try {
$twLink = $ipfsHost . '/ipns/' . $keygen->getIPNSPub($_SESSION['salt'], $_SESSION['pepper']);
} catch (Exception $errMsg) {
$twLink = '#';
$fred = new Fred();
$twLink = $ipfsHost . '/ipns/' . $fred->donneMoiLaPutainDeClefIPNS($_SESSION['salt'], $_SESSION['pepper']);
}
echo '
<header>
Bienvenue '. $player->getUserName() . ' !
<!-- ('. substr($player->getUserGchangeId(), 0, 8) . ') -->
</header>
<nav>
<ul>
<li id="dashboard-map">
<a href="map.php">
<span>
Carte
</span>
</a>
</li>
<li id="dashboard-messenger">
<a href="messenger.php">
<span>
Messagerie
</span>
</a>
</li>
<li id="dashboard-farfetched">
<a href="farfetched.php">
<span>
À distance ou en livraison
</span>
</a>
</li>
<li id="dashboard-minelife">
<a href="minelife/index.html">
<span>
Manuel
</span>
</a>
</li>
<li id="dashboard-tiddlywiki">
<a href="'. $twLink .'">
<span>
'. ('Mon TiddlyWiki') .'
</span>
</a>
</li>
</ul>
</nav>
';
include_once('footer.php');