Un style un peu mieux, un titre à la page, et d'autres trucs

This commit is contained in:
Mysaa
2021-06-05 18:17:31 +02:00
parent f515420c6c
commit 7ac29bb13d
16 changed files with 192 additions and 201 deletions
+15 -20
View File
@@ -1,20 +1,17 @@
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<title>Le site de tous les bernards !</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="css/style.css"/>
</head>
<body>
<?php
include 'includes/head.php';
?>
Mes projets :</br>
<head>
<?php include 'includes/data.php'; ?>
</head>
<body>
<?php include 'includes/head.php'; ?>
<h1>Mes projets</h1>
<?php
try{
$bdd = new PDO('mysql:host=mysql.hostinger.fr;dbname=u808188674_bcom;charset=utf8', 'u808188674_bcom', '*******************');
$bdd = new PDO('mysql:host=mysql.hostinger.fr;dbname=u890869027_bcom;charset=utf8', 'u890869027_bcom', '*******************');
}catch(Exception $e){
die ('Erreur : ' . $e->getMessage());
}
@@ -23,19 +20,17 @@
if(isset($_SESSION['session_id']) && isset($_SESSION['session_mdp'])){
$req->execute(array($_SESSION['session_id'],$_SESSION['session_mdp']));
}
if(isset($_SESSION['session_id']) && isset($_SESSION['session_mdp']) && $req->fetch() ){
$req = $bdd->query('SELECT * FROM projets WHERE ownersID REGEXP \'[^0-9]?' . $_SESSION['session_id'] .'[^0-9]?\'');
while($rep = $req->fetch()){
echo ('<a href="projet.php?id='. $rep['ID'] .'">Le projet ' . $rep['name'] . ' à la version ' . $rep['version'] . '</a></br>');
}
echo ('<a href="projet.php?id='. $rep['ID'] .'">Le projet ' . $rep['name'] . ' en version ' . $rep['version'] . '</a><br/>
');}
}else{
echo 'Erreur : vous n\'etes pas connécté';
header('Location:401.php');
}
?>
<?php
include 'includes/foot.php'
?>
<?php include 'includes/foot.php'; ?>
</body>
</html>