From 87d339d62dfa1a054b3d48c3c0e88927be696dea Mon Sep 17 00:00:00 2001 From: OliverParoczai Date: Tue, 30 Mar 2021 14:37:31 +0200 Subject: [PATCH] Polished selector and file upload --- admin/dataupload.php | 13 +++++++++---- header.php | 6 +++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/admin/dataupload.php b/admin/dataupload.php index 46c30f3..7966559 100644 --- a/admin/dataupload.php +++ b/admin/dataupload.php @@ -12,7 +12,7 @@
-
+
@@ -327,5 +329,8 @@ $('.masked-input').find('.phone-number').inputmask('+36 99/999-9999', { placeholder: '+__ __/___-____' }); $('.masked-input').find('.postal-code').inputmask('9999', { placeholder: '____' }); }); + document.getElementById("formfile").onchange = function() { + document.getElementById("uploadform").submit.click(); + }; \ No newline at end of file diff --git a/header.php b/header.php index f793887..f5e05d4 100644 --- a/header.php +++ b/header.php @@ -197,10 +197,10 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type != $username = "Vendég"; $type = "0"; $sql = "SELECT * FROM `acctypes` WHERE `id` = '".$type."'"; - mysqli_free_result($result); $result = $conn->query($sql); $sqlvals = $result->fetch_assoc(); $fulltype = $sqlvals["name_hun"]; + mysqli_free_result($result); } ?> @@ -362,6 +362,7 @@ if(!isset($liteload) && $loggedin == false && $isadmin && $type != 1 && $type != + +