misc updates
This commit is contained in:
parent
4fc111cab2
commit
799258b453
5 changed files with 3 additions and 36 deletions
BIN
static/buttons/gayweb.gif
Normal file
BIN
static/buttons/gayweb.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
static/buttons/transrights.gif
Normal file
BIN
static/buttons/transrights.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 471 B |
|
@ -13,8 +13,10 @@
|
|||
<a target="_blank"href="https://www.codecademy.com/learn/learn-css"><img src="/static/buttons/csshard.gif"></a>
|
||||
<a target="_blank"href="https://www.linux.org/"><img src="/static/buttons/linux.gif"></a>
|
||||
<a href='javascript:alert("Got ideas where I should point this to?")'><img src="/static/buttons/paws.gif">
|
||||
<a target="_blank"href="https://www.php.net/"><img src="/static/buttons/php.gif"></a>
|
||||
<a target="_blank" href="https://www.php.net/"><img src="/static/buttons/php.gif"></a>
|
||||
<a target="_blank" href="https://www.linux.org/"><img src="/static/buttons/powered_linux.gif"></a>
|
||||
<a href='javascript:alert("Got ideas where I should point this to?")'><img src="/static/buttons/transrights.gif"></a>
|
||||
<a href='javascript:alert("Got ideas where I should point this to?")'><img src="/static/buttons/gayweb.gif"></a>
|
||||
<!-- <a target="_blank" href="https://ubuntu.com/"><img src="/static/buttons/ubuntu.gif"></a> -->
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
<?php
|
||||
// Start the session
|
||||
session_start();
|
||||
|
||||
// Path to the counter file
|
||||
$file = $_SERVER['DOCUMENT_ROOT'].'/static/visitor_counter/counter.txt';
|
||||
|
||||
// Check if the file exists
|
||||
if (!file_exists($file)) {
|
||||
// If it doesn't exist, create the file and set the initial count to 0
|
||||
file_put_contents($file, '0');
|
||||
}
|
||||
|
||||
// Check if the visitor has already been counted in this session
|
||||
if (!isset($_SESSION['has_visited'])) {
|
||||
// Read the current count from the file
|
||||
$count = file_get_contents($file);
|
||||
|
||||
// Increment the count by 1
|
||||
$count++;
|
||||
|
||||
// Write the new count back to the file
|
||||
file_put_contents($file, $count);
|
||||
|
||||
// Mark this visitor as counted in this session
|
||||
$_SESSION['has_visited'] = true;
|
||||
}
|
||||
|
||||
// Read the current count (after potentially updating it)
|
||||
$count = file_get_contents($file);
|
||||
|
||||
// Display the current count
|
||||
$count_string = "This website has been visited by " . $count . " unique people.";
|
||||
?>
|
|
@ -1 +0,0 @@
|
|||
0
|
Loading…
Reference in a new issue