php typoes, styling
This commit is contained in:
parent
de214d8f00
commit
7c6007393b
38
footer.php
38
footer.php
|
@ -1,31 +1,29 @@
|
|||
<div id=footer class=footer>
|
||||
<p>Site last updated 2024-02-20 19:32:55 +1100</p>
|
||||
<div id=counter class=counter>
|
||||
<p>Visits:
|
||||
<div class="update"><p>Site last updated 2024-02-20 19:32:55 +1100</p></div>
|
||||
<div class="counter"><p>Visits:
|
||||
<?php
|
||||
session_start();
|
||||
if(!isset($_SESSION['counter'])) {
|
||||
$c_handle = fopen("../data/counter.txt", "r");
|
||||
$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;
|
||||
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>
|
||||
</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue