php typoes, styling

This commit is contained in:
Paul Warren 2024-02-25 16:40:12 +11:00
parent de214d8f00
commit 7c6007393b
2 changed files with 28 additions and 21 deletions

View File

@ -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>

View File

@ -84,7 +84,6 @@
overflow: auto;
}
#sidebar {
float: left;
background-color:#A0A0A0;
@ -95,10 +94,20 @@
clear: both;
}
.update {
float: inline-start;
}
.counter {
float: inline-end;
}
#footer p {
font-size: 10px;
}
img {
border: none;
}