<?php $data = App\Table\Article::getLastWithCategories(); foreach ($data as $one) { ?> <h2> <a href="<?php echo $one->url; ?> "><?php echo $one->titre; ?> </a> </h2> <p><em><?php echo $one->categorie; ?> </em></p> <?php echo $one->extrait; ?> <?php } ?> <h1>Liste des categories de l'appli</h1> <?php $allCategories = App\Table\Categorie::all();
<body> <!-- Navigation --> <?php require_once "../template/header.php"; ?> <!-- Main Content --> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <?php $article = new App\Table\Article(); if (isset($_GET['year']) && $_GET['year'] > 2000) { $year = $app::destroyHTML($_GET['year']); $query = $article::getArticlesWritedIn($year); foreach ($query as $article) { ?> <div class="post-preview post-preview2" onclick="location.href='<?php echo $article->getURL(); ?> ';"> <a href="<?php echo $article->getURL(); ?> "> <h2 class="post-title" style="font-size:25px;"> <?php
<?php if (isset($_GET['id'])) { $id = $app::DestroyHTML($_GET['id']); $article = new App\Table\Article($id); } else { $app::redirect("index.php"); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title><?php echo $config->get("blog_title"); ?> - <?php echo $article->title; ?> </title> <!-- Bootstrap Core CSS --> <link href="css/bootstrap.min.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="css/flag-icon.min.css">