Changeset 1371522
- Timestamp:
- 03/15/2016 12:26:36 PM (10 years ago)
- Location:
- visitoraudit/trunk
- Files:
-
- 2 edited
-
visitor-audit.admin.php (modified) (4 diffs)
-
visitor-audit.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
visitoraudit/trunk/visitor-audit.admin.php
r1365893 r1371522 82 82 $table["columns"] = array("ID", "IP Address","IP Fowarded", "Last Visit", "Page/Error Per Minute", "Status", "Actions"); 83 83 $table["rows"] = array(); 84 $results = $this->db->get_results("SELECT * FROM ". $this->db->prefix . "visitor_audit ");84 $results = $this->db->get_results("SELECT * FROM ". $this->db->prefix . "visitor_audit LIMIT 1000"); 85 85 if (isset($results) AND is_array($results) AND count($results)){ 86 86 $original_id = $this->system->id; … … 135 135 $table["columns"] = array("ID", "IP Address", "IP Fowarded", "Banned Time", "Action"); 136 136 $table["rows"] = array(); 137 $results = $this->db->get_results("SELECT * FROM ". $this->db->prefix . "visitor_audit_banned ");137 $results = $this->db->get_results("SELECT * FROM ". $this->db->prefix . "visitor_audit_banned LIMIT 1000"); 138 138 if (isset($results) AND is_array($results) AND count($results)){ 139 139 foreach ($results as $result){ … … 279 279 if ($id){ 280 280 $divider = "----------------------------------------------------------------------------<br>"; 281 $query = $this->db->prepare("SELECT * FROM ". $this->db->prefix . "visitor_audit_history WHERE visitor_audit_id = %d ", $id);281 $query = $this->db->prepare("SELECT * FROM ". $this->db->prefix . "visitor_audit_history WHERE visitor_audit_id = %d LIMIT 1000", $id); 282 282 $results = $this->db->get_results($query); 283 283 … … 358 358 if (!empty($_REQUEST["visitor_audit_id"])){ $id = (int)$_REQUEST["visitor_audit_id"]; } 359 359 if ($id){ 360 $query = $this->db->prepare("SELECT * FROM ". $this->db->prefix . "visitor_audit WHERE visitor_audit_id = %d ", $id);360 $query = $this->db->prepare("SELECT * FROM ". $this->db->prefix . "visitor_audit WHERE visitor_audit_id = %d LIMIT 1", $id); 361 361 $result = $this->db->get_results($query); 362 362 if (!empty($result[0]->visitor_audit_ip)){ -
visitoraudit/trunk/visitor-audit.class.php
r1365893 r1371522 155 155 $banned_status = true; 156 156 if ($result[0]->visitor_audit_banned_type == 1){ $this->banned_retention = 0; } //indefinite 157 } 157 } 158 158 } 159 159 //if visitor meets critiria block them … … 243 243 $insert["visitor_audit_ip_forwarded"] = $this->ip_forwarded; 244 244 if (!empty($_SERVER['HTTP_USER_AGENT'])) { 245 $insert["visitor_audit_useragent"] = $_SERVER['HTTP_USER_AGENT'];245 $insert["visitor_audit_useragent"] = preg_replace("/[^a-zA-Z0-9-_. ]/", "", $_SERVER['HTTP_USER_AGENT']); 246 246 } 247 247 if (!empty($_SERVER['HTTP_REFERER'])) { 248 $insert["visitor_audit_referer"] = $_SERVER['HTTP_REFERER'];248 $insert["visitor_audit_referer"] = preg_replace("/[^a-zA-Z0-9-_. ]/", "", $_SERVER['HTTP_REFERER']); 249 249 } 250 250 $this->db->insert($this->db->prefix . "visitor_audit", $insert); … … 423 423 { 424 424 if (!empty($_SERVER['REMOTE_ADDR'])){ 425 return $_SERVER['REMOTE_ADDR'];425 return preg_replace("/[^0-9:. ]/", "", $_SERVER['REMOTE_ADDR']); 426 426 } else { 427 427 return 0; … … 437 437 { 438 438 if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){ 439 return $_SERVER['HTTP_X_FORWARDED_FOR'];439 return preg_replace("/[^0-9:. ]/", "", $_SERVER['HTTP_X_FORWARDED_FOR']); 440 440 } else { 441 441 return 0;
Note: See TracChangeset
for help on using the changeset viewer.