g1chapeau/index.php

43 lines
767 B
PHP

<?php
require_once('config.php');
require_once('lib/DAO.class.php');
$isHome = true;
include('header.php');
$dao = DAO::getInstance();
echo '<h2>Liste des créateurs</h2>';
echo '<ul class="creatorsList">';
foreach ($bdd as $pubkey) {
$json = $dao->fetchJson('/user/profile/' . $pubkey, 'cesiumplus');
$data = json_decode($json);
echo '
<li>
<a href="creator.php?pubkey='. $pubkey. '">
<span class="name">
' . $data->_source->title . '
</span>';
if (isset($data->_source->avatar)) {
echo '
<span class="avatar">
<img src="data:'. $data->_source->avatar->_content_type . ';base64, '. $data->_source->avatar->_content . '" />
</span>';
}
echo '
</a>
</li>';
}
echo '</ul>';
include('footer.php');