added old project files

This commit is contained in:
2020-05-16 20:41:32 +02:00
parent 177e267e18
commit b264ae0ee2
21 changed files with 796 additions and 0 deletions

23
php/checkSessionValidity.php Executable file
View File

@ -0,0 +1,23 @@
<?php
if(isset($_COOKIE['LAST_ACTIVITY']))
{
if (time() - $_COOKIE['LAST_ACTIVITY'] > 86400) {
// last activity is more than 10 minutes ago
session_destroy();
echo "you are logged out because of the 10 minutes...";
exit();
} else {
// update last activity timestamp
//echo "updated timestamp";
//printf("timestamp updated %d seconds left", 3600 - (time() - $_SESSION['LAST_ACTIVITY']));
$_COOKIE['LAST_ACTIVITY'] = time();
}
}else
{
echo "no cookie...";
exit();
}
?>