-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdodaj-ksiazke.php
96 lines (87 loc) · 3.75 KB
/
dodaj-ksiazke.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
session_start();
if(!isset($_SESSION['zalogowany']))
{
header('Location: index.php');
exit();
}
require_once "connect.php";
$polaczenie = @new mysqli($host, $db_user, $db_password, $db_name);
if($polaczenie->connect_errno!=0)
{
echo "Error:".$polaczenie->connect_errno;
}
?>
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel = "stylesheet" href="css/bootstrap.min.css" type="text/css"/>
<link rel = "stylesheet" href="strona-glowna.css" type="text/css"/>
<title>Wirtualna Biblioteka</title>
<meta name="description" content="Strona o książkach">
<meta name="keywords" content="książki">
<meta name="author" content="Karolina Rojowska">
<meta http-equiv="X-Ua-Compatible" content="IE=edge">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&subset=latin-ext" rel="stylesheet">
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
</head>
<body>
<header>
<nav class="navbar navbar-dark bg-jumpers navbar-expand-md mb-4">
<a class="navbar-brand" href="#"><img src="img/clipart3.png" width="30" height="30" alt="" class="d-inline-block mr-1 align-bottom"> wb.pl</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainmenu" aria-controls="mainmenu" aria-expended="false" aria-label="przelacznik nawigacji">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="mainmenu">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="main.php"> Strona główna </a>
</li>
<li class="nav-item">
<a class="nav-link" href="opinie.php"> Moje konto </a>
</li>
<li class="nav-item">
<a class="nav-link" href="godziny-otwarcia.php"> Godziny otwarcia </a>
</li>
<li class="nav-item">
<a class="nav-link" href="o-bibliotece.php"> O bibliotece </a>
</li>
<li class="nav-item">
<a class="nav-link" href="zasoby.php"> Zasoby </a>
</li>
<li class="nav-item">
<a class="nav-link" href="kontakt.php"> Kontakt </a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php"> Wyloguj się </a>
</li>
</ul>
</div>
</nav>
</header>
<main>
<h1 class="text-center" style="color:white">Dodaj <span style="color: #2CBFA4;">nową książkę</span></h1>
<br/>
<form class="text-center" action="dodawanie.php" method="post">
Tytuł: <br/> <input type="text" name="tytul"/> <br/><br/>
Autor: <br/> <input type="text" name="autor"/> <br/><br/>
Data wydania: <br/> <input type="text" name="datawydania"/> <br/><br/>
Ilość sztuk: <br/> <input type="text" name="iloscsztuk"/> <br/><br/>
<input class="przycisk" type="submit" value="Dodaj"/>
</form>
<?php
if(isset($_SESSION['blad']))
{
echo $_SESSION['blad'];
}
?>
</main>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>