Keep session active for auth purposes.
This commit is contained in:
parent
077f68754a
commit
4d6594071d
|
@ -1,5 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
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("Expires: " . gmdate("D, d M Y H:i:s", time() + (100)) . " GMT");
|
||||||
header("Cache-Control: max-age=100");
|
header("Cache-Control: max-age=100");
|
||||||
header("Pragma: cache");
|
header("Pragma: cache");
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
session_start();
|
||||||
|
if (! isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60) {
|
||||||
|
$_SESSION['last_access'] = time();
|
||||||
|
}
|
||||||
|
|
||||||
$_SESSION['isframed'] = 1;
|
$_SESSION['isframed'] = 1;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
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("Expires: " . gmdate("D, d M Y H:i:s", time() + (120)) . " GMT");
|
||||||
header("Cache-Control: max-age=120");
|
header("Cache-Control: max-age=120");
|
||||||
header("Pragma: cache");
|
header("Pragma: cache");
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
session_start();
|
session_start();
|
||||||
|
if (! isset($_SESSION['last_access']) || (time() - $_SESSION['last_access']) > 60) {
|
||||||
|
$_SESSION['last_access'] = time();
|
||||||
|
}
|
||||||
|
|
||||||
include "config.inc.php";
|
include "config.inc.php";
|
||||||
$CONFIG = include ($config_file);
|
$CONFIG = include ($config_file);
|
||||||
$logfile = $logdir . '/post.log';
|
$logfile = $logdir . '/post.log';
|
||||||
|
@ -44,7 +48,7 @@ if ($ip_pass && $_SESSION['pass']) {
|
||||||
} else {
|
} else {
|
||||||
$logged_in = false;
|
$logged_in = false;
|
||||||
}
|
}
|
||||||
if($CONFIG['anonuser'] == '1') {
|
if ($CONFIG['anonuser'] == '1') {
|
||||||
$logged_in = false;
|
$logged_in = false;
|
||||||
}
|
}
|
||||||
// This will log user post info (group and username)
|
// 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="right"><b><?php echo $text_post["password"]?></b></td>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<?php
|
<?php
|
||||||
// if (strcmp($user, $CONFIG['anonusername']) === 0) {
|
// if (strcmp($user, $CONFIG['anonusername']) === 0) {
|
||||||
// $logged_in = false;
|
// $logged_in = false;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if ($logged_in) {
|
if ($logged_in) {
|
||||||
echo '<input class="post" type="password" name="' . md5($fieldencrypt . "email") . '"value="**********"';
|
echo '<input class="post" type="password" name="' . md5($fieldencrypt . "email") . '"value="**********"';
|
||||||
|
|
|
@ -1,5 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
session_start();
|
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("Expires: " . gmdate("D, d M Y H:i:s", time() + (100)) . " GMT");
|
||||||
header("Cache-Control: max-age=100");
|
header("Cache-Control: max-age=100");
|
||||||
header("Pragma: cache");
|
header("Pragma: cache");
|
||||||
|
|
Loading…
Reference in New Issue