Kód: Vybrat vše
<?php
session_start();
if(!isset($_SESSION['uzivatel_id'])) {
header('Location: prihlaseni.php');
exit();
}
if (isset($_GET['odhlasit']))
{
session_destroy();
header('Location: prihlaseni.php');
exit();
}
require('Db.php');
require('Galerie.php');
Db::connect('wm56.wedos.net', 'xxx', xxx', xxx');
$items = Db::queryAll('select * from soubory where user_id = ' . $_SESSION['uzivatel_id']);
?>
<html>
<head>
<link rel="stylesheet" href="menu.css" type="text/css">
<link rel="stylesheet" href="font-awesome.min.css">
<link rel="stylesheet" href="bootstrap.css">
<link rel="icon" href="icon.ico">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="script.js"></script>
<script src="bootstrap.js"></script>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<title>Galerie | FileUP.cz</title>
</head>
<style>
body {
background-color: white;
background-image: url(./soubory/background.png);
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: 100% 100%;
a:link {color: orange;}
a:visited {color: orange};
a:active {color: orange};}
#text{ /* Plovoucí okno*/
border-radius: 5px;
margin-top: 10%;
margin-right: 5%;
margin-left: 5%;
padding: 10px 30px 10px 30px;
background-color: rgb(255,255,255);
border: medium solid black;
text-align: justify }
#galerie{
width: 33%;
padding: 20px;
vertical-align: top;
}
</style>
<body>
<div id='cssmenu'>
<ul>
<li><a href='index.php'><span>Nahrávání</span></a></li>
<li class='active'><a href='#'><span>O nás</span></a></li>
<li><a href='faq.php'><span>F.A.Q</span></a></li>
<li><a href='obrazky.php'><span>Galerie</span></a></li>
<li class='last'><a href='kontakt.php'><span>Kontakt</span></a></li>
</ul>
</div>
<div id="text">
<h2 align="right">Galerie snímků </h1>
<p>Zde najdete pouze Vámi nahrané snímky.</p>
<?
$rows = array_chunk($items,3);
echo '<table>';
foreach($rows as $row) {
echo "<tr>";
foreach($row as $column) {
echo "<td><img src=".$column['img_link']."></td>";
}
echo "</tr>";
}
echo "</table>";
?>
</body>
</html>
Tag <style> je zde, protože je tato stránka trošku jinačí, než celý web.