vytvoření .htaccess + úklid
This commit is contained in:
parent
5721707bda
commit
de25923e3e
1
www2databaze/assets/.htaccess
Normal file
1
www2databaze/assets/.htaccess
Normal file
@ -0,0 +1 @@
|
||||
Require all denied
|
3
www2databaze/assets/header.php
Normal file
3
www2databaze/assets/header.php
Normal file
@ -0,0 +1,3 @@
|
||||
<header>
|
||||
<h1>Hlavička</h1>
|
||||
</header>
|
@ -11,18 +11,19 @@
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Škola čar a kouzel v Bradavicích</h1>
|
||||
</header>
|
||||
|
||||
<?php require "assets/header.php" ?>
|
||||
|
||||
<main>
|
||||
<section class="main-heading">
|
||||
<h1>Škola čar a kouzel v Bradavicích</h1>
|
||||
</section>
|
||||
<section>
|
||||
<a href="zaci.php">Seznam všech žáků</a>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
|
||||
<footer></footer>
|
||||
<?php require "assets/footer.php" ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
global $connection;
|
||||
require "database.php";
|
||||
require "assets/database.php";
|
||||
|
||||
if (isset($_GET["id"]) and is_numeric($_GET["id"])) {
|
||||
$sql = "SELECT * FROM student WHERE id = ". $_GET["id"];
|
||||
@ -25,11 +25,12 @@ if (isset($_GET["id"]) and is_numeric($_GET["id"])) {
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Informace o žákovi</h1>
|
||||
</header>
|
||||
<?php require "assets/header.php" ?>
|
||||
|
||||
|
||||
|
||||
<main>
|
||||
<section class="main-heading"><h1>Informace o žákovi</h1></section>
|
||||
<section>
|
||||
<?php if ($students === null): ?>
|
||||
<p>Žák nenalezen</p>
|
||||
@ -42,8 +43,6 @@ if (isset($_GET["id"]) and is_numeric($_GET["id"])) {
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
|
||||
</footer>
|
||||
<?php require "assets/footer.php" ?>
|
||||
</body>
|
||||
</html>
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
global $connection;
|
||||
require "database.php";
|
||||
require "assets/database.php";
|
||||
|
||||
$sql = "SELECT * FROM student";
|
||||
|
||||
@ -27,12 +27,15 @@ if ($result === false) {
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Seznam žáků školy</h1>
|
||||
<?php require "assets/header.php" ?>
|
||||
|
||||
<main>
|
||||
<section class="main-heading"><h1>Seznam žáků školy</h1></section>
|
||||
<section class="students-list">
|
||||
<?php
|
||||
if(empty($students)):
|
||||
?>
|
||||
<p>Žádní žáci nebyli nalezeni</p>
|
||||
|
||||
<?php else: ?>
|
||||
<ul>
|
||||
<?php foreach ($students as $one_student): ?>
|
||||
@ -43,5 +46,9 @@ if ($result === false) {
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<a href="index.php">Zpět na hlavní stranu</a>
|
||||
</section>
|
||||
</main>
|
||||
<?php require "assets/footer.php" ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user