35 lines
761 B
PHP
35 lines
761 B
PHP
<div id=footer class=footer>
|
|
<div class="update"><p>Site last updated
|
|
<?php
|
|
exec("cd /var/www/daviac && /usr/bin/git show -s --format=%ci 2>&1", $output, $errno);
|
|
echo $output[0];
|
|
?>
|
|
</p></div>
|
|
<div class="counter"><p>Visits:
|
|
<?php
|
|
session_start();
|
|
if(!isset($_SESSION['counter'])) {
|
|
$c_handle = fopen("../data/counter.txt", "r");
|
|
if(!$c_handle){
|
|
echo "error";
|
|
} else {
|
|
$counter = ( int ) fread($c_handle,32);
|
|
fclose($c_handle);
|
|
$counter++ ;
|
|
echo $counter;
|
|
$c_handle = fopen("../data/counter.txt", "w");
|
|
fwrite($c_handle, $counter);
|
|
fclose($c_handle);
|
|
$_SESSION['counter'] = $counter;
|
|
}
|
|
} else {
|
|
$counter = $_SESSION['counter'];
|
|
echo $counter;
|
|
}
|
|
|
|
?>
|
|
</p></div>
|
|
</div>
|
|
</div>
|
|
|