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> <div id=footer class=footer>
<p>Site last updated 2024-02-20 19:32:55 +1100</p> <div class="update"><p>Site last updated 2024-02-20 19:32:55 +1100</p></div>
<div id=counter class=counter> <div class="counter"><p>Visits:
<p>Visits:
<?php <?php
session_start(); session_start();
if(!isset($_SESSION['counter'])) { if(!isset($_SESSION['counter'])) {
$c_handle = fopen("../data/counter.txt", "r"); $c_handle = fopen("../data/counter.txt", "r");
if(!$c_handle){ if(!$c_handle){
echo "error" echo "error";
} } else {
else { $counter = ( int ) fread($c_handle,32);
$counter = ( int ) fread($c_handle,32); fclose($c_handle);
fclose($c_handle); $counter++ ;
$counter++ ; echo $counter;
echo $counter; $c_handle = fopen("../data/counter.txt", "w");
$c_handle = fopen("../data/counter.txt", "w"); fwrite($c_handle, $counter);
fwrite($c_handle,counter); fclose($c_handle);
fclose($c_handle); $_SESSION['counter'] = $counter;
$_SESSION['counter'] = $counter;
}
else {
$counter = $_SESSION['counter'];
echo $counter;
} }
} else {
$counter = $_SESSION['counter'];
echo $counter;
} }
?> ?>
</p> </p></div>
</div> </div>
</div> </div>

View File

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