From 389f7343d3bdf88473a47b8a50bd6ab27fbf8953 Mon Sep 17 00:00:00 2001 From: Givou Date: Wed, 17 Mar 2021 14:00:18 +0100 Subject: [PATCH] Make impressum and privacy links able to open in a new tab --- admin.php | 19 +++++++++++++++---- index.php | 10 +++++++++- install/index.php | 1 + worker.php | 22 ++++++++++++++++++++++ 4 files changed, 47 insertions(+), 5 deletions(-) diff --git a/admin.php b/admin.php index 6a32777..fee97c5 100644 --- a/admin.php +++ b/admin.php @@ -505,10 +505,10 @@ if(isset($_GET["manageservice"])) { echo '
- +
@@ -518,6 +518,8 @@ if(isset($_GET["manageservice"])) { echo '

Impressum link set to: '.$_GET['impressumset'].'!

'; } else if($_GET['privacyset']) { echo '

Privacy policity link set to: '.$_GET['privacyset'].'!

'; + } else if(isset($_GET['newtabset'])) { + echo '

Open new tab policy updated!

'; } echo '
@@ -531,6 +533,15 @@ if(isset($_GET["manageservice"])) {
+ +
+ + + +
'; } diff --git a/index.php b/index.php index 9256a66..4e3cbda 100644 --- a/index.php +++ b/index.php @@ -19,6 +19,7 @@ $modular_setting = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='modularwindow'"))["value"]; $privacy = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='privacy'"))["value"]; $impressum = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='impressum'"))["value"]; + $newtab = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='newtab'"))["value"]; $groups = mysqli_query($con, "SELECT priority, name, id FROM groups ORDER BY priority DESC"); $services = mysqli_query($con, "SELECT priority, groupid, name, id, status FROM services ORDER BY priority DESC"); @@ -259,7 +260,14 @@ echo ''; diff --git a/install/index.php b/install/index.php index b250ec0..47d61ed 100644 --- a/install/index.php +++ b/install/index.php @@ -89,6 +89,7 @@ if(isset($_POST['dbhost']) && isset($_POST['dbname']) && isset($_POST['dbpwd']) mysqli_query($con, "INSERT INTO settings(type, value) VALUES ('autoreload', 'enabled')"); mysqli_query($con, "INSERT INTO settings(type, value) VALUES ('impressum', '#')"); mysqli_query($con, "INSERT INTO settings(type, value) VALUES ('privacy', '#')"); + mysqli_query($con, "INSERT INTO settings(type, value) VALUES ('newtab', 'same tab')"); //Creating Administrative User mysqli_query($con, "INSERT INTO accounts (username, password, role) VALUES ('".mysqli_real_escape_string($con,$admin_username)."', diff --git a/worker.php b/worker.php index 9447afe..f9de250 100644 --- a/worker.php +++ b/worker.php @@ -25,6 +25,7 @@ $role = mysqli_fetch_assoc(mysqli_query($con, "SELECT role FROM accounts WHERE i $instancename = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='instancename'"))["value"]; $privacy = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='privacy'"))["value"]; $impressum = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='impressum'"))["value"]; +$newtab = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='newtab'"))["value"]; if($role == "administrator") { $autoreload_setting = mysqli_fetch_assoc(mysqli_query($con, "SELECT value FROM settings WHERE type='autoreload'"))["value"]; @@ -350,6 +351,27 @@ if($role == "administrator") { } ?> + +