Skip to content

Commit

Permalink
Change logo
Browse files Browse the repository at this point in the history
Suite à la demande du product owner, le logo a été changé
  • Loading branch information
zeqamir committed Mar 12, 2024
1 parent 86b5292 commit 76c8ee7
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 3 deletions.
2 changes: 1 addition & 1 deletion unesco-web/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
?></a></li>
</ul>
</div>
<a href=""><img id="logo" src="ressource/images/logoUNESCO.png" alt="" /></a>
<a href=""><img id="logo" src="ressource/images/logo_V5.png" alt="" /></a>
</nav>

<!-- Barre de recherche de lieux -->
Expand Down
Binary file added unesco-web/ressource/images/logo_V5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion unesco-web/src/html/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
?></a></li>
</ul>
</div>
<a href="../../index.php"><img id="logo" src="../../ressource/images/logoUNESCO.png" alt="" /></a>
<a href="../../index.php"><img id="logo" src="../../ressource/images/logo_V5.png" alt="" /></a>
</nav>


Expand Down
2 changes: 1 addition & 1 deletion unesco-web/src/html/lieuVisite.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
?></a></li>
</ul>
</div>
<a href="../../index.php"><img id="logo" src="../../ressource/images/logoUNESCO.png" alt="" /></a>
<a href="../../index.php"><img id="logo" src="../../ressource/images/logo_V5.png" alt="" /></a>

</nav>

Expand Down
72 changes: 72 additions & 0 deletions unesco-web/src/php/database.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?php

class Database {
private $connector;
private $connection;

public function __construct(){
try {
$conn = new PDO("mysql:host=localhost;dbname=db_unesco", $_GET["mail"], $_GET["password"]);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "Connected successfully";
} catch(PDOException $e) {
dir ("Connection failed: " . $e->getMessage());
}
}

private function querySimpleExecute($query){
$req = $this->connector->query($query);
return $req;
}

public function getOneUnescoSite($site_id) {
$query = "SELECT * FROM t_site_unesco WHERE id_site_unesco=" . $site_id . ";";
$req = $this->querySimpleExecute($query);
$datas = $req->fetchALL(PDO::FETCH_ASSOC);
return $datas;
}

public function getAllUnescoSite() {
$query = "SELECT * FROM t_site_unesco";
$req = $this->querySimpleExecute($query);
$datas = $req->fetchALL(PDO::FETCH_ASSOC);
return $datas;
}

public function getAllUser() {
$query = "SELECT * FROM t_user";
$req = $this->querySimpleExecute($query);
$datas = $req->fetchALL(PDO::FETCH_ASSOC);
return $datas;
}

public function getOneUser($user_name) {
$query = "SELECT * FROM t_user WHERE t_user.name=" . $user_name . ";";
$req = $this->querySimpleExecute($query);
$datas = $req->fetchALL(PDO::FETCH_ASSOC);
return $datas;
}

public function getUserHistory($user_id) {
$query = "SELECT * FROM t_history WHERE fk_user=" . $user_id . ";";
$req = $this->querySimpleExecute($query);
$datas = $req->fetchALL(PDO::FETCH_ASSOC);
return $datas;
}

public function insertUser($username, $password) {
$query = "INSERT INTO t_user(username, password) VALUES (" . $username . ", " . $password . ");";
$req = $this->querySimpleExecute($query);
$datas = $req->fetchALL(PDO::FETCH_ASSOC);
return $datas;
}

public function deleteUser($user_id) {
$query = "DELETE FROM t_user WHERE user_id=" . $user_id . ";";
$req = $this->querySimpleExecute($query);
$datas = $req->fetchALL(PDO::FETCH_ASSOC);
}
}
// header("Location: ../../index.php");
?>

0 comments on commit 76c8ee7

Please sign in to comment.