Keep session active for auth purposes.

This commit is contained in:
Retro_Guy 2023-12-23 13:07:03 -07:00
parent 077f68754a
commit 4d6594071d
5 changed files with 23 additions and 4 deletions

View File

@ -1,5 +1,9 @@
<?php
session_start();
if (! isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60) {
$_SESSION['last_access'] = time();
}
header("Expires: " . gmdate("D, d M Y H:i:s", time() + (100)) . " GMT");
header("Cache-Control: max-age=100");
header("Pragma: cache");

View File

@ -1,5 +1,8 @@
<?php
session_start();
if (! isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60) {
$_SESSION['last_access'] = time();
}
$_SESSION['isframed'] = 1;

View File

@ -1,5 +1,9 @@
<?php
session_start();
if (! isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60) {
$_SESSION['last_access'] = time();
}
header("Expires: " . gmdate("D, d M Y H:i:s", time() + (120)) . " GMT");
header("Cache-Control: max-age=120");
header("Pragma: cache");

View File

@ -23,6 +23,10 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
session_start();
if (! isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60) {
$_SESSION['last_access'] = time();
}
include "config.inc.php";
$CONFIG = include ($config_file);
$logfile = $logdir . '/post.log';
@ -44,7 +48,7 @@ if ($ip_pass && $_SESSION['pass']) {
} else {
$logged_in = false;
}
if($CONFIG['anonuser'] == '1') {
if ($CONFIG['anonuser'] == '1') {
$logged_in = false;
}
// This will log user post info (group and username)
@ -394,9 +398,9 @@ if ($show == 1) {
<td align="right"><b><?php echo $text_post["password"]?></b></td>
<td align="left">
<?php
// if (strcmp($user, $CONFIG['anonusername']) === 0) {
// $logged_in = false;
// }
// if (strcmp($user, $CONFIG['anonusername']) === 0) {
// $logged_in = false;
// }
if ($logged_in) {
echo '<input class="post" type="password" name="' . md5($fieldencrypt . "email") . '"value="**********"';

View File

@ -1,5 +1,9 @@
<?php
session_start();
if (! isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60) {
$_SESSION['last_access'] = time();
}
header("Expires: " . gmdate("D, d M Y H:i:s", time() + (100)) . " GMT");
header("Cache-Control: max-age=100");
header("Pragma: cache");