You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$insert = $db->sql_query("INSERT INTO `mod_useronline` (`timestamp`, `ip`) VALUES ('mysql_real_escape_string($this->timestamp)', 'mysql_real_escape_string($this->ip)')");
52
+
$insert = $db->sql_query("INSERT INTO `mod_useronline` (`timestamp`, `ip`) VALUES ('$this->timestamp', '$this->ip')");
53
53
if (!$insert) {
54
54
$this->error[$this->i] = "Unable to record new visitor\r\n";
55
55
$this->i ++;
@@ -120,7 +120,7 @@ function count_users() {
120
120
121
121
$yesterdaystart = $daystart - (24*60*60);
122
122
$now = time();
123
-
$ip = getIP();
123
+
$ip = mysql_real_escape_string(getIP());
124
124
125
125
126
126
$r = mysql_query("SELECT MAX( id ) AS total FROM `mod_visitcounter`");
@@ -140,12 +140,12 @@ function count_users() {
140
140
//$query = mysql_query ("DELETE FROM `mod_visitcounter` WHERE `id`<'$temp'");
141
141
}
142
142
143
-
$item = mysql_fetch_assoc(mysql_query ("SELECT COUNT(*) AS `total` FROM `mod_visitcounter` WHERE `ip`='mysql_real_escape_string($ip)' AND (tm+'$locktime')>'$now'"));
143
+
$item = mysql_fetch_assoc(mysql_query ("SELECT COUNT(*) AS `total` FROM `mod_visitcounter` WHERE `ip`='$ip' AND (tm+'$locktime')>'$now'"));
0 commit comments