コード例 #1
0
function read_billet($offset, $limit)
{
    $bdd = connexionDB();
    $offset = (int) $offset;
    $limit = (int) $limit;
    $req = $bdd->prepare('SELECT id, titre, contenu, DATE_FORMAT(date_creation, \'%d/%m/%Y à %Hh%imin%ss\') AS date_creation_fr FROM billets ORDER BY date_creation DESC LIMIT :offset, :limit');
    $req->execute(array('offset' => $offset, 'limit' => $limit));
    $billets = $req->fetchAll();
    $req->closeCursor();
    unset($bdd);
    return $billets;
}
コード例 #2
0
ファイル: lists.php プロジェクト: alvin97231/Projet_Web
<?php

$AppelInclude = './include/';
require $AppelInclude . "debut.inc.html";
require $AppelInclude . "fonction.inc";
$bdd = connexionDB();
affectTypeUtilisateur($bdd);
verifConnecte();
?>

  <div id="header">
  	<div class="header_content">

  	<div class="logo"><a href="index.php">F4U</a> <span>| application de gestion des fournitures</span></div>

    <?php 
require $AppelInclude . "menu.inc.php";
?>

    </div>
  </div><!-- End of Header-->

<div id="wrap">


  <div class="main_content">

    <div id="list">
      <?php 
if ($_SESSION['type'] == 1) {
    echo '<div id="dropper" ondrop="drop(event)" ondragover="allowDrop(event)" class="dropper1">';