From 9371aebfc48fa8cc78bca4eb460e5c13b71934fe Mon Sep 17 00:00:00 2001
From: Banana
Date: Sun, 8 Aug 2021 13:38:29 +0200
Subject: [PATCH] setup
---
documentation/setup/bibliotheca.sql | 336 +++++++++--------------
sources/updatecheck.txt | 11 +
webclient/setup.php | 144 ----------
webclient/setup/bibliotheca.sql | 303 ++++++++++++++++++++
webclient/setup/bibliotheca.sql.default | 303 ++++++++++++++++++++
webclient/setup/index.php | 349 ++++++++++++++++++++++++
6 files changed, 1096 insertions(+), 350 deletions(-)
create mode 100644 sources/updatecheck.txt
delete mode 100644 webclient/setup.php
create mode 100644 webclient/setup/bibliotheca.sql
create mode 100644 webclient/setup/bibliotheca.sql.default
create mode 100644 webclient/setup/index.php
diff --git a/documentation/setup/bibliotheca.sql b/documentation/setup/bibliotheca.sql
index aa63575..fe12c78 100644
--- a/documentation/setup/bibliotheca.sql
+++ b/documentation/setup/bibliotheca.sql
@@ -1,49 +1,62 @@
-SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
-SET AUTOCOMMIT = 0;
-START TRANSACTION;
-SET time_zone = "+00:00";
-
+-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
+--
+-- Host: localhost Database: bibliotheca
+-- ------------------------------------------------------
+-- Server version 8.0.25
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8mb4 */;
-
---
--- Database: `bibliotheca`
---
-
--- --------------------------------------------------------
+/*!50503 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `#REPLACEME#_collection`
--
DROP TABLE IF EXISTS `#REPLACEME#_collection`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_collection` (
- `id` int NOT NULL,
+ `id` int NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`defaultSearchField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
- `defaultSortField` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL,
+ `defaultSortField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`advancedSearchTableFields` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`modificationuser` int DEFAULT NULL,
`owner` int NOT NULL,
`group` int NOT NULL,
- `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_collection`
+--
--- --------------------------------------------------------
+LOCK TABLES `#REPLACEME#_collection` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_collection` DISABLE KEYS */;
+/*!40000 ALTER TABLE `#REPLACEME#_collection` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_group`
--
DROP TABLE IF EXISTS `#REPLACEME#_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_group` (
- `id` int NOT NULL,
+ `id` int NOT NULL AUTO_INCREMENT,
`name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`protected` tinyint(1) NOT NULL DEFAULT '0',
@@ -52,27 +65,30 @@ CREATE TABLE `#REPLACEME#_group` (
`modificationuser` int DEFAULT NULL,
`owner` int NOT NULL,
`group` int NOT NULL,
- `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `#REPLACEME#_group`
--
-INSERT INTO `#REPLACEME#_group` (`id`, `name`, `description`, `protected`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES
-(1, 'Administration', 'Admin group', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwx------'),
-(2, 'Users', 'Default user group', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwxr--r--'),
-(3, 'Anonymous', 'Anonymous users', 1, '2020-05-31 21:25:29', 0, 1, 1, 'rwxr--r--');
-
--- --------------------------------------------------------
+LOCK TABLES `#REPLACEME#_group` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_group` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_group` VALUES (1,'Administration','Admin group',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwx------'),(2,'Users','Default user group',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwxr--r--'),(3,'Anonymous','Anonymous users',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwxr--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_group` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_menu`
--
DROP TABLE IF EXISTS `#REPLACEME#_menu`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_menu` (
- `id` int UNSIGNED NOT NULL,
+ `id` int unsigned NOT NULL AUTO_INCREMENT,
`text` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`icon` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
@@ -80,40 +96,30 @@ CREATE TABLE `#REPLACEME#_menu` (
`group` int NOT NULL DEFAULT '0',
`rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`position` int NOT NULL DEFAULT '0',
- `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `#REPLACEME#_menu`
--
-INSERT INTO `#REPLACEME#_menu` (`id`, `text`, `action`, `icon`, `owner`, `group`, `rights`, `position`, `category`) VALUES
-(1, 'Dashboard', '', 'home', 1, 1, 'rw-r--r--', 0, 'show'),
-(2, 'Collections', 'collections', 'database', 1, 1, 'rw-r--r--', 1, 'show'),
-(3, 'Tags', 'tags', 'tag', 1, 1, 'rw-r--r--', 2, 'show'),
-(4, 'Add', 'manageentry', 'plus-circle', 1, 2, 'rw-rw----', 0, 'manage'),
-(6, 'Tags', 'managetags', 'tag', 1, 2, 'rw-rw----', 2, 'manage'),
-(7, 'Collections', 'managecolletions', 'database', 1, 2, 'rw-rw----', 3, 'manage'),
-(8, 'Users', 'manageusers', 'users', 1, 1, 'rw-------', 4, 'manage'),
-(9, 'Login', 'auth', '', 1, 1, 'rw-r--r--', 0, ''),
-(10, 'Collection fields', 'managecollectionfields', '', 1, 2, 'rw-rw----', 0, ''),
-(11, 'Entry', 'entry', '', 1, 1, 'rw-r--r--', 0, ''),
-(12, 'Search', 'search', '', 1, 1, 'rw-r--r--', 0, ''),
-(14, 'Tool', 'tool', '', 1, 2, 'rw-rw----', 0, ''),
-(15, 'Advanced search', 'advancedsearch', '', 1, 1, 'rw-r--r--', 0, ''),
-(16, 'Profile', 'profile', 'user', 1, 2, 'rw-rw----', 6, 'manage'),
-(17, 'Groups', 'managegroups', 'users', 1, 1, 'rw-------', 5, 'manage'),
-(18, 'Bulkedit', 'bulkedit', '', 1, 2, 'rw-rw----', 0, '');
-
--- --------------------------------------------------------
+LOCK TABLES `#REPLACEME#_menu` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_menu` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_menu` VALUES (1,'Dashboard','','home',1,1,'rw-r--r--',0,'show'),(2,'Collections','collections','database',1,1,'rw-r--r--',1,'show'),(3,'Tags','tags','tag',1,1,'rw-r--r--',2,'show'),(4,'Add','manageentry','plus-circle',1,2,'rw-rw----',0,'manage'),(6,'Tags','managetags','tag',1,2,'rw-rw----',2,'manage'),(7,'Collections','managecolletions','database',1,2,'rw-rw----',3,'manage'),(8,'Users','manageusers','users',1,1,'rw-------',4,'manage'),(9,'Login','auth','',1,1,'rw-r--r--',0,''),(10,'Collection fields','managecollectionfields','',1,2,'rw-rw----',0,''),(11,'Entry','entry','',1,1,'rw-r--r--',0,''),(12,'Search','search','',1,1,'rw-r--r--',0,''),(14,'Tool','tool','',1,2,'rw-rw----',0,''),(15,'Advanced search','advancedsearch','',1,1,'rw-r--r--',0,''),(16,'Profile','profile','user',1,2,'rw-rw----',6,'manage'),(17,'Groups','managegroups','users',1,1,'rw-------',5,'manage'),(18,'Bulkedit','bulkedit','',1,2,'rw-rw----',0,'');
+/*!40000 ALTER TABLE `#REPLACEME#_menu` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_sys_fields`
--
DROP TABLE IF EXISTS `#REPLACEME#_sys_fields`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_sys_fields` (
- `id` int NOT NULL,
+ `id` int NOT NULL AUTO_INCREMENT,
`identifier` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`displayname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
@@ -127,92 +133,85 @@ CREATE TABLE `#REPLACEME#_sys_fields` (
`modificationuser` int DEFAULT NULL,
`owner` int NOT NULL,
`group` int NOT NULL,
- `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `identifier` (`identifier`)
+) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `#REPLACEME#_sys_fields`
--
-INSERT INTO `bib_sys_fields` (`id`, `identifier`, `displayname`, `type`, `searchtype`, `createstring`, `inputValidation`, `value`, `apiinfo`, `created`, `modified`, `modificationuser`, `owner`, `group`, `rights`) VALUES
-(1, 'title', 'Title', 'text', 'entryText', '`title` varchar(128) NOT NULL, ADD FULLTEXT (`title`)', '', NULL, 'string 128', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(2, 'description', 'Description', 'text3', 'entryText', '`description` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`description`)', '', NULL, 'string 255', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(3, 'content', 'Main content', 'textarea', 'entryText', '`content` text NULL DEFAULT NULL, ADD FULLTEXT (`content`)', '', NULL, 'mysql text', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(5, 'tag', 'Tag', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(6, 'category', 'Category', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(7, 'publisher', 'Publisher', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(8, 'developer', 'Developer', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(9, 'platform', 'Platform', 'selection', 'entrySingleText', '`platform` varchar(32) NULL DEFAULT NULL', '', 'Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X', 'One of Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(10, 'storage', 'Storage', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(13, 'rating', 'Rating', 'selection', 'entrySingleText', '`rating` varchar(16) NULL DEFAULT NULL', '', '0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10', 'One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(14, 'year', 'Year', 'year', 'entrySingleNum', '`year` int(10) NULL, ADD INDEX (`year`)', '', NULL, 'int 10', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(15, 'coverimage', 'Cover image', 'upload', NULL, NULL, '', NULL, 'One file in $_FILES[uploads] of post', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(16, 'attachment', 'Attachments', 'upload_multiple', NULL, NULL, '', NULL, 'Multiple in $_FILES[uploads] of post', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(17, 'os', 'Operating system and version', 'selection', 'entrySingleNum', '`os` varchar(32) NULL DEFAULT NULL', '', 'DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10', 'One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(18, 'actors', 'Actors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(19, 'countries', 'Countries', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(20, 'directors', 'Directors', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(21, 'genres', 'Genres', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(22, 'languages', 'Languages', 'lookupmultiple', 'tag', NULL, '', NULL, 'string 64', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(23, 'runtime', 'Runtime (min)', 'number', 'entrySingleNum', '`runtime` int(10) NULL, ADD INDEX (`runtime`)', '', NULL, 'int 10', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(24, 'imdbrating', 'IMDB Rating', 'text', 'entrySingleText', '`imdbrating` varchar(128) NULL DEFAULT NULL', '', NULL, 'string 128', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(25, 'viewcount', 'View counter', 'number', 'entrySingleNum', '`viewcount` int(10) NULL, ADD INDEX (`viewcount`)', '', NULL, 'int 10', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(26, 'writers', 'Writers', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(27, 'localizedTitle', 'localized Title', 'text', 'entryText', '`localizedTitle` varchar(128) NULL DEFAULT NULL, ADD FULLTEXT (`localizedTitle`)', '', NULL, 'string 128', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(28, 'gameEngine', 'Game Engine', 'text', 'entryText', '`gameEngine` varchar(128) NOT NULL, ADD FULLTEXT (`gameEngine`)', '', NULL, 'string 128', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(29, 'view', 'View', 'selection', 'entrySingleNum', '`view` varchar(32) NULL DEFAULT NULL', '', 'First person,Third person,Top-down', 'First person,Third person,Top-down', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(30, 'sysReq', 'System Requirements', 'text3', 'entryText', '`sysReq` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`sysReq`)', '', NULL, 'string 255', NOW(), NOW(), 0, 1, 1, 'rw-r--r--'),
-(31, 'artist', 'Artist', 'text', 'entrySingleText', '`artist` varchar(128) NULL DEFAULT NULL', '', NULL, 'string 128', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--'),
-(32, 'artists', 'Artists', 'lookupmultiple', 'tag', NULL, 'allowSpace', NULL, 'string 64', NOW(), NOW(), NULL, 1, 1, 'rw-r--r--');
-
--- --------------------------------------------------------
+LOCK TABLES `#REPLACEME#_sys_fields` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_sys_fields` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_sys_fields` VALUES (1,'title','Title','text','entryText','`title` varchar(128) NOT NULL, ADD FULLTEXT (`title`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(2,'description','Description','text3','entryText','`description` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`description`)','',NULL,'string 255','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(3,'content','Main content','textarea','entryText','`content` text NULL DEFAULT NULL, ADD FULLTEXT (`content`)','',NULL,'mysql text','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(5,'tag','Tag','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(6,'category','Category','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(7,'publisher','Publisher','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(8,'developer','Developer','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(9,'platform','Platform','selection','entrySingleText','`platform` varchar(32) NULL DEFAULT NULL','','Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X','One of Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(10,'storage','Storage','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(13,'rating','Rating','selection','entrySingleText','`rating` varchar(16) NULL DEFAULT NULL','','0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10','One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(14,'year','Year','year','entrySingleNum','`year` int(10) NULL, ADD INDEX (`year`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(15,'coverimage','Cover image','upload',NULL,NULL,'',NULL,'One file in $_FILES[uploads] of post','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(16,'attachment','Attachments','upload_multiple',NULL,NULL,'',NULL,'Multiple in $_FILES[uploads] of post','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(17,'os','Operating system and version','selection','entrySingleNum','`os` varchar(32) NULL DEFAULT NULL','','DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10','One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(18,'actors','Actors','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(19,'countries','Countries','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(20,'directors','Directors','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(21,'genres','Genres','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(22,'languages','Languages','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(23,'runtime','Runtime (min)','number','entrySingleNum','`runtime` int(10) NULL, ADD INDEX (`runtime`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(24,'imdbrating','IMDB Rating','text','entrySingleText','`imdbrating` varchar(128) NULL DEFAULT NULL','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(25,'viewcount','View counter','number','entrySingleNum','`viewcount` int(10) NULL, ADD INDEX (`viewcount`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(26,'writers','Writers','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(27,'localizedTitle','localized Title','text','entryText','`localizedTitle` varchar(128) NULL DEFAULT NULL, ADD FULLTEXT (`localizedTitle`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(28,'gameEngine','Game Engine','text','entryText','`gameEngine` varchar(128) NOT NULL, ADD FULLTEXT (`gameEngine`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(29,'view','View','selection','entrySingleNum','`view` varchar(32) NULL DEFAULT NULL','','First person,Third person,Top-down','First person,Third person,Top-down','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(30,'sysReq','System Requirements','text3','entryText','`sysReq` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`sysReq`)','',NULL,'string 255','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(31,'artist','Artist','text','entrySingleText','`artist` varchar(128) NULL DEFAULT NULL','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(32,'artists','Artists','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_sys_fields` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_tool`
--
DROP TABLE IF EXISTS `#REPLACEME#_tool`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_tool` (
- `id` int NOT NULL,
+ `id` int NOT NULL AUTO_INCREMENT,
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`target` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`owner` int NOT NULL,
`group` int NOT NULL,
- `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `action` (`action`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `#REPLACEME#_tool`
--
-INSERT INTO `#REPLACEME#_tool` (`id`, `name`, `description`, `action`, `target`, `owner`, `group`, `rights`) VALUES
-(1, 'IMDB web', 'Web parser', 'imdbweb', '_self', 1, 1, 'rw-r--r--'),
-(2, 'Game infos', 'Weblinks', 'gameinfo', '_self', 1, 1, 'rw-r--r--'),
-(3, 'Musicbrainz', 'Album infos', 'musicbrainz', '_self', 1, 1, 'rw-r--r--');
-
--- --------------------------------------------------------
+LOCK TABLES `#REPLACEME#_tool` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_tool` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_tool` VALUES (1,'IMDB web','Web parser','imdbweb','_self',1,1,'rw-r--r--'),(2,'Game infos','Weblinks','gameinfo','_self',1,1,'rw-r--r--'),(3,'Musicbrainz','Album infos','musicbrainz','_self',1,1,'rw-r--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_tool` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_tool2collection`
--
DROP TABLE IF EXISTS `#REPLACEME#_tool2collection`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_tool2collection` (
`fk_tool_id` int NOT NULL,
- `fk_collection_id` int NOT NULL
+ `fk_collection_id` int NOT NULL,
+ UNIQUE KEY `fk_collection_id` (`fk_collection_id`,`fk_tool_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--- --------------------------------------------------------
+--
+-- Dumping data for table `#REPLACEME#_tool2collection`
+--
+
+LOCK TABLES `#REPLACEME#_tool2collection` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_tool2collection` DISABLE KEYS */;
+/*!40000 ALTER TABLE `#REPLACEME#_tool2collection` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_user`
--
DROP TABLE IF EXISTS `#REPLACEME#_user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_user` (
- `id` int NOT NULL,
+ `id` int NOT NULL AUTO_INCREMENT,
`login` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
@@ -226,154 +225,79 @@ CREATE TABLE `#REPLACEME#_user` (
`modificationuser` int DEFAULT NULL,
`owner` int NOT NULL,
`group` int NOT NULL,
- `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `login` (`login`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `#REPLACEME#_user`
--
-INSERT INTO `#REPLACEME#_user` (`id`, `login`, `password`, `name`, `active`, `apiToken`, `apiTokenValidDate`, `baseGroupId`, `protected`, `created`, `modificationuser`, `owner`, `group`, `rights`) VALUES
-(1, 'admin', '$2y$10$BdLVGaeiQc12smmNKf4rk.2Dj6ockECsSlpx1eO7RWN3RbX2gYrai', 'Administrator', 1, NULL, NULL, 1, 1, '2019-09-01 17:22:02', 0, 1, 1, 'rwxr-----'),
-(2, 'anonymoose', '', 'Anonymoose', 1, NULL, NULL, 3, 1, '2020-05-03 17:22:02', 0, 2, 3, 'rwxr--r--');
-
--- --------------------------------------------------------
+LOCK TABLES `#REPLACEME#_user` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_user` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_user` VALUES (1,'admin','$2y$10$BdLVGaeiQc12smmNKf4rk.2Dj6ockECsSlpx1eO7RWN3RbX2gYrai','Administrator',1,NULL,NULL,1,1,'2019-09-01 17:22:02','2021-08-08 10:52:45',0,1,1,'rwxr-----'),(2,'anonymoose','','Anonymoose',1,NULL,NULL,3,1,'2020-05-03 17:22:02','2021-08-08 10:52:45',0,2,3,'rwxr--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_user` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_user2group`
--
DROP TABLE IF EXISTS `#REPLACEME#_user2group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_user2group` (
`fk_user_id` int NOT NULL DEFAULT '0',
- `fk_group_id` int NOT NULL DEFAULT '0'
+ `fk_group_id` int NOT NULL DEFAULT '0',
+ PRIMARY KEY (`fk_user_id`,`fk_group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `#REPLACEME#_user2group`
--
-INSERT INTO `#REPLACEME#_user2group` (`fk_user_id`, `fk_group_id`) VALUES
-(1, 1),
-(2, 3);
-
--- --------------------------------------------------------
+LOCK TABLES `#REPLACEME#_user2group` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_user2group` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_user2group` VALUES (1,1),(2,3);
+/*!40000 ALTER TABLE `#REPLACEME#_user2group` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `#REPLACEME#_userSession`
--
DROP TABLE IF EXISTS `#REPLACEME#_userSession`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `#REPLACEME#_userSession` (
`fk_user_id` int NOT NULL,
`loginTime` datetime NOT NULL,
`area` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
- `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
+ `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`area`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Indexes for dumped tables
+-- Dumping data for table `#REPLACEME#_userSession`
--
---
--- Indexes for table `#REPLACEME#_collection`
---
-ALTER TABLE `#REPLACEME#_collection`
- ADD PRIMARY KEY (`id`);
-
---
--- Indexes for table `#REPLACEME#_group`
---
-ALTER TABLE `#REPLACEME#_group`
- ADD PRIMARY KEY (`id`);
-
---
--- Indexes for table `#REPLACEME#_menu`
---
-ALTER TABLE `#REPLACEME#_menu`
- ADD PRIMARY KEY (`id`);
-
---
--- Indexes for table `#REPLACEME#_sys_fields`
---
-ALTER TABLE `#REPLACEME#_sys_fields`
- ADD PRIMARY KEY (`id`) USING BTREE,
- ADD UNIQUE KEY `identifier` (`identifier`);
-
---
--- Indexes for table `#REPLACEME#_tool`
---
-ALTER TABLE `#REPLACEME#_tool`
- ADD PRIMARY KEY (`id`),
- ADD UNIQUE KEY `action` (`action`);
-
---
--- Indexes for table `#REPLACEME#_tool2collection`
---
-ALTER TABLE `#REPLACEME#_tool2collection`
- ADD UNIQUE KEY `fk_collection_id` (`fk_collection_id`,`fk_tool_id`);
-
---
--- Indexes for table `#REPLACEME#_user`
---
-ALTER TABLE `#REPLACEME#_user`
- ADD PRIMARY KEY (`id`),
- ADD UNIQUE KEY `login` (`login`);
-
---
--- Indexes for table `#REPLACEME#_user2group`
---
-ALTER TABLE `#REPLACEME#_user2group`
- ADD PRIMARY KEY (`fk_user_id`,`fk_group_id`);
-
---
--- Indexes for table `#REPLACEME#_userSession`
---
-ALTER TABLE `#REPLACEME#_userSession`
- ADD PRIMARY KEY (`area`);
-
---
--- AUTO_INCREMENT for dumped tables
---
-
---
--- AUTO_INCREMENT for table `#REPLACEME#_collection`
---
-ALTER TABLE `#REPLACEME#_collection`
- MODIFY `id` int NOT NULL AUTO_INCREMENT;
-
---
--- AUTO_INCREMENT for table `#REPLACEME#_group`
---
-ALTER TABLE `#REPLACEME#_group`
- MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
-
---
--- AUTO_INCREMENT for table `#REPLACEME#_menu`
---
-ALTER TABLE `#REPLACEME#_menu`
- MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;
-
---
--- AUTO_INCREMENT for table `#REPLACEME#_sys_fields`
---
-ALTER TABLE `#REPLACEME#_sys_fields`
- MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
-
---
--- AUTO_INCREMENT for table `#REPLACEME#_tool`
---
-ALTER TABLE `#REPLACEME#_tool`
- MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
-
---
--- AUTO_INCREMENT for table `#REPLACEME#_user`
---
-ALTER TABLE `#REPLACEME#_user`
- MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
-COMMIT;
+LOCK TABLES `#REPLACEME#_userSession` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_userSession` DISABLE KEYS */;
+/*!40000 ALTER TABLE `#REPLACEME#_userSession` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-08-08 12:53:01
diff --git a/sources/updatecheck.txt b/sources/updatecheck.txt
new file mode 100644
index 0000000..02964ff
--- /dev/null
+++ b/sources/updatecheck.txt
@@ -0,0 +1,11 @@
+setup
+- sql file mit mysqldump
+- config files in setup.php
+- options in setup.php
+
+documentation
+version, readme and changelog
+
+upgrade file
+
+correct placeholders
diff --git a/webclient/setup.php b/webclient/setup.php
deleted file mode 100644
index 8456b60..0000000
--- a/webclient/setup.php
+++ /dev/null
@@ -1,144 +0,0 @@
- 'Europe/Berlin'
- );
-
- $TemplateData['bodyForm'] = stepConfig($data);
- break;
-
- case 'ready':
- default:
- $TemplateData['headline'] = 'Complete';
- $TemplateData['body'] = 'All done. This file is now gone. To restart the setup remove all non .default config files and upload the setup.php file again.';
- $TemplateData['bodyForm'] = '';
- $TemplateData['footer'] = 'cya';
-}
-
-?>
-
-
-
-
-
-
- Setup - Bibliotheca
-
-
-
-
-
-
-
-
-
-
-".$tz."";
- }
- $absPath = getcwd();
-
- return <<
- Select your timezone
-
-
-
- The absolute path to this installation on your webspace. Current {$absPath} should be the right one.
-
-
-
- Database Hostname
-
-
-
- Database User
-
-
-
- Database Password for the given user
-
-
-
- Database name
-
-
-
- Database table prefix. Default is bib. A _ is added automatically.
-
-
-RET;
-}
diff --git a/webclient/setup/bibliotheca.sql b/webclient/setup/bibliotheca.sql
new file mode 100644
index 0000000..93efb83
--- /dev/null
+++ b/webclient/setup/bibliotheca.sql
@@ -0,0 +1,303 @@
+-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
+--
+-- Host: localhost Database: bibliotheca_test
+-- ------------------------------------------------------
+-- Server version 8.0.25
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!50503 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `bib_collection`
+--
+
+DROP TABLE IF EXISTS `bib_collection`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_collection` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `defaultSearchField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `defaultSortField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `advancedSearchTableFields` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_collection`
+--
+
+LOCK TABLES `bib_collection` WRITE;
+/*!40000 ALTER TABLE `bib_collection` DISABLE KEYS */;
+/*!40000 ALTER TABLE `bib_collection` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_group`
+--
+
+DROP TABLE IF EXISTS `bib_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_group` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `protected` tinyint(1) NOT NULL DEFAULT '0',
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_group`
+--
+
+LOCK TABLES `bib_group` WRITE;
+/*!40000 ALTER TABLE `bib_group` DISABLE KEYS */;
+INSERT INTO `bib_group` VALUES (1,'Administration','Admin group',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwx------'),(2,'Users','Default user group',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwxr--r--'),(3,'Anonymous','Anonymous users',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwxr--r--');
+/*!40000 ALTER TABLE `bib_group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_menu`
+--
+
+DROP TABLE IF EXISTS `bib_menu`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_menu` (
+ `id` int unsigned NOT NULL AUTO_INCREMENT,
+ `text` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `icon` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `owner` int NOT NULL DEFAULT '0',
+ `group` int NOT NULL DEFAULT '0',
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `position` int NOT NULL DEFAULT '0',
+ `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_menu`
+--
+
+LOCK TABLES `bib_menu` WRITE;
+/*!40000 ALTER TABLE `bib_menu` DISABLE KEYS */;
+INSERT INTO `bib_menu` VALUES (1,'Dashboard','','home',1,1,'rw-r--r--',0,'show'),(2,'Collections','collections','database',1,1,'rw-r--r--',1,'show'),(3,'Tags','tags','tag',1,1,'rw-r--r--',2,'show'),(4,'Add','manageentry','plus-circle',1,2,'rw-rw----',0,'manage'),(6,'Tags','managetags','tag',1,2,'rw-rw----',2,'manage'),(7,'Collections','managecolletions','database',1,2,'rw-rw----',3,'manage'),(8,'Users','manageusers','users',1,1,'rw-------',4,'manage'),(9,'Login','auth','',1,1,'rw-r--r--',0,''),(10,'Collection fields','managecollectionfields','',1,2,'rw-rw----',0,''),(11,'Entry','entry','',1,1,'rw-r--r--',0,''),(12,'Search','search','',1,1,'rw-r--r--',0,''),(14,'Tool','tool','',1,2,'rw-rw----',0,''),(15,'Advanced search','advancedsearch','',1,1,'rw-r--r--',0,''),(16,'Profile','profile','user',1,2,'rw-rw----',6,'manage'),(17,'Groups','managegroups','users',1,1,'rw-------',5,'manage'),(18,'Bulkedit','bulkedit','',1,2,'rw-rw----',0,'');
+/*!40000 ALTER TABLE `bib_menu` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_sys_fields`
+--
+
+DROP TABLE IF EXISTS `bib_sys_fields`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_sys_fields` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `identifier` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `displayname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `searchtype` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `createstring` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `inputValidation` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
+ `apiinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `identifier` (`identifier`)
+) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_sys_fields`
+--
+
+LOCK TABLES `bib_sys_fields` WRITE;
+/*!40000 ALTER TABLE `bib_sys_fields` DISABLE KEYS */;
+INSERT INTO `bib_sys_fields` VALUES (1,'title','Title','text','entryText','`title` varchar(128) NOT NULL, ADD FULLTEXT (`title`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(2,'description','Description','text3','entryText','`description` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`description`)','',NULL,'string 255','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(3,'content','Main content','textarea','entryText','`content` text NULL DEFAULT NULL, ADD FULLTEXT (`content`)','',NULL,'mysql text','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(5,'tag','Tag','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(6,'category','Category','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(7,'publisher','Publisher','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(8,'developer','Developer','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(9,'platform','Platform','selection','entrySingleText','`platform` varchar(32) NULL DEFAULT NULL','','Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X','One of Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(10,'storage','Storage','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(13,'rating','Rating','selection','entrySingleText','`rating` varchar(16) NULL DEFAULT NULL','','0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10','One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(14,'year','Year','year','entrySingleNum','`year` int(10) NULL, ADD INDEX (`year`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(15,'coverimage','Cover image','upload',NULL,NULL,'',NULL,'One file in $_FILES[uploads] of post','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(16,'attachment','Attachments','upload_multiple',NULL,NULL,'',NULL,'Multiple in $_FILES[uploads] of post','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(17,'os','Operating system and version','selection','entrySingleNum','`os` varchar(32) NULL DEFAULT NULL','','DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10','One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(18,'actors','Actors','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(19,'countries','Countries','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(20,'directors','Directors','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(21,'genres','Genres','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(22,'languages','Languages','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(23,'runtime','Runtime (min)','number','entrySingleNum','`runtime` int(10) NULL, ADD INDEX (`runtime`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(24,'imdbrating','IMDB Rating','text','entrySingleText','`imdbrating` varchar(128) NULL DEFAULT NULL','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(25,'viewcount','View counter','number','entrySingleNum','`viewcount` int(10) NULL, ADD INDEX (`viewcount`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(26,'writers','Writers','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(27,'localizedTitle','localized Title','text','entryText','`localizedTitle` varchar(128) NULL DEFAULT NULL, ADD FULLTEXT (`localizedTitle`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(28,'gameEngine','Game Engine','text','entryText','`gameEngine` varchar(128) NOT NULL, ADD FULLTEXT (`gameEngine`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(29,'view','View','selection','entrySingleNum','`view` varchar(32) NULL DEFAULT NULL','','First person,Third person,Top-down','First person,Third person,Top-down','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(30,'sysReq','System Requirements','text3','entryText','`sysReq` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`sysReq`)','',NULL,'string 255','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(31,'artist','Artist','text','entrySingleText','`artist` varchar(128) NULL DEFAULT NULL','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(32,'artists','Artists','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--');
+/*!40000 ALTER TABLE `bib_sys_fields` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_tool`
+--
+
+DROP TABLE IF EXISTS `bib_tool`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_tool` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `target` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `action` (`action`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_tool`
+--
+
+LOCK TABLES `bib_tool` WRITE;
+/*!40000 ALTER TABLE `bib_tool` DISABLE KEYS */;
+INSERT INTO `bib_tool` VALUES (1,'IMDB web','Web parser','imdbweb','_self',1,1,'rw-r--r--'),(2,'Game infos','Weblinks','gameinfo','_self',1,1,'rw-r--r--'),(3,'Musicbrainz','Album infos','musicbrainz','_self',1,1,'rw-r--r--');
+/*!40000 ALTER TABLE `bib_tool` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_tool2collection`
+--
+
+DROP TABLE IF EXISTS `bib_tool2collection`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_tool2collection` (
+ `fk_tool_id` int NOT NULL,
+ `fk_collection_id` int NOT NULL,
+ UNIQUE KEY `fk_collection_id` (`fk_collection_id`,`fk_tool_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_tool2collection`
+--
+
+LOCK TABLES `bib_tool2collection` WRITE;
+/*!40000 ALTER TABLE `bib_tool2collection` DISABLE KEYS */;
+/*!40000 ALTER TABLE `bib_tool2collection` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_user`
+--
+
+DROP TABLE IF EXISTS `bib_user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_user` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `login` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `active` int NOT NULL DEFAULT '1',
+ `apiToken` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `apiTokenValidDate` timestamp NULL DEFAULT NULL,
+ `baseGroupId` int NOT NULL DEFAULT '0',
+ `protected` tinyint(1) NOT NULL DEFAULT '0',
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `login` (`login`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_user`
+--
+
+LOCK TABLES `bib_user` WRITE;
+/*!40000 ALTER TABLE `bib_user` DISABLE KEYS */;
+INSERT INTO `bib_user` VALUES (1,'admin','$2y$10$BdLVGaeiQc12smmNKf4rk.2Dj6ockECsSlpx1eO7RWN3RbX2gYrai','Administrator',1,NULL,NULL,1,1,'2019-09-01 17:22:02','2021-08-08 10:52:45',0,1,1,'rwxr-----'),(2,'anonymoose','','Anonymoose',1,NULL,NULL,3,1,'2020-05-03 17:22:02','2021-08-08 10:52:45',0,2,3,'rwxr--r--');
+/*!40000 ALTER TABLE `bib_user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_user2group`
+--
+
+DROP TABLE IF EXISTS `bib_user2group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_user2group` (
+ `fk_user_id` int NOT NULL DEFAULT '0',
+ `fk_group_id` int NOT NULL DEFAULT '0',
+ PRIMARY KEY (`fk_user_id`,`fk_group_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_user2group`
+--
+
+LOCK TABLES `bib_user2group` WRITE;
+/*!40000 ALTER TABLE `bib_user2group` DISABLE KEYS */;
+INSERT INTO `bib_user2group` VALUES (1,1),(2,3);
+/*!40000 ALTER TABLE `bib_user2group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `bib_userSession`
+--
+
+DROP TABLE IF EXISTS `bib_userSession`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `bib_userSession` (
+ `fk_user_id` int NOT NULL,
+ `loginTime` datetime NOT NULL,
+ `area` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
+ `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`area`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `bib_userSession`
+--
+
+LOCK TABLES `bib_userSession` WRITE;
+/*!40000 ALTER TABLE `bib_userSession` DISABLE KEYS */;
+/*!40000 ALTER TABLE `bib_userSession` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-08-08 12:53:01
diff --git a/webclient/setup/bibliotheca.sql.default b/webclient/setup/bibliotheca.sql.default
new file mode 100644
index 0000000..fe12c78
--- /dev/null
+++ b/webclient/setup/bibliotheca.sql.default
@@ -0,0 +1,303 @@
+-- MySQL dump 10.13 Distrib 8.0.25, for Linux (x86_64)
+--
+-- Host: localhost Database: bibliotheca
+-- ------------------------------------------------------
+-- Server version 8.0.25
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!50503 SET NAMES utf8mb4 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `#REPLACEME#_collection`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_collection`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_collection` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `defaultSearchField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `defaultSortField` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `advancedSearchTableFields` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_collection`
+--
+
+LOCK TABLES `#REPLACEME#_collection` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_collection` DISABLE KEYS */;
+/*!40000 ALTER TABLE `#REPLACEME#_collection` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_group`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_group` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `protected` tinyint(1) NOT NULL DEFAULT '0',
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_group`
+--
+
+LOCK TABLES `#REPLACEME#_group` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_group` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_group` VALUES (1,'Administration','Admin group',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwx------'),(2,'Users','Default user group',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwxr--r--'),(3,'Anonymous','Anonymous users',1,'2020-05-31 21:25:29','2021-08-08 10:52:44',0,1,1,'rwxr--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_menu`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_menu`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_menu` (
+ `id` int unsigned NOT NULL AUTO_INCREMENT,
+ `text` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `icon` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `owner` int NOT NULL DEFAULT '0',
+ `group` int NOT NULL DEFAULT '0',
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `position` int NOT NULL DEFAULT '0',
+ `category` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_menu`
+--
+
+LOCK TABLES `#REPLACEME#_menu` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_menu` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_menu` VALUES (1,'Dashboard','','home',1,1,'rw-r--r--',0,'show'),(2,'Collections','collections','database',1,1,'rw-r--r--',1,'show'),(3,'Tags','tags','tag',1,1,'rw-r--r--',2,'show'),(4,'Add','manageentry','plus-circle',1,2,'rw-rw----',0,'manage'),(6,'Tags','managetags','tag',1,2,'rw-rw----',2,'manage'),(7,'Collections','managecolletions','database',1,2,'rw-rw----',3,'manage'),(8,'Users','manageusers','users',1,1,'rw-------',4,'manage'),(9,'Login','auth','',1,1,'rw-r--r--',0,''),(10,'Collection fields','managecollectionfields','',1,2,'rw-rw----',0,''),(11,'Entry','entry','',1,1,'rw-r--r--',0,''),(12,'Search','search','',1,1,'rw-r--r--',0,''),(14,'Tool','tool','',1,2,'rw-rw----',0,''),(15,'Advanced search','advancedsearch','',1,1,'rw-r--r--',0,''),(16,'Profile','profile','user',1,2,'rw-rw----',6,'manage'),(17,'Groups','managegroups','users',1,1,'rw-------',5,'manage'),(18,'Bulkedit','bulkedit','',1,2,'rw-rw----',0,'');
+/*!40000 ALTER TABLE `#REPLACEME#_menu` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_sys_fields`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_sys_fields`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_sys_fields` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `identifier` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `displayname` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `type` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `searchtype` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `createstring` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `inputValidation` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
+ `apiinfo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`) USING BTREE,
+ UNIQUE KEY `identifier` (`identifier`)
+) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_sys_fields`
+--
+
+LOCK TABLES `#REPLACEME#_sys_fields` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_sys_fields` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_sys_fields` VALUES (1,'title','Title','text','entryText','`title` varchar(128) NOT NULL, ADD FULLTEXT (`title`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(2,'description','Description','text3','entryText','`description` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`description`)','',NULL,'string 255','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(3,'content','Main content','textarea','entryText','`content` text NULL DEFAULT NULL, ADD FULLTEXT (`content`)','',NULL,'mysql text','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(5,'tag','Tag','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(6,'category','Category','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(7,'publisher','Publisher','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(8,'developer','Developer','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(9,'platform','Platform','selection','entrySingleText','`platform` varchar(32) NULL DEFAULT NULL','','Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X','One of Nintendo,Nintendo Switch,PC,Playstation,Playstation 2,Playstation 3,Playstation 4,Playstation 5,Xbox,Xbox 360,Xbox One,Xbox One S,Xbox One X,Xbox Series S,Xbox Series X','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(10,'storage','Storage','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(13,'rating','Rating','selection','entrySingleText','`rating` varchar(16) NULL DEFAULT NULL','','0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10','One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(14,'year','Year','year','entrySingleNum','`year` int(10) NULL, ADD INDEX (`year`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(15,'coverimage','Cover image','upload',NULL,NULL,'',NULL,'One file in $_FILES[uploads] of post','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(16,'attachment','Attachments','upload_multiple',NULL,NULL,'',NULL,'Multiple in $_FILES[uploads] of post','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(17,'os','Operating system and version','selection','entrySingleNum','`os` varchar(32) NULL DEFAULT NULL','','DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10','One of DOS,Windows 1,Windows 2,Windows 3,Windows 95,Windows 99,Windows XP,Windows 2000,Windows ME,Windows Vista,Windows 8,Windows 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(18,'actors','Actors','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(19,'countries','Countries','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(20,'directors','Directors','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(21,'genres','Genres','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(22,'languages','Languages','lookupmultiple','tag',NULL,'',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(23,'runtime','Runtime (min)','number','entrySingleNum','`runtime` int(10) NULL, ADD INDEX (`runtime`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(24,'imdbrating','IMDB Rating','text','entrySingleText','`imdbrating` varchar(128) NULL DEFAULT NULL','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(25,'viewcount','View counter','number','entrySingleNum','`viewcount` int(10) NULL, ADD INDEX (`viewcount`)','',NULL,'int 10','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(26,'writers','Writers','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(27,'localizedTitle','localized Title','text','entryText','`localizedTitle` varchar(128) NULL DEFAULT NULL, ADD FULLTEXT (`localizedTitle`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(28,'gameEngine','Game Engine','text','entryText','`gameEngine` varchar(128) NOT NULL, ADD FULLTEXT (`gameEngine`)','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(29,'view','View','selection','entrySingleNum','`view` varchar(32) NULL DEFAULT NULL','','First person,Third person,Top-down','First person,Third person,Top-down','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(30,'sysReq','System Requirements','text3','entryText','`sysReq` varchar(255) NULL DEFAULT NULL, ADD FULLTEXT (`sysReq`)','',NULL,'string 255','2021-08-08 10:52:44','2021-08-08 10:52:44',0,1,1,'rw-r--r--'),(31,'artist','Artist','text','entrySingleText','`artist` varchar(128) NULL DEFAULT NULL','',NULL,'string 128','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--'),(32,'artists','Artists','lookupmultiple','tag',NULL,'allowSpace',NULL,'string 64','2021-08-08 10:52:44','2021-08-08 10:52:44',NULL,1,1,'rw-r--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_sys_fields` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_tool`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_tool`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_tool` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `description` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `action` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `target` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `action` (`action`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_tool`
+--
+
+LOCK TABLES `#REPLACEME#_tool` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_tool` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_tool` VALUES (1,'IMDB web','Web parser','imdbweb','_self',1,1,'rw-r--r--'),(2,'Game infos','Weblinks','gameinfo','_self',1,1,'rw-r--r--'),(3,'Musicbrainz','Album infos','musicbrainz','_self',1,1,'rw-r--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_tool` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_tool2collection`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_tool2collection`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_tool2collection` (
+ `fk_tool_id` int NOT NULL,
+ `fk_collection_id` int NOT NULL,
+ UNIQUE KEY `fk_collection_id` (`fk_collection_id`,`fk_tool_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_tool2collection`
+--
+
+LOCK TABLES `#REPLACEME#_tool2collection` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_tool2collection` DISABLE KEYS */;
+/*!40000 ALTER TABLE `#REPLACEME#_tool2collection` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_user`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_user` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `login` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `active` int NOT NULL DEFAULT '1',
+ `apiToken` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
+ `apiTokenValidDate` timestamp NULL DEFAULT NULL,
+ `baseGroupId` int NOT NULL DEFAULT '0',
+ `protected` tinyint(1) NOT NULL DEFAULT '0',
+ `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+ `modificationuser` int DEFAULT NULL,
+ `owner` int NOT NULL,
+ `group` int NOT NULL,
+ `rights` char(9) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `login` (`login`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_user`
+--
+
+LOCK TABLES `#REPLACEME#_user` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_user` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_user` VALUES (1,'admin','$2y$10$BdLVGaeiQc12smmNKf4rk.2Dj6ockECsSlpx1eO7RWN3RbX2gYrai','Administrator',1,NULL,NULL,1,1,'2019-09-01 17:22:02','2021-08-08 10:52:45',0,1,1,'rwxr-----'),(2,'anonymoose','','Anonymoose',1,NULL,NULL,3,1,'2020-05-03 17:22:02','2021-08-08 10:52:45',0,2,3,'rwxr--r--');
+/*!40000 ALTER TABLE `#REPLACEME#_user` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_user2group`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_user2group`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_user2group` (
+ `fk_user_id` int NOT NULL DEFAULT '0',
+ `fk_group_id` int NOT NULL DEFAULT '0',
+ PRIMARY KEY (`fk_user_id`,`fk_group_id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_user2group`
+--
+
+LOCK TABLES `#REPLACEME#_user2group` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_user2group` DISABLE KEYS */;
+INSERT INTO `#REPLACEME#_user2group` VALUES (1,1),(2,3);
+/*!40000 ALTER TABLE `#REPLACEME#_user2group` ENABLE KEYS */;
+UNLOCK TABLES;
+
+--
+-- Table structure for table `#REPLACEME#_userSession`
+--
+
+DROP TABLE IF EXISTS `#REPLACEME#_userSession`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!50503 SET character_set_client = utf8mb4 */;
+CREATE TABLE `#REPLACEME#_userSession` (
+ `fk_user_id` int NOT NULL,
+ `loginTime` datetime NOT NULL,
+ `area` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
+ `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ `salt` char(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
+ PRIMARY KEY (`area`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping data for table `#REPLACEME#_userSession`
+--
+
+LOCK TABLES `#REPLACEME#_userSession` WRITE;
+/*!40000 ALTER TABLE `#REPLACEME#_userSession` DISABLE KEYS */;
+/*!40000 ALTER TABLE `#REPLACEME#_userSession` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-08-08 12:53:01
diff --git a/webclient/setup/index.php b/webclient/setup/index.php
new file mode 100644
index 0000000..b7de62a
--- /dev/null
+++ b/webclient/setup/index.php
@@ -0,0 +1,349 @@
+ 'Europe/Berlin',
+ 'dbhost' => '127.0.01',
+ 'dbuser' => 'user',
+ 'dbprefix' => 'bib',
+ 'dbname' => '',
+ 'dbpassword' => '',
+ 'pathabsolute' => ''
+ );
+
+ if(isset($_POST['submitForm'])) {
+ $fCheck = false;
+ foreach ($data as $k=>$v) {
+ if(isset($_POST[$k])) {
+ $_t = trim($_POST[$k]);
+ if(!empty($_t)) {
+ $data[$k] = $_t;
+ $fCheck = true;
+ }
+ else {
+ $fCheck = false;
+ break;
+ }
+ }
+ else {
+ $fCheck = false;
+ break;
+ }
+ }
+
+ if(!empty($fCheck)) {
+ $configFileSkeletonString = file_get_contents($configFileSkeleton);
+
+ $configFileString = str_replace('~timezone~',$data['timezone'],$configFileSkeletonString);
+ $configFileString = str_replace('~dbhost~',$data['dbhost'],$configFileString);
+ $configFileString = str_replace('~dbuser~',$data['dbuser'],$configFileString);
+ $configFileString = str_replace('~dbprefix~',$data['dbprefix'],$configFileString);
+ $configFileString = str_replace('~dbname~',$data['dbname'],$configFileString);
+ $configFileString = str_replace('~dbpassword~',$data['dbpassword'],$configFileString);
+ $configFileString = str_replace('~pathabsolute~',$data['pathabsolute'],$configFileString);
+
+ if(file_put_contents($configFile, $configFileString)) {
+ copy($configBrainz.'.default', $configBrainz);
+ copy($configImdb.'.default', $configImdb);
+ header('Location: index.php');
+ exit();
+ }
+ else {
+ $TemplateData['result']['status'] = 'ERROR';
+ $TemplateData['result']['message'] = 'Config file could not be written. Please check your permission';
+ }
+
+ }
+ else {
+ $TemplateData['result']['status'] = 'ERROR';
+ $TemplateData['result']['message'] = 'Please provide input for all the fields';
+ }
+ }
+
+ $TemplateData['bodyForm'] = stepConfigForm($data);
+ break;
+
+ case 'database':
+ $TemplateData['headline'] = '2. Database';
+ $TemplateData['body'] = 'Check and setup of default tables';
+ $TemplateData['bodyForm'] = '';
+ $TemplateData['footer'] = 'Next - Additional tools';
+ $TemplateData['result'] = array();
+
+ if(isset($_POST['submitForm'])) {
+ if(isset($_POST['resetConfig']) && !empty($_POST['resetConfig'])) {
+ unlink($configFile);
+ header('Location: index.php');
+ }
+ }
+
+ require_once $configFile;
+
+ $DB = new mysqli(DB_HOST, DB_USERNAME,DB_PASSWORD, DB_NAME);
+ $driver = new mysqli_driver();
+ $driver->report_mode = MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT;
+ $_conCheck = false;
+ if ($DB->connect_errno) {
+ $TemplateData['result']['status'] = 'ERROR';
+ $TemplateData['result']['message'] = 'Can not connect to database: '.$DB->connect_error;
+ $TemplateData['bodyForm'] = stepDBRest();
+ }
+ else {
+ $_conCheck = true;
+ $DB->set_charset("utf8mb4");
+ $DB->query("SET collation_connection = 'utf8mb4_unicode_ci'");
+ }
+
+
+ if(!empty($_conCheck)) {
+ try {
+ $query = $DB->query("SELECT * FROM information_schema.tables WHERE table_schema = '".DB_NAME."' AND table_name = '".DB_PREFIX."_sys_fields' LIMIT 1");
+ if($query !== false && $query->num_rows < 1) {
+ $TemplateData['bodyForm'] = stepDBCreateTables();
+ }
+ else {
+ $TemplateData['result']['status'] = 'ERROR';
+ $TemplateData['result']['message'] = 'Existing DB Tables found! Setup already complete';
+ clearSetup();
+ }
+ }
+ catch (Exception $e) {
+ $TemplateData['result']['status'] = 'ERROR';
+ $TemplateData['result']['message'] = 'Can not run query: '.$e->getMessage();
+ }
+ }
+
+ if(isset($_POST['submitForm'])) {
+ if(isset($_POST['createTables']) && !empty($_POST['createTables'])) {
+ $sqlSkeleton = file_get_contents('./bibliotheca.sql.default');
+ file_put_contents('./bibliotheca.sql', str_replace('#REPLACEME#',DB_PREFIX,$sqlSkeleton));
+
+ try {
+ $sqlScript = file('./bibliotheca.sql');
+ $queryStr = '';
+ foreach ($sqlScript as $line) {
+
+ $startWith = substr(trim($line), 0 ,2);
+ $endWith = substr(trim($line), -1 ,1);
+
+ if (empty($line) || $startWith == '--' || $startWith == '/*' || $startWith == '//') {
+ continue;
+ }
+
+ $queryStr .= $line;
+ if ($endWith == ';') {
+ $DB->query($queryStr);
+ $queryStr = '';
+ }
+ }
+
+ header("Location: index.php?done=1");
+ }
+ catch (Exception $e) {
+ $TemplateData['result']['status'] = 'ERROR';
+ $TemplateData['result']['message'] = 'Can not create needed tables: '.$e->getMessage();
+ $TemplateData['body'] = 'Please check your DB Settings, files and start over. To restart the setup remove all non .default config files and upload the /setup folder again.';
+ }
+ }
+ }
+
+ break;
+
+ case 'ready':
+ default:
+ $TemplateData['headline'] = 'Complete';
+ $TemplateData['body'] = 'All done. This file is now gone. To restart the setup remove all non .default config files and upload the /setup folder gain.';
+ $TemplateData['bodyForm'] = '';
+ $TemplateData['footer'] = 'cya';
+ $TemplateData['result'] = array();
+ clearSetup();
+}
+
+header('Content-type: text/html; charset=UTF-8');
+?>
+
+
+
+
+
+
+ Setup - Bibliotheca
+
+
+
+
+
+
+
+
+
+
+".$tz."";
+ }
+ $absPath = getcwd();
+
+ return <<
+ Select your timezone
+
+
+
+ The absolute path to this installation on your webspace. Current {$absPath} should be the right one.
+
+
+
+ Database Hostname
+
+
+
+ Database User
+
+
+
+ Database Password for the given user
+
+
+
+ Database name
+
+
+
+ Database table prefix. Default is bib. A _ is added automatically.
+
+
+RET;
+}
+
+/**
+ * Database step
+ *
+ * @return string
+ */
+function stepDBRest(): string {
+ return <<
+ Reset the config file to input the correct DB values:
+
+
+RET;
+}
+
+/**
+ * database step
+ *
+ * @return string
+ */
+function stepDBCreateTables(): string {
+ return <<
+ Warning: Existing data can be lost if the config is wrong!
+ Create tables:
+
+RET;
+}
--
2.39.5