is_logged_in()) { header('Location: login.php'); } //Il n'y a que l'admin qui accède à cette page if(isset($_SESSION['userid'])) { if($_SESSION['userid'] != 1) { header('Location: '.SITEURL); } } $pagetitle = 'Page de logs du site'; include_once('../includes/header.php'); ?>
query('SELECT * FROM blog_logs'); $pages->set_total($query->rowCount()); //On cherche tous les logs $query = $db->query('SELECT * FROM blog_logs ORDER BY log_id DESC '.$pages->get_limit()); while($logs = $query->fetch()) { echo ''; echo ''; echo ''; echo ''; echo ''; sscanf($logs['log_date'], "%4s-%2s-%2s %2s:%2s:%2s", $annee, $mois, $jour, $heure, $minute, $seconde); echo ''; echo ''; } //while echo '
Id Remote adresse Resquest uri Message Date log
'.$logs['log_id'].''.$logs['remote_addr'].''.$logs['request_uri'].''.$logs['message'].''.$jour.'-'.$mois.'-'.$annee.'
à '.$heure.':'.$minute.':'.$seconde.'

'; echo $pages->page_links(); } catch(PDOException $e) { echo $e->getMessage(); } ?>