Parcourir la source

outdated code has been removed

root il y a 1 an
Parent
commit
3d1b9a2328
3 fichiers modifiés avec 1 ajouts et 33 suppressions
  1. 1 1
      docs/mysql/reset_admin.sql
  2. 0 28
      html/admin/users/add_dhcp.php
  3. 0 4
      html/inc/qauth.php

+ 1 - 1
docs/mysql/reset_admin.sql

@@ -1,3 +1,3 @@
 --- default user: admin
 --- default password admin
-INSERT INTO `Customers` (`id`, `Login`, `password`, `api_key`, `readonly`) VALUES (1, 'admin', '$2y$11$wohV8Tuqu0Yai9Shacei5OKfMxG5bnLxB5ACcZcJJ3pYEbIH0qLGG', 'c3284d0f94606de1fd2af172aba15bf31', 0) ON DUPLICATE KEY UPDATE Login="admin", password="$2y$11$wohV8Tuqu0Yai9Shacei5OKfMxG5bnLxB5ACcZcJJ3pYEbIH0qLGG";
+INSERT INTO `Customers` (`id`, `Login`, `password`, `api_key`,`rights`) VALUES (1, 'admin', '$2y$11$wohV8Tuqu0Yai9Shacei5OKfMxG5bnLxB5ACcZcJJ3pYEbIH0qLGG', 'c3284d0f94606de1fd2af172aba15bf31','1') ON DUPLICATE KEY UPDATE Login="admin", password="$2y$11$wohV8Tuqu0Yai9Shacei5OKfMxG5bnLxB5ACcZcJJ3pYEbIH0qLGG";

+ 0 - 28
html/admin/users/add_dhcp.php

@@ -1,28 +0,0 @@
-<?php
-require_once($_SERVER['DOCUMENT_ROOT'] . "/inc/qauth.php");
-
-if (!empty($_GET["ip"]) and !empty($_GET["mac"])) {
-  $ip = $_GET["ip"];
-  $mac = mac_dotted(trim($_GET["mac"]));
-  $dhcp_hostname = '';
-  if (!empty($_GET["hostname"])) {
-    $dhcp_hostname = trim($_GET["hostname"]);
-  }
-  $faction = $_GET["action"] * 1;
-  $action = 'add';
-  if ($faction == 1) {
-    $action = 'add';
-  }
-  if ($faction == 0) {
-    $action = 'del';
-  }
-  LOG_VERBOSE($db_link, "external dhcp request for $ip [$mac] $action");
-  if (checkValidIp($ip) and is_our_network($db_link, $ip)) {
-    $run_cmd = "/opt/Eye/scripts/dnsmasq-hook.sh '" . $action . "' '" . $mac . "' '" . $ip . "' '" . $dhcp_hostname . "'";
-    $result = shell_exec("/usr/bin/sudo " . escapeshellcmd($run_cmd) . " >/dev/null 2>/dev/null &");
-    LOG_VERBOSE($db_link, "Run command: $run_cmd ");
-  } else {
-    LOG_ERROR($db_link, "$ip - wrong network!");
-  }
-}
-unset($_GET);

+ 0 - 4
html/inc/qauth.php

@@ -1,4 +0,0 @@
-<?php
-require_once ("auth.utils.php");
-Silentlogin($db_link);
-?>