255 lines
12 KiB
PHP
255 lines
12 KiB
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<title>Hodowla kaktusów i innych sukulentów</title>
|
|
<meta name="keywords" content="kaktusy" />
|
|
<meta name="Premium Series" content="" />
|
|
<link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
|
|
<link href="css/default.css" rel="stylesheet" type="text/css" media="screen" />
|
|
<link rel="stylesheet" type="text/css" href="css/jquery.nailthumb.1.1.css" />
|
|
<link rel="stylesheet" type="text/css" href="css/jquery.lightbox-0.5.css" media="screen" />
|
|
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
|
|
<script type="text/javascript" src="js/jquery.nailthumb.1.1.min.js"></script>
|
|
<script type="text/javascript" src="js/jquery.lightbox-0.5.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<!-- start header -->
|
|
<div id="header">
|
|
<div id="logo">
|
|
<h1><a href="http://www.kaktusiarnia.pl"><span>Hodowla kaktusów i innych sukulentów</span></a></h1>
|
|
</div>
|
|
<div id="splash"><img src="images/img02.gif" alt="" /> </div>
|
|
<div id="menu">
|
|
<ul id="main">
|
|
<li><a href="index.html">Strona Główna</a></li>
|
|
<li><a href="http://kaktusy.firestorm.pl/">Nadwyżki z hodowli</a></li>
|
|
<li><a href="uprawa.html">Uprawa</a></li>
|
|
<li class="current_page_item"><a href="galeria.php">Galeria</a></li>
|
|
<li><a href="kontakt.html">Kontakt</a></li>
|
|
<li><a href="linki.html">Linki</a></li>
|
|
</ul>
|
|
</div>
|
|
|
|
</div>
|
|
<br />
|
|
<!-- end header -->
|
|
<div id="wrapper">
|
|
<!-- start page -->
|
|
<div id="page">
|
|
<div id="sidebar1" class="sidebar">
|
|
<ul>
|
|
<li>
|
|
<h2>Menu</h2>
|
|
<ul>
|
|
<li><a href="index.html">Strona Główna</a></li>
|
|
<li><a href="http://kaktusy.firestorm.pl/">Nadwyżki z hodowli</a></li>
|
|
<li><a href="uprawa.html">Uprawa</a></li>
|
|
<li class="current_page_item_left"><a href="galeria.php">Galeria</a></li>
|
|
<li><a href="kontakt.html">Kontakt</a></li>
|
|
<li><a href="linki.html">Linki</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<h2>Kontakt</h2>
|
|
<div class="kontakt">
|
|
<p><b>Andrzej i Łucja Hinz</b><br />
|
|
ul. Partyzantów 2<br />
|
|
84-230 RUMIA k. GDYNI<br />
|
|
<b>kom.</b> 512-459-225<br />
|
|
<a href="mailto:kaktusiarnia@kaktusiarnia.pl" style="color:#6E8A21;">kaktusiarnia@kaktusiarnia.pl</a><br />
|
|
</p>
|
|
</div>
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
<!-- start content -->
|
|
<div id="content">
|
|
<div class="flower"></div>
|
|
<div class="post">
|
|
<h1 class="title">Galeria</h1>
|
|
<p class="byline"><small> </small></p>
|
|
<div class="entry">
|
|
<?php
|
|
/* lista katalogów */
|
|
$directory = "./galeria/";
|
|
if ($handle = opendir($directory)) {
|
|
/* This is the correct way to loop over the directory. */
|
|
while (false !== ($file = readdir($handle)))
|
|
if ($file != "." && $file != "..")
|
|
$list[] = $file;
|
|
closedir($handle);
|
|
}
|
|
sort($list);
|
|
reset($list);
|
|
foreach ($list as $plik)
|
|
//if (ereg(".php$", $plik))
|
|
print "<a href=\"galeria.php?dzial=$plik\">$plik</a> | ";
|
|
?>
|
|
</div>
|
|
<p class="byline"><small> </small></p>
|
|
<div class="pagination_cl" id="pagination_top"></div>
|
|
<div class="entry">
|
|
<div id="loader"><center><img src="images/loading.gif" alt="Proszę czekać" /></center></div>
|
|
<div id="gallery" style="display:none;">
|
|
|
|
<table>
|
|
<?php
|
|
$max_page = 1;
|
|
$strona = 1;
|
|
|
|
if (!empty($_GET)) {
|
|
$dzial = $_GET["dzial"];
|
|
if (!empty($_GET["page"]))
|
|
$strona = $_GET["page"];
|
|
}
|
|
if (isset($dzial)) {
|
|
$directory = "./galeria/$dzial";
|
|
if ($handle = opendir($directory)) {
|
|
/* This is the correct way to loop over the directory. */
|
|
while (false !== ($file = readdir($handle)))
|
|
if ($file != "." && $file != "..")
|
|
$list[] = $file;
|
|
closedir($handle);
|
|
}
|
|
sort($list);
|
|
reset($list);
|
|
$numb = 1;
|
|
$img_count = 0;
|
|
$start_num = (($strona - 1) * 20) + 1;
|
|
$end_num = $strona * 20;
|
|
foreach ($list as $plik)
|
|
if (preg_match("/.jpg$/", $plik)) {
|
|
$img_count = $img_count + 1;
|
|
if ($img_count >= $start_num && $img_count <= $end_num) {
|
|
$name = str_replace(".jpg", "", $plik);
|
|
if ($numb == 1) {
|
|
print "<tr><td>";
|
|
} else {
|
|
print "<td>";
|
|
}
|
|
print "<div class='nailthumb-container square-thumb'><a href=\"$directory/$plik\" class='thumb-container' title=\"$name\"><img src=\"$directory/$plik\" alt=\"$name\" title=\"$name\" /></a></div>";
|
|
if ($numb == 5) {
|
|
print "</td></tr>";
|
|
$numb = 0;
|
|
} else {
|
|
print "</td>";
|
|
}
|
|
|
|
$numb = $numb + 1;
|
|
}
|
|
}
|
|
}
|
|
?>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php
|
|
if (!empty($_GET)) {
|
|
$pages = ceil($img_count / 20);
|
|
print "<div class=\"pagination_cl\" id=\"pagination_bottom\">strona($strona z $pages)";
|
|
if ($pages > 1) {
|
|
print "<ul class=\"pages\">";
|
|
if ($strona == 1) {
|
|
print "<li class=\"prev-off\">« poprz</li>";
|
|
} else {
|
|
$last_page = $strona - 1;
|
|
print "<li><a href=\"?dzial=$dzial&page=$last_page\">« poprz</a></li>";
|
|
}
|
|
for ($i = 1; $i <= $pages; $i++) {
|
|
if ($strona == $i) {
|
|
print "<li class=\"active\">$i</li>";
|
|
} else {
|
|
print "<li><a href=\"?dzial=$dzial&page=$i\">$i</a></li>";
|
|
}
|
|
}
|
|
|
|
if ($strona == $pages) {
|
|
print "<li class=\"next-off\">nast »</li>";
|
|
} else {
|
|
$next_page = $strona + 1;
|
|
print "<li><a href=\"?dzial=$dzial&page=$next_page\">nast »</a></li>";
|
|
}
|
|
print "</ul>";
|
|
}
|
|
print "</div>";
|
|
}
|
|
?>
|
|
|
|
</div>
|
|
</div>
|
|
<!-- end content -->
|
|
<!-- start sidebars -->
|
|
|
|
<!-- end sidebars -->
|
|
<div style="clear: both;"> </div>
|
|
</div>
|
|
<!-- end page -->
|
|
</div>
|
|
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
|
|
<div id="footer">
|
|
<p class="copyright">© 2013 Wszelkie prawa zastrzeżone.</p>
|
|
<p class="link">Opieka nad stroną • <a href="mailto:ahinz@o2.pl">ahinz@o2.pl</a></p>
|
|
</div>
|
|
<script type="text/javascript">
|
|
jQuery(document).ready(function () {
|
|
jQuery('.nailthumb-container').nailthumb({width: 130, height: 110});
|
|
$("#pagination_top").html($("#pagination_bottom").html());
|
|
});
|
|
|
|
this.imagePreview = function () {
|
|
/* CONFIG */
|
|
|
|
xOffset = 10;
|
|
yOffset = -300;
|
|
|
|
// these 2 variable determine popup's distance from the cursor
|
|
// you might want to adjust to get the right result
|
|
|
|
/* END CONFIG */
|
|
$("a.thumb-container").hover(function (e) {
|
|
this.t = this.title;
|
|
this.title = "";
|
|
var c = (this.t != "") ? "<br/>" + this.t : "";
|
|
$("body").append("<p id='preview'><img src='" + this.href + "' alt='Image preview' />" + c + "</p>");
|
|
$("#preview")
|
|
.css("top", (e.pageY - xOffset) + "px")
|
|
.css("left", (e.pageX + yOffset) + "px")
|
|
.fadeIn("fast");
|
|
},
|
|
function () {
|
|
this.title = this.t;
|
|
$("#preview").remove();
|
|
});
|
|
$("a.thumb-container").mousemove(function (e) {
|
|
$("#preview")
|
|
.css("top", (e.pageY - xOffset) + "px")
|
|
.css("left", (e.pageX + yOffset) + "px");
|
|
});
|
|
};
|
|
|
|
|
|
// starting the script on page load
|
|
$(document).ready(function () {
|
|
imagePreview();
|
|
});
|
|
$(function () {
|
|
$('#gallery a').lightBox({
|
|
overlayOpacity: 0.6,
|
|
containerResizeSpeed: 350,
|
|
txtImage: 'Obraz',
|
|
txtOf: 'z'
|
|
});
|
|
});
|
|
$(window).load(function () {
|
|
$("#loader").hide();
|
|
$('#gallery').show();
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|