Permalink
Browse files

Fixed new message

fixed icon and mktime() (deprecated, there are more mktime()'s in the
code but only the one without arguments is deprecated)
  • Loading branch information...
Halamix2 committed Jun 26, 2017
1 parent 10be457 commit b20de47c6294767e5cadf76c7000a64292a1ea72
Showing with 3 additions and 3 deletions.
  1. +2 −2 includes/header.php
  2. +1 −1 login.php
View
@@ -123,13 +123,13 @@
fseek($f, (((int)$_COOKIE["id_env"] * 2) - 2));
$new_pm = fread($f, 2);
fclose($f);
if ((int)$new_pm != 0) $pm_alert = "-&nbsp;<img src=\"images/new.gif\"> <a href='pmsystem.php?section=inbox'><strong>".$new_pm."</strong> new PMs in your inbox</a>";
if ((int)$new_pm != 0) $pm_alert = "-&nbsp;<img src=\"images/new.jpg\"> <a href='pmsystem.php?section=inbox'><strong>".$new_pm."</strong> new PMs in your inbox</a>";
else $pm_alert = "-&nbsp;<img src=\"images/old.gif\"> No new messages";
$mark_all_read = "<a href='setallread.php'>Mark all posts read</a>";
if ($_COOKIE["power_env"] >= 3) {
$adminlink = "<a href='admin.php'>Admin Panel</a>&nbsp;&middot;";
if($_REGIST['reg_approval']) {
if($_SESSION['reg_approval_count'] == 0 && mktime() > ($_SESSION['reg_approval_lastcheck']+300)) {//Check every 5 mins IF count == 0
if($_SESSION['reg_approval_count'] == 0 && time() > ($_SESSION['reg_approval_lastcheck']+300)) {//Check every 5 mins IF count == 0
$users = $tdb->query('users', "reg_code?'reg_'", 1, -1);
$_SESSION['reg_approval_count'] = ((!empty($users[0])) ? count($users) : 0);
}
View
@@ -27,7 +27,7 @@
if($_REGIST['reg_approval']) {
$reg_approvals = $tdb->query('users', "reg_code?'reg_'", 1, -1);
$_SESSION['reg_approval_count'] = ((!empty($reg_approvals[0])) ? count($reg_approvals) : 0);
$_SESSION['reg_approval_lastcheck'] = mktime(); //Use only if reg_approval_count == 0
$_SESSION['reg_approval_lastcheck'] = time(); //Use only if reg_approval_count == 0
} else {
$_SESSION['reg_approval_count'] = 0;
$_SESSION['reg_approval_lastcheck'] = 0;

0 comments on commit b20de47

Please sign in to comment.