<?php
/**
 * @copyright 2024 Double Bastion LLC <www.doublebastion.com>
 *
 * @author Double Bastion LLC
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

define('RESTRICTED', TRUE);

include 'install-signup-check.php';

if ($installcheck == true) {

 session_start();

 if ($_SESSION['validateaccesspnl'] == "accessallowedpnl") {

    if(isset($_POST['submitadminbttn'])) {

       if (isset($_POST['adminuser']) && $_POST['adminuser'] != '' && isset($_POST['adminuserpassword']) && $_POST['adminuserpassword'] != '' &&
           isset($_POST['adminuseremail']) && $_POST['adminuseremail'] != '') {

           $adminuser = $_POST['adminuser'];
           $adminuserpass = password_hash($_POST['adminuserpassword'], PASSWORD_DEFAULT);
           $adminuseremail = $_POST['adminuseremail'];

           define('ACCESSCONST', TRUE);

           require('db-connect.php');

	   // Create table for panel users
	   $query = " CREATE TABLE IF NOT EXISTS panelusers (
		        id           INT UNSIGNED AUTO_INCREMENT  PRIMARY KEY,
		        userrole     VARCHAR (150)     DEFAULT NULL,
		        username     VARCHAR (150)     DEFAULT NULL,
		        password     VARCHAR (150)     DEFAULT NULL,
		        emailaddress VARCHAR (150)     DEFAULT NULL,
		        registered   VARCHAR (12)      DEFAULT NULL,
		        token        VARCHAR (150)     DEFAULT NULL,
		        temporary    VARCHAR (50)      DEFAULT NULL,
		        enabled      SMALLINT          DEFAULT NULL
		    ); ";

	   $result = $mysqli->query($query);

	   $query_1 = $mysqli->prepare("INSERT INTO panelusers (userrole, username, password, emailaddress, registered, token, temporary, enabled) VALUES ('superadmin', ?, ?,
		                        ?, '1', NULL, NULL, '1');");
	   $query_1->bind_param("sss", $adminuser, $adminuserpass, $adminuseremail);
	   $query_1->execute();
	   $query_1->close();

	   // Create table for dashboard buttons links
	   $query_2 = " CREATE TABLE IF NOT EXISTS buttons (
		          id           INT UNSIGNED AUTO_INCREMENT  PRIMARY KEY,
		          orderno      SMALLINT UNSIGNED DEFAULT NULL,
		          userrole     VARCHAR (150)     DEFAULT NULL,
		          username     VARCHAR (150)     DEFAULT NULL,
		          nameonbutton VARCHAR (150)     DEFAULT NULL,
		          buttonurl    VARCHAR (600)     DEFAULT NULL,
		          imgname      VARCHAR (150)     DEFAULT NULL
		      ); ";

	   $result_2 = $mysqli->query($query_2);

	   // Create table for suite components
	   $query_3 = " CREATE TABLE IF NOT EXISTS components (
		          id               INT UNSIGNED AUTO_INCREMENT  PRIMARY KEY,
		          orderno          SMALLINT UNSIGNED DEFAULT NULL,
		          userrole         VARCHAR (150)     DEFAULT NULL,
		          username         VARCHAR (150)     DEFAULT NULL,
		          component        VARCHAR (100)     DEFAULT NULL,
		          componentrole    VARCHAR (50)      DEFAULT NULL,
		          componentplace   VARCHAR (50)      DEFAULT NULL,
		          imagename        VARCHAR (150)     DEFAULT NULL,
		          versionscript    VARCHAR (150)     DEFAULT NULL,
		          info             VARCHAR (2000)    DEFAULT NULL
		      ); ";

	   $result_3 = $mysqli->query($query_3);


	   // Create table for ClamAV detections directory
	   $query_4 = " CREATE TABLE IF NOT EXISTS detectionsdir (
		          id               SMALLINT UNSIGNED DEFAULT 1  PRIMARY KEY,
		          detdir           VARCHAR (150) DEFAULT NULL
		       ); ";
	   $result_4 = $mysqli->query($query_4);

	   $query_5 = " INSERT INTO detectionsdir (detdir) VALUES ('/srv/scripts/detections'); ";
	   $result_5 = $mysqli->query($query_5);


	   // Insert default data into the 'components' table
	   $query_6 = "INSERT INTO `components` (`orderno`, `userrole`, `username`, `component`, `componentrole`, `componentplace`, `imagename`, `versionscript`, `info`) VALUES
			(1, 'superadmin', '$adminuser', 'Debian', 'Kernel Component', 'First Level', 'debian-logo.svg', 'debian_version.php', 'Debian is a Linux distribution consisting entirely of free software. Debian is recommended by its performance, stability, wealth of software packages, well-thought package management system and developer community dedicated to the free software philosophy. The real reason for its high quality, which made it the most popular operating system for servers, is the ethical standards that underpin its development, outlined in the famous <a class=&quot;popuplinks\" href=\"https://en.wikipedia.org/wiki/Debian_Social_Contract\" target=\"_blank\">Debian Social Contract,</a> whose text can be read <a class=\"popuplinks\" href=\"https://www.debian.org/social_contract\" target=\"_blank\">here.</a> This is because ethical principles are always coupled with strong motivation and honest and sustained effort to improve the software, which in their turn lead to high technical finesse.<hr style=\"color: #E0E0E0; margin: 5px 0px 5px 0px;\">• <a  class=\"popuplinks\" href=\"https://www.debian.org/legal/licenses/\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://www.debian.org/\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/Debian\" target=\"_blank\">Wikipedia</a>'),
			(2, 'superadmin', '$adminuser', 'Nginx', 'Kernel Component', 'Second Level', 'nginx-logo.svg', 'nginx_version.php', 'Nginx is a free and open source web server that can also act as a reverse proxy, load balancer, mail proxy and HTTP cache server. Nginx uses an asynchronous event-driven approach to handling requests, rather than threads, like Apache. Nginx is by far better than Apache, mainly because it can handle a much larger number of concurent HTTP requests and because it uses dramatically less RAM memory. Nginx was built with the explicit goal of outperforming Apache and it does it overwhelmingly.&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://github.com/nginx/nginx/blob/master/docs/text/LICENSE&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://www.nginx.com/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/Nginx&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(3, 'superadmin', '$adminuser', 'MariaDB', 'Kernel Component', 'Second Level', 'mariadb-logo.svg', 'mariadb_version.php', 'MariaDB is a free and open source relational database management system (RDBMS), forked from MySQL. Development is led by some of the original developers of MySQL, who forked MySQL due to concerns over its acquisition by Oracle Corporation. MariaDB maintains high compatibility with MySQL (exact matching with MySQL commands and APIs and library binary parity), making it a drop-in replacement.&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://mariadb.com/kb/en/library/mariadb-license/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://mariadb.com/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/MariaDB&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(4, 'superadmin', '$adminuser', 'PHP', 'Kernel Component', 'Second Level', 'php-logo.svg', 'php_version.php', 'PHP is a general-purpose programming language specifically suited for server-side web development. It&amp;apos;s  the most popular scripting language for web development because it&amp;apos;s highly effective, easy to use, the code is easy to debug and maintain, it&amp;apos;s highly compatible with many relational database management systems and the documentation is impressive. The real reason for its quality and unmatched success is the way it was born: it developed organically, out of practical necessities, by the incremental contributions of some outstanding minds with an in-depth understanding of real life programming. The remarkable speed improvements achieved with PHP 7 reaffirmed the tremendous future potential of PHP.&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://www.php.net/license/3_01.txt&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;PHP License&lt;/a&gt; and &lt;a class=&quot;popuplinks&quot; href=&quot;https://github.com/php/php-src/blob/master/Zend/LICENSE&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Zend Engine License&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://www.php.net/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/PHP&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(5, 'superadmin', '$adminuser', 'BIND', 'Hull Component', 'Second Level', 'bind-logo.svg', '', 'BIND is the most popular Domain Name System (DNS) software. It can be used as an authoritative name server for specific domains, as a recursive resolver for the general DNS system or as a DNS forwarder. It offers automatic DNSSEC zone signing and key management, response rate limiting (RRL) and recursive query limits to fight against distributed denial of service attacks, response policy zones (RPZ), multiprocessor support and many other DNS features. BIND also includes a number of administrative tools, such as the &amp;apos;dig&amp;apos; and &amp;apos;delv&amp;apos; DNS lookup tools, &amp;apos;nsupdate&amp;apos; for dynamic DNS zone updates, &amp;apos;rndc&amp;apos; for remote name server administration, etc.\n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://github.com/isc-projects/bind9/blob/master/LICENSE&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt; &lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://www.isc.org/bind/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/BIND&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(6, 'superadmin', '$adminuser', 'Fail2Ban', 'Kernel Component', 'Second Level', 'fail2ban-logo.svg', 'fail2ban_version.php', 'Fail2ban is an intrusion prevention application that protects servers from brute-force attacks by monitoring log files and blocking IPs belonging to hosts that make too many failed log in attempts in a specified time interval. The number of failed log in attempts that trigger a ban, the time interval in which the failed log in attempts can occur and the ban time are all configurable. Fail2ban is an indispensable tool for protecting all  network-facing applications that create access log files.\n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://www.gnu.org/licenses/old-licenses/gpl-2.0.html&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;http://www.fail2ban.org&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/Fail2ban&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(7, 'superadmin', '$adminuser', 'ClamAV', 'Kernel Component', 'Second Level', 'clamav-logo.svg', 'clamav_version.php', 'ClamAV is a free and open source antivirus software used for detecting viruses, trojans, malware and other types of malicious software. It can be used for on-demand  or automated scanning of sensitive directories, for real-time scanning of incoming emails, etc. It offers a multi-threaded daemon, a command line scanner and a tool for periodically updating the  virus signatures database.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/old-licenses/gpl-2.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"https://www.clamav.net/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>&#8226; <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/Clam_AntiVirus\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(8, 'superadmin', '$adminuser', 'Postfix', 'Shell Component', 'Second Level', 'postfix-logo.svg', 'postfix_version.php', 'Postfix is a free and open source mail transfer agent (MTA). As an SMTP server, Postfix can implement a defense layer against spambots and malware by using complex access policies, and by integration with anti spam tools such as SpamAssassin. It is usually used in conjunction with a message-store access server such as Dovecot. As an SMTP client, Postfix acts as a parallelized mail-delivery engine. Postfix is fast, efficient, easy to administer, and secure if properly configured.\n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;http://www.postfix.org/IBM-Public-License-1.0.txt&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt; &lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;http://www.postfix.org/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/Postfix_(software)&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(9, 'superadmin', '$adminuser', 'Dovecot', 'Shell Component', 'Second Level', 'dovecot-logo.svg', 'dovecot_version.php', 'Dovecot is a robust, secure and fast IMAP and POP3 server. It&amp;apos;s easy to use and memory efficient. It acts as a mail storage server. Mail is delivered to Dovecot by a mail delivery agent (MDA) and is stored for later access with an email client. The email client (or mail user agent (MUA)) can be either a web application, like Roundcube, or a standalone program like Thunderbird. Dovecot includes a local delivery agent (LDA) and a LMTP server with Sieve filtering support.\n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://dovecot.org/doc/COPYING&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt; &lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://www.dovecot.org/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/Dovecot_(software)&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(10, 'superadmin', '$adminuser', 'Apache SpamAssassin', 'Shell Component', 'Second Level', 'spamassassin-logo.svg', 'spamassassin_version.php', 'Apache SpamAssassin is the most popular free and open source email spam filtering application. It&amp;apos;s highly configurable and it can use different spam-detection techniques, such as blacklists, Bayesian filtering, online databases, external programs, DNS-based techniques and fuzzy-checksum-based spam detection. It can be easily integrated with mail servers for automatic filtering of incoming emails.\n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;http://www.apache.org/licenses/LICENSE-2.0&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt; &lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://spamassassin.apache.org/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/Apache_SpamAssassin&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(11, 'superadmin', '$adminuser', 'Postgrey', 'Shell Component', 'Second Level', 'postgrey-logo.svg', 'postgrey_version.php', 'Postgrey is a Postfix policy server that implements greylisting. When Postfix receives a mail delivery request from a sender that it does&amp;apos;t recognize, the email will be rejected with a temporary error. If the email is legitimate, the sending server will try again after a few minutes, as is required by the SMTP specification, and if sufficient time has passed, the email will be accepted. Spam filtering tools and antivirus applications are intensive users of memory and CPU, so, stopping spam before it enters any filtering processes is an efficient way of reducing spam while  sparing the server&amp;apos;s hardware resources.\n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://github.com/schweikert/postgrey/blob/master/COPYING&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt; &lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://postgrey.schweikert.ch/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;'),
			(12, 'superadmin', '$adminuser', 'Postfix Admin', 'Shell Component', 'Second Level', 'postfix-admin-logo.svg', '', 'Postfix Admin is a web based administration interface for Postfix based mail servers. It can be used to create and manage email domains, individual mailboxes, alias email addresses, etc. It requires PHP, a DBMS like MariaDB, Postfix and  an IMAP/POP3 server, like Dovecot. It offers a command line client and has storage quota support.\n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://www.gnu.org/licenses/old-licenses/gpl-2.0.html&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt; &lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;http://postfixadmin.sourceforge.net/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;'),
			(13, 'superadmin', '$adminuser', 'Roundcube', 'Shell Component', 'Second Level', 'roundcube-logo.svg', '', 'Roundcube is a web-based IMAP client with a desktop-like user interface which can be easily installed on a LEMP stack. It provides all the functionalities of a complete email client such as full support for MIME and HTML messages, threaded message listing, message searching, spell checking, address book, folder manipulation, canned response templates, multiple sender identities, support for GPG encryption, template system for custom skins, plug-in API for flexible extensions, etc. \n&lt;hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;&quot;&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://roundcube.net/license/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;License&lt;/a&gt; &lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://roundcube.net/&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Website&lt;/a&gt;&lt;br&gt;&amp;#8226; &lt;a class=&quot;popuplinks&quot; href=&quot;https://en.wikipedia.org/wiki/Roundcube&quot; style=&quot;color:#1b60ba;&quot; target=&quot;_blank&quot;&gt;Wikipedia&lt;/a&gt;'),
			(14, 'superadmin', '$adminuser', 'Roundcube Auto Login', 'Hull Component', 'Third Level', 'roundcube_auto_login.svg', '', 'This plugin allows users to automatically log in to Roundcube when they log in to Roundpin, so that they can access Roundcube from within Roundpin.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(15, 'superadmin', '$adminuser', 'Roundcube Auto Logout', 'Hull Component', 'Third Level', 'roundcube_auto_logout.svg', '', 'When Roundcube is accessed from within Roundpin, this plugin allows users to log out simultaneously from Roundpin and Roundcube.<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\" rel=\"noopener\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"\" style=\"color:#1b60ba;\" target=\"_blank\" rel=\"noopener\">Website</a>'),
			(16, 'superadmin', '$adminuser', 'Mailman', 'Hull Component', 'Second Level', 'mailman-logo.svg', '', 'Mailman is an electronic mailing lists manager. Features include: a web interface for list administration, a customizable publicly-accessible web page for each mailing list, built-in message archiving, spam filtering, separate interfaces for users, moderators and administrators, support for multiple administrators and moderators for each list, per-list privacy features (closed-subscriptions, private archives, private membership rosters, sender-based posting rules), integrated bounce detection and automatic handling of bouncing addresses, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"https://gitlab.com/mailman/mailman/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"https://www.gnu.org/software/mailman/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>&#8226; <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/GNU_Mailman\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(17, 'superadmin', '$adminuser', 'phpList', 'Hull Component', 'Second Level', 'phplist-logo.svg', '', 'phpList is a web application for sending mass emails such as marketing emails, newsletters, announcements, notifications, etc. to large lists of subscribers. phpList can be used to set up and schedule email campaigns that send one email to thousands or even millions of subscribers. Features include: web interface for editing messages, HTML/plain text support, email customization by using HTML templates, separate lists of subscribers for specific subscriber groups, email addresses can be imported from email accounts, databases, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"https://www.phplist.org/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>&#8226; <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/PhpList\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(18, 'superadmin', '$adminuser', 'ProFTPD', 'Shell Component', 'Second Level', 'proftpd-logo.svg', 'proftpd_version.php', 'ProFTPD is a feature-rich and secure FTP server. It offers per directory access configuration, multiple virtual FTP servers and anonymous FTP services, hidden directories and files based on permissions or user/group ownership. In stand-alone mode it runs as a configurable non-privileged user  in order to prevent attackers from exploiting its &apos;root\' abilities. Its functionalities can be easily extended with modules.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">• <a class=\"popuplinks\" href=\"https://github.com/proftpd/proftpd/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>• <a class=\"popuplinks\" href=\"http://www.proftpd.org/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/ProFTPD\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(19, 'superadmin', '$adminuser', 'phpMyAdmin', 'Shell Component', 'Second Level', 'phpmyadmin-logo.svg', 'phpmyadmin_version.php', 'phpMyAdmin is the most popular web application for MySQL/MariaDB administration. It&apos;s written in PHP and it can be used to easily manage databases, tables, columns, relations, indexes, users, user priviledges, etc. Its web interface offers a more confortable interaction with MySQL/MariaDB databases than the command line, while also offering the ability to execute any SQL query in an embeded console. phpMyAdmin can be used to import or export databases in different formats, to manage databases on multiple servers, to create graphics of database layouts in various formats, to perform advanced searches, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">• <a class=\"popuplinks\" href=\"https://www.phpmyadmin.net/license/\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>• <a class=\"popuplinks\" href=\"https://www.phpmyadmin.net/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/PhpMyAdmin\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(20, 'superadmin', '$adminuser', 'WordPress', 'Kernel Component', 'Second Level', 'wordpress-logo.svg', '', 'WordPress is a feature-rich and versatile content management system (CMS). It  is the best website management system not because it&apos;s perfect, but because it solves all the problems raised by website building and management in the simplest way, while respecting its users\' freedom. Nobody wants to spend additional time, patience and money to use complicated software and nobody likes software burdened with restrictions. Accompanied by its GPL license, a guarantee of its users\' freedom, WordPress grew into the most popular CMS and one of the best examples of how a high quality free and open source application can be developed using the \'online collaboration on publicly available source code\' model. WordPress is not only a robust CMS, but an ecosystem with thousands of free themes and plugins. WordPress can be used for any type of website: large e-commerce websites, news websites, magazines, portofolio websites, blogs, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">• <a class=\"popuplinks\" href=\"https://wordpress.org/about/license/\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>• <a class=\"popuplinks\" href=\"https://wordpress.org/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/WordPress\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(21, 'superadmin', '$adminuser', 'WPS Hide Login', 'Shell Component', 'Third Level', 'wps-hide-login.svg', '', 'WPS Hide Login is a lightweight WordPress plugin that allows the site administrator to change the default login page name (wp-login.php) to any custom name. Changing the default login URL has been proved very effective in fighting against brute force attacks. Before beginning to try various passwords to fraudulently log in to one&apos;s admin area, an attacker has to first find the login URL, which is not trivial. If the administrator of the WordPress website also disabled logging in with email address (by installing the plugin &apos;No Login by Email Address&apos;), the email address being easy to find by an attacker by looking at the contact page, etc., and the administrator also took the precaution to use a username difficult to guess (different from admin, administrator, webmaster, etc.), then any attacker trying to log in, will have three obstacles ahead: the first is to find the login URL, the second is to find the username and the third is to find the password.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"http://www.gnu.org/licenses/old-licenses/gpl-2.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"https://wordpress.org/plugins/wps-hide-login/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(22, 'superadmin', '$adminuser', 'Nginx Cache', 'Shell Component', 'Third Level', 'nginx-cache.svg', '', 'Nginx Cache is a plugin that automatically purges Nginx cache when the website content is changed. It is indispensable when using FastCGI cache because any time the content is edited, the visitors need to see the new edited content and not the old cached files. It also allows the administrator to purge the Nginx cache manually, by clicking &apos;Purge Cache&apos; in the &apos;Nginx&apos; menu located in the upper WordPress admin bar.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"http://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"https://wordpress.org/plugins/nginx-cache/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(23, 'superadmin', '$adminuser', 'WooCommerce', 'Shell Component', 'Third Level', 'woocommerce-logo.svg', '', 'WooCommerce is a popular e-commerce plugin for WordPress. It offers all the features needed to build a professional, modern e-commerce website, it&apos;s easy to use and is designed so that PHP developers can easily extend its functionalities with custom made plugins. WooCommerce has become one of the leading e-commerce platforms because it solves all the problems associated with e-commerce in the simplest way, as compared with competing e-commerce platforms, while remaining easy to customize and respecting users&apos; freedom.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"https://github.com/woocommerce/woocommerce/blob/master/license.txt\" style=\"color:#1b60ba;\" target=\"_blank\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"https://woocommerce.com/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>&#8226; <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/WooCommerce\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(24, 'superadmin', '$adminuser', 'Sync WooCommerce with Dolibarr', 'Shell Component', 'Third Level', 'sync-woocommerce-with-dolibarr-logo.svg', '', '&apos;Sync WooCommerce with Dolibarr\' is a WordPress plugin that acts as a bridge between WooCommerce and Dolibarr ERP/CRM. When a product is created in WooCommerce, it is automatically transferred to Dolibarr (along with its data and product categories). If an order is placed by a client in WooCommerce, the order is automatically transferred to Dolibarr (along with all the client\'s data). This plugin also allows the admin to manually transfer products/orders/clients/registered users in bulk to Dolibarr. It offers an option to apply structured SKU numbers to all the products in the store. It also adds to the \'Inventory\' section of products a \'Generate SKU number\' button, a \'Unit of measure\' field, where the admin can choose a unit of measure for the product, options to display the unit of measure on the shop page or on the single product page and cart page and a field for the warehouse name. Dolibarr has to be installed on the same machine as the WooCommerce website. This plugin is designed so that multiple WooCommerce websites can be connected to one Dolibarr instance, installed on the same machine.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(25, 'superadmin', '$adminuser', 'Dolibarr', 'Shell Component', 'Second Level', 'dolibarr-logo.svg', '', 'Dolibarr is a powerful, well-structured and flexible free and open source ERP & CRM application. It has all the fuctionalities of a classic ERP & CRM application and is very easy to install, upgrade, use and customize. It has a modular structure, all the functionalities being implemented by separate modules which can be enabled/disabled at will. It can be used with multiple currencies, it&apos;s translated in many languages, it can be integrated with other applications, like Mailman, it offers \'Point of Sale\' modules, it can be used to conduct polls/surveys, it has an import/export assistant, job scheduler,  ticketing system, etc. Its functionalities can be further extended by installing additional modules. It even has a built-in module development wizard. Dolibarr is another good example of how honest FOSS principles can give birth to a complex application whose quality surpasses that of proprietary competitors, while respecting its users\' freedom.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/Dolibarr/dolibarr/blob/develop/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://www.dolibarr.org/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/Dolibarr\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(26, 'superadmin', '$adminuser', 'Sync Dolibarr with WooCommerce', 'Shell Component', 'Third Level', 'sync-dolibarr-with-woocommerce-logo.svg', '', '&apos;Sync Dolibarr with WooCommerce\' is a Dolibarr module whose main function is to synchronize product stocks and order status between Dolibarr and WooCommerce. When the stock of a product increases/decreases in Dolibarr (by receiving purchased products, by validating shipments, by manually correcting the stock), the corresponding WooCommerce product stock is adjusted accordingly. \nAlso, when an order that has been transferred from WooCommerce to Dolibarr is invoiced in Dolibarr, the status of that WooCommerce order is automatically changed to \'Invoiced\'. When the products listed on such an order are shipped to the customer and the shipment is validated in Dolibarr, the status of the corresponding WooCommerce order is changed to \'Shipped/Completed/Pending payment\'. The module also contains many customized PDF templates for orders and invoices, that can be used instead of the default PDF templates when viewing or printing such documents. It also adds some custom fields to products (such as \'Site of origin\', \'Downloadable\'), to orders (such as \'Delivery address\', \'Customer note\') and to invoices (\'Delivery address\').\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(27, 'superadmin', '$adminuser', 'Sync Dolibarr Contacts with Roundpin', 'Hull Component', 'Third Level', 'sync_dolibarr_contacts_with_roundpin.svg', '', 'Sync Dolibarr Contacts with Roundpin is a Dolibarr module that synchronizes contacts and their details between Dolibarr and Roundpin. It can be configured to remove contacts from Roundpin automatically when they are removed from Dolibarr.<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\" rel=\"noopener\">License</a> <br>• <a class=\"popuplinks\" href=\"\" style=\"color:#1b60ba;\" target=\"_blank\" rel=\"noopener\">Website</a>'),
			(28, 'superadmin', '$adminuser', 'Coturn', 'Shell Component', 'Second Level', 'coturn-logo.svg', '', 'Coturn is both a &apos;Traversal Using Relays around NAT\' (TURN) server and a \'Session Traversal Utilities for NAT\' (STUN) server. It can be managed in command line but also over telnet and HTTPS. It is feature-rich and supports many client-to-TURN-server protocols (UDP (per RFC 5766), TCP (per RFC 5766 and RFC 6062), TLS (per RFC 5766 and RFC 6062), DTLS, SCTP) and relay protocols (UDP (per RFC 5766), TCP (per RFC 6062)). As message integrity digest algorithms it supports HMAC-SHA1, with MD5-hashed keys and as TURN authentication mechanisms it supports long-term credentials, TURN REST API (a modification of the long-term mechanism, for time-limited secret-based authentication for WebRTC applications) and third-party oAuth-based client authorization. It has been included in \'RED SCARF Suite\' to assist Nextcloud Talk  during video communication sessions.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/coturn/coturn/blob/master/LICENSE\" style=\"color:#1b60ba;\" target=\"_blank\">Coturn License</a> and <a class=\"popuplinks\" href=\"https://github.com/coturn/coturn/blob/master/LICENSE.OpenSSL\" style=\"color:#1b60ba;\" target=\"_blank\">OpenSSL License</a><br>• <a class=\"popuplinks\" href=\"https://github.com/coturn/coturn\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(29, 'superadmin', '$adminuser', 'Asterisk', 'Hull Component', 'Second Level', 'asterisk-logo.svg', '', 'Asterisk is a powerful and flexible free and open source private branch exchange (PBX) software. It is used to make phone calls between various types of endpoints, such as destinations on the &apos;public switched telephone network\' (PSTN), in-house telephone sets, devices and services on VoIP networks, etc. Features include: interactive voice response (IVR), voice mail, call queues, on-hold messages, automatic call distribution, conference calling, etc. Phone calls can be routed in various ways by using dial plans written in Asterisk\'s extensions language. To extend its functionalities even further, users can add custom modules written in C or PHP. Also, external programs can communicate with Asterisk through the Asterisk Gateway Interface (AGI), to control specific telephony operations. Asterisk supports multiple VoIP protocols, such as the \'Session Initiation Protocol\' (SIP), the \'Media Gateway Control Protocol\' (MGCP), H.323, etc., as well as its own protocol: \'Inter-Asterisk eXchange protocol\' (IAX). It can be used as a gateway between IP phones and the PSTN or as a gateway between VoIP services and WebRTC applications.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://wiki.asterisk.org/wiki/display/AST/License+Information\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://www.asterisk.org/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/Asterisk_(PBX)\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(30, 'superadmin', '$adminuser', 'Collabora Online Development Edition', 'Shell Component', 'Second Level', 'collabora-online-development-edition-logo.svg', '', 'Collabora Online Development Edition (CODE) offers a way to open and edit LibreOffice and MS Office files inside a browser. The &apos;Office Online integration\' Nextcloud application integrates CODE with Nextcloud, so that any user logged in to Nextcloud can open and edit odt, ods, odp, odg, rtf, docx, doc, xlsx, xls, pptx or ppt files inside Nextcloud. CODE also allows \'collaborative editing\' in the sense that multiple Nextcloud users can view and edit documents simultaneously. In Nextcloud, users can also create links that give access to documents to anonymous users with or without editing permission.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/CollaboraOnline/online/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://www.collaboraoffice.com/code/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(31, 'superadmin', '$adminuser', 'Nextcloud', 'Shell Component', 'Second Level', 'nextcloud-logo.svg', '', 'Nextcloud is a file sync and share application offering a variety of online collaboration tools, that turn it into a complete groupware solution. The server component can be installed on Linux VPSs, dedicated servers and even in shared hosting accounts. The client component, which is used to sync local files with Nextcloud, can be installed on all major operating systems. Nextcloud allows syncing files from desktop/laptop/tablet/phone, sharing them with other Nextcloud users or giving public access to them if needed. Hundreds of apps can be installed to extend the built-in functionalities. Thus, Nextcloud can be used to have chat, audio or video conversations, to manage calendars and tasks, to conduct surveys, to create forms, to mount external directories, to share files with other Nextcloud instances through &apos;federation sharing\', to edit office documents online, etc. Nextcloud is an excellent example of how a compnay dedicated to the free software philosophy can create a complex and flexible application that surpasses its proprietary competitors in terms of features and design. It\'s also a proof that developing free and open source software is a financially viable option for companies.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/nextcloud/server/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://nextcloud.com/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/Nextcloud\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(32, 'superadmin', '$adminuser', 'External storage support ', 'Shell Component', 'Third Level', 'external-storage-support.svg', '', 'This application allows connecting Nextcloud to local directories outside the web root, to external FTP servers, to other Nextcloud servers, WebDAV servers, etc. Access to the new storage location can be restricted to specific users or groups. After configuration, Nextcloud users will see a new folder in their root directory. They can access and use this folder like any other Nextcloud folder, creating, removing or sharing files with other users.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage_configuration_gui.html\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(33, 'superadmin', '$adminuser', 'Antivirus for files', 'Shell Component', 'Third Level', 'antivirus-for-files.svg', '', 'This application integrates ClamAV antivirus with Nextcloud. After correctly configuring &apos;Antivirus for files\', any file uploaded to Nextcloud will be scanned with ClamAV. If a virus will be detected, the infected file will be deleted before being written to the Nextcloud storage and a notification will be displayed, informing the user about the detection.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://apps.nextcloud.com/apps/files_antivirus\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(34, 'superadmin', '$adminuser', 'Calendar', 'Hull Component', 'Third Level', 'calendar-logo.svg', '', 'The Calendar application implements a digital calendar that allows synchronizing events from various devices with Nextcloud and editing them online, inviting people to events, sending browser notifications or email reminders before events, seeing attendees&apos; status, etc. It is integrated with the Contacts application and has WebCal support.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/nextcloud/calendar/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://apps.nextcloud.com/apps/calendar\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(35, 'superadmin', '$adminuser', 'Tasks', 'Hull Component', 'Third Level', 'tasks-logo.svg', '', 'The Tasks application allows users to create tasks, add start and due dates, change display options, associate a status, a priority, show the degree of completion, add a category, add a description, add subtasks, etc. Tasks can be shared, they can be linked to a Nextcloud calendar and synchronized with local clients like Thunderbird (by adding the Nextcloud calendar as a remote calendar in the local client). Tasks can also be downloaded as ICS files using the download button for each calendar.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/nextcloud/tasks/blob/master/LICENSE\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://apps.nextcloud.com/apps/tasks\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>');";
	   $result_6 = $mysqli->query($query_6);

	   $query_7 = "INSERT INTO `components` (`orderno`, `userrole`, `username`, `component`, `componentrole`, `componentplace`, `imagename`, `versionscript`, `info`) VALUES
			(36, 'superadmin', '$adminuser', 'Forms', 'Hull Component', 'Third Level', 'forms-logo.svg', '', 'Forms is a Nextcloud application that can be used to create forms containig various fields: long texts, short texts, checkboxes, radio buttons, drop-down lists. Once created, the forms can be shared with specific users or groups, with all registered users or made public. When creating the forms, an expiration date can be set. The answers submitted by users who fill out the forms can be viewed in Nextcloud or exported as csv files.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/nextcloud/forms/blob/master/LICENSE\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://apps.nextcloud.com/apps/forms\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(37, 'superadmin', '$adminuser', 'Polls', 'Hull Component', 'Third Level', 'polls-logo.svg', '', 'Polls is an application that allows creating polls with title, description, expiration date, visible or hidden to other Nextcloud users, with results display options, shared with specific users, groups, or made public. If the owner of a poll shares it with a Nextcloud user, an email is automatically sent to that Nextcloud user, containing an invitation to participate in the poll.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/nextcloud/polls/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://apps.nextcloud.com/apps/polls\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(38, 'superadmin', '$adminuser', 'Nextcloud Office', 'Shell Component', 'Third Level', 'nextcloud-office.svg', '', 'Nextcloud Office is an application that integrates Collabora Online Development Edition with Nextcloud. If the Collabora Online Development Edition server is properly installed and configured, this application allows users to open and edit odt, ods, odp, odg, rtf, docx, doc, xlsx, xls, pptx or ppt files inside Nextcloud. Such documents can be also made public, with or without editing permission.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://apps.nextcloud.com/apps/richdocuments\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(39, 'superadmin', '$adminuser', 'SIP Trip Phone', 'Hull Component', 'Third Level', 'sip-trip-phone-logo.svg', '', 'SIP Trip Phone is a browser phone that connects to an Asterisk server to make and receive VoIP phone calls. It uses SIP over WebSocket and WebRTC. For calls to and from PSTN phone numbers, a &apos;telnyx.com\' or \'localphone.com\' account is needed and a real phone number acquired from one of the two providers. SIP Trip Phone allows making and receiving phone calls to/from any mobile or landline phone, at lower rates than with regular phones. It allows making cheap international phone calls from phone numbers located in the same country as the receivers (who will be able to call those numbers and pay as for local calls). It can be used to make free calls over the Internet between extensions configured on the underlying Asterisk server. It logs recent phone calls and their duration, it can be used to pause/mute or transfer phone calls to different extensions configured on the same Asterisk server. Asterisk can be used to implement an IVR (Interactive Voice Response) and many advanced PBX features such as voicemail, queue management, music on hold, number blacklisting, call recording, audio conference calls, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(40, 'superadmin', '$adminuser', 'SMS Relentless', 'Hull Component', 'Third Level', 'sms-relentless-logo.svg', '', 'This Nextcloud application connects to a &apos;telnyx.com\' or \'plivo.com\' account to send and receive SMS messages. It needs at least an SMS enabled phone number acquired from Telnyx or Plivo. It allows sending and receiving SMS messages from a browser, using one or multiple phone numbers located in a country chosen by the admin. The numbers can be acquired from Telnyx or Plivo or from both. Users can send individual SMS messages to any SMS enabled phone numbers in the world, they can send SMS messages to multiple recipients by uploading ‘csv’ or ‘txt’ files containig the target phone numbers, they receive delivery receipts for sent SMS messages, they receive Nextcloud notifications and can also receive email notifications when new SMS messages arrive, they can list all the sent and received messages in paginated tables, filter all the messages by any table column, archive messages older then a specified time interval before deleting them, so that they become available for future viewing and analysis, list current balance and current phone numbers, set alphanumeric sequences as Sender IDs for sent SMS messages, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(41, 'superadmin', '$adminuser', 'Pax Fax', 'Hull Component', 'Third Level', 'pax-fax-logo.svg', '', 'This application allows sending and receiving faxes in Nextcloud by connecting to a &apos;phaxio.com\' account. A real fax number acquired from Phaxio is needed. Users can send up to 20 documents in each fax call (supported file formats are: pdf, doc, docx, odt, jpg, png, tif, txt, html), they can send faxes to 10 different fax numbers simultaneously, they can receive faxes as pdf documents in Nextcloud, they receive notifications in Nextcloud and can receive email notifications when new faxes arrive, they can list all the sent or received faxes and search for specific faxes by phone number or date, they can see the current balance and set one of the Phaxio numbers as caller ID for sent faxes, they can upload files to send as fax from their computer or choose them directly from Nextcloud, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(42, 'superadmin', '$adminuser', 'Sync Nextcloud Contacts with Roundpin', 'Hull Component', 'Third Level', 'sync_nextcloud_contacts_with_roundpin.svg', '', 'Sync Nextcloud Contacts with Roundpin is a Nextcloud application that synchronizes contacts and their details between Nextcloud and Roundpin. It also allows creating Asterisk extensions for contacts automatically, so that they can have video, audio and text conversations using Roundpin. It can be configured to remove contacts from Roundpin automatically when they are removed from Nextcloud.<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">&#8226; <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\" rel=\"noopener\">License</a> <br>&#8226; <a class=\"popuplinks\" href=\"\" style=\"color:#1b60ba;\" target=\"_blank\" rel=\"noopener\">Website</a>'),
			(43, 'superadmin', '$adminuser', 'Roundpin', 'Shell Component', 'Second Level', 'roundpin-logo.svg', '', 'Roundpin is a browser phone that connects to an Asterisk server to make and receive audio/video calls using WebRTC and SIP over WebSocket. For calls to and from mobile and landline phone numbers, a &apos;telnyx.com\' or \'localphone.com\' account is needed and a real phone number acquired from one of the two providers. It can be used to have text, audio and video conversations with other extensions configured on the same Asterisk server and to make and receive audio phone calls to/from any phone number in the world. Video conferences with other extensions configured in Asterisk and even with external users who are not logged in to Roundpin can be started with two clicks. It logs recent phone calls and their duration, it allows pausing/muting and transferring phone calls as well as using an IVR (Interactive Voice Response) configured on the underlying Asterisk server. Asterisk can be used to implement advanced PBX features, such as voicemail, queue management, music on hold, number blacklisting, call recording, etc.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://www.covertower.com/roundpin/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(44, 'superadmin', '$adminuser', 'MyBB', 'Shell Component', 'Second Level', 'mybb-logo.svg', '', 'MyBB is a free and open source forum software recommended by its well-thought structure, features and flexibility. It allows admins to open/close/stick/unstick threads, move or copy threads, split and merge threads, merge selected posts together, merge users, send mass emails to users, ban users, add more user groups, it displays a &apos;who\'s online\' list, it has a forum statistics page, a full text search engine, a customizable control panel, custom user permissions, ability to attach multiple files per post, quick moderation operations, email notification of new posts, creation of polls, quick reply box, report posts to moderators, etc. Its features can be further extended by choosing one of the hundreds of plugins available. Its appearance can also be changed by installing new themes.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/mybb/mybb/blob/feature/LICENSE\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://mybb.com/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/MyBB\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>');
			(45, 'superadmin', '$adminuser', 'Friendica', 'Hull Component', 'Second Level', 'friendica-logo.svg', '', 'Friendica is a decentralised social network platform. A Friendica installation functions as a network node that can interact with other Friendica nodes and even with other social network platforms. Friendica has built-in support for protocols such as ActivityPub, OStatus, diaspora* protocols, DFRN. This enables Friendica users to communicate with users of different other platforms from the &apos;Fediverse\': diaspora*, Mastodon, GNU social, Red, Hubzilla, StatusNet, Pleroma, Socialhome, pump.io, GangGo, etc. Full interaction with Twitter is also possible. Users can import content from arbitrary websites (including WordPress websites and Tumblr) into the social stream. They can write posts and edit them, they can comment, like/dislike posts from other contacts, reshare, use hashtags, share photos, set up events, they can have different public and private profiles; there are private conversation pages where communication is restricted to group members; one-to-one private messaging is also possible. Different addons can be installed to extend the built-in functionalities and different themes are available to change appearance.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/friendica/friendica/blob/develop/LICENSE\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://friendi.ca/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/Friendica\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(46, 'superadmin', '$adminuser', 'OpenVPN', 'Shell Component', 'Second Level', 'openvpn-logo.svg', 'openvpn_version.php', 'OpenVPN implements virtual private network (VPN) techniques to create secure, encrypted network connections. It can be used in multiple scenarios, such as to encrypt Internet traffic to/from users connected through untrusted public access networks or to create encrypted connections over the Internet between private networks with different locations. It uses OpensSSL and TLS for key exchange. It can easily traverse NATs and firewalls. User authentication can be done by pre-shared secret keys, certificates or username and password. The OpenSSL library is used to encrypt both the data and the control channels. An additional layer of security can be added to the connection by using HMAC packet authentication. When a user wants to access the Internet from an untrusted public access network such as the Wi-Fi access point of a hotel, using a VPN is a must. OpenVPN allows installing a VPN server on one&apos;s own VPS or dedicated server, thus bringing real control, privacy and security to such connections.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/OpenVPN/openvpn/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://openvpn.net/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/OpenVPN\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(47, 'superadmin', '$adminuser', 'Matomo', 'Kernel Component', 'Second Level', 'matomo-logo.svg', '', 'Matomo is an accurate and flexible web analytics application. It tracks visits to websites and applications and builds detailed reports and graphs for web traffic analysis. It can collect traffic data using the &apos;server log analytics method\' (access logs are parsed and traffic data is extracted and archived), the \'JavaScript method\' (special JavaScript code is embedded into web pages), the \'image tracking method\' (using \'img\' HTML tags to make requests to Matomo URLs when web pages are loaded), or using client scripts that make requests to the Matomo tracking API. Matomo is very rich in features, yet its functionalities can be further extended by installing different plugins. When self-hosted, Matomo is a valuable replacement for third-party web analytics services, allowing maximum control over the program and over the collected data.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/matomo-org/matomo/blob/4.x-dev/LICENSE\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://matomo.org/\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a><br>• <a class=\"popuplinks\" href=\"https://en.wikipedia.org/wiki/Matomo_(software)\" style=\"color:#1b60ba;\" target=\"_blank\">Wikipedia</a>'),
			(48, 'superadmin', '$adminuser', 'Backup-Manager', 'Kernel Component', 'Second Level', 'backup-manager-logo.svg', 'backupmanager_version.php', 'Backup Manager is a powerful and easy-to-use tool for archiving important data on a server. It can create different types of archives: tar, tar.gz, tar.bz2, zip. The methods for building archives are: tarball, tarball-incremental, mysql, postgresql, svn, pipe. Archives are kept for a given number of days configured by the admin. Its upload feature can use FTP, SSH or RSYNC to transfer the generated archives to one or multiple remote hosts.\nIt&apos;s also possible to automatically burn archives to removable media such as CDs or DVDs. Backup Manager can run in parallel mode, with different configuration files. This allows it to use different archiving methods for different directories and to create the archives with different frequencies.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://github.com/sukria/Backup-Manager/blob/master/COPYING\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"https://github.com/sukria/Backup-Manager\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(49, 'superadmin', '$adminuser', 'System Health and Security Probe', 'Shell Component', 'Second Level', 'system-health-and-security-probe-logo.svg', '', 'System Health and Security Probe is a program that runs periodically and sends a report email to the administrator if it detects at least one of the following problems: a) One or more services running on the host server are in failed state; b) The periodic ClamAV scan has detected any viruses in the mail directories or in the Nextcloud upload directories or the logs show recent virus detections in the incoming emails or in the files uploaded to Nextcloud; c) Any new IP address has been banned during the last run cycle interval due to repeated failed log in attempts against one of the applications monitored by Fail2ban; d) The free disk space on all partitions is less than a threashold established by the admin; e) The average CPU load in the last 15 minutes exceeded 100% utilization of all the CPU cores;\nIt also stores all the IP addresses banned by Fail2ban in a MariaDB database and if one IP has been banned more than once, it includes the &apos;whois\' data for that IP in the email report. It also searches for the \'abuse\' email address in the \'whois\' data and writes a draft email that can be manually sent by the admin to the entity that owns the offending IP, to report the repeated attacks. The draft email includes the log lines containing the failed log in attepts for that IP. \nThe program can also be configured to automatically send the abuse report email to the entity that owns the offending IPs that were banned more than once.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/gpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>'),
			(50, 'superadmin', '$adminuser', 'RED SCARF Suite Panel', 'Kernel Component', 'Second Level', 'red-scarf-suite-panel-logo.svg', '', 'RED SCARF Suite Panel is an admin panel that displays all the components of RED SCARF Suite installed on the server, specifies if any services are in failed state, shows the available storage space and real time CPU, RAM and network ussage, lists the infected files detected by ClamAV during periodic scanning and offers a way to access with one click the customized, difficult to remember login URLs of any web application installed on the server. Its main purpose is to provide a general view of the server&apos;s capabilities and health status and to facilitate access to different login pages.\n<hr style=&quot;color: #E0E0E0; margin: 5px 0px 5px 0px;\">\n• <a class=\"popuplinks\" href=\"https://www.gnu.org/licenses/agpl-3.0.html\" style=\"color:#1b60ba;\" target=\"_blank\">License</a><br>• <a class=\"popuplinks\" href=\"#\" style=\"color:#1b60ba;\" target=\"_blank\">Website</a>');";
	   $result_7 = $mysqli->query($query_7);

	   // Insert default data into the 'buttons' table
	   $query_8 = "INSERT INTO `buttons` (`orderno`, `userrole`, `username`, `nameonbutton`, `buttonurl`, `imgname`) VALUES
		      (1, 'superadmin', '$adminuser', 'example.com', 'Enter URL here', 'wordpress-logo.svg'),
		      (2, 'superadmin', '$adminuser', 'example.net', 'Enter URL here', 'wordpress-logo.svg'),
		      (3, 'superadmin', '$adminuser', 'Dolibarr', 'Enter URL here', 'dolibarr-logo.svg'),
		      (4, 'superadmin', '$adminuser', 'Nextcloud', 'Enter URL here', 'nextcloud-logo.svg'),
		      (5, 'superadmin', '$adminuser', 'Roundcube', 'Enter URL here', 'roundcube-logo.svg'),
		      (6, 'superadmin', '$adminuser', 'phpList', 'Enter URL here', 'phplist-logo.svg'),
		      (7, 'superadmin', '$adminuser', 'Mailman', 'Enter URL here', 'mailman-logo.svg'),
		      (8, 'superadmin', '$adminuser', 'Roundpin', 'Enter URL here', 'roundpin-logo.svg'),
		      (9, 'superadmin', '$adminuser', 'Matomo', 'Enter URL here', 'matomo-logo.svg'),
		      (10, 'superadmin', '$adminuser', 'Friendica', 'Enter URL here', 'friendica-logo.svg'),
		      (11, 'superadmin', '$adminuser', 'MyBB', 'Enter URL here', 'mybb-logo.svg'),
		      (12, 'superadmin', '$adminuser', 'phpMyAdmin', 'Enter URL here', 'phpmyadmin-logo.svg'),
		      (13, 'superadmin', '$adminuser', 'Postfix Admin', 'Enter URL here', 'postfix-admin-logo.svg'),
		      (14, 'superadmin', '$adminuser', 'LibreOffice Online - Admin Console', 'Enter URL here', 'libreoffice-online-logo.svg');";
	   $result_8 = $mysqli->query($query_8);

           $_SESSION['validateaccesspnl'] == "noaccessallowedpnl";

           $_SESSION['instcompleteaccesspnl'] = "instaccesspnl";

           header("Location: panel-inst-complete.php");

       }
    }

?>

<html>

<head>
  <title>RED SCARF Suite Panel Setup</title>

  <link rel="stylesheet" href="assets/css/setup-style.css">
  <script type="text/javascript" src="assets/js/jquery-3.3.1.min.js"></script>
  <script type="text/javascript" src="assets/js/panel-setup.js"></script>

</head>

<body>

  <div id="mainarea">

    <img class="logosetuppage" src="images/red-scarf-suite-panel_logo_about.svg" />

    <h3 style="text-align:center;">RED SCARF Suite Panel Setup</h3><br>

    <img class="setupStage" src="images/panel-setup-stages-2.svg" />

    <form id="panelcredform" action="" method="POST">

       <label for="adminuser" class="fieldlabels">Superadmin username:</label><br>
       <input type="text" id="adminuser" class="textinput" name="adminuser"/><br><br>

       <label for="adminuserpassword" class="fieldlabels">Superadmin password:</label><br>
       <input type="password" id="adminuserpassword" class="textinput" name="adminuserpassword" title="The password should be
       at least 10 characters long, it should contain at least one letter, at least one digit and at least one special character" /><br><br>

       <label for="adminuseremail" class="fieldlabels">Superadmin email address:</label><br>
       <input type="text" id="adminuseremail" class="textinput" name="adminuseremail"/><br><br>

       <input type="submit" id="submitadminbttn" name="submitadminbttn" value="Submit" />

    </form>

  </div>

</body>

</html>

<?php
 }
}

?>
