74 lines
2.2 KiB
PHP
74 lines
2.2 KiB
PHP
<?php
|
|
|
|
require("../../include/variables.php");
|
|
require("../../include/init.php");
|
|
|
|
if (isset($_SESSION['userID']) == false || empty($_SESSION['userID'])) {
|
|
header("Location: /login?p=cagnottes");
|
|
die('Veuillez vous connecter dans <a href="/login">/login</a>');
|
|
}
|
|
|
|
require("../../include/main-functions.php");
|
|
require("../../include/inputs.php");
|
|
require("../../include/panels.php");
|
|
|
|
$pdo = sqlConnect($sqlDatabaseHost, $sqlDatabaseName, $sqlDatabaseUser, $sqlDatabasePass);
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
|
|
<head>
|
|
<?php fillHead($rootPageURL, "Pay - " . $pageName, $darkTheme, $lightTheme);?>
|
|
<style>
|
|
#sumup-card {
|
|
margin-top: 4em;
|
|
}
|
|
label {
|
|
text-wrap: wrap;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="body">
|
|
|
|
<header>
|
|
<div class="panel-content">
|
|
<?php fillHeader($rootPageURL, $headerTitle, $headerSubtitle, $social);?>
|
|
</div>
|
|
</header>
|
|
|
|
<nav>
|
|
<div class="panel-content">
|
|
<?php fillNav($rootPageURL);?>
|
|
</div>
|
|
</nav>
|
|
|
|
<main>
|
|
<div class="content">
|
|
<?php
|
|
if (isset($_GET['c']) && filter_var($_GET['id'], FILTER_VALIDATE_INT)) {
|
|
$request = $pdo->prepare("SELECT titre, description, objectif, recolte, date_ouverture, date_cloture, product_id WHERE ID = :cagnotte_id");
|
|
$request->bindParam(":cagnotte_id", $_GET['c']);
|
|
$request->execute();
|
|
$result = $request->fetchAll(PDO::FETCH_ASSOC);
|
|
} else {
|
|
$request = $pdo->prepare("SELECT titre, objectif, date_ouverture, date_cloture");
|
|
$request->execute();
|
|
$result = $request->fetchAll(PDO::FETCH_ASSOC);
|
|
|
|
foreach ($result as $row) {
|
|
echo ('');
|
|
}
|
|
}
|
|
?>
|
|
</div>
|
|
</main>
|
|
<footer>
|
|
<div class="panel-content">
|
|
<?php fillFooter($footerText);?>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|