initial commit
105
-img/facebook.svg
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
height="512"
|
||||||
|
width="512"
|
||||||
|
version="1.1"
|
||||||
|
id="Capa_1"
|
||||||
|
x="0px"
|
||||||
|
y="0px"
|
||||||
|
viewBox="0 0 512 512"
|
||||||
|
xml:space="preserve"
|
||||||
|
sodipodi:docname="facebook.svg"
|
||||||
|
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"><metadata
|
||||||
|
id="metadata43"><rdf:RDF><cc:Work
|
||||||
|
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||||
|
id="defs41" /><sodipodi:namedview
|
||||||
|
fit-margin-bottom="0"
|
||||||
|
fit-margin-right="0"
|
||||||
|
fit-margin-left="0"
|
||||||
|
fit-margin-top="0"
|
||||||
|
inkscape:document-rotation="0"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
objecttolerance="10"
|
||||||
|
gridtolerance="10"
|
||||||
|
guidetolerance="10"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1063"
|
||||||
|
id="namedview39"
|
||||||
|
showgrid="false"
|
||||||
|
inkscape:zoom="0.87988281"
|
||||||
|
inkscape:cx="276.79273"
|
||||||
|
inkscape:cy="280.54923"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="0"
|
||||||
|
inkscape:window-maximized="0"
|
||||||
|
inkscape:current-layer="Capa_1" />
|
||||||
|
<g
|
||||||
|
style="fill:#ffffff"
|
||||||
|
id="g6">
|
||||||
|
<g
|
||||||
|
style="fill:#ffffff"
|
||||||
|
id="g4">
|
||||||
|
<path
|
||||||
|
d="M 452,0 H 60 C 26.916,0 0,26.916 0,60 v 392 c 0,33.084 26.916,60 60,60 h 392 c 33.084,0 60,-26.916 60,-60 V 60 C 512,26.916 485.084,0 452,0 Z m 20,452 c 0,11.028 -8.972,20 -20,20 H 338 V 309 h 61.79 L 410,247 h -72 v -43 c 0,-16.975 13.025,-30 30,-30 h 41 v -62 h -41 c -50.923,0 -91.978,41.25 -91.978,92.174 V 247 H 216 v 62 h 60.022 V 472 H 60 C 48.972,472 40,463.028 40,452 V 60 C 40,48.972 48.972,40 60,40 h 392 c 11.028,0 20,8.972 20,20 z"
|
||||||
|
id="path2"
|
||||||
|
style="fill:#ffffff" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g8">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g10">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g12">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g14">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g16">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g18">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g20">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g22">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g24">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g26">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g28">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g30">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g32">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g34">
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
id="g36">
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
BIN
-img/header_logo.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
-img/kruhacek.jpg
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
-img/kruhacek1.jpg
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
-img/kruhacek2.jpg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
-img/kruhacek3.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
-img/kruhacek4.jpg
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
-img/kruhacek5.jpg
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
-img/michal.jpg
Normal file
|
After Width: | Height: | Size: 42 KiB |
BIN
-img/onas1.jpg
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
-img/onas2.jpg
Normal file
|
After Width: | Height: | Size: 87 KiB |
BIN
-img/onas3.jpg
Normal file
|
After Width: | Height: | Size: 196 KiB |
55
-inc/footer.php
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
<footer class="footer bg-dark text-white py-4 px-3 px-md-0">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row d-flex flex-row justify-content-between align-items-center">
|
||||||
|
<a href="https://www.facebook.com/Posilovna-Tj-Olympia-Zl%C3%ADn-Bure%C5%A1ov-199000300263655">
|
||||||
|
<img src="<?php echo $webpath; ?>-img/facebook.svg" alt="Facebook" class="fb-logo">
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
if (isset($_SESSION['userrole'])) {
|
||||||
|
if ($_SESSION['userrole'] != 'Cvičenec') {
|
||||||
|
echo '<a class="text-white" href="' . $webpath . 'admin/index.php">Administrace</a>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<span class="text-right">TJ Olympia © 2020</span>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="row">
|
||||||
|
<span class="mx-auto text-center">Souhlasím s využítím pro potřeby výuky na KITTV PEDF UK. @David_Zálešák</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<?php echo (isset($_SESSION['userid'])) ? '' : '<script src="https://captcheck.netsyms.com/captcheck.min.js"></script>' ?>
|
||||||
|
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('[data-toggle="popover"]').popover();
|
||||||
|
<?php
|
||||||
|
if (isset($loginerror)) {
|
||||||
|
echo "$('#login').modal('show');";
|
||||||
|
}
|
||||||
|
if (isset($registererror)) {
|
||||||
|
echo "$('#register').modal('show');";
|
||||||
|
}
|
||||||
|
if (isset($adderror)) {
|
||||||
|
echo "$('#add').modal('show');";
|
||||||
|
}
|
||||||
|
if (isset($_GET["list"])) {
|
||||||
|
echo "$('#userList').modal('show');";
|
||||||
|
}
|
||||||
|
if (isset($_GET["edit"])) {
|
||||||
|
echo "$('#edit').modal('show');";
|
||||||
|
}
|
||||||
|
if (isset($_GET["edituser"])) {
|
||||||
|
echo "$('#editUser').modal('show');";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
//$('#staticBackdrop').modal('show');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
481
-inc/function-admin.php
Normal file
@@ -0,0 +1,481 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$servername = "127.0.0.1";
|
||||||
|
$username = "...";
|
||||||
|
$password = "...";
|
||||||
|
$dbname = "...";
|
||||||
|
|
||||||
|
// Create connection
|
||||||
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
|
// Check connection
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
die("Connection failed: " . $conn->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$mysqlerror = NULL;
|
||||||
|
$adderror = NULL;
|
||||||
|
$editerror = NULL;
|
||||||
|
|
||||||
|
function remove_accents($string)
|
||||||
|
{
|
||||||
|
if (!preg_match('/[\x80-\xff]/', $string))
|
||||||
|
return $string;
|
||||||
|
|
||||||
|
$chars = array(
|
||||||
|
// Decompositions for Latin-1 Supplement
|
||||||
|
chr(195) . chr(128) => 'A', chr(195) . chr(129) => 'A',
|
||||||
|
chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A',
|
||||||
|
chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A',
|
||||||
|
chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E',
|
||||||
|
chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E',
|
||||||
|
chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I',
|
||||||
|
chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I',
|
||||||
|
chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N',
|
||||||
|
chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O',
|
||||||
|
chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O',
|
||||||
|
chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U',
|
||||||
|
chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U',
|
||||||
|
chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y',
|
||||||
|
chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a',
|
||||||
|
chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a',
|
||||||
|
chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a',
|
||||||
|
chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c',
|
||||||
|
chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e',
|
||||||
|
chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e',
|
||||||
|
chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i',
|
||||||
|
chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i',
|
||||||
|
chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o',
|
||||||
|
chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o',
|
||||||
|
chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o',
|
||||||
|
chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u',
|
||||||
|
chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u',
|
||||||
|
chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y',
|
||||||
|
chr(195) . chr(191) => 'y',
|
||||||
|
// Decompositions for Latin Extended-A
|
||||||
|
chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a',
|
||||||
|
chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a',
|
||||||
|
chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a',
|
||||||
|
chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c',
|
||||||
|
chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c',
|
||||||
|
chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c',
|
||||||
|
chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c',
|
||||||
|
chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd',
|
||||||
|
chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd',
|
||||||
|
chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e',
|
||||||
|
chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e',
|
||||||
|
chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e',
|
||||||
|
chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e',
|
||||||
|
chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e',
|
||||||
|
chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g',
|
||||||
|
chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g',
|
||||||
|
chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g',
|
||||||
|
chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g',
|
||||||
|
chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h',
|
||||||
|
chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h',
|
||||||
|
chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i',
|
||||||
|
chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i',
|
||||||
|
chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i',
|
||||||
|
chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i',
|
||||||
|
chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i',
|
||||||
|
chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij',
|
||||||
|
chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j',
|
||||||
|
chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k',
|
||||||
|
chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L',
|
||||||
|
chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L',
|
||||||
|
chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L',
|
||||||
|
chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L',
|
||||||
|
chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L',
|
||||||
|
chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N',
|
||||||
|
chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N',
|
||||||
|
chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N',
|
||||||
|
chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N',
|
||||||
|
chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N',
|
||||||
|
chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o',
|
||||||
|
chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o',
|
||||||
|
chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o',
|
||||||
|
chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe',
|
||||||
|
chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r',
|
||||||
|
chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r',
|
||||||
|
chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r',
|
||||||
|
chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's',
|
||||||
|
chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's',
|
||||||
|
chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's',
|
||||||
|
chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's',
|
||||||
|
chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't',
|
||||||
|
chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't',
|
||||||
|
chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't',
|
||||||
|
chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u',
|
||||||
|
chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u',
|
||||||
|
chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u',
|
||||||
|
chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u',
|
||||||
|
chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u',
|
||||||
|
chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u',
|
||||||
|
chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w',
|
||||||
|
chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y',
|
||||||
|
chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z',
|
||||||
|
chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z',
|
||||||
|
chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z',
|
||||||
|
chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's'
|
||||||
|
);
|
||||||
|
|
||||||
|
$string = strtr($string, $chars);
|
||||||
|
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function vypisTreninku()
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
$sql = "SELECT id, datum, kapacita, jmeno FROM trenink_trenink ORDER BY datum ASC;";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
$dateus = array("/^1/", "/^2/", "/^3/", "/^4/", "/^5/", "/^6/", "/^7/");
|
||||||
|
$datecz = array("Po", "Út", "St", "Čt", "Pa", "So", "Ne");
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
$sql1 = "select * from trenink_zapsan where trenink=" . $row["id"] . ";";
|
||||||
|
$result1 = $conn->query($sql1);
|
||||||
|
echo '<tr>';
|
||||||
|
echo '<td><b>' . $row["jmeno"] . '</b><br>' . preg_replace($dateus, $datecz, date("N j.&\\nb\sp;n. Y \o\d&\\nb\sp;H:i", strtotime($row["datum"]))) . '</td>';
|
||||||
|
echo '<td>' . $result1->num_rows . '/' . $row["kapacita"] . '</td>';
|
||||||
|
echo '<td>';
|
||||||
|
echo '<a role="button" href="?edit=' . $row["id"] . '" class="btn btn-outline-secondary btn-block">Upravit</a>';
|
||||||
|
echo '<a role="button" href="?list=' . $row["id"] . '" class="btn btn-info btn-block">Seznam</a>';
|
||||||
|
echo '</td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="3">';
|
||||||
|
echo "Žádné Tréninky";
|
||||||
|
echo '</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function addTrenink($nazev, $datum, $kapacita, $obrazek, $popis, $treneri)
|
||||||
|
{
|
||||||
|
global $adderror;
|
||||||
|
global $mysqlerror;
|
||||||
|
if (empty($nazev) || empty($datum) || empty($kapacita) || empty($obrazek) || empty($popis)) {
|
||||||
|
$adderror = "Vyplňte všechna pole.";
|
||||||
|
} else {
|
||||||
|
$check = getimagesize($obrazek);
|
||||||
|
if ($check !== false) {
|
||||||
|
global $conn;
|
||||||
|
$obrazek = addslashes(file_get_contents($obrazek));
|
||||||
|
$sql = "INSERT INTO `trenink_trenink` (`id`, `datum`, `kapacita`, `jmeno`, `popis`, `obrazek`) VALUES (NULL, '" . date("Y-m-d H:i:s", strtotime($datum)) . "', '$kapacita', '$nazev', '$popis', '{$obrazek}');";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$treninkId = $conn->insert_id;
|
||||||
|
$sql = "INSERT INTO `trenink_trenuje` (`trener`, `trenink`) VALUES ";
|
||||||
|
for ($i = 0; $i < count($treneri); $i++) {
|
||||||
|
$sql .= "('" . $treneri["$i"] . "', '$treninkId')";
|
||||||
|
if (count($treneri) != 1 && $i != count($treneri) - 1) {
|
||||||
|
$sql .= ", ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$sql .= ";";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$adderror = "Soubor musí být obrázek.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function vypisTreneru()
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
$sql = "SELECT id, jmeno, prijmeni FROM trenink_user WHERE `role`=2;";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
echo '<option value="' . $row['id'] . '">' . $row['jmeno'] . ' ' . $row['prijmeni'] . '</option>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<option selected>Žádní trenéři</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function editVypisTreneru($trenink)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
$sql = "SELECT u.id, u.jmeno, u.prijmeni FROM trenink_trenuje t INNER JOIN trenink_user u ON t.trener=u.id WHERE t.trenink=$trenink;";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
$sql = "SELECT id, jmeno, prijmeni FROM trenink_user WHERE `role`=2 AND id NOT IN(";
|
||||||
|
$count = $result->num_rows - 1;
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
$sql .= $row['id'];
|
||||||
|
if ($count) {
|
||||||
|
$sql .= ", ";
|
||||||
|
$count--;
|
||||||
|
}
|
||||||
|
echo '<option value="' . $row['id'] . '" selected>' . $row['jmeno'] . ' ' . $row['prijmeni'] . '</option>';
|
||||||
|
}
|
||||||
|
$sql .= ");";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
echo '<option value="' . $row['id'] . '">' . $row['jmeno'] . ' ' . $row['prijmeni'] . '</option>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
vypisTreneru();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function vypisPrihlasenych($trenink)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
$sql = "SELECT u.id, u.jmeno, u.prijmeni, u.overeni FROM trenink_zapsan z INNER JOIN trenink_user u ON u.id=z.client WHERE z.trenink=$trenink";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
if ($row['overeni'] > 1) {
|
||||||
|
echo '<tr class="table-success">';
|
||||||
|
} elseif ($row['overeni'] > 0) {
|
||||||
|
echo '<tr class="table-warning">';
|
||||||
|
} else {
|
||||||
|
echo '<tr class="align-middle">';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo '<td>' . $row['prijmeni'] . ' ' . $row['jmeno'] . '</td>';
|
||||||
|
echo '<td><a class="btn btn-outline-danger float-right" href="?list=' . $trenink . '&odepsat=' . $row['id'] . '" role="button">Odepsat</a>
|
||||||
|
</td>';
|
||||||
|
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="2">Nikdo není přihlášen.</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function odepsat($client, $trenink)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
global $mysqlerror;
|
||||||
|
$sql = "DELETE FROM `trenink_zapsan` WHERE `trenink_zapsan`.`client` = " . $client . " AND `trenink_zapsan`.`trenink` = $trenink;";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function editForm($trenink)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
global $editerror;
|
||||||
|
$sql = "SELECT * FROM trenink_trenink WHERE `id`=$trenink;";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
$row = $result->fetch_assoc();
|
||||||
|
echo '<form class="was-validated" id="editForm" action="' . $_SERVER['PHP_SELF'] . '" method="post" enctype="multipart/form-data">';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="nazev">Název:</label>';
|
||||||
|
echo '<input type="text" name="nazev" class="form-control" id="nazev" value="' . $row['jmeno'] . '" required>';
|
||||||
|
echo '<input type="hidden" id="id" name="id" value="' . $row['id'] . '">';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="datum">Datum:</label>';
|
||||||
|
echo '<input type="datetime-local" name="datum" class="form-control" id="datum" value="' . strftime('%Y-%m-%dT%H:%M:%S', strtotime($row['datum'])) . '" required>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="kapacita">Kapacita:</label>';
|
||||||
|
echo '<input type="number" name="kapacita" class="form-control" id="kapacita" value="' . $row['kapacita'] . '" required>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="kapacita">Trénují:</label>';
|
||||||
|
echo '<select class="custom-select" name="treneri[]" multiple required>';
|
||||||
|
editVypisTreneru($_GET['edit']);
|
||||||
|
echo '</select>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="popis">Popis:</label>';
|
||||||
|
echo '<div class="custom-file mb-3">';
|
||||||
|
echo '<input type="file" class="custom-file-input" name="obrazekEdit" id="obrazekEdit" accept="image/*">';
|
||||||
|
echo '<label class="custom-file-label" for="obrazekEdit">Vyberte obrázek...</label>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<textarea class="form-control" name="popis" id="popis" placeholder="Popis tréninku..."required>' . $row['popis'] . '</textarea>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</form>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function editTrenink($id, $nazev, $datum, $kapacita, $obrazek, $popis, $treneri)
|
||||||
|
{
|
||||||
|
global $mysqlerror;
|
||||||
|
if (empty($nazev) || empty($datum) || empty($kapacita) || empty($popis)) {
|
||||||
|
$mysqlerror = "Vyplňte všechna pole.";
|
||||||
|
} else {
|
||||||
|
global $conn;
|
||||||
|
$check = (empty($obrazek)) ? '' : getimagesize($obrazek);
|
||||||
|
if (!empty($obrazek) && $check !== false) {
|
||||||
|
$obrazek = addslashes(file_get_contents($obrazek));
|
||||||
|
$sql = "UPDATE `trenink_trenink` SET `datum` = '" . date("Y-m-d H:i:s", strtotime($datum)) . "', `kapacita` = '$kapacita', `jmeno` = '$nazev', `popis` = '$popis', `obrazek` = '$obrazek' WHERE `trenink_trenink`.`id` = $id; ;";
|
||||||
|
} else {
|
||||||
|
$sql = "UPDATE `trenink_trenink` SET `datum` = '" . date("Y-m-d H:i:s", strtotime($datum)) . "', `kapacita` = '$kapacita', `jmeno` = '$nazev', `popis` = '$popis' WHERE `trenink_trenink`.`id` = $id; ;";
|
||||||
|
}
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "DELETE FROM `trenink_trenuje` WHERE `trenink_trenuje`.`trenink` = $id; ";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "INSERT INTO `trenink_trenuje` (`trener`, `trenink`) VALUES ";
|
||||||
|
for ($i = 0; $i < count($treneri); $i++) {
|
||||||
|
$sql .= "('" . $treneri["$i"] . "', '$id')";
|
||||||
|
if (count($treneri) != 1 && $i != count($treneri) - 1) {
|
||||||
|
$sql .= ", ";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$sql .= ";";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function delete($trenink)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
global $mysqlerror;
|
||||||
|
$sql = "DELETE FROM `trenink_zapsan` WHERE `trenink_zapsan`.`trenink` = $trenink;";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
$sql = "DELETE FROM `trenink_trenuje` WHERE `trenink_trenuje`.`trenink` = $trenink;";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
$sql = "DELETE FROM `trenink_trenink` WHERE `trenink_trenink`.`id` = $trenink;";
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function vypisUzivatelu()
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
$sql = "SELECT id, jmeno, prijmeni, overeni FROM trenink_user;";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
if ($row['overeni'] > 1) {
|
||||||
|
echo '<tr class="table-success">';
|
||||||
|
} elseif ($row['overeni'] > 0) {
|
||||||
|
echo '<tr class="table-secondary">';
|
||||||
|
} else {
|
||||||
|
echo '<tr class="table-warning">';
|
||||||
|
}
|
||||||
|
echo '<td>' . $row['prijmeni'] . ' ' . $row['jmeno'] . '</td>';
|
||||||
|
echo '<td>';
|
||||||
|
echo '<a role="button" href="?edituser=' . $row['id'] . '" class="btn btn-secondary btn-block">Upravit</a>';
|
||||||
|
echo '</td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<tr><td colspan="2">Žádní uživatelé.</td></tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function editFormUser($user)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
global $editerror;
|
||||||
|
$sql = "SELECT * FROM trenink_user WHERE `id`=$user;";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
$row = $result->fetch_assoc();
|
||||||
|
echo '<form class="was-validated" id="editFormUser" action="' . $_SERVER['PHP_SELF'] . '" method="post" enctype="multipart/form-data">';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="jmeno">Jméno:</label>';
|
||||||
|
echo '<input type="text" name="jmeno" class="form-control" value="' . $row['jmeno'] . '" id="jmeno" required>';
|
||||||
|
echo '<input type="hidden" name="id" value="' . $row['id'] . '">';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="prijmeni">Příjmení:</label>';
|
||||||
|
echo '<input type="text" name="prijmeni" class="form-control" value="' . $row['prijmeni'] . '" id="prijmeni" required>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="email">E-mail:</label>';
|
||||||
|
echo '<input type="email" name="email" class="form-control" value="' . $row['email'] . '" id="email" required>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
echo '<label for="funkce">Funkce:</label>';
|
||||||
|
echo '<select class="custom-select" id="funkce" name="funkce">';
|
||||||
|
echo '<option value="1" '.($row['role'] == "Cvičenec" ? 'selected':'').'>Cvičenec</option>';
|
||||||
|
echo '<option value="2" ' . ($row['role'] == "Trenér" ? 'selected' : '') . '>Trenér</option>';
|
||||||
|
echo '<option value="3" ' . ($row['role'] == "Admin" ? 'selected' : '') . '>Admin</option>';
|
||||||
|
echo '</select>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="form-group">';
|
||||||
|
if ($row['overeni'] < 2) {
|
||||||
|
echo '<button type="submit" class="btn btn-success btn-block" name="submit" value="overit" form="editFormUser">Ověřit</button>';
|
||||||
|
} else {
|
||||||
|
echo '<button type="submit" class="btn btn-outline-warning btn-block" name="submit" value="zrusitOvereni" form="editFormUser">Zrušit ověření</button>';
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
echo '</form>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function editUser($id, $jmeno, $prijmeni, $email, $funkce){
|
||||||
|
global $mysqlerror;
|
||||||
|
if (empty($id) || empty($jmeno) || empty($prijmeni) || empty($email) || empty($funkce)) {
|
||||||
|
$mysqlerror = "Vyplňte všechna pole.";
|
||||||
|
} else {
|
||||||
|
global $conn;
|
||||||
|
$sql = "UPDATE `trenink_user` SET `email` = '$email', `role` = '$funkce', `jmeno` = '$jmeno', `prijmeni` = '$prijmeni' WHERE `trenink_user`.`id` = $id;";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function overit($id){
|
||||||
|
global $mysqlerror;
|
||||||
|
if (empty($id)) {
|
||||||
|
$mysqlerror = "Vyplňte všechna pole.";
|
||||||
|
} else {
|
||||||
|
global $conn;
|
||||||
|
$sql = "UPDATE `trenink_user` SET `overeni` = `overeni` + 2 WHERE `trenink_user`.`id` = $id;";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function zrusitOvereni($id) {
|
||||||
|
global $mysqlerror;
|
||||||
|
if (empty($id)) {
|
||||||
|
$mysqlerror = "Vyplňte všechna pole.";
|
||||||
|
} else {
|
||||||
|
global $conn;
|
||||||
|
$sql = "UPDATE `trenink_user` SET `overeni` = `overeni` - 2 WHERE `trenink_user`.`id` = $id;";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function deleteUser($id)
|
||||||
|
{
|
||||||
|
global $mysqlerror;
|
||||||
|
if (empty($id)) {
|
||||||
|
$mysqlerror = "Vyplňte všechna pole.";
|
||||||
|
} else {
|
||||||
|
global $conn;
|
||||||
|
$sql = "DELETE FROM `trenink_trenuje` WHERE `trenink_trenuje`.`trener` = $id";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "DELETE FROM `trenink_zapsan` WHERE `trenink_zapsan`.`client` = $id";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "DELETE FROM `trenink_user` WHERE `trenink_user`.`id` = $id";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
322
-inc/function.php
Normal file
@@ -0,0 +1,322 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$servername = "127.0.0.1";
|
||||||
|
$username = "...";
|
||||||
|
$password = "...";
|
||||||
|
$dbname = "...";
|
||||||
|
|
||||||
|
// Create connection
|
||||||
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
|
// Check connection
|
||||||
|
if ($conn->connect_error) {
|
||||||
|
die("Connection failed: " . $conn->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
|
$loginerror = NULL;
|
||||||
|
$mysqlerror = NULL;
|
||||||
|
$registererror = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
function remove_accents($string)
|
||||||
|
{
|
||||||
|
if (!preg_match('/[\x80-\xff]/', $string))
|
||||||
|
return $string;
|
||||||
|
|
||||||
|
$chars = array(
|
||||||
|
// Decompositions for Latin-1 Supplement
|
||||||
|
chr(195) . chr(128) => 'A', chr(195) . chr(129) => 'A',
|
||||||
|
chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A',
|
||||||
|
chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A',
|
||||||
|
chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E',
|
||||||
|
chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E',
|
||||||
|
chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I',
|
||||||
|
chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I',
|
||||||
|
chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N',
|
||||||
|
chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O',
|
||||||
|
chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O',
|
||||||
|
chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U',
|
||||||
|
chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U',
|
||||||
|
chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y',
|
||||||
|
chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a',
|
||||||
|
chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a',
|
||||||
|
chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a',
|
||||||
|
chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c',
|
||||||
|
chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e',
|
||||||
|
chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e',
|
||||||
|
chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i',
|
||||||
|
chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i',
|
||||||
|
chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o',
|
||||||
|
chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o',
|
||||||
|
chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o',
|
||||||
|
chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u',
|
||||||
|
chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u',
|
||||||
|
chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y',
|
||||||
|
chr(195) . chr(191) => 'y',
|
||||||
|
// Decompositions for Latin Extended-A
|
||||||
|
chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a',
|
||||||
|
chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a',
|
||||||
|
chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a',
|
||||||
|
chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c',
|
||||||
|
chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c',
|
||||||
|
chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c',
|
||||||
|
chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c',
|
||||||
|
chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd',
|
||||||
|
chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd',
|
||||||
|
chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e',
|
||||||
|
chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e',
|
||||||
|
chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e',
|
||||||
|
chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e',
|
||||||
|
chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e',
|
||||||
|
chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g',
|
||||||
|
chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g',
|
||||||
|
chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g',
|
||||||
|
chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g',
|
||||||
|
chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h',
|
||||||
|
chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h',
|
||||||
|
chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i',
|
||||||
|
chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i',
|
||||||
|
chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i',
|
||||||
|
chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i',
|
||||||
|
chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i',
|
||||||
|
chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij',
|
||||||
|
chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j',
|
||||||
|
chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k',
|
||||||
|
chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L',
|
||||||
|
chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L',
|
||||||
|
chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L',
|
||||||
|
chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L',
|
||||||
|
chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L',
|
||||||
|
chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N',
|
||||||
|
chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N',
|
||||||
|
chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N',
|
||||||
|
chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N',
|
||||||
|
chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N',
|
||||||
|
chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o',
|
||||||
|
chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o',
|
||||||
|
chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o',
|
||||||
|
chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe',
|
||||||
|
chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r',
|
||||||
|
chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r',
|
||||||
|
chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r',
|
||||||
|
chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's',
|
||||||
|
chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's',
|
||||||
|
chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's',
|
||||||
|
chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's',
|
||||||
|
chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't',
|
||||||
|
chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't',
|
||||||
|
chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't',
|
||||||
|
chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u',
|
||||||
|
chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u',
|
||||||
|
chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u',
|
||||||
|
chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u',
|
||||||
|
chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u',
|
||||||
|
chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u',
|
||||||
|
chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w',
|
||||||
|
chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y',
|
||||||
|
chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z',
|
||||||
|
chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z',
|
||||||
|
chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z',
|
||||||
|
chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's'
|
||||||
|
);
|
||||||
|
|
||||||
|
$string = strtr($string, $chars);
|
||||||
|
|
||||||
|
return $string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function vypisTreninku()
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
$sql = "SELECT id, datum, kapacita, jmeno, popis, obrazek FROM trenink_trenink ORDER BY datum ASC";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
|
// output data of each row
|
||||||
|
$dateus = array("/^1/", "/^2/", "/^3/", "/^4/", "/^5/", "/^6/", "/^7/");
|
||||||
|
$datecz = array("Po", "Út", "St", "Čt", "Pa", "So", "Ne");
|
||||||
|
|
||||||
|
echo '<div class="card-columns">';
|
||||||
|
while ($row = $result->fetch_assoc()) {
|
||||||
|
$sql1 = "select jmeno, prijmeni from trenink_trenuje t INNER JOIN trenink_user u ON t.trener=u.id WHERE t.trenink=" . $row["id"] . ";";
|
||||||
|
$result1 = $conn->query($sql1);
|
||||||
|
$sql2 = "select * from trenink_zapsan where trenink=" . $row["id"] . ";";
|
||||||
|
$result2 = $conn->query($sql2);
|
||||||
|
$row2 = $result2->fetch_row();
|
||||||
|
if (isset($_SESSION["userid"])) {
|
||||||
|
$sql3 = "select * from trenink_zapsan where trenink=" . $row["id"] . " and client=" . $_SESSION["userid"] . ";";
|
||||||
|
$result3 = $conn->query($sql3);
|
||||||
|
}
|
||||||
|
echo '<div class="card">';
|
||||||
|
echo '<img class="card-img-top" src="data:image/jpeg;base64,' . base64_encode($row['obrazek']) . '" alt="Card image cap">';
|
||||||
|
echo '<div class="card-body">';
|
||||||
|
echo '<div class="container">';
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col">';
|
||||||
|
echo '<h2 class="card-title">' . $row["jmeno"] . '</h2>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col">';
|
||||||
|
echo '<span class="datum"><strong>' . preg_replace($dateus, $datecz, date("N j.&\\nb\sp;n. Y \o\d&\\nb\sp;H:i", strtotime($row["datum"]))) . '</strong></span>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col">';
|
||||||
|
echo '<strong class="text-muted">Trénují: </strong>';
|
||||||
|
if ($result1->num_rows > 0) {
|
||||||
|
$count = $result1->num_rows - 1;
|
||||||
|
while ($row1 = $result1->fetch_assoc()) {
|
||||||
|
echo '<a href="onas.php#' . remove_accents($row1["prijmeni"]) . '">' . $row1["jmeno"] . ' ' . $row1["prijmeni"] . '</a>';
|
||||||
|
if ($count) {
|
||||||
|
echo ", ";
|
||||||
|
$count--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "Nikdo netrénuje.";
|
||||||
|
}
|
||||||
|
echo '';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="row">';
|
||||||
|
echo '<div class="col">';
|
||||||
|
echo '<p class="card-text">' . $row["popis"] . '</p>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="row align-items-center mt-3">';
|
||||||
|
echo '<div class="col">';
|
||||||
|
if (isset($_SESSION["userid"])) {
|
||||||
|
if ($row["kapacita"] <= $result2->num_rows) {
|
||||||
|
echo '<a class="btn btn-danger disabled" href="#" role="button">Plno</a>';
|
||||||
|
} elseif ($result3->num_rows) {
|
||||||
|
echo '<a class="btn btn-outline-danger" href="?odepsat=' . $row["id"] . '" role="button">Odepsat se</a>';
|
||||||
|
} else {
|
||||||
|
echo '<a class="btn btn-success" href="?zapsat=' . $row["id"] . '" role="button">Zapsat se</a>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<div class="btn-group p-0" role="group" aria-label="Basic example" data-toggle="popover" data-placement="bottom" data-content="Pro zapsání se musíte přihlásit.">';
|
||||||
|
echo '<a class="btn btn-success disabled" href="#" role="button">Zapsat se</a>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
echo '<div class="col-">';
|
||||||
|
if (100 / $row["kapacita"] * $result2->num_rows > 85) {
|
||||||
|
$fontColor = "text-danger";
|
||||||
|
} else if (100 / $row["kapacita"] * $result2->num_rows > 65) {
|
||||||
|
$fontColor = "text-warning";
|
||||||
|
} else {
|
||||||
|
$fontColor = "text-primary";
|
||||||
|
}
|
||||||
|
echo '<span class="align-bottom ' . $fontColor . ' kapacita">' . $result2->num_rows . '/' . $row["kapacita"] . '</span>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
echo '</div>';
|
||||||
|
} else {
|
||||||
|
echo '<div class="alert alert-info w-100" role="alert">';
|
||||||
|
echo "Momentálně nemáme žádné tréninky.";
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function registrace($jmeno, $prijmeni, $email, $passwd, $passwdr)
|
||||||
|
{
|
||||||
|
global $registererror;
|
||||||
|
if (empty($jmeno) || empty($prijmeni) || empty($email) || empty($passwd) || empty($passwdr)) {
|
||||||
|
$registererror = "Vyplňte všechna pole.";
|
||||||
|
} else {
|
||||||
|
if($passwd == $passwdr){
|
||||||
|
$url = 'http://captcheck.netsyms.com/api.php';
|
||||||
|
$data = [
|
||||||
|
'session_id' => $_POST['captcheck_session_code'],
|
||||||
|
'answer_id' => isset($_POST['captcheck_selected_answer']) ? $_POST['captcheck_selected_answer'] : NULL,
|
||||||
|
'action' => "verify"
|
||||||
|
];
|
||||||
|
$options = [
|
||||||
|
'http' => [
|
||||||
|
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
|
||||||
|
'method' => 'POST',
|
||||||
|
'content' => http_build_query($data)
|
||||||
|
]
|
||||||
|
];
|
||||||
|
$context = stream_context_create($options);
|
||||||
|
$result = file_get_contents($url, false, $context);
|
||||||
|
$resp = json_decode($result, TRUE);
|
||||||
|
if (!$resp['result']) {
|
||||||
|
// Replace with error-handling code
|
||||||
|
$registererror = "Chyba ověření.";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
global $conn;
|
||||||
|
|
||||||
|
$sql = "INSERT INTO `trenink_user` (`id`, `email`, `passwd`, `role`, `jmeno`, `prijmeni`, `overeni`) VALUES (NULL, '$email', '". crypt($passwd, '$6$rounds=5000$wretgbgsdfbuikitffdhsa$')."', 1, '$jmeno', '$prijmeni', 0);";
|
||||||
|
|
||||||
|
if ($conn->query($sql) === FALSE) {
|
||||||
|
if ($conn->errno == 1062) {
|
||||||
|
$registererror = "Tento email je již registrován.";
|
||||||
|
} else {
|
||||||
|
$registererror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
prihlaseni($email, $passwd);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$registererror = "Hesla jsou rozdílná.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function prihlaseni($email, $passwd)
|
||||||
|
{
|
||||||
|
global $loginerror;
|
||||||
|
if (empty($email) || empty($passwd)) {
|
||||||
|
$loginerror = "Vyplňte email i heslo.";
|
||||||
|
} else {
|
||||||
|
global $conn;
|
||||||
|
$sql = "SELECT id, jmeno, prijmeni, `role`, email, passwd FROM trenink_user WHERE email LIKE '" . $email . "';";
|
||||||
|
$result = $conn->query($sql);
|
||||||
|
$row = $result->fetch_assoc();
|
||||||
|
|
||||||
|
if (empty($row)) {
|
||||||
|
$loginerror = "Tento email není zaregistrován.";
|
||||||
|
} elseif (crypt($passwd, '$6$rounds=5000$wretgbgsdfbuikitffdhsa$') == $row['passwd']) {
|
||||||
|
// Set session variables
|
||||||
|
$_SESSION["userid"] = $row['id'];
|
||||||
|
$_SESSION["userjmeno"] = $row['jmeno'];
|
||||||
|
$_SESSION["userprijmeni"] = $row['prijmeni'];
|
||||||
|
$_SESSION["userrole"] = $row['role'];
|
||||||
|
} else {
|
||||||
|
$loginerror = "Špatné heslo.";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function logout()
|
||||||
|
{
|
||||||
|
// remove all session variables
|
||||||
|
session_unset();
|
||||||
|
|
||||||
|
// destroy the session
|
||||||
|
session_destroy();
|
||||||
|
}
|
||||||
|
function zapsat($trenink)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
global $mysqlerror;
|
||||||
|
$sql = "INSERT INTO `trenink_zapsan` (`client`, `trenink`) VALUES ('" . $_SESSION["userid"] . "', '$trenink');";
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
} else {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function odepsat($trenink)
|
||||||
|
{
|
||||||
|
global $conn;
|
||||||
|
global $mysqlerror;
|
||||||
|
$sql = "DELETE FROM `trenink_zapsan` WHERE `trenink_zapsan`.`client` = " . $_SESSION["userid"] . " AND `trenink_zapsan`.`trenink` = $trenink;";
|
||||||
|
if ($conn->query($sql) === TRUE) {
|
||||||
|
} else {
|
||||||
|
$mysqlerror = "Error: " . $sql . "<br>" . $conn->error;
|
||||||
|
}
|
||||||
|
}
|
||||||
14
-inc/header.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
// Start the session
|
||||||
|
session_start();
|
||||||
|
$webpath = preg_replace('/(admin\/|)[a-zA-Z0-9_-]+\.\S+$/', '', $_SERVER['PHP_SELF']);;
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>TJ Olympia - Tréninky</title>
|
||||||
|
<link rel="stylesheet" href="<?php echo $webpath; ?>-inc/style.css">
|
||||||
222
-inc/menu-admin.php
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
<?php
|
||||||
|
if (isset($_SESSION['userrole'])) {
|
||||||
|
if ($_SESSION['userrole'] != "Admin" && $_SESSION['userrole'] != "Trenér") {
|
||||||
|
header('Location: ../index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
header('Location: ../index.php');
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
include_once("../-inc/function-admin.php");
|
||||||
|
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
if ($_POST['submit'] == 'add') {
|
||||||
|
addTrenink($_POST['nazev'], $_POST['datum'], $_POST['kapacita'], $_FILES['obrazek']["tmp_name"], $_POST['popis'], $_POST['treneri']);
|
||||||
|
}
|
||||||
|
if ($_POST['submit'] == 'edit') {
|
||||||
|
editTrenink($_POST['id'], $_POST['nazev'], $_POST['datum'], $_POST['kapacita'], $_FILES['obrazekEdit']["tmp_name"], $_POST['popis'], $_POST['treneri']);
|
||||||
|
}
|
||||||
|
if ($_POST['submit'] == 'delete') {
|
||||||
|
delete($_POST['id']);
|
||||||
|
}
|
||||||
|
if ($_POST['submit'] == 'editUser') {
|
||||||
|
editUser($_POST['id'], $_POST['jmeno'], $_POST['prijmeni'], $_POST['email'], $_POST['funkce']);
|
||||||
|
}
|
||||||
|
if ($_POST['submit'] == 'overit') {
|
||||||
|
overit($_POST['id']);
|
||||||
|
}
|
||||||
|
if ($_POST['submit'] == 'zrusitOvereni') {
|
||||||
|
zrusitOvereni($_POST['id']);
|
||||||
|
}
|
||||||
|
if ($_POST['submit'] == 'deleteUser') {
|
||||||
|
deleteUser($_POST['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
|
||||||
|
|
||||||
|
if (isset($_GET['odepsat'])) {
|
||||||
|
odepsat($_GET['odepsat'], $_GET['list']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 bg-white border-bottom box-shadow">
|
||||||
|
<h5 class="my-0 mr-md-auto font-weight-normal">
|
||||||
|
<img src="../-img/header_logo.png" alt="Logo">
|
||||||
|
<span class="text-success">TJ</span> OLYMPIA <span class="section">/ administrace</span>
|
||||||
|
</h5>
|
||||||
|
<nav class="my-2 my-md-0 mr-md-3">
|
||||||
|
<a class="p-2 text-dark" href="index.php">Tréninky</a>
|
||||||
|
<a class="p-2 text-dark" href="uzivatele.php">Uživatelé</a>
|
||||||
|
</nav>
|
||||||
|
<div class="mt-3 mt-md-0">
|
||||||
|
<a class="btn btn-success float-left mr-1" href="../index.php" role="button">Zpět</a>
|
||||||
|
<a class="btn btn-outline-success float-left ml-1" href="../index.php?logout" role="button">Odhlásit se</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (isset($mysqlerror)) {
|
||||||
|
echo '<div class="alert alert-danger" role="alert">';
|
||||||
|
echo $mysqlerror;
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Modal Add -->
|
||||||
|
<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-scrollable">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="loginLabel">Přidat trénink</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if (isset($adderror)) {
|
||||||
|
echo '<div class="alert alert-danger" role="alert">';
|
||||||
|
echo $adderror;
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<form class="was-validated" id="addForm" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="nazev">Název:</label>
|
||||||
|
<input type="text" name="nazev" class="form-control" id="nazev" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="datum">Datum:</label>
|
||||||
|
<input type="datetime-local" name="datum" class="form-control" id="datum" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="kapacita">Kapacita:</label>
|
||||||
|
<input type="number" name="kapacita" class="form-control" id="kapacita" value="30" required>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="kapacita">Trénují:</label>
|
||||||
|
<select class="custom-select" name="treneri[]" multiple required>
|
||||||
|
<?php vypisTreneru(); ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="popis">Popis:</label>
|
||||||
|
<div class="custom-file mb-3">
|
||||||
|
<input type="file" class="custom-file-input" name="obrazek" id="obrazek" accept="image/*" required>
|
||||||
|
<label class="custom-file-label" for="obrazek">Vyberte obrázek...</label>
|
||||||
|
</div>
|
||||||
|
<textarea class="form-control" name="popis" id="popis" placeholder="Popis tréninku..." required></textarea>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Zavřít</button>
|
||||||
|
<button type="submit" class="btn btn-success" name="submit" value="add" form="addForm">Přidat</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal seznam přihlášených -->
|
||||||
|
<div class="modal fade" id="userList" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-scrollable">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="loginLabel">Přihlášení na trénink</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-body px-0 px-md-3">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Jméno</th>
|
||||||
|
<th scope="col"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
if (isset($_GET['list'])) {
|
||||||
|
vypisPrihlasenych($_GET['list']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Zavřít</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal uprava -->
|
||||||
|
<div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-scrollable">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="loginLabel">Přidat trénink</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if (isset($editerror)) {
|
||||||
|
echo '<div class="alert alert-danger" role="alert">';
|
||||||
|
echo $editerror;
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<?php
|
||||||
|
if (isset($_GET['edit'])) {
|
||||||
|
editForm($_GET['edit']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" class="btn btn-outline-danger mr-auto" name="submit" value="delete" form="editForm">Odstranit</button>
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Zavřít</button>
|
||||||
|
<button type="submit" class="btn btn-success" name="submit" value="edit" form="editForm">Přidat</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal uprava uživatele -->
|
||||||
|
<div class="modal fade" id="editUser" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog modal-dialog-scrollable">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="loginLabel">Úprava účtu</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="modal-body">
|
||||||
|
<?php
|
||||||
|
if (isset($_GET['edituser'])) {
|
||||||
|
editFormUser($_GET['edituser']);
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="submit" class="btn btn-outline-danger mr-auto" name="submit" value="deleteUser" form="editFormUser">Odstranit</button>
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Zavřít</button>
|
||||||
|
<button type="submit" class="btn btn-success" name="submit" value="editUser" form="editFormUser">Upravit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
162
-inc/menu.php
Normal file
@@ -0,0 +1,162 @@
|
|||||||
|
<?php
|
||||||
|
include_once("-inc/function.php");
|
||||||
|
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
||||||
|
if ($_POST['submit'] == 'login') {
|
||||||
|
prihlaseni($_POST['email'], $_POST['passwd']);
|
||||||
|
}
|
||||||
|
if ($_POST['submit'] == 'register') {
|
||||||
|
registrace($_POST['jmeno'], $_POST['prijmeni'], $_POST['email'], $_POST['passwd'], $_POST['passwdr'],);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
|
||||||
|
if (isset($_GET['logout'])) {
|
||||||
|
logout();
|
||||||
|
}
|
||||||
|
if (isset($_GET['zapsat'])) {
|
||||||
|
zapsat($_GET['zapsat']);
|
||||||
|
}
|
||||||
|
if (isset($_GET['odepsat'])) {
|
||||||
|
odepsat($_GET['odepsat']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 bg-white border-bottom box-shadow">
|
||||||
|
<h5 class="my-0 mr-md-auto font-weight-normal">
|
||||||
|
<img src="-img/header_logo.png" alt="Logo">
|
||||||
|
<span class="text-success">TJ</span> OLYMPIA
|
||||||
|
</h5>
|
||||||
|
<nav class="my-2 my-md-0 mr-md-3">
|
||||||
|
<a class="p-2 text-dark" href="index.php">Tréninky</a>
|
||||||
|
<a class="p-2 text-dark" href="onas.php">O nás</a>
|
||||||
|
<a class="p-2 text-dark" href="kontakty.php">Kontakt</a>
|
||||||
|
</nav>
|
||||||
|
<div class="mt-3 mt-md-0 row align-items-center">
|
||||||
|
<?php
|
||||||
|
if (isset($_SESSION["userid"])) {
|
||||||
|
echo '<span class="mx-3">' . $_SESSION["userjmeno"] . ' ' . $_SESSION["userprijmeni"] . '</span>';
|
||||||
|
echo '<a class="btn btn-outline-success float-left ml-1" href="?logout" role="button">Odhlásit se</a>';
|
||||||
|
} else {
|
||||||
|
echo '<button class="btn btn-success float-left mr-1" type="button" data-toggle="modal" data-target="#login">Prihlásit se</button>';
|
||||||
|
echo '<button class="btn btn-outline-success float-left ml-1" type="button" data-toggle="modal" data-target="#register">Registrovat se</button>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (isset($mysqlerror)) {
|
||||||
|
echo '<div class="alert alert-danger" role="alert">';
|
||||||
|
echo $mysqlerror;
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Modal Login -->
|
||||||
|
<div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="loginLabel">Přihlášení</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if (isset($loginerror)) {
|
||||||
|
echo '<div class="alert alert-danger" role="alert">';
|
||||||
|
echo $loginerror;
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="exampleInputEmail1">E-mail:</label>
|
||||||
|
<input type="email" name="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="exampleInputPassword1">Heslo:</label>
|
||||||
|
<input type="password" name="passwd" class="form-control" id="exampleInputPassword1">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<span class="mr-auto">Zapomenuté heslo</span>
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Zavřít</button>
|
||||||
|
<button type="submit" class="btn btn-success" name="submit" value="login">Přihlásit</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal Register -->
|
||||||
|
<div class="modal fade" id="register" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="registerLabel">Registrace</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if (isset($registererror)) {
|
||||||
|
echo '<div class="alert alert-danger" role="alert">';
|
||||||
|
echo $registererror;
|
||||||
|
echo '</div>';
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="jmeno">Jméno:</label>
|
||||||
|
<input type="text" class="form-control" name="jmeno" id="jmeno">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="prijmeni">Příjmení:</label>
|
||||||
|
<input type="text" class="form-control" name="prijmeni" id="prijmeni">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="email">E-mail:</label>
|
||||||
|
<input type="email" class="form-control" name="email" id="email">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="passwd">Heslo:</label>
|
||||||
|
<input type="password" name="passwd" class="form-control" id="passwd">
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="passwdr">Heslo znovu:</label>
|
||||||
|
<input type="password" name="passwdr" class="form-control" id="passwdr">
|
||||||
|
</div>
|
||||||
|
<div class="captcheck_container"></div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">Zavřít</button>
|
||||||
|
<button type="submit" class="btn btn-success" name="submit" value="register">Registrovat</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Modal Neni produkční verze -->
|
||||||
|
<div class="modal fade" id="staticBackdrop" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title" id="staticBackdropLabel">Upozornění</h5>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="alert alert-danger mb-0" role="alert">
|
||||||
|
Toto není produkční verze!!!
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-primary" data-dismiss="modal">Rozumím</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
7931
-inc/style.css
Normal file
62
admin/index.php
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../-inc/header.php");
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include_once("../-inc/menu-admin.php"); ?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row align-items-center px-3">
|
||||||
|
<div class="col">
|
||||||
|
<h1 class="my-3">Tréninky</h1>
|
||||||
|
</div>
|
||||||
|
<div class="col text-right">
|
||||||
|
<button role="button" class="btn btn-default" data-toggle="modal" data-target="#add">
|
||||||
|
<svg class="bi bi-plus-square float-right" width="2.5em" height="2.5em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill-rule="evenodd" d="M8 3.5a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5H4a.5.5 0 0 1 0-1h3.5V4a.5.5 0 0 1 .5-.5z" />
|
||||||
|
<path fill-rule="evenodd" d="M7.5 8a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 0 1H8.5V12a.5.5 0 0 1-1 0V8z" />
|
||||||
|
<path fill-rule="evenodd" d="M14 1H2a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2z" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Název</th>
|
||||||
|
<th scope="col">Kapacita</th>
|
||||||
|
<th scope="col"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
vypisTreninku();
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelector('.custom-file-input').addEventListener('change', function(e) {
|
||||||
|
var fileName = document.getElementById("obrazek").files[0].name;
|
||||||
|
var nextSibling = e.target.nextElementSibling
|
||||||
|
nextSibling.innerText = fileName
|
||||||
|
})
|
||||||
|
document.querySelectorAll('.custom-file-input')[1].addEventListener('change', function(e) {
|
||||||
|
var fileName = document.getElementById("obrazekEdit").files[0].name;
|
||||||
|
var nextSibling = e.target.nextElementSibling
|
||||||
|
nextSibling.innerText = fileName
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
var dateControl = document.querySelector('input[type="datetime-local"]')[1];
|
||||||
|
dateControl.value = '2017-06-01T08:30';
|
||||||
|
</script>
|
||||||
|
<?php include_once("../-inc/footer.php"); ?>
|
||||||
35
admin/uzivatele.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
include_once("../-inc/header.php");
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include_once("../-inc/menu-admin.php"); ?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="row align-items-center px-3">
|
||||||
|
<div class="col">
|
||||||
|
<h1 class="my-3">Uživatelé</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead class="thead-light">
|
||||||
|
<tr>
|
||||||
|
<th scope="col">Jméno</th>
|
||||||
|
<th scope="col"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php
|
||||||
|
vypisUzivatelu();
|
||||||
|
?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php include_once("../-inc/footer.php"); ?>
|
||||||
18
index.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
include_once("-inc/header.php");
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include_once("-inc/menu.php"); ?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<h1 class="my-3">Tréninky</h1>
|
||||||
|
|
||||||
|
|
||||||
|
<?php vypisTreninku(); ?>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<?php include_once("-inc/footer.php"); ?>
|
||||||
46
kontakty.php
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
<?php include_once("-inc/header.php"); ?>
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin="" />
|
||||||
|
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include_once("-inc/menu.php"); ?>
|
||||||
|
|
||||||
|
<div id="mapa"></div>
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<h1 class="my-3">Kontakty</h1>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-6">
|
||||||
|
<h2>Adresa</h2>
|
||||||
|
Burešov 4886,<br>
|
||||||
|
760 01 Zlín
|
||||||
|
</div>
|
||||||
|
<div class="col-6">
|
||||||
|
<h2>Michal Krček</h2>
|
||||||
|
Nějaký kontakt
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
//============================== MAPA ===================================
|
||||||
|
// Creating map options
|
||||||
|
var mapOptions = {
|
||||||
|
center: [49.235723, 17.687784],
|
||||||
|
zoom: 13
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creating a map object
|
||||||
|
var map = new L.map('mapa', mapOptions);
|
||||||
|
|
||||||
|
// Creating a Layer object
|
||||||
|
var layer = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
|
||||||
|
|
||||||
|
// Adding layer to the map
|
||||||
|
map.addLayer(layer);
|
||||||
|
|
||||||
|
var marker = L.marker([49.235723, 17.687784]).addTo(map);
|
||||||
|
marker.bindPopup('<span class="text-success">TJ</span> OLYMPIA').openPopup();
|
||||||
|
</script>
|
||||||
|
<?php include_once("-inc/footer.php"); ?>
|
||||||
107
onas.php
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<?php
|
||||||
|
include_once("-inc/header.php");
|
||||||
|
?>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<?php include_once("-inc/menu.php"); ?>
|
||||||
|
|
||||||
|
<h1 class="my-3 d-none">O nás</h1>
|
||||||
|
|
||||||
|
<div id="myCarousel" class="carousel slide" data-ride="carousel">
|
||||||
|
<ol class="carousel-indicators">
|
||||||
|
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
|
||||||
|
<li data-target="#myCarousel" data-slide-to="1" class=""></li>
|
||||||
|
<li data-target="#myCarousel" data-slide-to="2" class=""></li>
|
||||||
|
</ol>
|
||||||
|
<div class="carousel-inner">
|
||||||
|
<div class="carousel-item active">
|
||||||
|
<img class="img-fluid" src="-img/onas1.jpg" alt="" srcset="">
|
||||||
|
<div class="container">
|
||||||
|
<div class="carousel-caption text-left">
|
||||||
|
<h1>Example headline.</h1>
|
||||||
|
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||||
|
<p><a class="btn btn-lg btn-primary" href="#" role="button">Sign up today</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="carousel-item">
|
||||||
|
<img class="img-fluid" src="-img/onas2.jpg" alt="" srcset="">
|
||||||
|
<div class="container">
|
||||||
|
<div class="carousel-caption">
|
||||||
|
<h1>Another example headline.</h1>
|
||||||
|
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||||
|
<p><a class="btn btn-lg btn-primary" href="#" role="button">Learn more</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="carousel-item">
|
||||||
|
<img class="img-fluid" src="-img/onas3.jpg" alt="" srcset="">
|
||||||
|
<div class="container">
|
||||||
|
<div class="carousel-caption text-right">
|
||||||
|
<h1>One more for good measure.</h1>
|
||||||
|
<p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
|
||||||
|
<p><a class="btn btn-lg btn-primary" href="#" role="button">Browse gallery</a></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a class="carousel-control-prev" href="#myCarousel" role="button" data-slide="prev">
|
||||||
|
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
|
||||||
|
<span class="sr-only">Previous</span>
|
||||||
|
</a>
|
||||||
|
<a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next">
|
||||||
|
<span class="carousel-control-next-icon" aria-hidden="true"></span>
|
||||||
|
<span class="sr-only">Next</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container onas">
|
||||||
|
<div class="row featurette">
|
||||||
|
<div class="col-md-7">
|
||||||
|
<h2 id="Krcek" class="featurette-heading">Michal Krček</h2>
|
||||||
|
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<svg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" height="500" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 500x500">
|
||||||
|
<title>Placeholder</title>
|
||||||
|
<rect width="100%" height="100%" fill="#eee"></rect><text x="50%" y="50%" fill="#aaa" dy=".3em">500x500</text>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr class="featurette-divider">
|
||||||
|
|
||||||
|
<div class="row featurette">
|
||||||
|
<div class="col-md-7 order-md-2">
|
||||||
|
<h2 id="Hlatky" class="featurette-heading">Zdeněk Hlatký</h2>
|
||||||
|
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<svg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" height="500" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 500x500">
|
||||||
|
<title>Placeholder</title>
|
||||||
|
<rect width="100%" height="100%" fill="#eee"></rect><text x="50%" y="50%" fill="#aaa" dy=".3em">500x500</text>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr class="featurette-divider">
|
||||||
|
|
||||||
|
<div class="row featurette">
|
||||||
|
<div class="col-md-7">
|
||||||
|
<h2 id="Stritecky" class="featurette-heading">Adam Střitecký</h2>
|
||||||
|
<p class="lead">Donec ullamcorper nulla non metus auctor fringilla. Vestibulum id ligula porta felis euismod semper. Praesent commodo cursus magna, vel scelerisque nisl consectetur. Fusce dapibus, tellus ac cursus commodo.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-5">
|
||||||
|
<svg class="bd-placeholder-img bd-placeholder-img-lg featurette-image img-fluid mx-auto" width="500" height="500" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice" focusable="false" role="img" aria-label="Placeholder: 500x500">
|
||||||
|
<title>Placeholder</title>
|
||||||
|
<rect width="100%" height="100%" fill="#eee"></rect><text x="50%" y="50%" fill="#aaa" dy=".3em">500x500</text>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<?php include_once("-inc/footer.php"); ?>
|
||||||