
commit
030454a4e5
7 changed files with 92 additions and 0 deletions
@ -0,0 +1,2 @@ |
|||
# PHP project template |
|||
|
@ -0,0 +1,3 @@ |
|||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" crossorigin="anonymous"></script> |
|||
</body> |
|||
</html> |
@ -0,0 +1,9 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="cs"> |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|||
<title><?php echo "$title"; ?></title> |
|||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous"> |
|||
</head> |
|||
<body> |
@ -0,0 +1,9 @@ |
|||
|
|||
<ul> |
|||
<li><a href="index.php">Domů</a></li> |
|||
<li><a href="index.php?category=washing">Prací prostředky</a></li> |
|||
<li><a href="index.php?category=cleaning">Čisticí prostředky</a></li> |
|||
<li><a href="index.php?category=body">Tělová kosmetika</a></li> |
|||
<li><a href="index.php?category=teeth">Péče o zuby</a></li> |
|||
<li><a href="index.php?category=hygiene">Hygienické potřeby</a></li> |
|||
</ul> |
@ -0,0 +1,36 @@ |
|||
<?php |
|||
|
|||
$items = [ |
|||
"washing" => [ |
|||
"name" => "Prací prostředky", |
|||
"products" => [ |
|||
["name" => "Persil", "price" => 200], |
|||
["name" => "Ariel", "price" => 250], |
|||
["name" => "Formil", "price" => 150] |
|||
] |
|||
], |
|||
"cleaning" => [ |
|||
"name" => "Čisticí prostředky", |
|||
"products" => [ |
|||
["name" => "Ajax", "price" => 50], |
|||
["name" => "Cif", "price" => 70], |
|||
["name" => "Domestos", "price" => 80] |
|||
] |
|||
], |
|||
|
|||
]; |
|||
|
|||
// echo $items["washing"]["name"]; |
|||
// echo "<br>"; |
|||
// echo $items["washing"]["products"][1]["name"]; |
|||
|
|||
if (isset($_GET["category"])) { |
|||
$category = $_GET["category"]; |
|||
if (isset($items[$category])) { |
|||
|
|||
} else { |
|||
echo "Kategorie nenalezena"; |
|||
} |
|||
} else { |
|||
echo "Vyberte kategorii"; |
|||
} |
@ -0,0 +1,29 @@ |
|||
<?php |
|||
|
|||
$title = "E-shop"; |
|||
|
|||
include "include/header.php"; |
|||
|
|||
?> |
|||
|
|||
<div class="container"> |
|||
<h1>Drogerie</h1> |
|||
<div class="row"> |
|||
<div class="col-md-4"> |
|||
<?php include "include/menu.php"; ?> |
|||
</div> |
|||
<div class="col-md-8"> |
|||
<?php include "include/products.php"; ?> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
|
|||
|
|||
<?php |
|||
|
|||
include "include/footer.php"; |
|||
|
|||
?> |
|||
|
|||
|
@ -0,0 +1,4 @@ |
|||
<?php |
|||
|
|||
phpinfo(); |
|||
|
Loading…
Reference in new issue