get('general_database');?>
- get('general_create_backup');?>
+ get('general_create_backup');?>
-
+
';
diff --git a/admin/index.php b/admin/index.php
index 4b05191..cc41b05 100755
--- a/admin/index.php
+++ b/admin/index.php
@@ -7,7 +7,7 @@ if (file_exists('install.php'))
{
if (unlink('install.php'))
{
- echo $lang->get('delete_config_success');
+ echo msg('info', $lang->get('delete_config_success'));
}
}
@@ -21,12 +21,12 @@ if (hasPerm('view_dashboard'))
?>
get('general_config');?>
-
get('logfiles');?>
+
get('logfiles');?>
setLangFolder('lang/');
-
?>
- Installation
-
-
+ Installation
+
+
@@ -47,63 +45,54 @@ if(isset($_POST['submit']))
$_POST['admin_pw2'] !==''
)
{
- $CONFIG = [];
+ $CONFIG = [];
$CONFIG['General']['web_uri'] = $_POST['general_webUrl'];
$CONFIG['General']['home_uri'] = $_POST['general_home_url'];
$CONFIG['General']['phpmyadmin'] = $_POST['general_pma'];
$CONFIG['General']['title'] = 'inc/System/page_title.txt';
$CONFIG['General']['tinymce_css'] = $_POST['general_editor_css'];
-
$CONFIG['Database']['db_type'] = 'mysql';
$CONFIG['Database']['db_host'] = $_POST['db_host'];
$CONFIG['Database']['db_name'] = $_POST['db_name'];
$CONFIG['Database']['db_usr'] = $_POST['db_user'];
$CONFIG['Database']['db_pw'] = $_POST['db_pw1'];
$CONFIG['Database']['db_prefix'] = $_POST['db_prefix'];
-
$CONFIG['Templating']['template'] = $_POST['general_template'];
$CONFIG['Templating']['tpl_title'] = 'title';
$CONFIG['Templating']['tpl_content'] = 'content';
$CONFIG['Templating']['tpl_webUri'] = 'website_uri';
-
$CONFIG['Versioning']['version'] = '0.6 Beta';
$CONFIG['Versioning']['version_num'] = 1;
$CONFIG['Versioning']['update_uri'] = 'http://cdn.kola-entertainments.de/cms/';
-
- //Test Passwords
- if($_POST['db_pw1']!==$_POST['db_pw2'])
- {
- echo msg('fail', 'Mysqlpasswords don\'t match.');
- exit;
- }
- if($_POST['admin_pw1']!==$_POST['admin_pw2'])
- {
- echo msg('fail', 'Adminpasswords don\'t match');
+ //Test Passwords
+ if($_POST['db_pw1']!==$_POST['db_pw2'])
+ {
+ echo msg('fail', 'Mysqlpasswords don\'t match.');
exit;
- }
-
- //Database
- $db = new db($_POST['db_host'], $_POST['db_name'], $_POST['db_user'], $_POST['db_pw1'], $_POST['db_prefix']);
-
- //Create Tables
+ }
+ if($_POST['admin_pw1']!==$_POST['admin_pw2'])
+ {
+ echo msg('fail', 'Adminpasswords don\'t match');
+ exit;
+ }
+
+ //Database
+ $db = new db($_POST['db_host'], $_POST['db_name'], $_POST['db_user'], $_POST['db_pw1'], $_POST['db_prefix']);
+
+ //Create Tables
if($db->query('SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
-
-
CREATE TABLE `'.$_POST['db_prefix'].'meta_meta` (
`name` text NOT NULL,
`content` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
CREATE TABLE `'.$_POST['db_prefix'].'sidebar_sidebar` (
`active` tinyint(1) NOT NULL,
`content` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
INSERT INTO `'.$_POST['db_prefix'].'sidebar_sidebar` (`active`, `content`) VALUES
(0, \'\');
-
CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages` (
`id` int(11) NOT NULL,
`title` text CHARACTER SET utf8 NOT NULL,
@@ -116,7 +105,6 @@ CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages` (
`created` int(11) NOT NULL,
`lastedit` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm` (
`id` int(11) NOT NULL,
`page_id` int(11) NOT NULL,
@@ -130,14 +118,12 @@ CREATE TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm` (
`created` int(11) NOT NULL,
`lastedit` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-
CREATE TABLE `'.$_POST['db_prefix'].'simplePages_permissions` (
`id` int(11) NOT NULL,
`page` int(11) NOT NULL,
`user` int(11) NOT NULL,
`lastedit` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
-
CREATE TABLE `'.$_POST['db_prefix'].'system_admins` (
`id` int(11) NOT NULL,
`username` text NOT NULL,
@@ -146,7 +132,6 @@ CREATE TABLE `'.$_POST['db_prefix'].'system_admins` (
`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,
@@ -155,46 +140,35 @@ CREATE TABLE `'.$_POST['db_prefix'].'system_loggedin` (
`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;
-
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages`
ADD PRIMARY KEY (`id`);
-
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm`
ADD PRIMARY KEY (`id`);
-
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_permissions`
ADD PRIMARY KEY (`id`);
-
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'].'simplePages_pages`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
-
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages_confirm`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
-
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_permissions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
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;
'))
@@ -206,7 +180,6 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles`
echo msg('fail', 'Failed Creating Tables');
exit;
}
-
//Admin group
$db->setCol('system_roles');
$db->data['name'] = 'Admins';
@@ -219,7 +192,6 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles`
echo msg('fail', 'Error creating admin group.');
exit;
}
-
//Admin User
$db->setCol('system_admins');
$db->data['username'] = $_POST['admin_name'];
@@ -235,21 +207,19 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles`
echo msg('fail', 'Error creating admin user.');
exit;
}
-
- //Page title
- if(file_put_contents('../inc/System/page_title.txt', $_POST['general_page_title']))
- {
- echo msg('succes', 'Page Title was successfully set.
');
- }
- else
- {
- echo msg('fail', 'Error setting page title.');
- exit;
- }
-
- //htacces
- $htacces = 'ErrorDocument 404 '.$_POST['general_home_url'].'index.php
+ //Page title
+ if(file_put_contents('../inc/System/page_title.txt', $_POST['general_page_title']))
+ {
+ echo msg('succes', 'Page Title was successfully set.
');
+ }
+ else
+ {
+ echo msg('fail', 'Error setting page title.');
+ exit;
+ }
+ //htacces
+ $htacces = 'ErrorDocument 404 '.$_POST['general_home_url'].'index.php
SetEnv gp_rewrite U9sL2S2
@@ -266,16 +236,15 @@ RewriteRule /?(.*) "'.$_POST['general_home_url'].'index.php?$1" [qsa,L]
RewriteRule . "'.$_POST['general_home_url'].'index.php" [L]
';
- if(file_put_contents('../.htaccess', $htacces))
- {
- echo msg('succes', '.htaccess was successfully set.
');
- }
- else
- {
- echo msg('fail', 'Error setting up .htaccess.
');
- exit;
- }
-
+ if(file_put_contents('../.htaccess', $htacces))
+ {
+ echo msg('succes', '.htaccess was successfully set.
');
+ }
+ else
+ {
+ echo msg('fail', 'Error setting up .htaccess.
');
+ exit;
+ }
//Apps
$modulurl = '../apps/';
if ($handle = opendir($modulurl))
@@ -293,7 +262,6 @@ RewriteRule . "'.$_POST['general_home_url'].'index.php" [L]
}
closedir($handle);
}
-
//Write Config
$configfile = Yaml::dump($CONFIG);
if(file_put_contents('../inc/config.yml', $configfile))
@@ -305,77 +273,76 @@ RewriteRule . "'.$_POST['general_home_url'].'index.php" [L]
echo msg('fail', 'Error creating configfile.');
exit;
}
-
echo msg('info', 'Installation successfully completed. Login');
- }
- else
- {
- echo msg('info', 'Please fill in all fields!');
- }
+ }
+ else
+ {
+ echo msg('info', 'Please fill in all fields!');
+ }
}
else
{
-?>
-
-
-Mysql
+ Host
+ Database
+ Username
+ Password
+ Confirm Password
+ Table prefix
+
+ Website
+ Website Url
+ Home Url
+ Phpmyadmin Url
+ Page Title
+ Editor CSS
+ Template
+
+ First Adminuser
+ Name
+ Email-Adress
+ Password
+ Confirm Password
+
+
+
+
+
+
diff --git a/admin/lang/lang.de.php b/admin/lang/lang.de.php
index f006afa..8d4a132 100755
--- a/admin/lang/lang.de.php
+++ b/admin/lang/lang.de.php
@@ -20,6 +20,7 @@ $lang['all_fields'] = 'Bitte alle Felder ausfüllen.';
$lang['error_2fa'] = 'Fehler bei der Anmeldung in zwei Schritten.';
$lang['wrong_username_or_pass'] = 'Benutzername oder Passwort falsch.';
$lang['wrong_pass'] = 'Falsches Passwort';
+$lang['404_not_found'] = 'Die Seite wurde nicht gefunden.';
//Dashboard
$lang['delete_config_success'] = 'Die installationsdatei wurde erfolgreich gelöscht.';
diff --git a/admin/lang/lang.en.php b/admin/lang/lang.en.php
index 108dc09..6df8383 100755
--- a/admin/lang/lang.en.php
+++ b/admin/lang/lang.en.php
@@ -20,6 +20,7 @@ $lang['all_fields'] = 'Please fill in all fields';
$lang['error_2fa'] = 'Error with 2-Step Verification authentication';
$lang['wrong_username_or_pass'] = 'Wrong username or password.';
$lang['wrong_pass'] = 'Wrong password';
+$lang['404_not_found'] = 'The page you requested was not found.';
//Dashboard
$lang['delete_config_success'] = 'The Install-file was deleted successfully';
diff --git a/apps/Files/index.php b/apps/Files/index.php
index 145f333..38c52e1 100755
--- a/apps/Files/index.php
+++ b/apps/Files/index.php
@@ -405,7 +405,7 @@ if (isset($_SESSION['user']))
$('#content').html('');
$('#text').load(url);
}
- $('#content').append('get('files_url'); ?>:
get('files_download'); ?> get('files_delete'); ?>
');
+ $('#content').append('get('files_url'); ?>:
get('files_download'); ?> get('files_delete'); ?>
');
//uuund einbelnden
$(".overlay").fadeIn(250);
diff --git a/apps/sidebar/genConf.php b/apps/sidebar/genConf.php
index 98cdb96..ed3efaf 100755
--- a/apps/sidebar/genConf.php
+++ b/apps/sidebar/genConf.php
@@ -4,7 +4,7 @@ if (isset($_POST['sidebarconf']))
$sidebar_inhalt = 'text';
$text = $_POST['sidebar_inhalt'];
$active = false;
- if($_POST['aktiv'] == 'true')
+ if(isset($_POST['active']) && $_POST['active'] == 'true')
{
$active = true;
}
@@ -13,7 +13,7 @@ if (isset($_POST['sidebarconf']))
$db->data = ['active' => $active, 'content' => $text];
if ($db->update())
{
- echo msg('succes', 'Die Änderungen der Sidebar wurden erfolgreich gespeichert.');
+ echo msg('success', 'Die Änderungen der Sidebar wurden erfolgreich gespeichert.');
}
else
{
@@ -30,11 +30,9 @@ else
$active = '';
if(!$db->data[0]['active']) $active = ' selected';
?>
- Sidebar anzeigen:
-
+
+
+
@@ -44,14 +42,15 @@ else
+
-
-