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
{{ message }}
This repository was archived by the owner on Apr 9, 2023. It is now read-only.
$this->db_manager->query("UPDATE browsers SET network_id = '".$this->unid."' WHERE id = '".$this->ubid."';");
574
-
}
575
-
} else {
576
-
$this->db_manager->query("UPDATE browsers SET network_id = '".$this->unid."' WHERE id = '".$this->ubid."';");
577
-
}
578
-
if($this->profile_id != null) {
579
-
$this->db_manager->query("UPDATE browsers SET profile_id = '".$this->profile_id."' WHERE id = '".$this->ubid."';");
580
-
}
581
-
$this->db_manager->query("UPDATE browsers SET agent_id = '".$this->agent_id."', last_update = '".date('Y-m-d H:i:s')."' WHERE id = '".$this->ubid."';");
582
-
$identified = true;
581
+
$this->db_manager->update("browsers", array(
582
+
"ip" => $this->u_ip,
583
+
"network_id" => $this->unid,
584
+
"profile_id" => $this->profile_id,
585
+
"agent_id" => $this->agent_id,
586
+
"last_update" => date('Y-m-d H:i:s')
587
+
), array("id" => $this->ubid));
588
+
return;
583
589
}
584
590
}
585
591
}
586
592
}
587
-
if($identified == false) {
588
-
$cid = $this->db_manager->generate_id(20);
589
-
$result = null;
590
-
if($this->u_language != null) {
591
-
$result = $this->db_manager->query("SELECT id FROM browsers WHERE network_id = '".$this->unid."' AND agent_id = '".$this->agent_id."' AND language = '".$this->u_language."' AND last_update >= '".date('Y-m-d H:i:s', strtotime("-48 hours"))."';");
593
+
$cid = $this->db_manager->generate_id(20);
594
+
$result = null;
595
+
if($this->u_language != null) {
596
+
$result = $this->db_manager->query("SELECT id FROM browsers WHERE network_id = '".$this->unid."' AND agent_id = '".$this->agent_id."' AND language = '".$this->u_language."' AND last_update >= '".date('Y-m-d H:i:s', strtotime("-48 hours"))."';");
597
+
} else {
598
+
if($this->u_bot == 1) {
599
+
$result = $this->db_manager->query("SELECT id FROM browsers WHERE network_id = '".$this->unid."' AND agent_id = '".$this->agent_id."' AND language IS NULL AND bot = 1 AND last_update >= '".date('Y-m-d H:i:s', strtotime("-90 days"))."';");
592
600
} else {
593
-
if($this->u_bot == 1) {
594
-
$result = $this->db_manager->query("SELECT id FROM browsers WHERE network_id = '".$this->unid."' AND agent_id = '".$this->agent_id."' AND language IS NULL AND bot = 1 AND last_update >= '".date('Y-m-d H:i:s', strtotime("-90 days"))."';");
595
-
} else {
596
-
$result = $this->db_manager->query("SELECT id FROM browsers WHERE network_id = '".$this->unid."' AND agent_id = '".$this->agent_id."' AND language IS NULL AND last_update >= '".date('Y-m-d H:i:s', strtotime("-48 hours"))."';");
597
-
}
601
+
$result = $this->db_manager->query("SELECT id FROM browsers WHERE network_id = '".$this->unid."' AND agent_id = '".$this->agent_id."' AND language IS NULL AND last_update >= '".date('Y-m-d H:i:s', strtotime("-48 hours"))."';");
598
602
}
599
-
$data_ubid = "";
600
-
$ubid_count = 0;
601
-
if($resultinstanceof mysqli_result) {
602
-
while($row = $result->fetch_row()) {
603
-
$data_ubid = $row[0];
604
-
$ubid_count++;
605
-
}
606
-
$result->close();
603
+
}
604
+
$data_ubid = "";
605
+
$ubid_count = 0;
606
+
if($resultinstanceof mysqli_result) {
607
+
while($row = $result->fetch_row()) {
608
+
$data_ubid = $row[0];
609
+
$ubid_count++;
607
610
}
608
-
if($ubid_count == 1) {
609
-
$cidrow = null;
610
-
if($this->agent_id != null) {
611
-
$cidrow = $this->db_manager->get_one_row("SELECT id, domain, last FROM trackers WHERE browser_id = '".$data_ubid."' AND agent_id = '".$this->agent_id."' ORDER BY time DESC LIMIT 1;");
612
-
} else {
613
-
$cidrow = $this->db_manager->get_one_row("SELECT id, domain, last FROM trackers WHERE browser_id = '".$data_ubid."' AND agent_id IS NULL ORDER BY time DESC LIMIT 1;");
$this->db_manager->query("UPDATE trackers SET time = '".date('Y-m-d H:i:s')."' WHERE id = '".$cidrow[0]."';");
624
-
} else {
625
-
$this->db_manager->query("DELETE FROM trackers WHERE browser_id = '".$data_ubid."' AND agent_id = '".$this->agent_id."' AND domain = '".$this->d."';");
$cidrow = $this->db_manager->get_one_row("SELECT id, domain, last FROM trackers WHERE browser_id = '".$data_ubid."' AND agent_id = '".$this->agent_id."' ORDER BY time DESC LIMIT 1;");
617
+
} else {
618
+
$cidrow = $this->db_manager->get_one_row("SELECT id, domain, last FROM trackers WHERE browser_id = '".$data_ubid."' AND agent_id IS NULL ORDER BY time DESC LIMIT 1;");
$this->db_manager->query("DELETE FROM trackers WHERE browser_id = '".$data_ubid."' AND agent_id = '".$this->agent_id."' AND domain = '".$this->d."';");
0 commit comments