}
// Add user to database
- db_query("INSERT INTO ".TB_PREF."useronline (timestamp, ip, file) VALUES ('". $timestamp ."','". $ip ."','". $_SERVER['PHP_SELF'] ."')");
+ db_query("INSERT INTO ".TB_PREF."useronline (timestamp, ip, file) VALUES ('". $timestamp ."',". db_escape($ip) .",". db_escape($_SERVER['PHP_SELF']) .")");
//Remove users that were not online within $timeoutseconds.
db_query("DELETE FROM ".TB_PREF."useronline WHERE timestamp<". $timeout);
return "$users ".($users == 1 ? _("user online") : _("users online"));
}
-?>
\ No newline at end of file
+?>