61 lines
1.2 KiB
PHP
61 lines
1.2 KiB
PHP
<?php
|
|
|
|
$pauline = hash('sha256', 'srifi');
|
|
|
|
$curl = curl_init();
|
|
curl_setopt_array($curl, array(
|
|
CURLOPT_RETURNTRANSFER => 1,
|
|
CURLOPT_URL => "http://recettesiam9.cstb.fr/api-cours/get-journal-user.php?user=$pauline"
|
|
));
|
|
$resultsJson = curl_exec($curl);
|
|
|
|
curl_close($curl);
|
|
|
|
$results = json_decode($resultsJson);
|
|
|
|
?>
|
|
|
|
<html>
|
|
<style>
|
|
.demo {
|
|
width:100%;
|
|
border:1px solide #C0C0C0;
|
|
border-collapse:effondrer;
|
|
padding:5px;
|
|
}
|
|
.demo th {
|
|
border:1px solide #C0C0C0;
|
|
padding:5px;
|
|
background:#F0F0F0;
|
|
}
|
|
.demo td {
|
|
border:1px solide #C0C0C0;
|
|
padding:5px;
|
|
}
|
|
</style>
|
|
|
|
<?php
|
|
|
|
foreach($results->journal as $r){
|
|
|
|
echo '<table class="demo">';
|
|
echo '<thead>';
|
|
echo '<tr>';
|
|
echo '<th>File_id</th>';
|
|
echo '<th>Date</th>';
|
|
echo '<th>Action</th>';
|
|
echo '</tr>';
|
|
echo '</thead>';
|
|
echo '<tbody>';
|
|
echo '<tr>';
|
|
echo '<td>' .$r->file_id .'</td>';
|
|
echo '<td>' .date('d/m/Y h:i:s', $r->time) .'</td>';
|
|
echo '<td>' .$r->action .'</td>';
|
|
echo '</tr>';
|
|
echo '</tbody>';
|
|
echo '</table>';
|
|
}
|
|
|
|
?>
|
|
|
|
</html>
|