Fix failed git auto-merge.

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2020-05-14 20:14:33 +02:00
8 changed files with 57 additions and 34 deletions
+6 -4
View File
@@ -210,10 +210,12 @@ function initTable() {
// Disable autocorrect in the search box
var input = document.querySelector("input[type=search]");
input.setAttribute("autocomplete", "off");
input.setAttribute("autocorrect", "off");
input.setAttribute("autocapitalize", "off");
input.setAttribute("spellcheck", false);
if (input !== null) {
input.setAttribute("autocomplete", "off");
input.setAttribute("autocorrect", "off");
input.setAttribute("autocapitalize", "off");
input.setAttribute("spellcheck", false);
}
}
function addAdlist() {
+8 -5
View File
@@ -244,10 +244,12 @@ function initTable() {
// Disable autocorrect in the search box
var input = document.querySelector("input[type=search]");
input.setAttribute("autocomplete", "off");
input.setAttribute("autocorrect", "off");
input.setAttribute("autocapitalize", "off");
input.setAttribute("spellcheck", false);
if (input !== null) {
input.setAttribute("autocomplete", "off");
input.setAttribute("autocorrect", "off");
input.setAttribute("autocapitalize", "off");
input.setAttribute("spellcheck", false);
}
table.on("order.dt", function () {
var order = table.order();
@@ -257,6 +259,7 @@ function initTable() {
$("#resetButton").hide();
}
});
$("#resetButton").on("click", function () {
table.order([[0, "asc"]]).draw();
$("#resetButton").hide();
@@ -264,7 +267,7 @@ function initTable() {
}
function addClient() {
var ip = $("#select").val();
var ip = $("#select").val().trim();
var comment = $("#new_comment").val();
utils.disableAll();
+8 -6
View File
@@ -52,12 +52,6 @@ $(document).ready(function () {
$("#wildcard_checkbox").prop("checked", false);
}
});
// Disable autocorrect in the search box
var input = document.querySelector("input[type=search]");
input.setAttribute("autocomplete", "off");
input.setAttribute("autocorrect", "off");
input.setAttribute("autocapitalize", "off");
input.setAttribute("spellcheck", false);
$("#add2black, #add2white").on("click", addDomain);
@@ -286,6 +280,14 @@ function initTable() {
}
}
});
// Disable autocorrect in the search box
var input = document.querySelector("input[type=search]");
if (input !== null) {
input.setAttribute("autocomplete", "off");
input.setAttribute("autocorrect", "off");
input.setAttribute("autocapitalize", "off");
input.setAttribute("spellcheck", false);
}
table.on("order.dt", function () {
var order = table.order();
+9
View File
@@ -110,6 +110,15 @@ $(document).ready(function () {
}
});
// Disable autocorrect in the search box
var input = document.querySelector("input[type=search]");
if (input !== null) {
input.setAttribute("autocomplete", "off");
input.setAttribute("autocorrect", "off");
input.setAttribute("autocapitalize", "off");
input.setAttribute("spellcheck", false);
}
table.on("order.dt", function () {
var order = table.order();
if (order[0][0] !== 0 || order[0][1] !== "asc") {
+9 -5
View File
@@ -68,6 +68,8 @@ $(document).ready(function () {
rowCallback: function (row, data) {
var color,
mark,
maxiter,
index,
lastQuery = parseInt(data.lastQuery);
var network_recent = $(".network-recent").css("background-color");
var network_old = $(".network-old").css("background-color");
@@ -110,8 +112,9 @@ $(document).ready(function () {
$("td:eq(3)", row).html("<em>unknown</em>");
} else {
var names = [];
var maxiter = Math.min(data.name.length, MAXIPDISPLAY);
for (var index = 0; index < maxiter; index++) {
maxiter = Math.min(data.name.length, MAXIPDISPLAY);
index = 0;
for (index = 0; index < maxiter; index++) {
var name = data.name[index];
names.push('<a href="queries.php?client=' + name + '">' + name + "</a>");
}
@@ -121,19 +124,20 @@ $(document).ready(function () {
// have more to show here
names.push("...");
}
$("td:eq(3)", row).html(names.join("<br>"));
$("td:eq(3)", row).hover(function () {
this.title = data.name.join("\n");
});
}
// Set number of queries to localized string (add thousand separators)
$("td:eq(6)", row).html(data.numQueries.toLocaleString());
var ips = [];
var maxiter = Math.min(data.ip.length, MAXIPDISPLAY);
for (var index = 0; index < maxiter; index++) {
maxiter = Math.min(data.ip.length, MAXIPDISPLAY);
index = 0;
for (index = 0; index < maxiter; index++) {
var ip = data.ip[index];
ips.push('<a href="queries.php?client=' + ip + '">' + ip + "</a>");
}
+2 -2
View File
@@ -137,10 +137,10 @@ function addCustomDNSEntry($ip="", $domain="", $json_reply=true)
try
{
if(isset($_REQUEST['ip']))
$ip = $_REQUEST['ip'];
$ip = trim($_REQUEST['ip']);
if(isset($_REQUEST['domain']))
$domain = $_REQUEST['domain'];
$domain = trim($_REQUEST['domain']);
if (empty($ip))
return error("IP must be set");
+1 -1
View File
@@ -488,7 +488,7 @@ if ($_POST['action'] == 'get_groups') {
$domains = explode(' ', trim($_POST['domain']));
$total = count($domains);
$added = 0;
$stmt = $db->prepare('INSERT INTO domainlist (domain,type,comment) VALUES (:domain,:type,:comment)');
$stmt = $db->prepare('REPLACE INTO domainlist (domain,type,comment) VALUES (:domain,:type,:comment)');
if (!$stmt) {
throw new Exception('While preparing statement: ' . $db->lastErrorMsg());
}
+14 -11
View File
@@ -262,10 +262,10 @@ function addStaticDHCPLease($mac, $ip, $hostname) {
if(array_key_exists("custom".$i,$_POST))
{
$exploded = explode("#", $_POST["custom".$i."val"], 2);
$IP = $exploded[0];
$IP = trim($exploded[0]);
if(count($exploded) > 1)
{
$port = $exploded[1];
$port = trim($exploded[1]);
}
else
{
@@ -326,22 +326,25 @@ function addStaticDHCPLease($mac, $ip, $hostname) {
// Check if Conditional Forwarding is requested
if(isset($_POST["conditionalForwarding"]))
{
$conditionalForwardingIP = trim($_POST["conditionalForwardingIP"]);
$conditionalForwardingDomain = trim($_POST["conditionalForwardingDomain"]);
// Validate conditional forwarding IP
if (!validIP($_POST["conditionalForwardingIP"]))
if (!validIP($conditionalForwardingIP))
{
$error .= "Conditional forwarding IP (".htmlspecialchars($_POST["conditionalForwardingIP"]).") is invalid!<br>";
$error .= "Conditional forwarding IP (".htmlspecialchars($conditionalForwardingIP).") is invalid!<br>";
}
// Validate conditional forwarding domain name
if(!validDomain($_POST["conditionalForwardingDomain"]))
if(!validDomain($conditionalForwardingDomain))
{
$error .= "Conditional forwarding domain name (".htmlspecialchars($_POST["conditionalForwardingDomain"]).") is invalid!<br>";
$error .= "Conditional forwarding domain name (".htmlspecialchars($conditionalForwardingDomain).") is invalid!<br>";
}
if(!$error)
{
$addressArray = explode(".", $_POST["conditionalForwardingIP"]);
$addressArray = explode(".", $conditionalForwardingIP);
$reverseAddress = $addressArray[2].".".$addressArray[1].".".$addressArray[0].".in-addr.arpa";
$extra .= " conditional_forwarding ".$_POST["conditionalForwardingIP"]." ".$_POST["conditionalForwardingDomain"]." $reverseAddress";
$extra .= " conditional_forwarding ".$conditionalForwardingIP." ".$conditionalForwardingDomain." $reverseAddress";
}
}
@@ -588,9 +591,9 @@ function addStaticDHCPLease($mac, $ip, $hostname) {
if(isset($_POST["addstatic"]))
{
$mac = $_POST["AddMAC"];
$ip = $_POST["AddIP"];
$hostname = $_POST["AddHostname"];
$mac = trim($_POST["AddMAC"]);
$ip = trim($_POST["AddIP"]);
$hostname = trim($_POST["AddHostname"]);
addStaticDHCPLease($mac, $ip, $hostname);
break;