andre 4 anni fa
parent
commit
707396ccd2
1 ha cambiato i file con 15 aggiunte e 0 eliminazioni
  1. 15 0
      action.php

+ 15 - 0
action.php

@@ -68,6 +68,21 @@ class action {
         return $dbAction->execute();
     }
 
+    public function adminDeList($ip) {
+        if(!$this->isListed($ip)) {         //set true to avoid discovering
+            return true;
+        }
+        //delist ip
+        $dbAction = $this->db->prepare("DELETE FROM list WHERE ip = ?");
+        $dbAction->bind_param('i',$ip);
+        $dbAction->execute();
+        //reset delist count
+        $dbAction = $this->db->prepare("DELETE FROM delist WHERE ip = ?");
+        $dbAction->bind_param('i',$ip);
+        $dbAction->execute();
+        return true;
+    }
+
     public function deList($ip) {
         if(!$this->isListed($ip)) {         //set true to avoid discovering
             return true;