setLangFolder('lang/'); ?> Installation

Installation

query('SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; CREATE TABLE `' . $_POST['db_prefix'] . 'system_admins` ( `id` int(11) NOT NULL, `username` text NOT NULL, `pass` text NOT NULL, `lvl` text NOT NULL, `mail` text NOT NULL, `secret` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `' . $_POST['db_prefix'] . 'system_loggedin` ( `id` int(11) NOT NULL, `user` int(11) NOT NULL, `user_agent` longtext NOT NULL, `ip` text NOT NULL, `time` int(11) NOT NULL, `token` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `' . $_POST['db_prefix'] . 'system_roles` ( `id` int(11) NOT NULL, `name` text COLLATE utf8_unicode_ci NOT NULL, `permissions` longtext COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE `' . $_POST['db_prefix'] . 'system_show_stream` ( `id` int(11) NOT NULL, `user` int(11) NOT NULL, `level` text CHARACTER SET latin1 NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE `' . $_POST['db_prefix'] . 'system_stream` ( `id` int(11) NOT NULL, `time` text CHARACTER SET latin1 NOT NULL, `user` text CHARACTER SET latin1 NOT NULL, `lvl` text CHARACTER SET latin1 NOT NULL, `message` longtext CHARACTER SET latin1 NOT NULL, `extra` text CHARACTER SET latin1 NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; ALTER TABLE `' . $_POST['db_prefix'] . 'system_show_stream` ADD PRIMARY KEY (`id`); ALTER TABLE `' . $_POST['db_prefix'] . 'system_stream` ADD PRIMARY KEY (`id`); ALTER TABLE `' . $_POST['db_prefix'] . 'system_show_stream` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; ALTER TABLE `' . $_POST['db_prefix'] . 'system_stream` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; ALTER TABLE `' . $_POST['db_prefix'] . 'system_admins` ADD PRIMARY KEY (`id`); ALTER TABLE `' . $_POST['db_prefix'] . 'system_loggedin` ADD PRIMARY KEY (`id`); ALTER TABLE `' . $_POST['db_prefix'] . 'system_roles` ADD PRIMARY KEY (`id`); ALTER TABLE `' . $_POST['db_prefix'] . 'system_admins` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; ALTER TABLE `' . $_POST['db_prefix'] . 'system_loggedin` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; ALTER TABLE `' . $_POST['db_prefix'] . 'system_roles` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1; ALTER TABLE `' . $_POST['db_prefix'] . 'system_admins` ALTER COLUMN lvl SET DEFAULT 0; ALTER TABLE `' . $_POST['db_prefix'] . 'system_admins` ALTER COLUMN secret SET DEFAULT ""; ') ) { echo msg('success', 'Created Tables successfully.'); } else { echo msg('fail', 'Failed Creating Tables'); exit; } //Admin group $db->setCol('system_roles'); $db->data['name'] = 'Admins'; if ($db->insert()) { echo msg('success', 'Successfully created admin group.'); } else { echo msg('fail', 'Error creating admin group.'); exit; } //Admin User $db->setCol('system_admins'); $db->data['username'] = $_POST['admin_name']; $db->data['pass'] = password_hash($_POST['admin_pw1'], PASSWORD_DEFAULT); $db->data['lvl'] = 1; $db->data['mail'] = $_POST['admin_mail']; if ($db->insert()) { echo msg('success', 'Successfully created admin user.'); } else { echo msg('fail', 'Error creating admin user.'); exit; } //Page title if (file_put_contents('../content/.system/page_title.txt', $_POST['general_page_title'])) { echo msg('success', 'Page Title was successfully set.
'); } else { echo msg('fail', 'Error setting page title.'); exit; } //htacces if (strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') !== false) { $htacces = 'RewriteEngine On RewriteRule ^(admin|inc|apps|content)($|/) - [L] RewriteRule !favicon\.ico - [C] RewriteRule !index\.php - [C] RewriteRule ^(.*)$ /index.php?$1 [QSA,L] # Disables download of configuration Require all denied '; if (file_put_contents('../.htaccess', $htacces)) { echo msg('success', '.htaccess was successfully set.
'); } else { echo msg('fail', 'Error setting up .htaccess.
'); exit; } } else { echo msg('info', 'We detected you are not using Apache. Please make sure to redirect all requests to index.php (Like Apache\'s mod_rewrite).'); } //Apps $apps = new apps(2); $appUri = '../apps/'; foreach ($apps->getApps() as $app => $appconf) { require $appUri . $appconf['app_path'] . '/config.php'; if (isset($_CONF['install']) && $_CONF['install'] != '' && file_exists($appUri . $appconf['app_path'] . '/' . $_CONF['install'])) { require $appUri . $appconf['app_path'] . '/' . $_CONF['install']; } } //Write Config $configfile = Yaml::dump($CONFIG); if (file_put_contents('../config/config.yml', $configfile)) { echo msg('success', 'Configfile was successfully created.'); } else { echo msg('fail', 'Error creating configfile.'); exit; } echo msg('info', 'Installation successfully completed. Login'); } else { echo msg('info', 'Please fill in all fields!'); } } else { ?>

Language

Select your language:

Timezone

Select your timezone:

Mysql

Host
Database
Username
Password
Table prefix (optional)

Website

Page Title
Website Url
 More Options

Mail

 

First Adminuser

Name
Email-Adress
Password
Confirm Password
getApps() as $app => $appconf) { require $appUri . $appconf['app_path'] . '/config.php'; if (isset($_CONF['install']) && $_CONF['install'] != '' && file_exists($appUri . $appconf['app_path'] . '/' . $_CONF['install'])) { require $appUri . $appconf['app_path'] . '/' . $_CONF['install']; } } ?>