ACC SHELL
<?php
require_once "include/config.php";
use Nette\Finder;
$page = new page("Webkamera Olomouc, Horní náměstí");
$page->id = "cam";
$soubory = glob("./data/webcam/*.jpg");
$countSoubory = (count($soubory));
if ($countSoubory > 3) {
$i = 0;
foreach($soubory as $file) {
$i++;
if (($countSoubory-$i) > 5 ) {
unlink($file);
} // smaže foto z webcam starší nežli 2 hod.
}
}
log__navstevy::log("webcam", 0);
$files = scandir('./data/webcam', 1);
foreach ($files as $n => $file) {
if (strpos($file, 'x') === false) {unset($files[$n]);}
}
$files = array_values($files);
$files = array_values($files);
$newest_file_1 = $files[0];
$newest_file_2 = $files[1];
$page->og_image = 'https://www.oltv.cz/data/webcam/'.$newest_file_1;
include "inc/head.inc";
include "inc/header.inc";
?>
<div id="left">
<div class="graybox mb20">
<h2 class="red">Webkamera Olomouc, Horní náměstí</h2>
<div class="video-js-box camBox">
<div class="ajaxCam1"><img src="/data/webcam/<?=$newest_file_1?>" alt="Webkamera Olomouc" width="630" height="394" /></div>
<div class="ajaxCam2"><img src="/data/webcam/<?=$newest_file_2?>" alt="Webkamera Olomouc" width="630" height="394" /></div>
</div>
<script type="text/javascript">
$(document).ready(function(){
$(document).everyTime(5000,function(i) {
if ($('#ajaxPomocna').val() == "1") {
$('.video-js-box .ajaxCam1').show();
$('.video-js-box .ajaxCam2').hide();
$('.video-js-box .ajaxCam2').load('/ajax/webcam1.php');
$('#ajaxPomocna').val("2");
} else {
$('.video-js-box .ajaxCam2').show();
$('.video-js-box .ajaxCam1').hide();
$('.video-js-box .ajaxCam1').load('/ajax/webcam1.php');
$('#ajaxPomocna').val("1");
}
});
});
</script>
</div>
<input type="hidden" name="pomocna" id="ajaxPomocna" value="1" />
<?php include('inc/banner650px.inc'); ?>
<br><br>
<span class="h1">Dále doporučujeme...</span>
<div class="videoList">
<ul id="otherVideos">
<?php
$arr = array(
"limit" => 27,
"page" => 1,
"imageWidth" => 191,
"imageHeight" => 100,
"order" => "videa.caszalozeni",
"sort" => "DESC",
"pager" => FALSE
);
$kategorie_output = videa::vypis($arr);
echo $kategorie_output["html"];
?>
</ul>
<div class="clear"></div>
</div>
</div>
<?php
include "inc/right.inc";
?>
<div class="clear"></div>
<?php
include "inc/footer.inc";
ACC SHELL 2018