mirror of
https://github.com/Mowie/Mowie
synced 2024-06-03 01:19:39 +00:00
Compare commits
125 Commits
v0.91-beta
...
master
Author | SHA1 | Date | |
---|---|---|---|
f026c66918 | |||
|
cc40ca601f | ||
322e545b74 | |||
eb72b9fcca | |||
0f5c7cc4b1 | |||
a9810e8ce8 | |||
636ae4b756 | |||
70e1e50150 | |||
c0232dbd43 | |||
96425173e0 | |||
90e121d367 | |||
ae96503cc1 | |||
b90a42e575 | |||
0c4649c93f | |||
ec44bdce88 | |||
71743d5f46 | |||
74428a0225 | |||
1bddab64d3 | |||
f5dcad5814 | |||
5e5e221451 | |||
a54a31a0fc | |||
7c1f581ff1 | |||
8c02edce51 | |||
f77c375ec1 | |||
4e48fd77d2 | |||
b74cad4aa8 | |||
e8b972543c | |||
f5f55ee5cc | |||
61ab6aff2b | |||
129e6ac281 | |||
58550a8a96 | |||
167608b023 | |||
a7b7007346 | |||
a485c1763c | |||
e8e1ff2451 | |||
9e1397a4dd | |||
bc13edd329 | |||
546bbe62cd | |||
8c813b3394 | |||
f5291de8c2 | |||
d3bff8730e | |||
b246cf542f | |||
ca69b58cca | |||
97fdb974a2 | |||
33e88b3daf | |||
81530d956b | |||
2398fa28c0 | |||
3faa9d3c35 | |||
a66b948ffd | |||
19fc3d2d15 | |||
2e5afd6785 | |||
c8a19d3b3c | |||
9599614a60 | |||
d6db38753e | |||
4f99762684 | |||
8bbf7acb31 | |||
8ed9c62ce7 | |||
7806407eab | |||
41268a2022 | |||
97cc4ce084 | |||
f72e61d856 | |||
|
0bd97f3555 | ||
66ac3d1e89 | |||
fa76f4bf9e | |||
b3faa6425c | |||
60e4b7cec6 | |||
ad779c5737 | |||
0f6b63e8ad | |||
afcfb78250 | |||
f32d11a1f2 | |||
f85ec7faa4 | |||
2a534d0963 | |||
5d5c024d08 | |||
ddb4a3b47d | |||
5cceb2eb97 | |||
7d2fdcfebc | |||
0b96919d0c | |||
6c853cbeee | |||
4ce47c209f | |||
b365dc88ed | |||
97bd63177e | |||
0233dd26c3 | |||
d36b14f9c4 | |||
86f9367424 | |||
a784c5a574 | |||
a15b1d92aa | |||
8594b9aa11 | |||
0d63ceb822 | |||
d7f27d6e38 | |||
713b3dda18 | |||
63b01dd4e5 | |||
439b77ef86 | |||
f8850c4b24 | |||
11eb5627ef | |||
7af66fb9b8 | |||
a151256905 | |||
1cbe09099a | |||
0f1f894f70 | |||
dd1200d885 | |||
344857f4fe | |||
91b8687e12 | |||
47d380d1cc | |||
9ceb9c8b2a | |||
909e5aa5cc | |||
baebd1cd95 | |||
4d410fc400 | |||
45f957c29b | |||
d508dfe938 | |||
e9c981feb5 | |||
696f879a31 | |||
03a2a088a2 | |||
fc9e631f02 | |||
f532fb77fd | |||
60731bd6b4 | |||
d838144b50 | |||
0b02e07d99 | |||
4f57a8a1ab | |||
75b6f587cf | |||
740cdc500c | |||
99fcfd2220 | |||
a2cfd99d02 | |||
5911138b65 | |||
b6a4ecbe1e | |||
419bce04d2 | |||
528d2c4e49 |
11
.gitignore
vendored
Executable file
11
.gitignore
vendored
Executable file
|
@ -0,0 +1,11 @@
|
|||
.idea
|
||||
templates_c
|
||||
vendor/
|
||||
content/.system/page_title.txt
|
||||
content/Files/*
|
||||
config/*
|
||||
.db-data/
|
||||
|
||||
# install files
|
||||
admin/install.php
|
||||
apps/*/install.php
|
13
README.md
13
README.md
|
@ -1,9 +1,20 @@
|
|||
# Mowie
|
||||
|
||||
[![Join the chat at https://gitter.im/Mowie/Mowie](https://badges.gitter.im/Mowie/Mowie.svg)](https://gitter.im/Mowie/Mowie?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
A modular, powerful & good-looking CMS.
|
||||
|
||||
#Installing
|
||||
This CMS is currently under heavy development. You can use it (it is quite stable) but expect bugs - and possible changes to the api.
|
||||
|
||||
# Installing
|
||||
To install the CMS, grab [the latest release](https://github.com/Mowie/Mowie/releases), unzip it on your webserver and open a webbrowser to the files on your server. It will guide you through all necessary steps to install.
|
||||
|
||||
## Development
|
||||
|
||||
There is a developer docker image with a `docker-compose.yml` file to quickly set up a development environment.
|
||||
|
||||
It will expose two ports on your local machine, `8081` for the site itself and `3361` to access the database from your local machine.
|
||||
|
||||
# Documentation
|
||||
Comming Soon!
|
||||
|
||||
|
|
325
admin/action.php
325
admin/action.php
|
@ -1,224 +1,163 @@
|
|||
<?php
|
||||
require_once '../inc/autoload_adm.php';
|
||||
//Datenbank Backup
|
||||
|
||||
use HGG\DbCmd\CmdBuilder\MySql;
|
||||
use HGG\DbCmd\DbCmd;
|
||||
|
||||
// Full Database Backeup
|
||||
if (isset($_GET['dbbackup']) && is_loggedin() && hasPerm('db_dump'))
|
||||
{
|
||||
include '../inc/libs/dbbackup.php';
|
||||
$db = new DBBackup(array(
|
||||
'driver' => 'mysql',
|
||||
'host' => $MCONF['db_host'],
|
||||
'user' => $MCONF['db_usr'],
|
||||
'password' => $MCONF['db_pw'],
|
||||
'database' => $MCONF['db_name'],
|
||||
'db_prefix' => $MCONF['db_prefix']
|
||||
));
|
||||
$backup = $db->backup();
|
||||
if ($backup['error'])
|
||||
{
|
||||
echo msg('fail', $lang->get('action_backup_fail'));
|
||||
}
|
||||
else
|
||||
try
|
||||
{
|
||||
$output = '';
|
||||
$cmd = new DbCmd(new MySql());
|
||||
$cmd->dumpDatabase($MCONF['db_usr'], $MCONF['db_pw'], $MCONF['db_host'], $MCONF['db_name'],
|
||||
'.dbdump.tmp', array(), $output);
|
||||
|
||||
stream_message('{user} made a database-backup.', 4);
|
||||
header("Cache-Control: public");
|
||||
header("content-Description: File Transfer");
|
||||
header('Content-Disposition: attachment; filename=Backup_' . str_replace(' ', '_', $MCONF['title']) . '_' . date('Y-m-d_h-d') . '.sql');
|
||||
header("Content-Type: application/octet-stream; ");
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
echo $backup['msg'];
|
||||
exit;
|
||||
readfile('.dbdump.tmp');
|
||||
unlink('.dbdump.tmp');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
printHeader($lang->get('action_edit_content'));
|
||||
catch (\Exception $e)
|
||||
{
|
||||
echo msg('fail', $lang->get('action_backup_fail'));
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
}
|
||||
if (hasPerm('manage_system'))
|
||||
{
|
||||
//construction
|
||||
if (isset($_GET['construction']))
|
||||
{
|
||||
if (isset($_GET['constr_message']))
|
||||
{
|
||||
if (isset($_POST['constr_message']))
|
||||
{
|
||||
if (file_put_contents('../inc/System/construction2.txt', $_POST['constr_message']))
|
||||
{
|
||||
copy('../inc/System/construction2.txt', '../inc/System/construction.txt');
|
||||
echo msg('succes', $lang->get('action_construction_message_success').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_try_again_later').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
} else
|
||||
{
|
||||
tinymce();
|
||||
?>
|
||||
<div class="main">
|
||||
<h1><?php echo $lang->get('action_construction_message_edit');?></h1>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<textarea id="editor" name="constr_message"><?php require('../inc/System/construction2.txt'); ?></textarea>
|
||||
<input type="submit" value="<?php echo $lang->get('general_save_changes');?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else
|
||||
{
|
||||
if(hasPerm('construction'))
|
||||
{
|
||||
if (!file_exists('../inc/System/construction.txt'))
|
||||
{
|
||||
if (isset($_GET['confirm']))
|
||||
{
|
||||
if (copy('../inc/System/construction2.txt', '../inc/System/construction.txt'))
|
||||
{
|
||||
echo msg('succes', $lang->get('action_construction_success').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_try_again_later').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
} else
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<p style="text-align: center;">
|
||||
<?php echo $lang->get('action_construction_confirm');?><br/>
|
||||
<a href="action.php?construction&confirm" class="button"><?php echo $lang->get('general_yes');?></a>
|
||||
<a href="general_config.php" class="button btn_del"><?php echo $lang->get('general_no');?></a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (isset($_GET['confirm']))
|
||||
{
|
||||
if (unlink('../inc/System/construction.txt'))
|
||||
{
|
||||
echo msg('succes', $lang->get('action_construction_removed_success').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_try_again_later').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
} else
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<p style="text-align: center;">
|
||||
<?php echo $lang->get('action_construction_remove');?><br/>
|
||||
<a href="action.php?construction&confirm" class="button"><?php echo $lang->get('general_yes');?></a>
|
||||
<a href="general_config.php" class="button btn_del"><?php echo $lang->get('general_no');?></a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//Generelle Änderungen
|
||||
if (isset($_GET['general']))
|
||||
{
|
||||
//Header
|
||||
if(hasPerm('edit_title'))
|
||||
{
|
||||
$titel = $_POST['titel'];
|
||||
if (file_put_contents('../inc/System/page_title.txt', $titel))
|
||||
{
|
||||
echo msg('succes', $lang->get('action_change_page_title_success'));
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_try_again_later'));
|
||||
}
|
||||
}
|
||||
$moduluri = '../apps/';
|
||||
if ($handle = opendir($moduluri))
|
||||
{
|
||||
while (false !== ($mod = readdir($handle)))
|
||||
{
|
||||
if ($mod != "." && $mod != ".." && is_dir($moduluri . $mod))
|
||||
{
|
||||
require $moduluri . $mod . '/config.php';
|
||||
if (isset($_CONF['general_conf']) && $_CONF['general_conf'] != '' && file_exists($moduluri . $mod . '/' . $_CONF['general_conf']))
|
||||
{
|
||||
//echo '<li class="divider"></li>';
|
||||
require $moduluri . $mod . '/' . $_CONF['general_conf'];
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
//Update
|
||||
if(isset($_GET['update']))
|
||||
if (isset($_GET['construction']))
|
||||
{
|
||||
if(hasPerm('update'))
|
||||
printHeader($lang->get('action_construction_message_edit'));
|
||||
if (isset($_GET['constr_message']))
|
||||
{
|
||||
$version_remote = json_decode(file_get_contents($MCONF['update_uri'].'version.json'));
|
||||
if ($version_remote->versionNum > $MCONF['version_num'])
|
||||
if (isset($_POST['constr_message']))
|
||||
{
|
||||
if (copy($MCONF['update_uri'].'update.v' . $version_remote->versionNum . '.incremental.zip', 'update.zip'))
|
||||
if (file_put_contents('../content/.system/construction2.txt', $_POST['constr_message']))
|
||||
{
|
||||
if (md5_file('update.zip') == $version_remote->md5)
|
||||
{
|
||||
if (!file_exists('updateNeu/'))
|
||||
{
|
||||
mkdir('updateNeu/');
|
||||
}
|
||||
$zip = new ZipArchive;
|
||||
$res = $zip->open('update.zip');
|
||||
if ($res === true)
|
||||
{
|
||||
$zip->extractTo('updateNeu/');
|
||||
$zip->close();
|
||||
$updateInfos = json_decode(file_get_contents('updateNeu/filesToUpdate.json'));
|
||||
//array mit dateine erstellen
|
||||
$isUp = false;
|
||||
$fTU = [];
|
||||
foreach ($updateInfos->files as $num => $file)
|
||||
{
|
||||
$fTU[] = $file;
|
||||
$upNeu = 'updateNeu/' . $file;
|
||||
$upRem = '../' . $file;
|
||||
if (copy($upNeu, $upRem))
|
||||
{
|
||||
echo msg('succes', sprintf($lang->get('action_update_item_succss'), $file));
|
||||
$isUp = true;
|
||||
} else
|
||||
{
|
||||
echo msg('fail', sprintf($lang->get('action_update_item_fail'), $file));
|
||||
}
|
||||
}
|
||||
|
||||
//Jetzt altes update entfernen
|
||||
if (rrmdir('updateNeu') && $isUp && unlink('update.zip'))
|
||||
{
|
||||
echo msg('succes', $lang->get('action_update_success').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_update_fail').' <a href="general_config.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_update_fail_unzip'));
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_update_md5_fake'));
|
||||
}
|
||||
copy('../content/.system/construction2.txt', '../content/.system/construction.txt');
|
||||
echo msg('success', $lang->get('action_construction_message_success') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
|
||||
stream_message('{user} edited the construction-mode message.', 2);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_update_fail_copy'));
|
||||
echo msg('fail', $lang->get('action_try_again_later') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('general_version_current_new'));
|
||||
tinymce();
|
||||
?>
|
||||
<div class="main">
|
||||
<h1><?php echo $lang->get('action_construction_message_edit'); ?></h1>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
|
||||
<textarea id="editor"
|
||||
name="constr_message"><?php require('../content/.system/construction2.txt'); ?></textarea>
|
||||
<input type="submit" value="<?php echo $lang->get('general_save_changes'); ?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (hasPerm('construction'))
|
||||
{
|
||||
if (!file_exists('../content/.system/construction.txt'))
|
||||
{
|
||||
if (isset($_GET['confirm']))
|
||||
{
|
||||
if (copy('../content/.system/construction2.txt', '../content/.system/construction.txt'))
|
||||
{
|
||||
echo msg('success', $lang->get('action_construction_success') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
|
||||
stream_message('{user} put the site into construction mode.', 2);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_construction_error') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
} else
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<p style="text-align: center;">
|
||||
<?php echo $lang->get('action_construction_confirm'); ?><br/>
|
||||
<a href="action.php?construction&confirm"
|
||||
class="button"><?php echo $lang->get('general_yes'); ?></a>
|
||||
<a href="general_config.php"
|
||||
class="button btn_del"><?php echo $lang->get('general_no'); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (isset($_GET['confirm']))
|
||||
{
|
||||
if (unlink('../content/.system/construction.txt'))
|
||||
{
|
||||
echo msg('success', $lang->get('action_construction_removed_success') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
|
||||
stream_message('{user} put the site into production mode.', 2);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_construction_removed_error') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
} else
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<p style="text-align: center;">
|
||||
<?php echo $lang->get('action_construction_remove'); ?><br/>
|
||||
<a href="action.php?construction&confirm"
|
||||
class="button"><?php echo $lang->get('general_yes'); ?></a>
|
||||
<a href="general_config.php"
|
||||
class="button btn_del"><?php echo $lang->get('general_no'); ?></a>
|
||||
</p>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
//General Changes
|
||||
if (isset($_GET['general']))
|
||||
{
|
||||
printHeader($lang->get('general_config'));
|
||||
//Header
|
||||
if (hasPerm('edit_title'))
|
||||
{
|
||||
$titel = $_POST['titel'];
|
||||
if (file_put_contents('../content/.system/page_title.txt', $titel))
|
||||
{
|
||||
echo msg('success', $lang->get('action_change_page_title_success'));
|
||||
stream_message('{user} edited the page title.', 2);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_try_again_later'));
|
||||
}
|
||||
}
|
||||
|
||||
$apps = new apps();
|
||||
$appUri = '../apps/';
|
||||
foreach ($apps->getApps() as $app => $appconf)
|
||||
{
|
||||
require $appUri . $appconf['app_path'] . '/config.php';
|
||||
if (isset($_CONF['general_conf']) && $_CONF['general_conf'] != '' && file_exists($appUri . $appconf['app_path'] . '/' . $_CONF['general_conf']))
|
||||
{
|
||||
require $appUri .$appconf['app_path'] . '/' . $_CONF['general_conf'];
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
printHeader($lang->get('action_edit_content'));
|
||||
echo msg('info', $lang->get('missing_permission'));
|
||||
}
|
||||
require_once '../inc/footer.php';
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 42 KiB |
|
@ -4,6 +4,10 @@
|
|||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box;
|
||||
-moz-box-sizing: content-box;
|
||||
}
|
||||
|
||||
*, *:focus, *:hover, *:active {
|
||||
|
@ -23,6 +27,7 @@ body {
|
|||
font-size: 15px;
|
||||
color: #212121;
|
||||
background: #e6e6e6;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
|
@ -30,6 +35,10 @@ h1, h2, h3, h4, h5, h6 {
|
|||
font-weight: 400;
|
||||
}
|
||||
|
||||
ul{
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
/*Inputs und co*/
|
||||
input, textarea {
|
||||
font-size: 15px;
|
||||
|
@ -47,6 +56,7 @@ input, textarea {
|
|||
background-repeat: no-repeat;
|
||||
transition: 0.2s ease;
|
||||
-webkit-transition: 0.2s ease;
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
textarea {
|
||||
|
@ -76,6 +86,11 @@ input:invalid:focus, textarea:invalid:focus {
|
|||
border: 0;
|
||||
}
|
||||
|
||||
/*Placeholder*
|
||||
::-webkit-input-placeholder, :-moz-placeholder, ::-moz-placeholder, :-ms-input-placeholder, ::placeholder {
|
||||
color: #ccc !important;
|
||||
}*/
|
||||
|
||||
/*Checkbox*/
|
||||
input[type=checkbox] {
|
||||
display: none;
|
||||
|
@ -310,6 +325,7 @@ hr{
|
|||
a.del i {
|
||||
font-size: 20px;
|
||||
vertical-align: sub;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a.del {
|
||||
|
@ -368,7 +384,7 @@ a.del:hover {
|
|||
stroke: #FF9800;
|
||||
}
|
||||
75% {
|
||||
stroke: #4baa4f;
|
||||
stroke: #448AFF;
|
||||
}
|
||||
100% {
|
||||
stroke: #4CAF50;
|
||||
|
@ -386,7 +402,7 @@ a.del:hover {
|
|||
stroke: #FF9800;
|
||||
}
|
||||
75% {
|
||||
stroke: #4baa4f;
|
||||
stroke: #448AFF;
|
||||
}
|
||||
100% {
|
||||
stroke: #4CAF50;
|
||||
|
@ -423,7 +439,7 @@ a.del:hover {
|
|||
}
|
||||
}
|
||||
|
||||
/*Tabelle*/
|
||||
/*Table*/
|
||||
table {
|
||||
box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, .14);
|
||||
border: 1px solid #E0E0E0;
|
||||
|
@ -628,7 +644,7 @@ header {
|
|||
color: #727272;
|
||||
z-index: 2;
|
||||
font-size: 30px;
|
||||
overflow: hidden;
|
||||
/*overflow: hidden;*/
|
||||
}
|
||||
|
||||
header:after {
|
||||
|
@ -638,7 +654,7 @@ header:after {
|
|||
}
|
||||
|
||||
header .options {
|
||||
display: block;
|
||||
display: inline-block;
|
||||
float: right;
|
||||
font-size: 15px;
|
||||
text-align: right;
|
||||
|
@ -646,11 +662,12 @@ header .options {
|
|||
-moz-user-select: -moz-none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
position: fixed;
|
||||
/*position: fixed;
|
||||
top: -9px;
|
||||
right: 10px;
|
||||
right: 10px;*/
|
||||
background: #fff;
|
||||
height: 65px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
|
||||
header .options span {
|
||||
|
@ -755,6 +772,7 @@ nav header {
|
|||
|
||||
nav ul {
|
||||
padding-top: 20px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
nav ul li {
|
||||
|
@ -1163,24 +1181,85 @@ a[class^="card-"]:hover, a[class*=" card-"]:hover {
|
|||
|
||||
.form span {
|
||||
float: left;
|
||||
width: 200px;
|
||||
width: 230px;
|
||||
text-align: left;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
/*Stream*/
|
||||
header .stream{
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.stream a{
|
||||
color: #727272;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.stream #streamContent{
|
||||
background: #fff;
|
||||
padding: 10px 10px 20px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
border-radius: 1px;
|
||||
z-index: 1;
|
||||
font-size: 14px;
|
||||
|
||||
width: 300px;
|
||||
max-height: 200px;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
margin-left: -150px;
|
||||
margin-top: 5px;
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
.stream #streamContent p:last-child{
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.stream .button{
|
||||
width: calc(100% + 20px);
|
||||
margin: 10px -10px 0;
|
||||
padding: 0;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
border-radius: 0;
|
||||
background: #BDBDBD;
|
||||
}
|
||||
|
||||
/*Msgs*/
|
||||
[class^="message-"], [class*=" message-"] {
|
||||
.message{
|
||||
width: calc(100% - 95px);
|
||||
max-width: 280px;
|
||||
padding: 10px 15px 10px 80px;
|
||||
max-width: 360px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
border-radius: 2px;
|
||||
margin: 10px auto;
|
||||
background: #fff;
|
||||
min-height: 44px;
|
||||
min-height: 65px;
|
||||
|
||||
position: relative;
|
||||
}
|
||||
|
||||
[class^="message-"]:before, [class*=" message-"]:before {
|
||||
.message .msg{
|
||||
padding: 10px 15px 10px 80px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.message [class^="icon-"], .message [class*=" icon-"]{
|
||||
border-radius: 2px 0 0 2px;
|
||||
|
||||
display: block;
|
||||
width: 68px;
|
||||
float: left;
|
||||
|
||||
top: 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.message [class^="icon-"]:before, .message [class*=" icon-"]:before {
|
||||
/* use !important to prevent issues with browser extensions that change fonts */
|
||||
font-family: 'FontAwesome' !important;
|
||||
font-style: normal;
|
||||
|
@ -1194,256 +1273,34 @@ a[class^="card-"]:hover, a[class*=" card-"]:hover {
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
font-size: 45px;
|
||||
margin: -10px 10px -8px -80px;
|
||||
color: #fff;
|
||||
padding: 7px 15px 8px;
|
||||
border-radius: 2px 0 0 2px;
|
||||
|
||||
min-height: 49px;
|
||||
display: block;
|
||||
width: 37px;
|
||||
float: left;
|
||||
top: calc(50% - 30px);
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.message-success:before {
|
||||
content: "\f058";
|
||||
.message .icon-success{
|
||||
background: #4CAF50;
|
||||
}
|
||||
|
||||
.message-fail:before {
|
||||
content: "\f057";
|
||||
.message .icon-fail {
|
||||
background: #F44336;
|
||||
}
|
||||
|
||||
.message-info:before {
|
||||
content: "\f05a";
|
||||
.message .icon-info {
|
||||
background: #2280db;
|
||||
}
|
||||
|
||||
/*Files*/
|
||||
table#filesList {
|
||||
min-width: calc(100% + 20px);
|
||||
display: table;
|
||||
box-shadow: none;
|
||||
margin: 5px -10px;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
.message .icon-success:before {
|
||||
content: "\f058";
|
||||
}
|
||||
|
||||
table#filesList td {
|
||||
padding: 5px 10px;
|
||||
.message .icon-fail:before {
|
||||
content: "\f057";
|
||||
}
|
||||
|
||||
table#filesList a {
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
table#filesList thead{
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
}
|
||||
|
||||
table#filesList thead th{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
table#filesList thead th:after{
|
||||
font-family: 'FontAwesome' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
content: "\f0dc";
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
table#filesList thead th.headerSortDown:after{
|
||||
content: "\f0de";
|
||||
}
|
||||
|
||||
table#filesList thead th.headerSortUp:after{
|
||||
content: "\f0dd";
|
||||
}
|
||||
|
||||
.upbtninput {
|
||||
position: fixed;
|
||||
top: -100px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.window {
|
||||
width: 100%;
|
||||
max-width: 984px;
|
||||
left: calc((50vw - 366px));
|
||||
top: 40px;
|
||||
background: #fff;
|
||||
padding: 10px 10px 20px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
z-index: 1;
|
||||
border-radius: 2px;
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
max-height: calc(100vh - 80px);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.window .head {
|
||||
margin: -10px -10px 20px;
|
||||
padding: 10px 10px;
|
||||
background: #eaeaea;
|
||||
border-radius: 2px 2px 0 0;
|
||||
-moz-user-select: -moz-none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
position: fixed;
|
||||
width: 984px;
|
||||
}
|
||||
|
||||
.window .head .closeMsg {
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
.window .head .closeMsg:hover {
|
||||
color: #5d5d5d;
|
||||
}
|
||||
|
||||
.window #content {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.window-confirm, .window-confirm .head {
|
||||
width: 350px;
|
||||
text-align: center;
|
||||
left: calc(50vw - 175px);
|
||||
}
|
||||
|
||||
.window-confirm .head {
|
||||
margin: -10px -10px 10px 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.select {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.select:focus {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #4CAF50;
|
||||
}
|
||||
|
||||
.window textarea {
|
||||
width: calc(100% - 10px);
|
||||
height: 400px;
|
||||
font-family: monospace;
|
||||
max-width: 100%;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.window textarea:focus {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #4CAF50;
|
||||
}
|
||||
|
||||
.progbar_btm {
|
||||
background: #4CAF50;
|
||||
height: 4px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/*dropFileArea*/
|
||||
#dropFileArea{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 999;
|
||||
background: rgba(250,250,250,0.6);
|
||||
}
|
||||
|
||||
.dropmsgcontainer{
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
bottom: 20px;
|
||||
position: fixed;
|
||||
left: calc(50vw - 215px);
|
||||
}
|
||||
|
||||
.dropmsg{
|
||||
background: #2196F3;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
|
||||
.dropicon{
|
||||
font-size: 90px;
|
||||
text-shadow: 0 2px 2px rgba(0, 0, 0, .14), 0 3px 1px rgba(0, 0, 0, .2), 0 1px 5px rgba(0, 0, 0, .12);
|
||||
height: 110px;
|
||||
-moz-animation: bounce 2s infinite;
|
||||
-webkit-animation: bounce 2s infinite;
|
||||
animation: bounce 2s infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes bounce {
|
||||
0%, 20%, 50%, 80%, 100% {
|
||||
padding-bottom:0;
|
||||
}
|
||||
40% {
|
||||
padding-bottom:15px;
|
||||
}
|
||||
60% {
|
||||
padding-bottom:10px;
|
||||
}
|
||||
}
|
||||
@keyframes bounce {
|
||||
0%, 20%, 50%, 80%, 100% {
|
||||
padding-bottom:0;
|
||||
}
|
||||
40% {
|
||||
padding-bottom:15px;
|
||||
}
|
||||
60% {
|
||||
padding-bottom:10px;
|
||||
}
|
||||
}
|
||||
|
||||
/*Bild ZooomIN*/
|
||||
.imgContaienr {
|
||||
margin: 10px -10px;
|
||||
overflow: auto;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.imgContaienr img {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
cursor: zoom-in;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
img.zoomedin {
|
||||
max-height: inherit;
|
||||
max-width: inherit;
|
||||
cursor: zoom-out;
|
||||
.message .icon-info:before {
|
||||
content: "\f05a";
|
||||
}
|
||||
|
||||
/*icons*/
|
||||
|
@ -1538,6 +1395,59 @@ img.zoomedin {
|
|||
display: block;
|
||||
}
|
||||
|
||||
/*Confirm Window*/
|
||||
.overlay {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.window-confirm, .window-confirm .head {
|
||||
text-align: center;
|
||||
left: calc(50vw - 175px);
|
||||
width: 100%;
|
||||
max-width: 350px;
|
||||
top: 40px;
|
||||
background: #fff;
|
||||
padding: 10px 10px 20px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
z-index: 1;
|
||||
border-radius: 2px;
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
max-height: calc(100vh - 80px);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.window-confirm .head {
|
||||
margin: -10px -10px 10px 0;
|
||||
text-align: left;
|
||||
padding: 10px 10px;
|
||||
background: #eaeaea;
|
||||
border-radius: 2px 2px 0 0;
|
||||
-moz-user-select: -moz-none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.window-confirm .head .closeMsg {
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
.window-confirm .head .closeMsg:hover {
|
||||
color: #5d5d5d;
|
||||
}
|
||||
|
||||
.window-confirm #content {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 450px) {
|
||||
header .options span.usr_info {
|
||||
display: none;
|
||||
|
|
1095
admin/assets/bootstrap.min.css
vendored
Executable file
1095
admin/assets/bootstrap.min.css
vendored
Executable file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 264 KiB |
2199
admin/assets/font-awesome.css
vendored
Normal file → Executable file
2199
admin/assets/font-awesome.css
vendored
Normal file → Executable file
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 382 KiB After Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
11
admin/assets/js/bootstrap.min.js
vendored
Executable file
11
admin/assets/js/bootstrap.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
1212
admin/assets/js/moment.js
Executable file
1212
admin/assets/js/moment.js
Executable file
File diff suppressed because it is too large
Load Diff
2
admin/assets/js/page.bodyparser.js
Normal file → Executable file
2
admin/assets/js/page.bodyparser.js
Normal file → Executable file
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (nodeName !== 'INPUT' && nodeName !== 'BUTTON') {
|
||||
if (nodeName !== 'INPUT'){//} && nodeName !== 'BUTTON') {
|
||||
return; // something other than a submit button was clicked
|
||||
}
|
||||
else if (nodeName === 'INPUT' && el.type !== 'submit') {
|
||||
|
|
0
admin/assets/js/page.js
Normal file → Executable file
0
admin/assets/js/page.js
Normal file → Executable file
|
@ -7,8 +7,8 @@
|
|||
.mce-toolbar .mce-btn { background: #fff; border: 0; }
|
||||
.mce-toolbar .mce-btn i { color: #555; }
|
||||
.mce-toolbar .mce-btn:hover i { color: #333; }
|
||||
.mce-primary { background: #6ba72b; }
|
||||
.mce-primary:hover { background: #68a029; }
|
||||
.mce-primary { background: #4CAF50; }
|
||||
.mce-primary:hover { background: #4CAF50; }
|
||||
.mce-btn-group:not(:first-child) { border-left: 3px solid #fff; }
|
||||
.mce-menu-item:hover { background: #eee; }
|
||||
.mce-menu-item.mce-disabled * { color: #ddd !important; }
|
||||
|
|
|
@ -2,102 +2,110 @@
|
|||
require_once '../inc/autoload_adm.php';
|
||||
printHeader($lang->get('general_config'));
|
||||
tinymce();
|
||||
?>
|
||||
<div class="main">
|
||||
<form method="POST" action="action.php?general">
|
||||
<div class="form">
|
||||
?>
|
||||
<div class="main">
|
||||
<form method="POST" action="action.php?general">
|
||||
<div class="form">
|
||||
<?php
|
||||
if(hasPerm('edit_title'))
|
||||
if (hasPerm('edit_title'))
|
||||
{
|
||||
?>
|
||||
<p><span><?php echo $lang->get('general_website_title');?></span>
|
||||
<input type="text" name="titel" value="<?php
|
||||
<p><span><?php echo $lang->get('general_website_title'); ?></span>
|
||||
<input type="text" name="titel" value="<?php
|
||||
echo $MCONF['title'];
|
||||
?>"/>
|
||||
</p>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(hasPerm('construction'))
|
||||
if (hasPerm('construction'))
|
||||
{
|
||||
?>
|
||||
<p><span><?php echo $lang->get('general_construction_mode');?></span>
|
||||
<p><span><?php echo $lang->get('general_construction_mode'); ?></span>
|
||||
<?php
|
||||
if (file_exists('../inc/System/construction.txt'))
|
||||
if (file_exists('../content/.system/construction.txt'))
|
||||
{
|
||||
echo '<a href="action.php?construction" class="button">'.$lang->get('general_end_construction_mode').'</a>';
|
||||
echo '<a href="action.php?construction" class="button">' . $lang->get('general_end_construction_mode') . '</a>';
|
||||
} else
|
||||
{
|
||||
echo '<a href="action.php?construction" class="button">'.$lang->get('general_start_construction_mode').'</a>';
|
||||
echo '<a href="action.php?construction" class="button">' . $lang->get('general_start_construction_mode') . '</a>';
|
||||
}
|
||||
?> <a href="action.php?construction&constr_message" class="button"><?php echo $lang->get('general_edit_message');?></a>
|
||||
</p>
|
||||
?> <a href="action.php?construction&constr_message"
|
||||
class="button"><?php echo $lang->get('general_edit_message'); ?></a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(hasPerm('update'))
|
||||
if (hasPerm('update'))
|
||||
{
|
||||
?>
|
||||
<i class="divider"></i>
|
||||
<h1><?php echo $lang->get('general_version');?></h1>
|
||||
<p><?php echo $lang->get('general_version_current');?>:
|
||||
<?php
|
||||
echo $MCONF['version'];
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<i class="divider"></i>
|
||||
<h1><?php echo $lang->get('update_version'); ?></h1>
|
||||
<p><?php echo $lang->get('update_version_current'); ?>:
|
||||
<?php
|
||||
echo $MCONF['version'];
|
||||
?>
|
||||
</p>
|
||||
<?php
|
||||
if ($MCONF['update_enabled'])
|
||||
{
|
||||
?>
|
||||
<p>
|
||||
<div id="checkUpdate">
|
||||
<div class="spinner-container" style="margin: 0;">
|
||||
<svg class="spinner" style="width:41px;height:40px;" viewBox="0 0 44 44">
|
||||
<circle class="path" cx="22" cy="22" r="20" fill="none" stroke-width="4"></circle>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="margin: -35px 0 0 55px;padding-bottom: 10px;"></div>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<script>
|
||||
$.get('update.php?checkUpdate', function (data) {
|
||||
$('#checkUpdate').html('');
|
||||
$('#checkUpdate').html(data);
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
$version_remote = json_decode(file_get_contents($MCONF['update_uri'].'version.json'));
|
||||
if ($version_remote->versionNum > $MCONF['version_num'])
|
||||
{
|
||||
echo $lang->get('general_new_version').' <b>' . $version_remote->version . '</b> <a href="action.php?update" class="button">'.$lang->get('general_update').'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $lang->get('general_version_current_new');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasPerm('db_dump'))
|
||||
{
|
||||
?>
|
||||
</p>
|
||||
<i class="divider"></i>
|
||||
<h1><?php echo $lang->get('general_database'); ?></h1>
|
||||
<p>
|
||||
<a href="action.php?dbbackup" class="button" download="download"><i
|
||||
class="fa fa-database"></i> <?php echo $lang->get('general_create_backup'); ?>
|
||||
</a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
if(hasPerm('db_dump'))
|
||||
$apps = new apps();
|
||||
$appUri = '../apps/';
|
||||
foreach ($apps->getApps() as $app => $appconf)
|
||||
{
|
||||
?>
|
||||
<i class="divider"></i>
|
||||
<h1><?php echo $lang->get('general_database');?></h1>
|
||||
<p>
|
||||
<a href="action.php?dbbackup" class="button" download="download"><i class="fa fa-database"></i> <?php echo $lang->get('general_create_backup');?>
|
||||
</a>
|
||||
<a href="<?php
|
||||
echo $MCONF['phpmyadmin'];
|
||||
?>" class="button" target="_blank"><?php echo $lang->get('general_go_phpmyadmin');?> <i class="fa fa-external-link"></i></a>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
|
||||
$moduluri = '../apps/';
|
||||
if ($handle = opendir($moduluri))
|
||||
{
|
||||
while (false !== ($mod = readdir($handle)))
|
||||
require $appUri . $appconf['app_path'] . '/config.php';
|
||||
if (isset($_CONF['general_conf']) && $_CONF['general_conf'] != '' && file_exists($appUri . $appconf['app_path'] . '/' . $_CONF['general_conf']))
|
||||
{
|
||||
if ($mod != "." && $mod != ".." && is_dir($moduluri.$mod))
|
||||
if (file_exists($appUri . $appconf['app_path'] . '/lang/') && is_dir($appUri . $appconf['app_path'] . '/lang/'))
|
||||
{
|
||||
require $moduluri.$mod.'/config.php';
|
||||
if(isset($_CONF['general_conf']) && $_CONF['general_conf']!='' && file_exists($moduluri.$mod.'/'.$_CONF['general_conf']))
|
||||
{
|
||||
echo '<i class="divider"></i>';
|
||||
require $moduluri.$mod.'/'.$_CONF['general_conf'];
|
||||
}
|
||||
$lang->setLangFolder($appUri . $appconf['app_path'] . '/lang/');
|
||||
}
|
||||
echo '<i class="divider"></i>';
|
||||
require $appUri . $appconf['app_path'] . '/' . $_CONF['general_conf'];
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
}
|
||||
?>
|
||||
<i class="divider"></i>
|
||||
<input type="submit" class="speichern" value="<?php echo $lang->get('general_save_changes');?>" style="width: auto;" />
|
||||
</form>
|
||||
<?php
|
||||
echo '</div>';
|
||||
<i class="divider"></i>
|
||||
<input type="submit" class="speichern" value="<?php echo $lang->get('general_save_changes'); ?>"
|
||||
style="width: auto;"/>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
require_once '../inc/footer.php';
|
||||
?>
|
|
@ -3,6 +3,7 @@ require_once '../inc/autoload_adm.php';
|
|||
|
||||
printHeader($lang->get('dashboard_title'));
|
||||
|
||||
//Delete installation files
|
||||
if (file_exists('install.php'))
|
||||
{
|
||||
if (unlink('install.php'))
|
||||
|
@ -11,49 +12,66 @@ if (file_exists('install.php'))
|
|||
}
|
||||
}
|
||||
|
||||
if (hasPerm('view_dashboard'))
|
||||
$installedApps = $apps->getApps();
|
||||
foreach ($installedApps as $appuri => $installedApp)
|
||||
{
|
||||
echo '<div class="cardsContainer cardsContainer-main"><div class="card-yellow" title="' . php_uname() . '"><span>' . substr(php_uname(), 0, strpos(php_uname(), ' ')) . '</span>'.$lang->get('os').'</div>';
|
||||
echo '<div class="card-green" title="' . $_SERVER['SERVER_SOFTWARE'] . '"><span>' . $_SERVER['SERVER_SOFTWARE'] . '</span>'.$lang->get('server_software').'</div>';
|
||||
echo '<div class="card-indigo" title="' . PHP_VERSION . '"><span>' . str_replace(substr(PHP_VERSION, strpos(PHP_VERSION, '-')), '', PHP_VERSION) . '</span>'.$lang->get('php_version').'</div>';
|
||||
echo '<div class="card-orange" title="' . $db->version() . '"><span>' . str_replace(substr($db->version(), strpos($db->version(), '-')), '', $db->version()) . '</span>'.$lang->get('mysql_version').'</div></div><div class="cardsContainer cardsContainer-main">';
|
||||
echo '<div class="card-purple"><span>' . date('H:i:s') . '</span>'.$lang->get('system_time').'</div>';
|
||||
?>
|
||||
<a href="general_config.php" class="card-blue"><span><i class="fa fa-cog"></i></span><br/>
|
||||
<?php echo $lang->get('general_config');?></a>
|
||||
<a href=".<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/logfiles/index.php" class="card-lime"><span><i class="fa fa-list"></i></span><br/><?php echo $lang->get('logfiles');?></a>
|
||||
</div>
|
||||
<div class="cardsContainer cardsContainer-main">
|
||||
<a href="<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/SimplePages/backend/management.php" class="card-red"><span><i class="fa fa-list"></i></span><br/><?php echo $lang->get('manage_pages');?></a>
|
||||
<a href="<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/SimplePages/backend/permissions.php" class="card-pink"><span><i class="fa fa-lock"></i></span><br/><?php echo $lang->get('manage_contents');?></a>
|
||||
<a href="<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/Files/index.php" class="card-amber"><span>
|
||||
<i class="fa fa-file"></i></span><br/><?php echo $lang->get('manage_files');?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
echo '<div class="main">';
|
||||
//Find Dashboard files
|
||||
$moduluri = '../apps/';
|
||||
if ($handle = opendir($moduluri))
|
||||
{
|
||||
while (false !== ($mod = readdir($handle)))
|
||||
if (array_key_exists('install', $installedApp))
|
||||
{
|
||||
if ($mod != "." && $mod != ".." && is_dir($moduluri . $mod))
|
||||
$appInstaller = '../apps/' . $installedApp['app_path'] . '/' . $installedApp['install'];
|
||||
if (file_exists($appInstaller))
|
||||
{
|
||||
require $moduluri . $mod . '/config.php';
|
||||
if(isset($_CONF['dashboard']) && $_CONF['dashboard'] != '')
|
||||
if (unlink($appInstaller))
|
||||
{
|
||||
if (file_exists($moduluri . $mod . '/' . $_CONF['dashboard']))
|
||||
{
|
||||
echo '<div class="box">';
|
||||
require $moduluri . $mod . '/' . $_CONF['dashboard'];
|
||||
echo '</div>';
|
||||
}
|
||||
echo msg('info', $lang->get('delete_config_success' . $installedApp['app_name']));
|
||||
}
|
||||
$_CONF['dashboard'] = '';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
if (hasPerm('view_dashboard'))
|
||||
{
|
||||
|
||||
echo '<div class="cardsContainer cardsContainer-main"><div class="card-yellow" title="' . php_uname() . '"><span>' . substr(php_uname(), 0, strpos(php_uname(), ' ')) . '</span>' . $lang->get('os') . '</div>';
|
||||
echo '<div class="card-green" title="' . $_SERVER['SERVER_SOFTWARE'] . '"><span>' . $_SERVER['SERVER_SOFTWARE'] . '</span>' . $lang->get('server_software') . '</div>';
|
||||
echo '<div class="card-indigo" title="' . PHP_VERSION . '"><span>' . str_replace(substr(PHP_VERSION, strpos(PHP_VERSION, '-')), '', PHP_VERSION) . '</span>' . $lang->get('php_version') . '</div>';
|
||||
echo '<div class="card-orange" title="' . $db->version() . '"><span>' . str_replace(substr($db->version(), strpos($db->version(), '-')), '', $db->version()) . '</span>' . $lang->get('mysql_version') . '</div></div><div class="cardsContainer cardsContainer-main">';
|
||||
echo '<div class="card-purple"><span>' . date('H:i:s') . '</span>' . $lang->get('system_time') . '</div>';
|
||||
?>
|
||||
<a href="general_config.php" class="card-blue"><span><i class="fa fa-cog"></i></span><br/>
|
||||
<?php echo $lang->get('general_config'); ?></a>
|
||||
<a href=".<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/logfiles/index.php" class="card-lime"><span><i
|
||||
class="fa fa-list"></i></span><br/><?php echo $lang->get('logfiles'); ?></a>
|
||||
</div>
|
||||
<div class="cardsContainer cardsContainer-main">
|
||||
<a href="<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/SimplePages/backend/management.php"
|
||||
class="card-red"><span><i class="fa fa-list"></i></span><br/><?php echo $lang->get('manage_pages'); ?></a>
|
||||
<a href="<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/SimplePages/backend/permissions.php"
|
||||
class="card-pink"><span><i class="fa fa-lock"></i></span><br/><?php echo $lang->get('manage_contents'); ?>
|
||||
</a>
|
||||
<a href="<?php echo $GLOBALS['MCONF']['home_uri']; ?>apps/Files/index.php" class="card-amber"><span>
|
||||
<i class="fa fa-file"></i></span><br/><?php echo $lang->get('manage_files'); ?></a>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
echo '<div class="main container">';
|
||||
//Find Dashboard files
|
||||
|
||||
$apps = new apps();
|
||||
$appUri = '../apps/';
|
||||
foreach ($apps->getApps() as $app => $appconf)
|
||||
{
|
||||
require $appUri . $appconf['app_path'] . '/config.php';
|
||||
if (isset($_CONF['dashboard']) && $_CONF['dashboard'] != '')
|
||||
{
|
||||
if (file_exists($appUri . $appconf['app_path'] . '/' . $_CONF['dashboard']))
|
||||
{
|
||||
echo '<div class="box">';
|
||||
require $appUri . $appconf['app_path'] . '/' . $_CONF['dashboard'];
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
$_CONF['dashboard'] = '';
|
||||
|
||||
}
|
||||
echo '</div>';
|
||||
require_once '../inc/footer.php';
|
||||
|
|
509
admin/install-dev.php
Normal file → Executable file
509
admin/install-dev.php
Normal file → Executable file
|
@ -1,84 +1,88 @@
|
|||
<?php
|
||||
/*if(file_exists('../inc/config.yml'))
|
||||
if (file_exists('../config/config.yml'))
|
||||
{
|
||||
header('Location: index.php');
|
||||
exit;
|
||||
}*/
|
||||
}
|
||||
session_name('adminsession');
|
||||
session_start();
|
||||
|
||||
require_once '../vendor/autoload.php';
|
||||
require_once '../inc/libs/functions.php';
|
||||
require_once '../inc/libs/lang.class.php';
|
||||
require_once '../inc/libs/db-mysql.php';
|
||||
require_once '../inc/libs/YAML/autoload.php';
|
||||
require_once '../inc/apps.php';
|
||||
use Symfony\Component\Yaml\Yaml;
|
||||
|
||||
$lang = new lang();
|
||||
$lang->setLangFolder('lang/');
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>Installation</title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||
<link rel="stylesheet" href="assets/admin.css" type="text/css">
|
||||
<script src="assets/js/jquery.min.js"></script>
|
||||
<script>
|
||||
function fadeInput(input) {
|
||||
$('#' + input).fadeToggle(200);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body style="background: url('assets/bglogin.jpg') no-repeat center fixed;">
|
||||
<img src="http://server/SelfCMS/Version2/admin/assets/Logo.svg" alt="Mowie" class="install-logo"/>
|
||||
<img src="assets/Logo.svg" alt="Mowie" class="install-logo"/>
|
||||
<h1 style="text-align: center; color: #E8E8E8;">Installation</h1>
|
||||
<?php
|
||||
if(isset($_POST['submit']))
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
if(
|
||||
$_POST['lang'] !=='' &&
|
||||
$_POST['db_host'] !=='' &&
|
||||
$_POST['db_name'] !=='' &&
|
||||
$_POST['db_user'] !=='' &&
|
||||
$_POST['db_pw1'] !=='' &&
|
||||
$_POST['db_pw2'] !=='' &&
|
||||
$_POST['general_webUrl'] !=='' &&
|
||||
$_POST['general_home_url'] !=='' &&
|
||||
$_POST['general_pma'] !=='' &&
|
||||
$_POST['general_page_title'] !=='' &&
|
||||
$_POST['general_editor_css'] !=='' &&
|
||||
$_POST['general_template'] !=='' &&
|
||||
$_POST['admin_name'] !=='' &&
|
||||
$_POST['admin_mail'] !=='' &&
|
||||
$_POST['admin_pw1'] !=='' &&
|
||||
$_POST['admin_pw2'] !==''
|
||||
if (
|
||||
$_POST['lang'] !== '' &&
|
||||
$_POST['db_host'] !== '' &&
|
||||
$_POST['db_name'] !== '' &&
|
||||
$_POST['db_user'] !== '' &&
|
||||
$_POST['db_pw'] !== '' &&
|
||||
$_POST['general_webUrl'] !== '' &&
|
||||
$_POST['general_home_url'] !== '' &&
|
||||
$_POST['general_page_title'] !== '' &&
|
||||
$_POST['general_template'] !== '' &&
|
||||
$_POST['admin_name'] !== '' &&
|
||||
$_POST['admin_mail'] !== '' &&
|
||||
$_POST['admin_pw1'] !== '' &&
|
||||
$_POST['admin_pw2'] !== ''
|
||||
)
|
||||
{
|
||||
$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['General']['timezone'] = $_POST['general_timezone'];
|
||||
$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_pw'] = $_POST['db_pw'];
|
||||
$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.91 Beta';
|
||||
$CONFIG['Versioning']['version_num'] = 1;
|
||||
$CONFIG['Versioning']['update_uri'] = 'http://cdn.kola-entertainments.de/cms/';
|
||||
$CONFIG['Versioning']['version'] = '0.96.0';
|
||||
$CONFIG['Versioning']['update_enabled'] = true;
|
||||
$CONFIG['Versioning']['update_servers'][] = 'https://update.mowie.cc/';
|
||||
|
||||
$CONFIG['Mail']['smtp'] = false;
|
||||
//Mail Settings
|
||||
if(isset($_POST['mail_smtp']))
|
||||
if (isset($_POST['mail_smtp']))
|
||||
{
|
||||
if($_POST['mail_host'] != '' && $_POST['mail_user'] != '' && $_POST['mail_pass'] != '' && $_POST['mail_secure'] != '' && $_POST['mail_port'] != '')
|
||||
if ($_POST['mail_host'] != '' && $_POST['mail_user'] != '' && $_POST['mail_pass'] != '' && $_POST['mail_secure'] != '' && $_POST['mail_port'] != '')
|
||||
{
|
||||
$CONFIG['Mail']['smtp'] = true;
|
||||
$config['Mail']['host'] = $_POST['mail_host'];
|
||||
$config['Mail']['username'] = $_POST['mail_user'];
|
||||
$config['Mail']['password'] = $_POST['mail_pass'];
|
||||
$config['Mail']['secure'] = $_POST['mail_secure'];
|
||||
$config['Mail']['port'] = $_POST['mail_port'];
|
||||
}
|
||||
else
|
||||
$CONFIG['Mail']['host'] = $_POST['mail_host'];
|
||||
$CONFIG['Mail']['username'] = $_POST['mail_user'];
|
||||
$CONFIG['Mail']['password'] = $_POST['mail_pass'];
|
||||
$CONFIG['Mail']['secure'] = $_POST['mail_secure'];
|
||||
$CONFIG['Mail']['port'] = $_POST['mail_port'];
|
||||
} else
|
||||
{
|
||||
echo msg('fail', 'Please provide all SMTP-Informations.');
|
||||
exit;
|
||||
|
@ -86,65 +90,31 @@ if(isset($_POST['submit']))
|
|||
}
|
||||
|
||||
//Test Passwords
|
||||
if($_POST['db_pw1']!==$_POST['db_pw2'])
|
||||
{
|
||||
echo msg('fail', 'Mysqlpasswords don\'t match.');
|
||||
exit;
|
||||
}
|
||||
if($_POST['admin_pw1']!==$_POST['admin_pw2'])
|
||||
if ($_POST['admin_pw1'] !== $_POST['admin_pw2'])
|
||||
{
|
||||
echo msg('fail', 'Adminpasswords don\'t match');
|
||||
exit;
|
||||
}
|
||||
|
||||
// Creaete folders
|
||||
if (!file_exists('../config/'))
|
||||
{
|
||||
mkdir('../config');
|
||||
}
|
||||
|
||||
if (!file_exists('../content/.system/'))
|
||||
{
|
||||
mkdir('../content/.system/', null, true);
|
||||
}
|
||||
|
||||
//Database
|
||||
$db = new db($_POST['db_host'], $_POST['db_name'], $_POST['db_user'], $_POST['db_pw1'], $_POST['db_prefix']);
|
||||
$db = new db($_POST['db_host'], $_POST['db_name'], $_POST['db_user'], $_POST['db_pw'], $_POST['db_prefix']);
|
||||
|
||||
//Create Tables
|
||||
if($db->query('SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||||
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,
|
||||
`alias` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`content` text CHARACTER SET utf8 NOT NULL,
|
||||
`user` int(11) NOT NULL,
|
||||
`status` int(11) NOT NULL,
|
||||
`meta_description` text CHARACTER SET utf8 NOT NULL,
|
||||
`meta_keywords` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`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,
|
||||
`title` text CHARACTER SET utf8 NOT NULL,
|
||||
`alias` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`content` text CHARACTER SET utf8 NOT NULL,
|
||||
`user` int(11) NOT NULL,
|
||||
`status` int(11) NOT NULL,
|
||||
`meta_description` text CHARACTER SET utf8 NOT NULL,
|
||||
`meta_keywords` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`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` (
|
||||
|
||||
CREATE TABLE `' . $_POST['db_prefix'] . 'system_admins` (
|
||||
`id` int(11) NOT NULL,
|
||||
`username` text NOT NULL,
|
||||
`pass` text NOT NULL,
|
||||
|
@ -152,7 +122,7 @@ 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` (
|
||||
CREATE TABLE `' . $_POST['db_prefix'] . 'system_loggedin` (
|
||||
`id` int(11) NOT NULL,
|
||||
`user` int(11) NOT NULL,
|
||||
`user_agent` longtext NOT NULL,
|
||||
|
@ -160,42 +130,56 @@ 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` (
|
||||
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
|
||||
`permissions` longtext COLLATE utf8_unicode_ci NOT NULL DEFAULT \'{}\'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages`
|
||||
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'].'simplePages_pages_confirm`
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'system_stream`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_permissions`
|
||||
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_admins`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
ALTER TABLE `'.$_POST['db_prefix'].'system_loggedin`
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'system_loggedin`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `'.$_POST['db_prefix'].'system_roles`
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'system_roles`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
ALTER TABLE `'.$_POST['db_prefix'].'simplePages_pages`
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'system_admins`
|
||||
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`
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'system_loggedin`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
ALTER TABLE `'.$_POST['db_prefix'].'system_admins`
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'system_roles`
|
||||
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
|
||||
} else
|
||||
{
|
||||
echo msg('fail', 'Failed Creating Tables');
|
||||
exit;
|
||||
|
@ -203,11 +187,10 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles`
|
|||
//Admin group
|
||||
$db->setCol('system_roles');
|
||||
$db->data['name'] = 'Admins';
|
||||
if($db->insert())
|
||||
if ($db->insert())
|
||||
{
|
||||
echo msg('success', 'Successfully created admin group.');
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
echo msg('fail', 'Error creating admin group.');
|
||||
exit;
|
||||
|
@ -218,94 +201,88 @@ ALTER TABLE `'.$_POST['db_prefix'].'system_roles`
|
|||
$db->data['pass'] = password_hash($_POST['admin_pw1'], PASSWORD_DEFAULT);
|
||||
$db->data['lvl'] = 1;
|
||||
$db->data['mail'] = $_POST['admin_mail'];
|
||||
if($db->insert())
|
||||
if ($db->insert())
|
||||
{
|
||||
echo msg('success', 'Successfully created admin user.');
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
echo msg('fail', 'Error creating admin user.');
|
||||
exit;
|
||||
}
|
||||
|
||||
//Page title
|
||||
if(file_put_contents('../inc/System/page_title.txt', $_POST['general_page_title']))
|
||||
if (file_put_contents('../content/.system/page_title.txt', $_POST['general_page_title']))
|
||||
{
|
||||
echo msg('succes', 'Page Title was successfully set.<br/>');
|
||||
}
|
||||
else
|
||||
echo msg('success', 'Page Title was successfully set.<br/>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', 'Error setting page title.');
|
||||
exit;
|
||||
}
|
||||
|
||||
//htacces
|
||||
$htacces = 'ErrorDocument 404 '.$_POST['general_home_url'].'index.php
|
||||
<Ifapps mod_rewrite.c>
|
||||
<Ifapps mod_env.c>
|
||||
SetEnv gp_rewrite U9sL2S2
|
||||
</Ifapps>
|
||||
RewriteEngine On
|
||||
RewriteBase "'.$_POST['general_home_url'].'"
|
||||
RewriteRule ^index\.php$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
<Ifapps mod_cache.c>
|
||||
RewriteRule /?(.*) "'.$_POST['general_home_url'].'index.php?$1" [qsa,L]
|
||||
</Ifapps>
|
||||
<Ifapps !mod_cache.c>
|
||||
RewriteRule . "'.$_POST['general_home_url'].'index.php" [L]
|
||||
</Ifapps>
|
||||
</Ifapps>';
|
||||
if(file_put_contents('../.htaccess', $htacces))
|
||||
if (strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache') !== false)
|
||||
{
|
||||
echo msg('succes', '.htaccess was successfully set.<br/>');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', 'Error setting up .htaccess.<br/>');
|
||||
exit;
|
||||
}
|
||||
//Apps
|
||||
$modulurl = '../apps/';
|
||||
if ($handle = opendir($modulurl))
|
||||
{
|
||||
while (false !== ($mod = readdir($handle)))
|
||||
$htacces = 'RewriteEngine On
|
||||
|
||||
RewriteRule ^(admin|inc|apps|content)($|/) - [L]
|
||||
RewriteRule !favicon\.ico - [C]
|
||||
RewriteRule !index\.php - [C]
|
||||
RewriteRule ^(.*)$ /index.php?$1 [QSA,L]
|
||||
|
||||
DirectoryIndex index.php index.html
|
||||
|
||||
# Disables download of configuration
|
||||
<Files ~ "\.(tpl|yml|ini)$">
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</Files>';
|
||||
if (file_put_contents('../.htaccess', $htacces))
|
||||
{
|
||||
if ($mod != "." && $mod != ".." && is_dir($modulurl.$mod))
|
||||
{
|
||||
require $modulurl.$mod.'/config.php';
|
||||
if(isset($_CONF['install']) && $_CONF['install']!='' && file_exists($modulurl.$mod.'/'.$_CONF['install']))
|
||||
{
|
||||
require $modulurl.$mod.'/'.$_CONF['install'];
|
||||
}
|
||||
}
|
||||
echo msg('success', '.htaccess was successfully set.<br/>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', 'Error setting up .htaccess.<br/>');
|
||||
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'];
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
//Write Config
|
||||
$configfile = Yaml::dump($CONFIG);
|
||||
if(file_put_contents('../inc/config.yml', $configfile))
|
||||
if (file_put_contents('../config/config.yml', $configfile))
|
||||
{
|
||||
echo msg('succes', 'Configfile was successfully created.');
|
||||
}
|
||||
else
|
||||
echo msg('success', 'Configfile was successfully created.');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', 'Error creating configfile.');
|
||||
exit;
|
||||
}
|
||||
echo msg('info', 'Installation successfully completed. <a href="'.$_POST['general_webUrl'].'admin">Login</a>');
|
||||
}
|
||||
else
|
||||
echo msg('info', 'Installation successfully completed. <a href="' . $_POST['general_webUrl'] . 'admin">Login</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('info', 'Please fill in all fields!');
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
?>
|
||||
|
||||
<div class="install-container">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post" class="form">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post" class="form">
|
||||
<h2>Language</h2>
|
||||
<span>Select your language:</span>
|
||||
<select name="lang">
|
||||
|
@ -313,7 +290,132 @@ else
|
|||
$langs = $lang->getAll();
|
||||
foreach ($langs as $lang_code => $lang_detail)
|
||||
{
|
||||
echo '<option value="'.$lang_code.'">'.$lang_detail['Lang'].'</option>';
|
||||
echo '<option value="' . $lang_code . '">' . $lang_detail['Lang'] . '</option>';
|
||||
}
|
||||
?>
|
||||
</select><br/><br/>
|
||||
|
||||
<h2>Timezone</h2>
|
||||
<span>Select your timezone:</span>
|
||||
<select name="general_timezone">
|
||||
<?php
|
||||
$timezones = array(
|
||||
'Pacific/Midway' => "(GMT-11:00) Midway Island",
|
||||
'US/Samoa' => "(GMT-11:00) Samoa",
|
||||
'US/Hawaii' => "(GMT-10:00) Hawaii",
|
||||
'US/Alaska' => "(GMT-09:00) Alaska",
|
||||
'US/Pacific' => "(GMT-08:00) Pacific Time (US & Canada)",
|
||||
'America/Tijuana' => "(GMT-08:00) Tijuana",
|
||||
'US/Arizona' => "(GMT-07:00) Arizona",
|
||||
'US/Mountain' => "(GMT-07:00) Mountain Time (US & Canada)",
|
||||
'America/Chihuahua' => "(GMT-07:00) Chihuahua",
|
||||
'America/Mazatlan' => "(GMT-07:00) Mazatlan",
|
||||
'America/Mexico_City' => "(GMT-06:00) Mexico City",
|
||||
'America/Monterrey' => "(GMT-06:00) Monterrey",
|
||||
'Canada/Saskatchewan' => "(GMT-06:00) Saskatchewan",
|
||||
'US/Central' => "(GMT-06:00) Central Time (US & Canada)",
|
||||
'US/Eastern' => "(GMT-05:00) Eastern Time (US & Canada)",
|
||||
'US/East-Indiana' => "(GMT-05:00) Indiana (East)",
|
||||
'America/Bogota' => "(GMT-05:00) Bogota",
|
||||
'America/Lima' => "(GMT-05:00) Lima",
|
||||
'America/Caracas' => "(GMT-04:30) Caracas",
|
||||
'Canada/Atlantic' => "(GMT-04:00) Atlantic Time (Canada)",
|
||||
'America/La_Paz' => "(GMT-04:00) La Paz",
|
||||
'America/Santiago' => "(GMT-04:00) Santiago",
|
||||
'Canada/Newfoundland' => "(GMT-03:30) Newfoundland",
|
||||
'America/Buenos_Aires' => "(GMT-03:00) Buenos Aires",
|
||||
'Greenland' => "(GMT-03:00) Greenland",
|
||||
'Atlantic/Stanley' => "(GMT-02:00) Stanley",
|
||||
'Atlantic/Azores' => "(GMT-01:00) Azores",
|
||||
'Atlantic/Cape_Verde' => "(GMT-01:00) Cape Verde Is.",
|
||||
'Africa/Casablanca' => "(GMT) Casablanca",
|
||||
'Europe/Dublin' => "(GMT) Dublin",
|
||||
'Europe/Lisbon' => "(GMT) Lisbon",
|
||||
'Europe/London' => "(GMT) London",
|
||||
'Africa/Monrovia' => "(GMT) Monrovia",
|
||||
'Europe/Amsterdam' => "(GMT+01:00) Amsterdam",
|
||||
'Europe/Belgrade' => "(GMT+01:00) Belgrade",
|
||||
'Europe/Berlin' => "(GMT+01:00) Berlin",
|
||||
'Europe/Bratislava' => "(GMT+01:00) Bratislava",
|
||||
'Europe/Brussels' => "(GMT+01:00) Brussels",
|
||||
'Europe/Budapest' => "(GMT+01:00) Budapest",
|
||||
'Europe/Copenhagen' => "(GMT+01:00) Copenhagen",
|
||||
'Europe/Ljubljana' => "(GMT+01:00) Ljubljana",
|
||||
'Europe/Madrid' => "(GMT+01:00) Madrid",
|
||||
'Europe/Paris' => "(GMT+01:00) Paris",
|
||||
'Europe/Prague' => "(GMT+01:00) Prague",
|
||||
'Europe/Rome' => "(GMT+01:00) Rome",
|
||||
'Europe/Sarajevo' => "(GMT+01:00) Sarajevo",
|
||||
'Europe/Skopje' => "(GMT+01:00) Skopje",
|
||||
'Europe/Stockholm' => "(GMT+01:00) Stockholm",
|
||||
'Europe/Vienna' => "(GMT+01:00) Vienna",
|
||||
'Europe/Warsaw' => "(GMT+01:00) Warsaw",
|
||||
'Europe/Zagreb' => "(GMT+01:00) Zagreb",
|
||||
'Europe/Athens' => "(GMT+02:00) Athens",
|
||||
'Europe/Bucharest' => "(GMT+02:00) Bucharest",
|
||||
'Africa/Cairo' => "(GMT+02:00) Cairo",
|
||||
'Africa/Harare' => "(GMT+02:00) Harare",
|
||||
'Europe/Helsinki' => "(GMT+02:00) Helsinki",
|
||||
'Europe/Istanbul' => "(GMT+02:00) Istanbul",
|
||||
'Asia/Jerusalem' => "(GMT+02:00) Jerusalem",
|
||||
'Europe/Kiev' => "(GMT+02:00) Kyiv",
|
||||
'Europe/Minsk' => "(GMT+02:00) Minsk",
|
||||
'Europe/Riga' => "(GMT+02:00) Riga",
|
||||
'Europe/Sofia' => "(GMT+02:00) Sofia",
|
||||
'Europe/Tallinn' => "(GMT+02:00) Tallinn",
|
||||
'Europe/Vilnius' => "(GMT+02:00) Vilnius",
|
||||
'Asia/Baghdad' => "(GMT+03:00) Baghdad",
|
||||
'Asia/Kuwait' => "(GMT+03:00) Kuwait",
|
||||
'Africa/Nairobi' => "(GMT+03:00) Nairobi",
|
||||
'Asia/Riyadh' => "(GMT+03:00) Riyadh",
|
||||
'Europe/Moscow' => "(GMT+03:00) Moscow",
|
||||
'Asia/Tehran' => "(GMT+03:30) Tehran",
|
||||
'Asia/Baku' => "(GMT+04:00) Baku",
|
||||
'Europe/Volgograd' => "(GMT+04:00) Volgograd",
|
||||
'Asia/Muscat' => "(GMT+04:00) Muscat",
|
||||
'Asia/Tbilisi' => "(GMT+04:00) Tbilisi",
|
||||
'Asia/Yerevan' => "(GMT+04:00) Yerevan",
|
||||
'Asia/Kabul' => "(GMT+04:30) Kabul",
|
||||
'Asia/Karachi' => "(GMT+05:00) Karachi",
|
||||
'Asia/Tashkent' => "(GMT+05:00) Tashkent",
|
||||
'Asia/Kolkata' => "(GMT+05:30) Kolkata",
|
||||
'Asia/Kathmandu' => "(GMT+05:45) Kathmandu",
|
||||
'Asia/Yekaterinburg' => "(GMT+06:00) Ekaterinburg",
|
||||
'Asia/Almaty' => "(GMT+06:00) Almaty",
|
||||
'Asia/Dhaka' => "(GMT+06:00) Dhaka",
|
||||
'Asia/Novosibirsk' => "(GMT+07:00) Novosibirsk",
|
||||
'Asia/Bangkok' => "(GMT+07:00) Bangkok",
|
||||
'Asia/Jakarta' => "(GMT+07:00) Jakarta",
|
||||
'Asia/Krasnoyarsk' => "(GMT+08:00) Krasnoyarsk",
|
||||
'Asia/Chongqing' => "(GMT+08:00) Chongqing",
|
||||
'Asia/Hong_Kong' => "(GMT+08:00) Hong Kong",
|
||||
'Asia/Kuala_Lumpur' => "(GMT+08:00) Kuala Lumpur",
|
||||
'Australia/Perth' => "(GMT+08:00) Perth",
|
||||
'Asia/Singapore' => "(GMT+08:00) Singapore",
|
||||
'Asia/Taipei' => "(GMT+08:00) Taipei",
|
||||
'Asia/Ulaanbaatar' => "(GMT+08:00) Ulaan Bataar",
|
||||
'Asia/Urumqi' => "(GMT+08:00) Urumqi",
|
||||
'Asia/Irkutsk' => "(GMT+09:00) Irkutsk",
|
||||
'Asia/Seoul' => "(GMT+09:00) Seoul",
|
||||
'Asia/Tokyo' => "(GMT+09:00) Tokyo",
|
||||
'Australia/Adelaide' => "(GMT+09:30) Adelaide",
|
||||
'Australia/Darwin' => "(GMT+09:30) Darwin",
|
||||
'Asia/Yakutsk' => "(GMT+10:00) Yakutsk",
|
||||
'Australia/Brisbane' => "(GMT+10:00) Brisbane",
|
||||
'Australia/Canberra' => "(GMT+10:00) Canberra",
|
||||
'Pacific/Guam' => "(GMT+10:00) Guam",
|
||||
'Australia/Hobart' => "(GMT+10:00) Hobart",
|
||||
'Australia/Melbourne' => "(GMT+10:00) Melbourne",
|
||||
'Pacific/Port_Moresby' => "(GMT+10:00) Port Moresby",
|
||||
'Australia/Sydney' => "(GMT+10:00) Sydney",
|
||||
'Asia/Vladivostok' => "(GMT+11:00) Vladivostok",
|
||||
'Asia/Magadan' => "(GMT+12:00) Magadan",
|
||||
'Pacific/Auckland' => "(GMT+12:00) Auckland",
|
||||
'Pacific/Fiji' => "(GMT+12:00) Fiji"
|
||||
);
|
||||
foreach ($timezones as $timezone_code => $timezone_title)
|
||||
{
|
||||
echo '<option value="' . $timezone_code . '">' . $timezone_title . '</option>';
|
||||
}
|
||||
?>
|
||||
</select><br/><br/>
|
||||
|
@ -322,28 +424,39 @@ else
|
|||
<span>Host</span><input type="text" placeholder="Host" name="db_host" value="localhost"/><br/>
|
||||
<span>Database</span><input type="text" placeholder="Database" name="db_name"/><br/>
|
||||
<span>Username</span><input type="text" placeholder="Username" name="db_user" value="root"/><br/>
|
||||
<span>Password</span><input type="password" placeholder="Password" name="db_pw1"/><br/>
|
||||
<span>Confirm Password</span><input type="password" placeholder="Confirm Password" name="db_pw2"/><br/>
|
||||
<span>Table prefix</span><input type="text" placeholder="Table prefix" name="db_prefix"/><br/><br/>
|
||||
<span>Password</span><input type="password" placeholder="Password" name="db_pw"/><br/>
|
||||
<span>Table prefix (optional)</span><input type="text" placeholder="Table prefix" name="db_prefix"/><br/><br/>
|
||||
|
||||
<h2>Website</h2>
|
||||
<span>Website Url</span><input type="text" placeholder="Website Url" name="general_webUrl" value="http://<?php echo $_SERVER['SERVER_NAME'].str_replace('admin/install.php', '', $_SERVER['REQUEST_URI']);?>"/><br/>
|
||||
<span>Home Url</span><input type="text" placeholder="Home Url" name="general_home_url" value="<?php echo str_replace('admin/install.php', '', $_SERVER['REQUEST_URI']);?>"/><br/>
|
||||
<span>Phpmyadmin Url</span><input type="text" placeholder="Phpmyadmin Url" name="general_pma"/><br/>
|
||||
<span>Page Title</span><input type="text" placeholder="Page Title" name="general_page_title"/><br/>
|
||||
<span>Editor CSS</span><input type="text" placeholder="Editor CSS" name="general_editor_css"/><br/>
|
||||
<span>Template</span><input type="text" placeholder="Template" name="general_template" value="content/template.tpl"/><br/>
|
||||
|
||||
<span>Website Url</span><input type="text" placeholder="Website Url" name="general_webUrl"
|
||||
value="http://<?php echo $_SERVER['SERVER_NAME'] . str_replace('admin/install.php', '', $_SERVER['REQUEST_URI']); ?>"/><br/>
|
||||
<span> </span><a onclick="fadeInput('more');" style="display: block;">More Options</a><br/>
|
||||
<div id="more" style="display: none;">
|
||||
<span>Home Url</span><input type="text" placeholder="Home Url" name="general_home_url"
|
||||
value="<?php echo str_replace('admin/install.php', '', $_SERVER['REQUEST_URI']); ?>"/><br/>
|
||||
<span>Editor CSS (optional)</span><input type="text" placeholder="Editor CSS" name="general_editor_css"/><br/>
|
||||
<span>Template</span><input type="text" placeholder="Template" name="general_template"
|
||||
value="content/template.tpl"/><br/>
|
||||
</div>
|
||||
<h2>Mail</h2>
|
||||
<span>Use SMTP</span><input type="checkbox" name="mail_smtp" id="mail_smtp"/><label for="mail_smtp"><i></i> Use SMTP</label> <br/>
|
||||
<span>SMTP-Host</span><input type="text" placeholder="SMTP-Host" name="mail_host"/><br/>
|
||||
<span>SMTP-Username</span><input type="text" placeholder="SMTP-Username" name="mail_user"/><br/>
|
||||
<span>SMTP-Password</span><input type="text" placeholder="SMTP-Password" name="mail_pass"/><br/>
|
||||
<span>Security</span>
|
||||
<input type="radio" name="mail_secure" id="mail_ssl"/><label for="mail_ssl"><i></i> Use SSL</label>
|
||||
<input type="radio" name="mail_secure" id="mail_tls"/><label for="mail_tls"><i></i> Use TLS</label>
|
||||
<span> </span><input type="checkbox" name="mail_smtp" id="mail_smtp"
|
||||
onchange="fadeInput('mailInput');"/><label for="mail_smtp"><i></i>
|
||||
Use SMTP</label>
|
||||
|
||||
<br/>
|
||||
<span>Port</span><input type="number" placeholder="Port" name="mail_port"/><br/>
|
||||
<div id="mailInput" style="display: none">
|
||||
<span>SMTP-Host</span><input type="text" placeholder="SMTP-Host" name="mail_host"/><br/>
|
||||
<span>SMTP-Username</span><input type="text" placeholder="SMTP-Username" name="mail_user"/><br/>
|
||||
<span>SMTP-Password</span><input type="text" placeholder="SMTP-Password" name="mail_pass"/><br/>
|
||||
<span>Security</span>
|
||||
<input type="radio" name="mail_secure" id="mail_ssl"/><label for="mail_ssl"><i></i> Use SSL</label>
|
||||
<input type="radio" name="mail_secure" id="mail_tls"/><label for="mail_tls"><i></i> Use TLS</label>
|
||||
<br/>
|
||||
<span>Port</span><input type="number" placeholder="Port" name="mail_port"/>
|
||||
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<h2>First Adminuser</h2>
|
||||
<span>Name</span><input type="text" placeholder="Name" name="admin_name"/><br/>
|
||||
|
@ -351,22 +464,16 @@ else
|
|||
<span>Password</span><input type="password" placeholder="Password" name="admin_pw1"/><br/>
|
||||
<span>Confirm Password</span><input type="password" placeholder="Confirm Password" name="admin_pw2"/><br/>
|
||||
<?php
|
||||
$modulurl = '../apps/';
|
||||
if ($handle = opendir($modulurl))
|
||||
//Apps
|
||||
$apps = new apps(2);
|
||||
$appUri = '../apps/';
|
||||
foreach ($apps->getApps() as $app => $appconf)
|
||||
{
|
||||
while (false !== ($mod = readdir($handle)))
|
||||
require $appUri . $appconf['app_path'] . '/config.php';
|
||||
if (isset($_CONF['install']) && $_CONF['install'] != '' && file_exists($appUri . $appconf['app_path'] . '/' . $_CONF['install']))
|
||||
{
|
||||
if ($mod != "." && $mod != ".." && is_dir($modulurl . $mod))
|
||||
{
|
||||
//echo $mod;
|
||||
require $modulurl . $mod . '/config.php';
|
||||
if (isset($_CONF['install']) && $_CONF['install'] != '' && file_exists($modulurl . $mod . '/' . $_CONF['install']))
|
||||
{
|
||||
require $modulurl . $mod . '/' . $_CONF['install'];
|
||||
}
|
||||
}
|
||||
require $appUri . $appconf['app_path'] . '/' . $_CONF['install'];
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
?>
|
||||
<p style="text-align: center"><input type="submit" value="Install" name="submit"/></p>
|
||||
|
|
1
admin/lang.php
Normal file → Executable file
1
admin/lang.php
Normal file → Executable file
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
session_name('adminsession');
|
||||
session_start();
|
||||
require_once '../vendor/autoload.php';
|
||||
require_once '../inc/config.php';
|
||||
|
||||
if(isset($_GET['set']))
|
||||
|
|
|
@ -21,6 +21,7 @@ $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.';
|
||||
$lang['error_occured'] = 'Es ist ein Fehler aufgetreten.';
|
||||
|
||||
//Reset Password
|
||||
$lang['reset_pass_title'] = 'Passwort zurücksetzen';
|
||||
|
@ -73,6 +74,9 @@ $lang['general_inactive'] = 'Nicht aktiviert';
|
|||
$lang['general_activate'] = 'Aktivieren';
|
||||
$lang['general_deactivate'] = 'Deaktivieren';
|
||||
$lang['general_save_changes'] = 'Änderungen speichern';
|
||||
$lang['general_needs_other_app'] = 'Diese App benötgt die andere App "%1$s" um ordnungsgemäß zu funktionieren.';
|
||||
$lang['general_needs_other_version'] = 'Diese App benötigt mindestens Mowie in Version %1$s.';
|
||||
$lang['general_needs_other_php'] = 'Diese App benötigt mindestens PHP in Version %1$s.';
|
||||
|
||||
//General Config
|
||||
$lang['general_config'] = 'Systemkonfiguration';
|
||||
|
@ -81,14 +85,16 @@ $lang['general_construction_mode'] = 'Baustellenzustand';
|
|||
$lang['general_end_construction_mode'] = 'Baustellenzustand aufheben';
|
||||
$lang['general_start_construction_mode'] = 'Seite in Baustellenzustand versetzen';
|
||||
$lang['general_edit_message'] = 'Meldung bearbeiten';
|
||||
$lang['general_version'] = 'Version';
|
||||
$lang['general_version_current'] = 'Installierte Version';
|
||||
$lang['general_new_version'] = 'Neue Version verfügbar!';
|
||||
$lang['general_version_current_new'] = 'Die installierte Version ist aktuell.';
|
||||
$lang['general_update'] = 'Update';
|
||||
$lang['general_database'] = 'Datenbank';
|
||||
$lang['general_create_backup'] = 'Datenbank Backup erstellen';
|
||||
$lang['general_go_phpmyadmin'] = 'Zu phpmyadmin';
|
||||
|
||||
//Legitimation
|
||||
$lang['legitimate_title'] = 'Legitimierung benötigt';
|
||||
$lang['legitimate_text'] = 'Dieser Vorgang benötigt eine Passwortbestätigung.';
|
||||
$lang['legitimate_confirm'] = 'Bestätigen';
|
||||
$lang['legitimate_abort'] = 'Abbrechen';
|
||||
$lang['legitimate_error'] = 'Beim Legitimieren ist ein Fehler aufgetreten.';
|
||||
$lang['legitimate_fail'] = 'Falsches Passwort.';
|
||||
|
||||
/*
|
||||
* Manage Admins
|
||||
|
@ -99,6 +105,7 @@ $lang['admins_title'] = 'Administratoren';
|
|||
$lang['admins_list'] = 'Benutzerliste';
|
||||
$lang['admins_groups'] = 'Benutzergruppen';
|
||||
$lang['admins_permissions'] = 'Berechtigungen';
|
||||
$lang['admins_group'] = 'Gruppe';
|
||||
$lang['admins_create_new'] = 'Neuen Benutzer anlegen';
|
||||
//Admin List
|
||||
$lang['admins_id'] = 'ID';
|
||||
|
@ -178,6 +185,14 @@ $lang['user_settings_settings_fail'] = 'Fehler beim Speichern der Änderungen de
|
|||
$lang['user_settings_settings_pass'] = 'Passwort ändern';
|
||||
$lang['user_settings_last_login'] = 'Letzter Login';
|
||||
$lang['user_settings_show_current_sessions'] = 'Offene Anmeldungen anzeigen';
|
||||
$lang['user_settings_log_level'] = 'Log-Level für Benachrichtigung';
|
||||
$lang['user_settings_log_level_1'] = 'Nur wichtiges';
|
||||
$lang['user_settings_log_level_2'] = 'System-Mitteilungen';
|
||||
$lang['user_settings_log_level_3'] = 'Änderungen';
|
||||
$lang['user_settings_log_level_4'] = 'Generelle Mitteilungen';
|
||||
$lang['user_settings_log_level_fail'] = 'Fehler beim Speichern des Log-Levels.';
|
||||
$lang['user_settings_log_level_success'] = 'Die Änderungen des Log-Levels wurden erfolgreich gespeichert.';
|
||||
$lang['user_settings_none'] = 'Keine. <a href="%1$s">Ändern</a>';
|
||||
|
||||
//Mail
|
||||
$lang['mail_write'] = 'Email schreiben';
|
||||
|
@ -195,14 +210,70 @@ $lang['action_construction_message_success'] = 'Die Meldung wurde erfolgreich ge
|
|||
$lang['action_try_again_later'] = 'Fehler. Bitte versuchen Sie es später noch einmal.';
|
||||
$lang['action_construction_message_edit'] = 'Baustellen-Meldung bearbeiten';
|
||||
$lang['action_construction_success'] = 'Die Webseite wurde erfolgreich in den Baustellenzustand versetzt.';
|
||||
$lang['action_construction_error'] = 'Beim Versetzen in den Baustellenmodus trat ein Fehler auf.';
|
||||
$lang['action_construction_confirm'] = 'Wollen Sie die Webseite wirklich in den Baustellenzustand verstzten?';
|
||||
$lang['action_construction_removed_success'] = 'Der Baustellenzustand wurde erfolgreich aufgehoben.';
|
||||
$lang['action_construction_removed_error'] = 'Beim Aufheben des Baustellenzustandes ist ein Fehler aufgetreten.';
|
||||
$lang['action_construction_remove'] = 'Wollen Sie den Baustellenzustand wirklich aufheben?';
|
||||
$lang['action_change_page_title_success'] = 'Die Änderungen des Seitentitels wurden erfolgreich gespeichert.';
|
||||
$lang['action_update_item_succss'] = '"%1$s" wurde erfolgreich upgedatet.';
|
||||
$lang['action_update_item_fail'] = 'Fehler beim Updaten von "%1$s"';
|
||||
$lang['action_update_succss'] = 'Mowie CMS wurde erfolgreich upgedatet.';
|
||||
$lang['action_update_fail'] = 'Fehler beim Updaten.';
|
||||
$lang['action_update_fail_unzip'] = 'Fehler beim Entpacken des Updates.';
|
||||
$lang['action_update_md5_fake'] = 'Die Heruntergeladene Datei ist vermutlich falsch.';
|
||||
$lang['action_update_fail_copy'] = 'Fehler beim Herunterladen des Updates. <b>Hinweis:</b> Der Nutzer, unter welchem der Webserver läuft, muss im Verzeichnis /admin Schreibrechte haben!';
|
||||
|
||||
//Update
|
||||
$lang['update_title'] = 'Update';
|
||||
$lang['update_showChangelog'] = 'Changelog anzeigen';
|
||||
$lang['update_item_succss'] = '"%1$s" wurde erfolgreich upgedatet.';
|
||||
$lang['update_item_fail'] = 'Fehler beim Updaten von "%1$s"';
|
||||
$lang['update_succss'] = 'Mowie CMS wurde erfolgreich upgedatet.';
|
||||
$lang['update_app_succss'] = '"%1$s" wurde erfolgreich upgedatet.';
|
||||
$lang['update_fail'] = 'Fehler beim Updaten.';
|
||||
$lang['update_config_fail'] = 'Beim Bearbeiten der Configdatei ist ein Fehler aufgetreten.';
|
||||
$lang['update_fail_unzip'] = 'Fehler beim Entpacken des Updates.';
|
||||
$lang['update_wrong_hash'] = 'Die Heruntergeladene Datei ist vermutlich falsch.';
|
||||
$lang['update_fail_copy'] = 'Fehler beim Herunterladen des Updates. <b>Hinweis:</b> Der Nutzer, unter welchem der Webserver läuft, muss im Verzeichnis /admin Schreibrechte haben!';
|
||||
$lang['update_version'] = 'Version';
|
||||
$lang['update_version_current'] = 'Installierte Version';
|
||||
$lang['update_new_version'] = 'Neue Version verfügbar!';
|
||||
$lang['update_version_current_new'] = 'Die installierte Version ist aktuell.';
|
||||
$lang['update_app_update_available'] = 'App-Update - Neue Version für "%1$s" verfügbar: %2$s';
|
||||
$lang['update_log'] = '{user} hat das System geupdated.';
|
||||
$lang['update_folder_not_writeable'] = 'Der Updateordner ist nicht schreibbar. Bitte stelle sicher, dass der Webserver Schreibrechte im Updateordner hat.';
|
||||
$lang['update_create_backup_error'] = 'Beim Erstellen eines Backups ist ein Fehler aufgetreten.';
|
||||
$lang['update_cleanup_error'] = 'Beim Aufräumen ist ein Fehler aufgetreten.';
|
||||
$lang['update_checking'] = 'Überprüfe auf Updates...';
|
||||
|
||||
//Stream Messages
|
||||
$lang['stream_saved_settings'] = '{user} hat seinen Benutzername/Email-Adresse geändert.';
|
||||
$lang['stream_logged_out'] = '{user} hat sich ausgeloggt.';
|
||||
$lang['stream_logged_in'] = '{user} hat sich eingeloggt.';
|
||||
$lang['stream_pass_changed'] = '{user}\'s passwort wurde geändert.';
|
||||
$lang['stream_db_backup'] = '{user} hat ein Datenbank-Backup gemacht.';
|
||||
$lang['stream_construction_mode'] = '{user} hat die Seite in Baustellenmodus versetzt.';
|
||||
$lang['stream_construction_mode_message'] = '{user} hat die Baustellenmodus-Nachricht geändert.';
|
||||
$lang['stream_construction_mode_delete'] = '{user} hat den Baustellenmodus beendet.';
|
||||
$lang['stream_edited_page_title'] = '{user} hat den Seitentitel geändert.';
|
||||
$lang['stream_created_user'] = '{user} hat den neuen Nutzer "{extra}" erstellt.';
|
||||
$lang['stream_edited_permissions'] = '{user} hat die Berechtigungen bearbeitet.';
|
||||
$lang['stream_added_to_group'] = '{user} hat einen Nutzer zur Gruppe "{extra}" hinzugefügt.';
|
||||
$lang['stream_added_group'] = '{user} hat die Gruppe "{extra}" erstellt.';
|
||||
$lang['stream_deleted_group'] = '{user} hat die Gruppe "{extra}" gelöscht.';
|
||||
$lang['stream_deleted_user'] = '{user} hat einen Nutzer gelöscht.';
|
||||
$lang['stream_created_group'] = '{user} hat eine neue Gruppe erstellt.';
|
||||
$lang['stream_system_update'] = '{user} hat das System geupdated.';
|
||||
$lang['stream_app_update'] = '{user} hat die App "{extra}" geupdated.';
|
||||
|
||||
//Permissions
|
||||
$lang['system_perm_view_dashboard_name'] = 'Relevante Informationen auf dem Dashboard ansehen.';
|
||||
$lang['system_perm_view_dashboard_description'] = '';
|
||||
$lang['system_perm_manage_system_name'] = 'Systemeinstellungen vornehmen.';
|
||||
$lang['system_perm_manage_system_description'] = '';
|
||||
$lang['system_perm_construction_name'] = 'Baustellenzustand ändern';
|
||||
$lang['system_perm_construction_description'] = 'Im Baustellenzustand wird Anstelle der Seite ein Text angezeigt.';
|
||||
$lang['system_perm_update_name'] = 'Systemupdate durchführen';
|
||||
$lang['system_perm_update_description'] = 'Nach neuen Versionen des Systems suchen und updaten.';
|
||||
$lang['system_perm_db_dump_name'] = 'Datenbanbackup herunterladen';
|
||||
$lang['system_perm_db_dump_description'] = 'Ein komplettes Backup der Datenbank herunterladen.';
|
||||
$lang['system_perm_manage_admins_name'] = 'Administratoren verwalten';
|
||||
$lang['system_perm_manage_admins_description'] = '';
|
||||
$lang['system_perm_manage_groups_name'] = 'Admingruppen verwalten';
|
||||
$lang['system_perm_manage_groups_description'] = '';
|
||||
$lang['system_perm_edit_permissions_name'] = 'Adminberechtigungen verwalten';
|
||||
$lang['system_perm_edit_permissions_description'] = '';
|
|
@ -21,6 +21,7 @@ $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.';
|
||||
$lang['error_occured'] = 'An error occured.';
|
||||
|
||||
//Reset Password
|
||||
$lang['reset_pass_title'] = 'Reset Password';
|
||||
|
@ -61,7 +62,7 @@ $lang['never'] = 'never';
|
|||
$lang['admin_title'] = 'Admin';
|
||||
$lang['settings'] = 'Settings';
|
||||
$lang['logout'] = 'Logout';
|
||||
$lang['main_page'] = 'Mainpage';
|
||||
$lang['main_page'] = 'Visit site';
|
||||
$lang['dashboard_title'] = 'Welcome to the dashboard';
|
||||
$lang['dashboard'] = 'Dashboard';
|
||||
$lang['missing_permission'] = 'Missing Permission';
|
||||
|
@ -82,13 +83,11 @@ $lang['general_end_construction_mode'] = 'End Construction Mode';
|
|||
$lang['general_start_construction_mode'] = 'Start Construction Mode';
|
||||
$lang['general_edit_message'] = 'Edit Construction Message';
|
||||
$lang['general_version'] = 'Version';
|
||||
$lang['general_version_current'] = 'Installed Version';
|
||||
$lang['general_new_version'] = 'New Version Available!';
|
||||
$lang['general_version_current_new'] = 'Installed Version is up-to-date';
|
||||
$lang['general_update'] = 'Update';
|
||||
$lang['general_database'] = 'Database';
|
||||
$lang['general_create_backup'] = 'Create Database Backup';
|
||||
$lang['general_go_phpmyadmin'] = 'phpmyadmin';
|
||||
$lang['general_needs_other_app'] = 'This app needs the app "%1$s" to function properly.';
|
||||
$lang['general_needs_other_version'] = 'This app needs at least Mowie version %1$s.';
|
||||
$lang['general_needs_other_php'] = 'This app needs at least PHP version %1$s.';
|
||||
|
||||
/*
|
||||
* Manage Admins
|
||||
|
@ -99,6 +98,7 @@ $lang['admins_title'] = 'Administrators';
|
|||
$lang['admins_list'] = 'Userlist';
|
||||
$lang['admins_groups'] = 'Usergroups';
|
||||
$lang['admins_permissions'] = 'Permissions';
|
||||
$lang['admins_group'] = 'Group';
|
||||
$lang['admins_create_new'] = 'Create New User';
|
||||
//Admin List
|
||||
$lang['admins_id'] = 'ID';
|
||||
|
@ -178,6 +178,14 @@ $lang['user_settings_settings_fail'] = 'An error occured while saving user-setti
|
|||
$lang['user_settings_settings_pass'] = 'Update Password';
|
||||
$lang['user_settings_last_login'] = 'Last Login';
|
||||
$lang['user_settings_show_current_sessions'] = 'Show Current Sessions';
|
||||
$lang['user_settings_log_level'] = 'Log-Level';
|
||||
$lang['user_settings_log_level_1'] = 'Important Only';
|
||||
$lang['user_settings_log_level_2'] = 'System-Messages';
|
||||
$lang['user_settings_log_level_3'] = 'Edits';
|
||||
$lang['user_settings_log_level_4'] = 'General Messages';
|
||||
$lang['user_settings_log_level_fail'] = 'An error occured while saving Log-Levels.';
|
||||
$lang['user_settings_log_level_success'] = 'The Log-Levels were saved successfully.';
|
||||
$lang['user_settings_none'] = 'none <a href="%1$s">Settings</a>';
|
||||
|
||||
//Mail
|
||||
$lang['mail_write'] = 'Write Email';
|
||||
|
@ -195,14 +203,71 @@ $lang['action_construction_message_success'] = 'The construction-message was edi
|
|||
$lang['action_try_again_later'] = 'Error. Please try again later.';
|
||||
$lang['action_construction_message_edit'] = 'Edit Construction Message';
|
||||
$lang['action_construction_success'] = 'The website was set to construction mode successfully.';
|
||||
$lang['action_construction_error'] = 'An error occured while setting the site to construction mode.';
|
||||
$lang['action_construction_confirm'] = 'Are you sure you want to enable construction mode?';
|
||||
$lang['action_construction_removed_success'] = 'Construction Mode was successfully disabled.';
|
||||
$lang['action_construction_removed_error'] = 'An error occured while disabling construction mode.';
|
||||
$lang['action_construction_remove'] = 'Are you sure you want to disable construction mode?';
|
||||
$lang['action_change_page_title_success'] = 'Page Title was successfully edited.';
|
||||
$lang['action_update_item_succss'] = '"%1$s" was successfully updated.';
|
||||
$lang['action_update_item_fail'] = 'An error occured while updating "%1$s"';
|
||||
$lang['action_update_succss'] = 'Mowie CMS was updated successfully.';
|
||||
$lang['action_update_fail'] = 'An error occured while updating.';
|
||||
$lang['action_update_fail_unzip'] = 'An error occured while unpacking the update.';
|
||||
$lang['action_update_md5_fake'] = 'The downloaded file has a wrong checksum.';
|
||||
$lang['action_update_fail_copy'] = 'An error occured while downloading the update. <b>Hint:</b> The webserver needs writing permissions in the folder /admin!';
|
||||
|
||||
|
||||
//Update
|
||||
$lang['update_title'] = 'Update';
|
||||
$lang['update_showChangelog'] = 'Show Changelog';
|
||||
$lang['update_item_succss'] = '"%1$s" was successfully updated.';
|
||||
$lang['update_item_fail'] = 'An error occured while updating "%1$s"';
|
||||
$lang['update_succss'] = 'Mowie CMS was updated successfully.';
|
||||
$lang['update_app_succss'] = '"%1$s" was updated successfully.';
|
||||
$lang['update_fail'] = 'An error occured while updating.';
|
||||
$lang['update_config_fail'] = 'An error occured while updating the config file.';
|
||||
$lang['update_fail_unzip'] = 'An error occured while unpacking the update.';
|
||||
$lang['update_wrong_hash'] = 'The downloaded file has a wrong checksum.';
|
||||
$lang['update_fail_copy'] = 'An error occured while downloading the update. <b>Hint:</b> The webserver needs writing permissions in the folder /admin!';
|
||||
$lang['update_version'] = 'Version';
|
||||
$lang['update_version_current'] = 'Installed Version';
|
||||
$lang['update_new_version'] = 'New Version Available!';
|
||||
$lang['update_version_current_new'] = 'Installed Version is up-to-date';
|
||||
$lang['update_app_update_available'] = 'App-Update - New Version for "%1$s" available: %2$s';
|
||||
$lang['update_log'] = '{user} updated the System.';
|
||||
$lang['update_folder_not_writeable'] = 'The updatefolder is not writeable. Please make sure your webserver can write into the folder.';
|
||||
$lang['update_create_backup_error'] = 'An error occured while creating a backup.';
|
||||
$lang['update_cleanup_error'] = 'An error occured during cleanup.';
|
||||
$lang['update_checking'] = 'Checking for updates...';
|
||||
|
||||
//Stream Messages
|
||||
$lang['stream_saved_settings'] = '{user} changed it\'s username and/or email-adress.';
|
||||
$lang['stream_logged_out'] = '{user} has logged out.';
|
||||
$lang['stream_logged_in'] = '{user} has logged in.';
|
||||
$lang['stream_pass_changed'] = '{user}\'s password was changed.';
|
||||
$lang['stream_db_backup'] = '{user} made a database-backup.';
|
||||
$lang['stream_construction_mode'] = '{user} put the site into construction mode.';
|
||||
$lang['stream_construction_mode_message'] = '{user} edited the construction-mode message.';
|
||||
$lang['stream_construction_mode_delete'] = '{user} put the site into production mode.';
|
||||
$lang['stream_edited_page_title'] = '{user} edited the page title.';
|
||||
$lang['stream_created_user'] = '{user} created the new user "{extra}".';
|
||||
$lang['stream_edited_permissions'] = '{user} edited permissions.';
|
||||
$lang['stream_added_to_group'] = '{user} added a user to the group "{extra}".';
|
||||
$lang['stream_added_group'] = '{user} created the group "{extra}".';
|
||||
$lang['stream_deleted_group'] = '{user} deleted the group "{extra}".';
|
||||
$lang['stream_deleted_user'] = '{user} deleted the user "{extra}".';
|
||||
$lang['stream_created_group'] = '{user} created a new group.';
|
||||
$lang['stream_system_update'] = '{user} updated the system';
|
||||
$lang['stream_app_update'] = '{user} updated the app "{extra}".';
|
||||
|
||||
//Permissions
|
||||
$lang['system_perm_view_dashboard_name'] = 'View relevant information on the Dashboard';
|
||||
$lang['system_perm_view_dashboard_description'] = '';
|
||||
$lang['system_perm_manage_system_name'] = 'Make System-wide Settings';
|
||||
$lang['system_perm_manage_system_description'] = '';
|
||||
$lang['system_perm_construction_name'] = 'Put The Site In Construction Mode';
|
||||
$lang['system_perm_construction_description'] = 'While in Construction Mode, the site will show a message.';
|
||||
$lang['system_perm_update_name'] = 'Systemupdate';
|
||||
$lang['system_perm_update_description'] = 'Search for newer versions of the system and upgrade.';
|
||||
$lang['system_perm_db_dump_name'] = 'Download a database backup';
|
||||
$lang['system_perm_db_dump_description'] = 'Download a full database backup.';
|
||||
$lang['system_perm_manage_admins_name'] = 'Manage Administrators';
|
||||
$lang['system_perm_manage_admins_description'] = '';
|
||||
$lang['system_perm_manage_groups_name'] = 'Manage Admin-Roles';
|
||||
$lang['system_perm_manage_groups_description'] = '';
|
||||
$lang['system_perm_edit_permissions_name'] = 'Manage Admin-Permissions';
|
||||
$lang['system_perm_edit_permissions_description'] = '';
|
172
admin/login.php
172
admin/login.php
|
@ -1,79 +1,133 @@
|
|||
<?php
|
||||
session_name('adminsession');
|
||||
session_start();
|
||||
|
||||
require_once '../vendor/autoload.php';
|
||||
require_once '../inc/config.php';
|
||||
require_once '../inc/libs/password.php';
|
||||
require_once '../inc/libs/functions.php';
|
||||
|
||||
$db->setCol('system_admins');
|
||||
$db->data['username'] = $_POST['username'];
|
||||
$db->get();
|
||||
if($db->data[0]['id'] != '')
|
||||
if(isset($_POST['username']))
|
||||
{
|
||||
if(password_verify($_POST['pw'], $db->data[0]['pass']))
|
||||
$db->setCol('system_admins');
|
||||
$db->data['username'] = $_POST['username'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]) && $db->data[0]['id'] != '')
|
||||
{
|
||||
session_regenerate_id();
|
||||
$uid = $db->data[0]['id'];
|
||||
|
||||
//Token
|
||||
$token = random(64);
|
||||
$_SESSION['token'] = $token;
|
||||
$db->clear();
|
||||
$db->setCol('system_loggedin');
|
||||
$db->data['user'] = $uid;
|
||||
$db->data['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
|
||||
$db->data['ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$db->data['time'] = time();
|
||||
$db->data['token'] = $token;
|
||||
//if($db->insert()) echo 'token'; else echo 'hm';
|
||||
$db->insert();
|
||||
//echo $token;
|
||||
|
||||
$db->clear();
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $uid;
|
||||
$db->get();
|
||||
if($db->data[0]['secret'] != '')
|
||||
$userData = $db->data[0];
|
||||
if (password_verify($_POST['pw'], $userData['pass']))
|
||||
{
|
||||
if(isset($_POST['2fa']) && $_POST['2fa'] == '')
|
||||
{
|
||||
echo '2fa';
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
require_once '../inc/libs/2fa.php';
|
||||
$authenticator = new php2FA();
|
||||
session_regenerate_id();
|
||||
|
||||
if($authenticator->verifyCode($db->data[0]['secret'], $_POST['2fa'], 3))
|
||||
//Token
|
||||
$token = random(64);
|
||||
$_SESSION['token'] = $token;
|
||||
$db->clear();
|
||||
$db->setCol('system_loggedin');
|
||||
$db->data['user'] = $userData['id'];
|
||||
$db->data['user_agent'] = $_SERVER['HTTP_USER_AGENT'];
|
||||
$db->data['ip'] = $_SERVER['REMOTE_ADDR'];
|
||||
$db->data['time'] = time();
|
||||
$db->data['token'] = $token;
|
||||
$db->insert();
|
||||
|
||||
$db->clear();
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $userData['id'];
|
||||
$db->get();
|
||||
if ($db->data[0]['secret'] != '')
|
||||
{
|
||||
if (isset($_POST['2fa']) && $_POST['2fa'] == '')
|
||||
{
|
||||
echo 'success';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '2fafail';
|
||||
echo '2fa';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'success';
|
||||
}
|
||||
} else
|
||||
{
|
||||
$auth = new \PragmaRX\Google2FA\Google2FA();
|
||||
|
||||
//Session
|
||||
$_SESSION['user'] = $db->data[0]['username'];
|
||||
$_SESSION['userid'] = $db->data[0]['id'];
|
||||
$_SESSION['lvl'] = $db->data[0]['lvl'];
|
||||
$_SESSION['mail'] = $db->data[0]['mail'];
|
||||
$_SESSION['guestview'] = 'true';
|
||||
}
|
||||
else
|
||||
if($auth->verify($_POST['2fa'], $db->data[0]['secret']))
|
||||
{
|
||||
echo 'success';
|
||||
stream_message('{user} has logged in.', 4, null, null, $db->data[0]['id']);
|
||||
} else
|
||||
{
|
||||
echo '2fafail';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo 'success';
|
||||
}
|
||||
|
||||
//Session
|
||||
$_SESSION['user'] = $userData['username'];
|
||||
$_SESSION['userid'] = $userData['id'];
|
||||
$_SESSION['lvl'] = $userData['lvl'];
|
||||
$_SESSION['mail'] = $userData['mail'];
|
||||
$_SESSION['guestview'] = 'true';
|
||||
|
||||
stream_message('{user} has logged in.', 4);
|
||||
} else
|
||||
{
|
||||
echo 'fail';
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo 'fail';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
//Check for password - needed for user's confirmation
|
||||
if(isset($_GET['checkPassword']))
|
||||
{
|
||||
echo 'fail';
|
||||
if(is_loggedin())
|
||||
{
|
||||
if(isset($_POST['pw']))
|
||||
{
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $_SESSION['userid'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]) && $db->data[0]['id'] != '')
|
||||
{
|
||||
if (password_verify($_POST['pw'], $db->data[0]['pass']))
|
||||
{
|
||||
echo 'success';
|
||||
$_SESSION['sudomode'] = time();
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'fail';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'fail';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'login first.';
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the user already entered his password
|
||||
if (isset($_GET['checkSudo']))
|
||||
{
|
||||
if(is_loggedin())
|
||||
{
|
||||
// Check if the user entered his password less then 10 minutes ago
|
||||
if (isset($_SESSION['sudomode']) && $_SESSION['sudomode'] >= (time() - 600))
|
||||
{
|
||||
echo 'true';
|
||||
} else
|
||||
{
|
||||
echo 'false';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'login first.';
|
||||
}
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
session_name('adminsession');session_start();
|
||||
session_name('adminsession');
|
||||
session_start();
|
||||
|
||||
require_once '../vendor/autoload.php';
|
||||
require_once '../inc/config.php';
|
||||
require_once '../inc/libs/functions.php';
|
||||
|
||||
|
@ -7,5 +10,7 @@ $db->setCol('system_loggedin');
|
|||
$db->data['token'] = $_SESSION['token'];
|
||||
$db->delete();
|
||||
|
||||
stream_message('{user} has logged out.', 4);
|
||||
|
||||
session_destroy();
|
||||
header('Location: '.$MCONF['web_uri'].'admin/?msg=3');
|
||||
|
|
|
@ -26,7 +26,8 @@ if (hasPerm('manage_admins'))
|
|||
|
||||
if ($db->insert())
|
||||
{
|
||||
echo msg('succes', sprintf($lang->get('admins_cn_success'), $_POST['userN']) . ' <a href="users.php">' . $lang->get('back') . '</a>');
|
||||
echo msg('success', sprintf($lang->get('admins_cn_success'), $_POST['userN']) . ' <a href="users.php">' . $lang->get('back') . '</a>');
|
||||
stream_message('{user} created the new user "{extra}".', 2, $_POST['userN']);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('admins_cn_fail') . ' {back}');
|
||||
|
@ -49,6 +50,7 @@ if (hasPerm('manage_admins'))
|
|||
<div class="main">
|
||||
<div class="form">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="POST">
|
||||
<input type="hidden" name="askPW" value="askPW">
|
||||
<p><span><?php echo $lang->get('admins_cn_username'); ?>:</span><input type="text" name="userN"/>
|
||||
</p>
|
||||
<p><span><?php echo $lang->get('admins_cn_password'); ?>:</span><input type="password" name="pw1"/>
|
||||
|
|
|
@ -2,50 +2,50 @@
|
|||
"permissions": [
|
||||
{
|
||||
"key": "view_dashboard",
|
||||
"name": "Relevante Informationen auf dem Dashboard ansehen.",
|
||||
"description": "",
|
||||
"name": "system_perm_view_dashboard_name",
|
||||
"description": "system_perm_view_dashboard_description",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "manage_system",
|
||||
"name": "Systemeinstellungen vornehmen.",
|
||||
"description": "",
|
||||
"name": "system_perm_manage_system_name",
|
||||
"description": "system_perm_manage_system_description",
|
||||
"critical": true
|
||||
},
|
||||
{
|
||||
"key": "construction",
|
||||
"name": "Baustellenzustand ändern",
|
||||
"description": "Im Baustellenzustand wird Anstelle der Seite ein Text angezeigt.",
|
||||
"name": "system_perm_construction_name",
|
||||
"description": "system_perm_construction_description",
|
||||
"critical": true
|
||||
},
|
||||
{
|
||||
"key": "update",
|
||||
"name": "Systemupdate durchführen",
|
||||
"description": "Nach neuen Versionen des Systems suchen und updaten.",
|
||||
"name": "system_perm_update_name",
|
||||
"description": "system_perm_update_description",
|
||||
"critical": true
|
||||
},
|
||||
{
|
||||
"key": "db_dump",
|
||||
"name": "Datenbanbackup herunterladen",
|
||||
"description": "Ein komplettes Backup der Datenbank herunterladen.",
|
||||
"name": "system_perm_db_dump_name",
|
||||
"description": "system_perm_db_dump_description",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "manage_admins",
|
||||
"name": "Administratoren verwalten",
|
||||
"description": "",
|
||||
"name": "system_perm_manage_admins_name",
|
||||
"description": "system_perm_manage_admins_description",
|
||||
"critical": true
|
||||
},
|
||||
{
|
||||
"key": "manage_groups",
|
||||
"name": "Admingruppen verwalten",
|
||||
"description": "",
|
||||
"name": "system_perm_manage_groups_name",
|
||||
"description": "system_perm_manage_groups_description",
|
||||
"critical": true
|
||||
},
|
||||
{
|
||||
"key": "edit_permissions",
|
||||
"name": "Adminberechtigungen verwalten",
|
||||
"description": "",
|
||||
"name": "system_perm_edit_permissions_name",
|
||||
"description": "system_perm_edit_permissions_description",
|
||||
"critical": true
|
||||
}
|
||||
]
|
||||
|
|
|
@ -11,21 +11,26 @@ if (hasPerm('edit_permissions'))
|
|||
$permArr = [];
|
||||
foreach ($_POST as $perm => $val)
|
||||
{
|
||||
if ($perm != 'smbt')
|
||||
if ($perm != 'smbt' && $val == 'true')
|
||||
{
|
||||
$perm_full = $perm;
|
||||
$perm = explode('_', $perm);
|
||||
$permArr[$perm[0]][$perm[1]][] = str_replace($perm[0].'_'.$perm[1].'_', '', $perm_full);
|
||||
//echo '<pre>'.print_r($perm, true).'</pre>';
|
||||
if(isset($perm[1], $perm[0]))
|
||||
{
|
||||
$permArr[$perm[0]][$perm[1]][] = str_replace($perm[0] . '_' . $perm[1] . '_', '', $perm_full);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//print_r($permArr);
|
||||
foreach ($permArr as $lvl => $perms)
|
||||
{
|
||||
$db->setCol('system_roles');
|
||||
$db->data['permissions'] = json_encode($perms);
|
||||
if ($db->update(['id' => $lvl]))
|
||||
{
|
||||
echo msg('success', $lang->get('admins_perms_set_success').' {back}');
|
||||
stream_message('{user} edited permissions.', 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -34,7 +39,7 @@ if (hasPerm('edit_permissions'))
|
|||
}
|
||||
} else
|
||||
{
|
||||
echo '<div class="main"><form action="'.$_SERVER['REQUEST_URI'].'" method="post">';
|
||||
echo '<div class="main"><form action="'.$_SERVER['REQUEST_URI'].'" method="post"><input type="hidden" name="askPW" value="askPW">';
|
||||
//Admin Groups
|
||||
$db->get();
|
||||
$role_names = [];
|
||||
|
@ -66,22 +71,20 @@ if (hasPerm('edit_permissions'))
|
|||
$permsTotal = [];
|
||||
$permsTotal['System'] = json_decode(file_get_contents('permissions.json'), true);
|
||||
$permsTotal['System'] = $permsTotal['System']['permissions'];
|
||||
$moduluri = '../apps/';
|
||||
if ($handle = opendir($moduluri))
|
||||
|
||||
$apps = new apps();
|
||||
$appUri = '../apps/';
|
||||
foreach ($apps->getApps() as $app => $appconf)
|
||||
{
|
||||
while (false !== ($mod = readdir($handle)))
|
||||
if (file_exists($appUri . '/' . $appconf['app_path'] . '/permissions.json'))
|
||||
{
|
||||
if ($mod != "." && $mod != ".." && is_dir($moduluri . $mod))
|
||||
{
|
||||
if (file_exists($moduluri . '/' . $mod . '/permissions.json'))
|
||||
{
|
||||
require $moduluri . '/' . $mod . '/config.php';
|
||||
$permsTotal[$_CONF['mod_name']] = json_decode(file_get_contents($moduluri . '/' . $mod . '/permissions.json'), true);
|
||||
$permsTotal[$_CONF['mod_name']] = $permsTotal[$_CONF['mod_name']]['permissions'];
|
||||
}
|
||||
}
|
||||
require $appUri . '/' . $appconf['app_path'] . '/config.php';
|
||||
|
||||
$lang->setLangFolder( $appUri . $appconf['app_path'] .'/lang/');
|
||||
|
||||
$permsTotal[$_CONF['app_name']] = json_decode(file_get_contents($appUri . '/' . $appconf['app_path'] . '/permissions.json'), true);
|
||||
$permsTotal[$_CONF['app_name']] = $permsTotal[$_CONF['app_name']]['permissions'];
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
//print_r($permsTotal);
|
||||
|
@ -94,9 +97,9 @@ if (hasPerm('edit_permissions'))
|
|||
foreach ($perms as $perm)
|
||||
{
|
||||
$critical = '';
|
||||
if ($perm['critical'] == true) $critical = '<span class="critical fa fa-warning" title="'.$lang->get('admins_perms_critical').'"></span>';
|
||||
if ($perm['critical'] == true) $critical = '<span data-toggle="tooltip" class="critical fa fa-warning" title="'.$lang->get('admins_perms_critical').'"></span>';
|
||||
|
||||
echo '<tr title="' . $perm['description'] . '"><td>' . $critical . $perm['name'] . '</td>';
|
||||
echo '<tr data-toggle="tooltip" title="' . $lang->get($perm['description']) . '"><td>' . $critical . $lang->get($perm['name']) . '</td>';
|
||||
foreach ($role_names as $lvl => $name)
|
||||
{
|
||||
$disable = '';
|
||||
|
|
5
admin/reset-pw.php
Normal file → Executable file
5
admin/reset-pw.php
Normal file → Executable file
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
require_once '../vendor/autoload.php';
|
||||
require_once '../inc/config.php';
|
||||
require_once '../inc/libs/functions.php';
|
||||
$lang->setLangFolder('lang/');
|
||||
|
@ -140,8 +141,8 @@ else
|
|||
</form>
|
||||
<div id="msg"></div>
|
||||
</div>
|
||||
<p style="text-align: center;color: #fff;text-shadow: 1px 1px 1px #555;">© 2016 <a
|
||||
href="http://mowie.cc" style="color: #fff;">Mowie</a></p>
|
||||
<p style="text-align: center;color: #fff;text-shadow: 1px 1px 1px #555;">© 2018 <a
|
||||
href="http://mowie.cc" style="color: #fff;" target="_blank">Mowie</a></p>
|
||||
</div>
|
||||
<script>
|
||||
$("#pwreset").submit(function () {
|
||||
|
|
|
@ -14,6 +14,7 @@ if (hasPerm('manage_groups'))
|
|||
if ($db->update(['id' => $_POST['user']]))
|
||||
{
|
||||
echo msg('success', $lang->get('admins_roles_added_success').' <a href="roles.php?members=' . $_GET['members'] . '">'.$lang->get('back').'</a>');
|
||||
stream_message('{user} added a user to the group "{extra}".', 2, $_GET['members']);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('admins_roles_added_fail').' <a href="roles.php?members=' . $_GET['members'] . '">'.$lang->get('back').'</a>');
|
||||
|
@ -31,6 +32,7 @@ if (hasPerm('manage_groups'))
|
|||
if ($db->delete(['id' => $_GET['members']]))
|
||||
{
|
||||
echo msg('success', $lang->get('admins_roles_delete_success').' <a href="roles.php">'.$lang->get('back').'</a>');
|
||||
stream_message('{user} deleted the group "{extra}".', 2, $_GET['members']);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('admins_roles_delete_fail').' <a href="roles.php">'.$lang->get('back').'</a>');
|
||||
|
@ -40,6 +42,7 @@ if (hasPerm('manage_groups'))
|
|||
?>
|
||||
<div class="main" style="text-align: center">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<input type="hidden" name="askPW" value="askPW">
|
||||
<p><?php echo $lang->get('admins_roles_delete_confirm');?></p>
|
||||
<input type="submit" name="del" value="<?php echo $lang->get('general_yes');?>"/>
|
||||
<a href="roles.php?members=<?php echo $_GET['members']; ?>" class="button btn_del"><?php echo $lang->get('general_no');?></a>
|
||||
|
@ -57,6 +60,7 @@ if (hasPerm('manage_groups'))
|
|||
if ($db->update(['id' => $_GET['deluser']]))
|
||||
{
|
||||
echo msg('success', $lang->get('admins_roles_user_delete_success').' <a href="roles.php?members=' . $_GET['members'] . '">'.$lang->get('back').'</a>');
|
||||
stream_message('{user} deleted the user "{extra}".', 2, $_GET['deluser']);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('admins_roles_user_delete_fail').' <a href="roles.php?members=' . $_GET['members'] . '">'.$lang->get('back').'</a>');
|
||||
|
@ -66,6 +70,7 @@ if (hasPerm('manage_groups'))
|
|||
?>
|
||||
<div class="main" style="text-align: center">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<input type="hidden" name="askPW" value="askPW">
|
||||
<p><?php echo $lang->get('admins_roles_user_delete_confirm');?></p>
|
||||
<input type="submit" name="del" value="<?php echo $lang->get('general_yes');?>"/>
|
||||
<a href="roles.php?members=<?php echo $_GET['members']; ?>" class="button btn_del"><?php echo $lang->get('general_no');?></a>
|
||||
|
@ -130,6 +135,7 @@ if (hasPerm('manage_groups'))
|
|||
{
|
||||
?>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<input type="hidden" name="askPW" value="askPW">
|
||||
<?php echo $lang->get('admins_roles_add_user');?>:
|
||||
<select name="user">
|
||||
<?php
|
||||
|
@ -159,6 +165,7 @@ if (hasPerm('manage_groups'))
|
|||
if ($db->insert())
|
||||
{
|
||||
echo msg('success', $lang->get('admins_roles_create_group_success').' <a href="roles.php">'.$lang->get('back').'</a>');
|
||||
stream_message('{user} created the group "{extra}".', 2, $_POST['group_name']. ' ('.$db->lastID().')');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('admins_roles_create_group_fail').' <a href="roles.php">'.$lang->get('back').'</a>');
|
||||
|
@ -169,6 +176,7 @@ if (hasPerm('manage_groups'))
|
|||
<div class="main">
|
||||
<h2><?php echo $lang->get('admins_roles_create_group');?></h2>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<input type="hidden" name="askPW" value="askPW">
|
||||
<input type="text" name="group_name" placeholder="<?php echo $lang->get('admins_roles_group_name');?>"/><br/>
|
||||
<input type="submit" name="submit" value="<?php echo $lang->get('admins_roles_create_group');?>"/>
|
||||
</form>
|
||||
|
|
68
admin/stream.php
Executable file
68
admin/stream.php
Executable file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
error_reporting(E_ALL);
|
||||
require_once '../inc/autoload_adm.php';
|
||||
|
||||
//Get Langstrings
|
||||
foreach ($apps->getApps() as $appname => $appdetail)
|
||||
{
|
||||
$path = '../apps/' . $appdetail['app_path'] . '/lang/';
|
||||
if (file_exists($path) && is_dir($path))
|
||||
{
|
||||
$lang->setLangFolder($path);
|
||||
}
|
||||
}
|
||||
|
||||
//Get Stream as JSON
|
||||
if (isset($_GET['getStream']) && is_loggedin())
|
||||
{
|
||||
$db->setCol('system_show_stream');
|
||||
$db->data['user'] = $_SESSION['userid'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]))
|
||||
{
|
||||
$loglevel = json_decode($db->data[0]['level']);
|
||||
|
||||
$streamData = [];
|
||||
$db->setCol('system_stream');
|
||||
$db->get(null, null, 'id', 'DESC', 10);
|
||||
foreach ($db->data as $stream)
|
||||
{
|
||||
if (in_array($stream['lvl'], $loglevel))
|
||||
{
|
||||
$message = str_replace('{user}', getUserByID($stream['user']), $lang->get($stream['message']));
|
||||
$message = str_replace('{extra}', $stream['extra'], $message);
|
||||
|
||||
$streamData[] = [
|
||||
'id' => $stream['id'],
|
||||
'time' => $stream['time'],
|
||||
'user' => $stream['user'],
|
||||
'message' => $message
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
header('Charset: utf-8');
|
||||
header('Content-type: application/json');
|
||||
echo json_encode($streamData);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//Show Stream
|
||||
printHeader('Stream');
|
||||
|
||||
echo '<div class="main">';
|
||||
|
||||
//Get Stream Messages
|
||||
$db->setCol('system_stream');
|
||||
$db->get(null, null, 'id', 'DESC', 200);
|
||||
foreach ($db->data as $stream)
|
||||
{
|
||||
$message = str_replace('{user}', getUserByID($stream['user']), $lang->get($stream['message']));
|
||||
$message = str_replace('{extra}', $stream['extra'], $message);
|
||||
echo '<p><b>' . date('d.m.Y H:i', $stream['time']) . ':</b> ' . $message . '</p>';
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
||||
require_once '../inc/footer.php';
|
180
admin/update.php
Executable file
180
admin/update.php
Executable file
|
@ -0,0 +1,180 @@
|
|||
<?php
|
||||
require_once '../inc/autoload_adm.php';
|
||||
require_once '../inc/libs/updater.php';
|
||||
|
||||
$update = new Mowie\Updater\updater();
|
||||
$update->setServer($MCONF['update_servers']);
|
||||
$update->setCurrentVersion($MCONF['version']);
|
||||
$update->setUpdateDir('../');
|
||||
$update->thingsToNotUpdate = [
|
||||
'apps/',
|
||||
'config/',
|
||||
'content/',
|
||||
'vendor/',
|
||||
'templates_c'
|
||||
];
|
||||
|
||||
//Update-Checker
|
||||
if (isset($_GET['checkUpdate']))
|
||||
{
|
||||
//sleep(50);
|
||||
if (hasPerm('update') && $MCONF['update_enabled'])
|
||||
{
|
||||
//Check for newer Version
|
||||
try
|
||||
{
|
||||
$new = $update->checkUpdateAvailable();
|
||||
} catch (\Exception $e)
|
||||
{
|
||||
echo 'Error. ' . $e->getMessage();
|
||||
}
|
||||
|
||||
// If we have a new version, show it
|
||||
if (isset($new))
|
||||
{
|
||||
echo $lang->get('update_new_version') . ' <b>' . $new['version'] . '</b> <a href="update.php?update" class="button">' . $lang->get('update_title') . '</a>';
|
||||
if (isset($new['changelog']))
|
||||
{
|
||||
echo '<a href="update.php?showChangelog&url=' . urlencode($new['server'] . $new['changelog']) . '" class="button"><i class="fa fa-list-alt" aria-hidden="true"></i> Changelog</a>';
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo $lang->get('update_version_current_new');
|
||||
}
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
//Show Changelog
|
||||
if (isset($_GET['showChangelog']))
|
||||
{
|
||||
printHeader($lang->get('update_showChangelog'));
|
||||
echo '<div class="main">';
|
||||
if (hasPerm('update'))
|
||||
{
|
||||
if(isset($_GET['url']))
|
||||
{
|
||||
$parsedown = new Parsedown();
|
||||
$change = $update->getChangelog(urldecode($_GET['url']));
|
||||
echo $parsedown->parse($change);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Missing Url';
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('missing_permission'));
|
||||
}
|
||||
echo '<a href="general_config.php">'.$lang->get('back').'</a> </div>';
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
//Update
|
||||
if (isset($_GET['update']))
|
||||
{
|
||||
printHeader($lang->get('update_title'));
|
||||
if (hasPerm('update') && $MCONF['update_enabled'])
|
||||
{
|
||||
//Check for newer Version
|
||||
try
|
||||
{
|
||||
$new = $update->checkUpdateAvailable();
|
||||
} catch (\Exception $e)
|
||||
{
|
||||
echo 'Error. ' . $e->getMessage();
|
||||
}
|
||||
|
||||
// Update if we have one
|
||||
if(isset($new))
|
||||
{
|
||||
//Check writing permissions
|
||||
if($update->updateFolderIsWritable())
|
||||
{
|
||||
// Download the update
|
||||
if ($update->downloadUpdate($new))
|
||||
{
|
||||
// Check downloaded update file
|
||||
if($update->verifyUpdate($new))
|
||||
{
|
||||
// Put the site in "under construction mode"
|
||||
if (copy('../content/.system/construction2.txt', '../content/.system/construction.txt'))
|
||||
{
|
||||
stream_message('{user} put the site into construction mode.', 2);
|
||||
|
||||
// Create a backup
|
||||
if($update->backupUpdateFolder())
|
||||
{
|
||||
// The actual update
|
||||
try
|
||||
{
|
||||
$update->rollTheUpdate();
|
||||
}
|
||||
catch (\Exception $e)
|
||||
{
|
||||
echo msg('fail', $lang->get('update_fail_unzip'). ' ('.$e->getMessage().')');
|
||||
}
|
||||
|
||||
// Execute migrations
|
||||
$update->migrate();
|
||||
|
||||
// Clean afterwards
|
||||
if($update->cleanup())
|
||||
{
|
||||
// Update new Version in Config file
|
||||
$conf = \Symfony\Component\Yaml\Yaml::parse(file_get_contents('../config/config.yml'));
|
||||
$conf['Versioning']['version'] = $update->getCurrentVersion();
|
||||
|
||||
$configfile = \Symfony\Component\Yaml\Yaml::dump($conf);
|
||||
if (file_put_contents('../config/config.yml', $configfile))
|
||||
{
|
||||
// Disable Construction mode
|
||||
if (unlink('../content/.system/construction.txt'))
|
||||
{
|
||||
echo msg('success', $lang->get('update_succss') . ' <a href="general_config.php">' . $lang->get('back') . '</a>');
|
||||
stream_message('{user} updated the System.', 2);
|
||||
stream_message('{user} put the site into production mode.', 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('success', $lang->get('action_construction_removed_error'));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', $lang->get('update_cleanup_error'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', $lang->get('update_create_backup_error'));
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('action_construction_error'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', $lang->get('update_wrong_hash'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', $lang->get('update_fail_copy'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', $lang->get('update_folder_not_writeable'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('info', $lang->get('update_version_current_new'));
|
||||
}
|
||||
}
|
||||
require_once '../inc/footer.php';
|
||||
}
|
|
@ -27,7 +27,8 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
$db->data['pass'] = password_hash($_POST['pw_new'], PASSWORD_DEFAULT);
|
||||
if ($db->update(['id' => $user]))
|
||||
{
|
||||
echo msg('succes', $lang->get('user_settings_pw_change_success') . ' <a href="index.php">' . $lang->get('back_dashboard') . '</a>');
|
||||
echo msg('success', $lang->get('user_settings_pw_change_success') . ' <a href="index.php">' . $lang->get('back_dashboard') . '</a>');
|
||||
stream_message('{user}\'s password was changed.', 4);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('user_settings_pw_change_fail') . ' {back}');
|
||||
|
@ -40,15 +41,15 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
} else
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<input type="password" name="pw_new"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass'); ?>" autofocus/><br/>
|
||||
<input type="password" name="pw_new2"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass_confirm'); ?>"/><br/>
|
||||
<input type="submit" value="<?php echo $lang->get('confirm'); ?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
|
||||
<input type="password" name="pw_new"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass'); ?>" autofocus/><br/>
|
||||
<input type="password" name="pw_new2"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass_confirm'); ?>"/><br/>
|
||||
<input type="submit" value="<?php echo $lang->get('confirm'); ?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} elseif (isset($_GET['pw_u']))
|
||||
|
@ -67,14 +68,14 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
{
|
||||
echo '<div class="main"><p>' . $lang->get('user_settings_new_pass') . '</p>';
|
||||
?>
|
||||
<form action="<?php echo parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);?>?pw_new" method="post">
|
||||
<input type="password" name="pw_new"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass'); ?>" autofocus/><br/>
|
||||
<input type="password" name="pw_new2"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass_confirm'); ?>"/><br/>
|
||||
<input type="submit" value="<?php echo $lang->get('confirm'); ?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<form action="<?php echo parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); ?>?pw_new" method="post">
|
||||
<input type="password" name="pw_new"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass'); ?>" autofocus/><br/>
|
||||
<input type="password" name="pw_new2"
|
||||
placeholder="<?php echo $lang->get('user_settings_new_pass_confirm'); ?>"/><br/>
|
||||
<input type="submit" value="<?php echo $lang->get('confirm'); ?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} else
|
||||
{
|
||||
|
@ -84,17 +85,17 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
} else
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<input type="password" name="pw" autofocus
|
||||
placeholder="<?php echo $lang->get('user_settings_enter_current_pass'); ?>"/><br/>
|
||||
<input type="submit" value="<?php echo $lang->get('confirm'); ?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div class="main">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
|
||||
<input type="password" name="pw" autofocus
|
||||
placeholder="<?php echo $lang->get('user_settings_enter_current_pass'); ?>"/><br/>
|
||||
<input type="submit" value="<?php echo $lang->get('confirm'); ?>"/>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}//Sessions
|
||||
elseif (isset($_GET['sessions']))
|
||||
elseif (isset($_GET['sessions']))
|
||||
{
|
||||
$db->setCol('system_loggedin');
|
||||
if (isset($_POST['smbt']))
|
||||
|
@ -121,17 +122,18 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
echo '</table>';
|
||||
|
||||
?>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post"><input type="submit" name="smbt"
|
||||
value="<?php echo $lang->get('user_settings_current_sessions_logout_all'); ?>"/>
|
||||
</form></div>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post"><input type="submit" name="smbt"
|
||||
value="<?php echo $lang->get('user_settings_current_sessions_logout_all'); ?>"/>
|
||||
</form></div>
|
||||
<?php
|
||||
}
|
||||
}//2-Faktor-Atentifizierung
|
||||
elseif (isset($_GET['2fa']))
|
||||
elseif (isset($_GET['2fa']))
|
||||
{
|
||||
echo '<div class="main">';
|
||||
require_once '../inc/libs/2fa.php';
|
||||
$authenticator = new php2FA();
|
||||
|
||||
$auth = new \PragmaRX\Google2FA\Google2FA();
|
||||
|
||||
$db->clear();
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $_SESSION['userid'];
|
||||
|
@ -155,13 +157,13 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
} else
|
||||
{
|
||||
?>
|
||||
<p><?php echo $lang->get('user_settings_2fa_deactivate_confirm'); ?></p>
|
||||
<p>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post" style="text-align: center;">
|
||||
<input type="submit" name="confirm" value="<?php echo $lang->get('general_yes'); ?>"/>
|
||||
<a onclick="history.back();" class="button btn_del"><?php echo $lang->get('general_no'); ?></a>
|
||||
</form>
|
||||
</p>
|
||||
<p><?php echo $lang->get('user_settings_2fa_deactivate_confirm'); ?></p>
|
||||
<p>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post" style="text-align: center;">
|
||||
<input type="submit" name="confirm" value="<?php echo $lang->get('general_yes'); ?>"/>
|
||||
<a onclick="history.back();" class="button btn_del"><?php echo $lang->get('general_no'); ?></a>
|
||||
</form>
|
||||
</p>
|
||||
<?php
|
||||
}
|
||||
}//Ansonsten mgl zum aktivieren/Einrichten anzeigen
|
||||
|
@ -170,7 +172,7 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
echo '<h2>' . $lang->get('user_settings_2fa_activate') . '</h2>';
|
||||
if (isset($_POST['smbt']))
|
||||
{
|
||||
if ($authenticator->verifyCode($_POST['secret'], $_POST['2fatest'], 3))
|
||||
if ($auth->verify($_POST['2fatest'], $_POST['secret']))
|
||||
{
|
||||
$db->clear();
|
||||
$db->setCol('system_admins');
|
||||
|
@ -183,63 +185,108 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
echo msg('fail', $lang->get('user_settings_2fa_activate_fail') . ' {back}');
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('user_settings_2fa_activate_wrong_code') . ' {back}');
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo '<p>' . $lang->get('user_settings_2fa_activate_import_code') . '</p>';
|
||||
$secret = $authenticator->createSecret();
|
||||
echo '<p><b>' . $lang->get('user_settings_2fa_key') . ':</b> ' . $secret . '<br/><br/>';
|
||||
$website = $MCONF['title'] . ' - Admin';
|
||||
$title = $_SESSION['user'];
|
||||
$qrCodeUrl = $authenticator->getSecretUrl($title, $secret, $website);
|
||||
echo '<img src="https://api.qrserver.com/v1/create-qr-code/?size=200x200&format=svg&data=' . $qrCodeUrl . '" alt=""/></p>';
|
||||
?>
|
||||
<p><?php echo $lang->get('user_settings_2fa_confirm_code'); ?>:</p>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post">
|
||||
<p><input type="text" placeholder="<?php echo $lang->get('user_settings_2fa_enter_code'); ?>"
|
||||
name="2fatest" autocomplete="off"/>
|
||||
<input type="hidden" name="secret" value="<?php echo $secret; ?>"/>
|
||||
<input type="submit" name="smbt" value="<?php echo $lang->get('user_settings_2fa_test'); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
echo msg('fail', $lang->get('user_settings_2fa_activate_wrong_code') . ' {back}');
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
} else
|
||||
{
|
||||
$db->setCol('system_admins');
|
||||
if (isset($_POST['smbt']))
|
||||
else
|
||||
{
|
||||
$db->data['username'] = $_POST['username'];
|
||||
$db->data['mail'] = $_POST['mail'];
|
||||
if ($db->update(['id' => $uid]))
|
||||
{
|
||||
echo msg('success', $lang->get('user_settings_settings_success') . ' {back}');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('user_settings_settings_fail') . ' {back}');
|
||||
}
|
||||
echo '<p>' . $lang->get('user_settings_2fa_activate_import_code') . '</p>';
|
||||
$secret = $auth->generateSecretKey();
|
||||
echo '<p><b>' . $lang->get('user_settings_2fa_key') . ':</b> ' . $secret . '<br/><br/>';
|
||||
|
||||
$qrcode = $auth->getQRCodeInline(
|
||||
$MCONF['title'] . ' - Admin',
|
||||
$_SESSION['user'],
|
||||
$secret,
|
||||
250
|
||||
);
|
||||
echo '<img src="' . $qrcode . '" alt=""/></p>';
|
||||
?>
|
||||
<p><?php echo $lang->get('user_settings_2fa_confirm_code'); ?>:</p>
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" method="post">
|
||||
<p><input type="text" placeholder="<?php echo $lang->get('user_settings_2fa_enter_code'); ?>"
|
||||
name="2fatest" autocomplete="off"/>
|
||||
<input type="hidden" name="secret" value="<?php echo $secret; ?>"/>
|
||||
<input type="submit" name="smbt" value="<?php echo $lang->get('user_settings_2fa_test'); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
echo '</div>';
|
||||
} else
|
||||
{
|
||||
$db->setCol('system_admins');
|
||||
if (isset($_POST['smbt']))
|
||||
{
|
||||
$db->data['username'] = $_POST['username'];
|
||||
$db->data['mail'] = $_POST['mail'];
|
||||
if ($db->update(['id' => $uid]))
|
||||
{
|
||||
echo msg('success', $lang->get('user_settings_settings_success') . ' {back}');
|
||||
stream_message('{user} changed it\'s username and/or email-adress.', 4);
|
||||
} else
|
||||
{
|
||||
$db->data['id'] = $uid;
|
||||
$db->get();
|
||||
//print_r($db->data);
|
||||
if ($db->data[0]['username'] !== '')
|
||||
echo msg('fail', $lang->get('user_settings_settings_fail') . ' {back}');
|
||||
}
|
||||
|
||||
//Log-Level
|
||||
$loglevel = '';
|
||||
$loglevelA = [];
|
||||
if (isset($_POST['level_1']) && $_POST['level_1'] == 'true') $loglevelA[] = 1;
|
||||
if (isset($_POST['level_2']) && $_POST['level_2'] == 'true') $loglevelA[] = 2;
|
||||
if (isset($_POST['level_3']) && $_POST['level_3'] == 'true') $loglevelA[] = 3;
|
||||
if (isset($_POST['level_4']) && $_POST['level_4'] == 'true') $loglevelA[] = 4;
|
||||
$loglevel = json_encode($loglevelA);
|
||||
|
||||
//Get the current status
|
||||
$db->setCol('system_show_stream');
|
||||
$db->data['user'] = $_SESSION['userid'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]))//If we already have stream settings saved, update them
|
||||
{
|
||||
$db->setCol('system_show_stream');
|
||||
$db->data['level'] = $loglevel;
|
||||
if ($db->update(['user' => $_SESSION['userid']]))
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI']?>" class="form" method="post">
|
||||
<p><span><?php echo $lang->get('username'); ?>:</span><input name="username"
|
||||
value="<?php echo $db->data[0]['username'] ?>"/>
|
||||
</p>
|
||||
<p><span><?php echo $lang->get('admins_mail'); ?>:</span><input name="mail"
|
||||
value="<?php echo $db->data[0]['mail'] ?>"/>
|
||||
</p>
|
||||
<p><span><?php echo $lang->get('password'); ?>:</span><a
|
||||
href="user_settings.php?uid=<?php echo $db->data[0]['id'];
|
||||
echo msg('success', $lang->get('user_settings_log_level_success') . ' {back}');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('user_settings_log_level_fail') . ' {back}');
|
||||
}
|
||||
} else //Otherwise insert them
|
||||
{
|
||||
$db->setCol('system_show_stream');
|
||||
$db->data['user'] = $_SESSION['userid'];
|
||||
$db->data['level'] = $loglevel;
|
||||
if ($db->insert())
|
||||
{
|
||||
echo msg('success', $lang->get('user_settings_log_level_success'));
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('user_settings_log_level_fail'));
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
$db->data['id'] = $uid;
|
||||
$db->get();
|
||||
//print_r($db->data);
|
||||
if ($db->data[0]['username'] !== '')
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<form action="<?php echo $_SERVER['REQUEST_URI'] ?>" class="form" method="post">
|
||||
<input type="hidden" name="askPW" value="askPW">
|
||||
<p><span><?php echo $lang->get('username'); ?>:</span><input name="username"
|
||||
value="<?php echo $db->data[0]['username'] ?>"/>
|
||||
</p>
|
||||
<p><span><?php echo $lang->get('admins_mail'); ?>:</span><input name="mail"
|
||||
value="<?php echo $db->data[0]['mail'] ?>"/>
|
||||
</p>
|
||||
<p><span><?php echo $lang->get('password'); ?>:</span><a
|
||||
href="user_settings.php?uid=<?php echo $db->data[0]['id'];
|
||||
if ($db->data[0]['id'] == $_SESSION['userid'])
|
||||
{
|
||||
echo '&pw_u';
|
||||
|
@ -248,55 +295,91 @@ if (hasPerm('manage_admins') || $uid == $_SESSION['userid'])
|
|||
echo '&pw_new';
|
||||
}
|
||||
?>"><?php echo $lang->get('user_settings_settings_pass'); ?></a></p>
|
||||
<p><span><?php echo $lang->get('admins_roles_group'); ?>:</span><?php
|
||||
$lvl = $db->data[0]['lvl'];
|
||||
$db->setCol('system_roles');
|
||||
$db->data['id'] = $lvl;
|
||||
$db->get();
|
||||
echo $db->data[0]['name'] ?></p>
|
||||
<p><span><?php echo $lang->get('user_settings_last_login'); ?>:</span><?php
|
||||
$db->setCol('system_loggedin');
|
||||
$db->data['user'] = $uid;
|
||||
$db->get();
|
||||
if (isset($db->data[0]['time']))
|
||||
<p><span><?php echo $lang->get('admins_roles_group'); ?>:</span><?php
|
||||
$lvl = $db->data[0]['lvl'];
|
||||
$db->setCol('system_roles');
|
||||
$db->data['id'] = $lvl;
|
||||
$db->get();
|
||||
if (isset($db->data[0]['name']))
|
||||
{
|
||||
echo $db->data[0]['name'];
|
||||
} else
|
||||
{
|
||||
echo '<i>' . sprintf($lang->get('user_settings_none'), $MCONF['web_uri'] . 'admin/roles.php') . '</i>';
|
||||
} ?></p>
|
||||
<p><span><?php echo $lang->get('user_settings_last_login'); ?>:</span><?php
|
||||
$db->setCol('system_loggedin');
|
||||
$db->data['user'] = $uid;
|
||||
$db->get();
|
||||
if (isset($db->data[0]['time']))
|
||||
{
|
||||
echo date('d.m.Y H:i:s', $db->data[0]['time']);
|
||||
} else
|
||||
{
|
||||
$last_login = '<i>' . $lang->get('never') . '</i>';
|
||||
foreach ($db->data as $data)
|
||||
{
|
||||
echo date('d.m.Y H:i:s', $db->data[0]['time']);
|
||||
} else
|
||||
{
|
||||
$last_login = '<i>' . $lang->get('never') . '</i>';
|
||||
foreach ($db->data as $data)
|
||||
{
|
||||
$last_login = date('d.m.Y H:i:s', $data['time']);
|
||||
}
|
||||
echo $last_login;
|
||||
$last_login = date('d.m.Y H:i:s', $data['time']);
|
||||
}
|
||||
echo $last_login;
|
||||
}
|
||||
|
||||
if ($uid == $_SESSION['userid'])
|
||||
{
|
||||
echo ' <a href="user_settings.php?sessions">' . $lang->get('user_settings_show_current_sessions') . '</a>';
|
||||
?></p>
|
||||
<p><span><?php echo $lang->get('user_settings_2fa'); ?>:</span><?php
|
||||
$db->clear();
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $_SESSION['userid'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]['secret']) && $db->data[0]['secret'] != '')
|
||||
{
|
||||
echo $lang->get('general_active') . '. <a href="?2fa">' . $lang->get('general_deactivate') . '</a>';
|
||||
} else
|
||||
{
|
||||
echo $lang->get('general_inactive') . '. <a href="?2fa">' . $lang->get('general_activate') . '</a>';
|
||||
}
|
||||
}
|
||||
?></p>
|
||||
<p><input type="submit" name="smbt" value="<?php echo $lang->get('general_save_changes'); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if ($uid == $_SESSION['userid'])
|
||||
{
|
||||
echo ' <a href="user_settings.php?sessions">' . $lang->get('user_settings_show_current_sessions') . '</a>';
|
||||
?></p>
|
||||
<p><span><?php echo $lang->get('user_settings_2fa'); ?>:</span><?php
|
||||
$db->clear();
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $_SESSION['userid'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]['secret']) && $db->data[0]['secret'] != '')
|
||||
{
|
||||
echo $lang->get('general_active') . '. <a href="?2fa">' . $lang->get('general_deactivate') . '</a>';
|
||||
} else
|
||||
{
|
||||
echo $lang->get('general_inactive') . '. <a href="?2fa">' . $lang->get('general_activate') . '</a>';
|
||||
}
|
||||
}
|
||||
?><br/></p>
|
||||
<p><span><?php echo $lang->get('user_settings_log_level'); ?>:</span>
|
||||
<?php
|
||||
$db->setCol('system_show_stream');
|
||||
$db->data['user'] = $_SESSION['userid'];
|
||||
$db->get();
|
||||
$loglevel = [];
|
||||
if (isset($db->data[0]))
|
||||
{
|
||||
$loglevel = json_decode($db->data[0]['level']);
|
||||
}
|
||||
?>
|
||||
<input type="checkbox" name="level_1"
|
||||
id="level_1"<?php if (in_array(1, $loglevel)) echo ' checked="checked"'; ?>/>
|
||||
<label for="level_1"><i></i> <?php echo $lang->get('user_settings_log_level_1'); ?></label>
|
||||
<div style="clear: both;"></div>
|
||||
<span> </span>
|
||||
<input type="checkbox" name="level_2"
|
||||
id="level_2"<?php if (in_array(2, $loglevel)) echo ' checked="checked"'; ?>/>
|
||||
<label for="level_2"><i></i> <?php echo $lang->get('user_settings_log_level_2'); ?></label>
|
||||
<div style="clear: both;"></div>
|
||||
<span> </span>
|
||||
<input type="checkbox" name="level_3"
|
||||
id="level_3"<?php if (in_array(3, $loglevel)) echo ' checked="checked"'; ?>/>
|
||||
<label for="level_3"><i></i> <?php echo $lang->get('user_settings_log_level_3'); ?></label>
|
||||
<div style="clear: both;"></div>
|
||||
<span> </span>
|
||||
<input type="checkbox" name="level_4"
|
||||
id="level_4"<?php if (in_array(4, $loglevel)) echo ' checked="checked"'; ?>/>
|
||||
<label for="level_4"><i></i> <?php echo $lang->get('user_settings_log_level_4'); ?></label>
|
||||
</p>
|
||||
<p><input type="submit" name="smbt" value="<?php echo $lang->get('general_save_changes'); ?>"/>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('missing_permission'));
|
||||
|
|
|
@ -1,45 +1,59 @@
|
|||
<?php
|
||||
require_once '../inc/autoload_adm.php';
|
||||
printHeader($lang->get('admins_list'));
|
||||
if(hasPerm('manage_admins'))
|
||||
if (hasPerm('manage_admins'))
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<table>
|
||||
<tr>
|
||||
<th><?php echo $lang->get('admins_id');?></th>
|
||||
<th><?php echo $lang->get('admins_users');?></th>
|
||||
<th><?php echo $lang->get('admins_permissions');?></th>
|
||||
<th><?php echo $lang->get('admins_mail');?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<table>
|
||||
<tr>
|
||||
<th><?php echo $lang->get('admins_id'); ?></th>
|
||||
<th><?php echo $lang->get('admins_users'); ?></th>
|
||||
<th><?php echo $lang->get('admins_group'); ?></th>
|
||||
<th><?php echo $lang->get('admins_mail'); ?></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<?php
|
||||
$db->setCol('system_admins');
|
||||
$db->get();
|
||||
foreach ($db->data as $user)
|
||||
$users = $db->data;
|
||||
foreach ($users as $user)
|
||||
{
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $user['id']; ?></td>
|
||||
<td><?php echo $user['username']; ?></td>
|
||||
<td><?php echo $user['lvl']; ?></td>
|
||||
<td><?php if ($user['mail'] === '')
|
||||
<tr>
|
||||
<td><?php echo $user['id']; ?></td>
|
||||
<td><?php echo $user['username']; ?></td>
|
||||
<td><?php
|
||||
$db->setCol('system_roles');
|
||||
$db->data['id'] = $user['lvl'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]))
|
||||
{
|
||||
echo '<i>'.$lang->get('admins_not_set').'</i>';
|
||||
echo '<a href="'.$MCONF['web_uri'].'admin/roles.php?members='.$user['lvl'].'">'.$db->data[0]['name'].'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<i>'.sprintf($lang->get('user_settings_none'), $MCONF['web_uri']. 'admin/roles.php').'</i>';
|
||||
}
|
||||
?></td>
|
||||
<td><?php if ($user['mail'] === '')
|
||||
{
|
||||
echo '<i>' . $lang->get('admins_not_set') . '</i>';
|
||||
} else
|
||||
{
|
||||
?>
|
||||
<a href="mail.php?to=<?php echo $user['mail']; ?>"
|
||||
title="<?php printf($lang->get('admins_write_mail'), $user['username']);?>"><?php echo $user['mail']; ?></a>
|
||||
<a href="mail.php?to=<?php echo $user['mail']; ?>"
|
||||
title="<?php printf($lang->get('admins_write_mail'), $user['username']); ?>"><?php echo $user['mail']; ?></a>
|
||||
<?php
|
||||
}
|
||||
?></td>
|
||||
<td><a href="user_settings.php?uid=<?php echo $user['id']; ?>"><?php echo $lang->get('settings');?></a></td>
|
||||
</tr>
|
||||
<td><a href="user_settings.php?uid=<?php echo $user['id']; ?>"><?php echo $lang->get('settings'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
$GLOBALS['lang']->set('Dateiverwaltung', 'files_title', 'de');
|
||||
$GLOBALS['lang']->set('Manage Files', 'files_title', 'en');
|
||||
|
||||
$_CONF['mod_name'] = 'Files';
|
||||
$_CONF['mod_desc'] = 'Ein Modul zum Anzeigen & Uploaden von Dateien';
|
||||
$_CONF['menu_top'] = '<i class="fa fa-folder"></i> '.$GLOBALS['lang']->get('files_title');
|
||||
$_CONF['app_name'] = 'Files';
|
||||
$_CONF['app_desc'] = 'Ein Modul zum Anzeigen & Uploaden von Dateien';
|
||||
$_CONF['app_build'] = 1;
|
||||
$_CONF['app_version'] = 'v0.9 Beta';
|
||||
$_CONF['menu_top'] = '<i class="fa fa-folder"></i> '.$lang->get('files_title');
|
||||
$_CONF['menu'] = ['menu_top' => 'index.php'];
|
||||
$_CONF['type'] = 'none';
|
||||
|
||||
$_CONF['css'] = ['css/files.css'];
|
225
apps/Files/css/files.css
Executable file
225
apps/Files/css/files.css
Executable file
|
@ -0,0 +1,225 @@
|
|||
/*Files*/
|
||||
table#filesList {
|
||||
min-width: calc(100% + 20px);
|
||||
display: table;
|
||||
box-shadow: none;
|
||||
margin: 5px -10px;
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
table#filesList td {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
table#filesList a {
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
table#filesList thead{
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
}
|
||||
|
||||
table#filesList thead th{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
table#filesList thead th:after{
|
||||
font-family: 'FontAwesome' !important;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-variant: normal;
|
||||
text-transform: none;
|
||||
line-height: 1;
|
||||
|
||||
/* Better Font Rendering =========== */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
content: "\f0dc";
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
table#filesList thead th.headerSortDown:after{
|
||||
content: "\f0de";
|
||||
}
|
||||
|
||||
table#filesList thead th.headerSortUp:after{
|
||||
content: "\f0dd";
|
||||
}
|
||||
|
||||
.upbtninput {
|
||||
position: fixed;
|
||||
top: -100px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.window {
|
||||
width: 100%;
|
||||
max-width: 984px;
|
||||
left: calc((50vw - 366px));
|
||||
top: 40px;
|
||||
background: #fff;
|
||||
padding: 10px 10px 20px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
z-index: 1;
|
||||
border-radius: 2px;
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
max-height: calc(100vh - 80px);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.window .head {
|
||||
margin: -10px -10px 20px;
|
||||
padding: 10px 10px;
|
||||
background: #eaeaea;
|
||||
border-radius: 2px 2px 0 0;
|
||||
-moz-user-select: -moz-none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
position: fixed;
|
||||
width: 984px;
|
||||
}
|
||||
|
||||
.window .head .closeMsg {
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
.window .head .closeMsg:hover {
|
||||
color: #5d5d5d;
|
||||
}
|
||||
|
||||
.window #content {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.window-confirm, .window-confirm .head {
|
||||
width: 350px;
|
||||
text-align: center;
|
||||
left: calc(50vw - 175px);
|
||||
}
|
||||
|
||||
.window-confirm .head {
|
||||
margin: -10px -10px 10px 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.select {
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.select:focus {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #4CAF50;
|
||||
}
|
||||
|
||||
.window textarea {
|
||||
width: calc(100% - 10px);
|
||||
height: 400px;
|
||||
font-family: monospace;
|
||||
max-width: 100%;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.window textarea:focus {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #4CAF50;
|
||||
}
|
||||
|
||||
.progbar_btm {
|
||||
background: #4CAF50;
|
||||
height: 4px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/*dropFileArea*/
|
||||
#dropFileArea{
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 999;
|
||||
background: rgba(250,250,250,0.6);
|
||||
}
|
||||
|
||||
.dropmsgcontainer{
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
bottom: 20px;
|
||||
position: fixed;
|
||||
left: calc(50vw - 215px);
|
||||
}
|
||||
|
||||
.dropmsg{
|
||||
background: #2196F3;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
|
||||
.dropicon{
|
||||
font-size: 90px;
|
||||
text-shadow: 0 2px 2px rgba(0, 0, 0, .14), 0 3px 1px rgba(0, 0, 0, .2), 0 1px 5px rgba(0, 0, 0, .12);
|
||||
height: 110px;
|
||||
-moz-animation: bounce 2s infinite;
|
||||
-webkit-animation: bounce 2s infinite;
|
||||
animation: bounce 2s infinite;
|
||||
}
|
||||
|
||||
@-webkit-keyframes bounce {
|
||||
0%, 20%, 50%, 80%, 100% {
|
||||
padding-bottom:0;
|
||||
}
|
||||
40% {
|
||||
padding-bottom:15px;
|
||||
}
|
||||
60% {
|
||||
padding-bottom:10px;
|
||||
}
|
||||
}
|
||||
@keyframes bounce {
|
||||
0%, 20%, 50%, 80%, 100% {
|
||||
padding-bottom:0;
|
||||
}
|
||||
40% {
|
||||
padding-bottom:15px;
|
||||
}
|
||||
60% {
|
||||
padding-bottom:10px;
|
||||
}
|
||||
}
|
||||
|
||||
/*Bild ZooomIN*/
|
||||
.imgContaienr {
|
||||
margin: 10px -10px;
|
||||
overflow: auto;
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
.imgContaienr img {
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
cursor: zoom-in;
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
img.zoomedin {
|
||||
max-height: inherit;
|
||||
max-width: inherit;
|
||||
cursor: zoom-out;
|
||||
}
|
|
@ -16,7 +16,7 @@ function checkFolder($dir)
|
|||
$dir = str_replace('../', '', $dir);
|
||||
$parts = explode('/', $dir);
|
||||
//print_r($parts);
|
||||
if ($parts[0] == 'Files')
|
||||
if ($parts[1] == 'Files')
|
||||
{
|
||||
return true;
|
||||
} else
|
||||
|
@ -61,21 +61,36 @@ if (isset($_GET['json']))
|
|||
header('Location: index.php?json&folder=' . str_replace(end($folders), '', str_replace('/..', '', $get_url)), true, 301);
|
||||
}
|
||||
$dir = $get_url;
|
||||
if (strpos(substr($dir, 0, 6), 'Files/') !== false) $dir = substr($dir, 6);
|
||||
//echo substr($dir, 0, 14);
|
||||
//var_dump(strpos(substr($dir, 0, 14), 'content/Files/'));
|
||||
if (strpos(substr($dir, 0, 14), 'content/Files/') !== false) $dir = substr($dir, 14);
|
||||
$dir = str_replace('..', '', $dir);
|
||||
$dir = '../../Files/' . str_replace('../', '', $dir) . '/';
|
||||
//echo $dir.'|';
|
||||
$dir = '../../content/Files/' . str_replace('../', '', $dir) . '/';
|
||||
//echo $dir;
|
||||
} else
|
||||
{
|
||||
$dir = '../../Files/';
|
||||
$dir = '../../content/Files/';
|
||||
}
|
||||
|
||||
$dir = str_replace('//', '/', $dir);
|
||||
|
||||
//If the folder doesn't exist, create it
|
||||
if($dir == '../../content/Files/')
|
||||
{
|
||||
if(!file_exists($dir))
|
||||
{
|
||||
if(!mkdir($dir)) echo 'An Error occured while trying to create '.$dir.'. Please make sure the webserver is allowed to write to /content.';
|
||||
}
|
||||
}
|
||||
|
||||
$files['url'] = $dir;
|
||||
$files['displayUrl'] = str_replace('../', '', cleanUrl($dir));
|
||||
|
||||
//Verzeichnisse
|
||||
//Wenn man nicht im root-verzeichnis ist, soll .. als ordner angezeigt werden, um auch zurückzukommen
|
||||
//if($dir != '../../Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '', 'icon' => 'folder'];
|
||||
if (cleanUrl($dir) != '../../Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '-', 'icon' => 'folder'];
|
||||
//if($dir != '../../content/Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '', 'icon' => 'folder'];
|
||||
if (cleanUrl($dir) != '../../content/Files/') $files['files'][] = ['name' => '..', 'date' => '', 'type' => 'Ordner', 'size' => '-', 'icon' => 'folder'];
|
||||
|
||||
$handle = opendir($dir) or die (http_response_code(404));
|
||||
while (false !== ($datei = readdir($handle)))
|
||||
|
@ -162,6 +177,7 @@ elseif (isset($_GET['del'], $_POST['file']))
|
|||
if (rrmdir('../../' . $_POST['file']))
|
||||
{
|
||||
echo 'success';
|
||||
stream_message('{user} deleted the folder "{extra}".', 3, $_POST['file']);
|
||||
} else
|
||||
{
|
||||
echo 'fail';
|
||||
|
@ -171,6 +187,7 @@ elseif (isset($_GET['del'], $_POST['file']))
|
|||
if (unlink('../../' . $_POST['file']))
|
||||
{
|
||||
echo 'success';
|
||||
stream_message('{user} deleted the file "{extra}".', 3, $_POST['file']);
|
||||
} else
|
||||
{
|
||||
echo 'fail';
|
||||
|
@ -208,6 +225,7 @@ elseif (isset($_GET['upload']))
|
|||
if (move_uploaded_file($_FILES['file']['tmp_name'], '../../' . $_GET['upload'] . $filename))
|
||||
{
|
||||
echo 'success';
|
||||
stream_message('{user} uploaded the file "{extra}".', 3, $filename);
|
||||
} else
|
||||
{
|
||||
echo 'fail';
|
||||
|
@ -229,6 +247,7 @@ elseif (isset($_GET['newFolder']))
|
|||
if (mkdir('../../' . $_POST['dir'] . str_replace(' ', '-', $_POST['name'])))
|
||||
{
|
||||
echo 'success';
|
||||
stream_message('{user} created the folder "{extra}".', 3, $_POST['name']);
|
||||
} else
|
||||
{
|
||||
echo 'fail';
|
||||
|
@ -246,8 +265,6 @@ else
|
|||
{
|
||||
printHeader($lang->get('files_title'));
|
||||
}
|
||||
if (isset($_SESSION['user']))
|
||||
{
|
||||
if (hasPerm('manage_files'))
|
||||
{
|
||||
?>
|
||||
|
@ -326,9 +343,9 @@ if (isset($_SESSION['user']))
|
|||
url: webUri + 'apps/Files/index.php?ajax&json&folder=' + folder,
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
msgDo(' ');
|
||||
if (folder == '') folder = 'Files';
|
||||
if (data.displayUrl == 'Files/') {
|
||||
msgDo(' ');
|
||||
if (folder == '') folder = 'content/Files/';
|
||||
if (data.displayUrl == 'content/Files/') {
|
||||
$('#delFolder').hide();
|
||||
}
|
||||
else {
|
||||
|
@ -339,12 +356,13 @@ if (isset($_SESSION['user']))
|
|||
}
|
||||
|
||||
$('#files').html('<h3 id="displayUrl">' + data.displayUrl + '</h3><table id="filesList" width="100%"><thead><tr><th><?php echo $lang->get('files_filename'); ?></th><th><?php echo $lang->get('files_last_modified'); ?></th><th><?php echo $lang->get('files_filetype'); ?></th><th><?php echo $lang->get('files_filesize'); ?></th></tr></thead><tbody id="filesContent"></tbody></table><div id="extra"></div>');
|
||||
var i = 0;
|
||||
$.each(data.files, function () {
|
||||
/*if (this.type == 'Ordner') {
|
||||
var name = '<a href="#folder=' + data.displayUrl + this.name + '"><i class="fa fa-' + this.icon + '"></i> ' + this.name;
|
||||
} else// onclick="openFile(\'' + this.name + '\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"*/
|
||||
if (this.name == '..') {
|
||||
var name = '<a onclick="openFile(\'..\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"><i class="fa fa-' + this.icon + '"></i> ' + this.name;
|
||||
var name = '<a onclick="openFile(\'..\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"><i class="fa fa-' + this.icon + '"></i> ' + this.name + ' [<?php echo $lang->get('back')?>]';
|
||||
} else {
|
||||
var name = '<a onclick="openFile(\'' + this.name + '\', \'' + this.icon + '\', \'' + webUri + data.displayUrl + this.name + '\');"><i class="fa fa-' + this.icon + '"></i> ' + this.name;
|
||||
}
|
||||
|
@ -355,7 +373,13 @@ if (isset($_SESSION['user']))
|
|||
}
|
||||
//$('#filesContent').append('<tr><td>' + name + '</td><td>' + this.date + '</td><td>' + this.type + '</td><td>' + this.size + '</td></tr>');
|
||||
filesContent += '<tr' + static_folder + '><td>' + name + '</td><td>' + this.date + '</td><td>' + this.type + '</td><td>' + this.size + '</td></tr>';
|
||||
i++;
|
||||
});
|
||||
|
||||
//If the folder is empty
|
||||
if(i<2) {
|
||||
$('#files').append('<div style="text-align: center"><?php echo $lang->get('files_folder_empty'); ?></div>');
|
||||
}
|
||||
},
|
||||
timeout: 5000,
|
||||
error: function (jqXHR, status, errorThrown) {
|
||||
|
@ -437,6 +461,14 @@ if (isset($_SESSION['user']))
|
|||
}, 300);
|
||||
}
|
||||
|
||||
window.onclick = function(event) {
|
||||
if(event.target.parentElement != null) {
|
||||
if (event.target.parentElement.id == 'extra') {
|
||||
closeW();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function uploadFileBtn() {
|
||||
$("#upbutton").click();
|
||||
}
|
||||
|
@ -685,5 +717,4 @@ if (isset($_SESSION['user']))
|
|||
echo msg('info', 'Fehlende Berechtigung. {back}');
|
||||
}
|
||||
require_once '../../inc/footer.php';
|
||||
}
|
||||
?>
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* Files apps
|
||||
* Files app
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
|
@ -35,7 +35,7 @@ $lang['files_create_dir_success'] = 'Der neue Ordner wurde erfolgreich erstellt.
|
|||
$lang['files_create_dir_fail'] = 'Fehler beim Erstellen des Ordners.';
|
||||
$lang['files_delete_file'] = 'löschen';
|
||||
$lang['files_delete_dir_confirm'] = 'Ordner wirklich löschen? Dies wird den gesamten Ordner mit Inhalt löschen! <b>Dieser Vorgang kann nicht rückgängig gemacht werden!</b>';
|
||||
$lang['files_delete_file_confirm'] = 'Datei wirklich löschen? <b>Dieser Vorgang kann nicht rückgängig gemacht werden!';
|
||||
$lang['files_delete_file_confirm'] = 'Datei wirklich löschen? <b>Dieser Vorgang kann nicht rückgängig gemacht werden!</b>';
|
||||
$lang['files_deleting_folder'] = 'Lösche Ordner...';
|
||||
$lang['files_deleting_file'] = 'Lösche Datei...';
|
||||
$lang['files_delete_dir_success'] = 'Der Ordner wurde erfolgreich gelöscht.';
|
||||
|
@ -44,4 +44,18 @@ $lang['files_delete_error'] = 'Fehler beim Löschen der Datei.';
|
|||
$lang['files_too_large_file'] = 'Die ausgewählte Datei ist zu groß!';
|
||||
$lang['files_processing'] = 'Datei wird verarbeitet...';
|
||||
$lang['files_upload_finished'] = 'Upload abgeschlossen.';
|
||||
$lang['files_upload_failed'] = 'Upload fehlgeschlagen.';
|
||||
$lang['files_upload_failed'] = 'Upload fehlgeschlagen.';
|
||||
$lang['files_folder_empty'] = 'Dieser Ordner ist leer. Lade Dateien hoch, um in zu füllen!';
|
||||
|
||||
//Stream Messages
|
||||
$lang['files_stream_deleted_folder'] = '{user} hat den Ordner "{extra}" gelöscht.';
|
||||
$lang['files_stream_deleted_file'] = '{user} hat die Datei "{extra}" gelöscht.';
|
||||
$lang['files_stream_uploaded'] = '{user} hat die Datei "{extra}" hochgeladen.';
|
||||
$lang['files_stream_created_folder'] = '{user} hat den Ordner "{extra}" erstellt.';
|
||||
|
||||
//Permissions
|
||||
$lang['file_perm_manage_files_name'] = 'Dateien verwalten';
|
||||
$lang['file_perm_manage_files_description'] = 'Dateien ansehen & verwalten';
|
||||
$lang['file_perm_upload_name'] = 'Dateien hochladen';
|
||||
$lang['file_perm_create_folder_name'] = 'Neuen Ordner erstellen';
|
||||
$lang['file_perm_delete_name'] = 'Dateien löschen';
|
|
@ -12,7 +12,7 @@ $lang['__Lang__'] = 'English (English)';
|
|||
$lang['__LangCode__'] = 'en';
|
||||
$lang['__Countrycode__'] = 'en';
|
||||
|
||||
$lang['files_title'] = 'File';
|
||||
$lang['files_title'] = 'Files';
|
||||
$lang['files_drag_drop_area'] = 'Drag and drop Files here to upload in the current folder.';
|
||||
$lang['files_upload'] = 'Upload';
|
||||
$lang['files_create_dir'] = 'Create New Folder';
|
||||
|
@ -44,4 +44,18 @@ $lang['files_delete_error'] = 'An error occured while deleting this file.';
|
|||
$lang['files_too_large_file'] = 'This file is too big!';
|
||||
$lang['files_processing'] = 'Processing file...';
|
||||
$lang['files_upload_finished'] = 'Upload finished.';
|
||||
$lang['files_upload_failed'] = 'Upload failed.';
|
||||
$lang['files_upload_failed'] = 'Upload failed.';
|
||||
$lang['files_folder_empty'] = 'This Folder is empty. Upload Files to fill it!';
|
||||
|
||||
//Stream Messages
|
||||
$lang['files_stream_deleted_folder'] = '{user} deleted the folder "{extra}".';
|
||||
$lang['files_stream_deleted_file'] = '{user} deleted the file "{extra}".';
|
||||
$lang['files_stream_uploaded'] = '{user} uploaded the file "{extra}".';
|
||||
$lang['files_stream_created_folder'] = '{user} created the folder "{extra}".';
|
||||
|
||||
//Permissions
|
||||
$lang['file_perm_manage_files_name'] = 'Manage Files';
|
||||
$lang['file_perm_manage_files_description'] = 'Manage and view Files';
|
||||
$lang['file_perm_upload_name'] = 'Upload Files';
|
||||
$lang['file_perm_create_folder_name'] = 'Create a new Directory';
|
||||
$lang['file_perm_delete_name'] = 'Delete Files';
|
|
@ -2,25 +2,25 @@
|
|||
"permissions": [
|
||||
{
|
||||
"key": "manage_files",
|
||||
"name": "Dateien verwalten",
|
||||
"description": "Dateien ansehen & verwalten",
|
||||
"name": "file_perm_manage_files_name",
|
||||
"description": "Manage and view Files",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "upload",
|
||||
"name": "Dateien hochladen",
|
||||
"name": "Upload Files",
|
||||
"description": "",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "create_folder",
|
||||
"name": "Neuen Ordner erstellen",
|
||||
"name": "Create a new Directory",
|
||||
"description": "",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "delete",
|
||||
"name": "Dateien löschen",
|
||||
"name": "Delete Files",
|
||||
"description": "",
|
||||
"critical": false
|
||||
}
|
||||
|
|
132
apps/Navigation/action.php
Executable file
132
apps/Navigation/action.php
Executable file
|
@ -0,0 +1,132 @@
|
|||
<?php
|
||||
require_once '../../inc/autoload.php';
|
||||
|
||||
$success = false;
|
||||
|
||||
if (is_loggedin())
|
||||
{
|
||||
//Save items
|
||||
if (isset($_GET['save']))
|
||||
{
|
||||
if (hasPerm('edit_nav'))
|
||||
{
|
||||
$db->setCol('nav_nav');
|
||||
foreach ($_POST['navID'] as $order => $id)
|
||||
{
|
||||
$db->data['nav_order'] = $order;
|
||||
$success = $db->update(['id' => $id]);
|
||||
}
|
||||
|
||||
//Stream Message
|
||||
stream_message('{user} edited a nav entry ({extra})', 3, $id);
|
||||
}
|
||||
}
|
||||
|
||||
//Delete Items
|
||||
if (isset($_GET['del']))
|
||||
{
|
||||
if (hasPerm('edit_nav'))
|
||||
{
|
||||
if (isset($_POST['id']) && is_numeric(intval($_POST['id'])))
|
||||
{
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['id'] = $_POST['id'];
|
||||
$success = $db->delete();
|
||||
|
||||
//Find all childs
|
||||
$childs = [];
|
||||
function findChilds($parent)
|
||||
{
|
||||
global $db, $childs;
|
||||
foreach ($parent as $site)
|
||||
{
|
||||
$childs[] = $site['id'];
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['parent'] = $site['id'];
|
||||
$db->get();
|
||||
$navd = $db->data;
|
||||
if (!empty($navd))
|
||||
{
|
||||
findChilds($navd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['parent'] = $_POST['id'];
|
||||
$db->get();
|
||||
findChilds($db->data);
|
||||
|
||||
$db->setCol('nav_nav');
|
||||
foreach ($childs as $child)
|
||||
{
|
||||
$db->data['id'] = $child;
|
||||
$success = $db->delete();
|
||||
}
|
||||
|
||||
//Stream Message
|
||||
stream_message('{user} deleted a nav entry ({extra})', 3, $_POST['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Create Items
|
||||
if (isset($_GET['create']))
|
||||
{
|
||||
if (hasPerm('edit_nav'))
|
||||
{
|
||||
if (isset($_POST['title'], $_POST['page'], $_POST['parent']))
|
||||
{
|
||||
if (is_numeric(intval($_POST['page'])) && is_numeric(intval($_POST['parent'])) && is_string(strval($_POST['title'])))
|
||||
{
|
||||
$pageval = $_POST['page'];
|
||||
$send_ready = true;
|
||||
if ($_POST['external'] !== '')
|
||||
{
|
||||
if (filter_var($_POST['external'], FILTER_VALIDATE_URL) === false)
|
||||
{
|
||||
$send_ready = false;
|
||||
echo 'url_invalid';
|
||||
}
|
||||
$pageval = 0;
|
||||
}
|
||||
|
||||
if ($send_ready)
|
||||
{
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['title'] = $_POST['title'];
|
||||
$db->data['page'] = $pageval;
|
||||
$db->data['external'] = $_POST['external'];
|
||||
$db->data['parent'] = $_POST['parent'];
|
||||
$success = $db->insert();
|
||||
|
||||
//Stream Message
|
||||
stream_message('{user} created a nav entry ({extra})', 3, $_POST['page']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Update Parents
|
||||
if (isset($_GET['update']))
|
||||
{
|
||||
if (isset($_POST['id'], $_POST['parent']))
|
||||
{
|
||||
if (is_numeric(intval($_POST['id'])) && is_numeric(intval($_POST['parent'])) && $_POST['parent'] != $_POST['id'])
|
||||
{
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['parent'] = $_POST['parent'];
|
||||
$success = $db->update(['id' => $_POST['id']]);
|
||||
|
||||
//Stream Message
|
||||
stream_message('{user} edited a nav entry ({extra})', 3, $_POST['id']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($success)
|
||||
{
|
||||
echo 'success';
|
||||
}
|
14
apps/Navigation/config.php
Executable file
14
apps/Navigation/config.php
Executable file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
$_CONF['app_name'] = 'Navigation';
|
||||
$_CONF['app_build'] = 2;
|
||||
$_CONF['app_version'] = 'v0.91 Beta';
|
||||
$_CONF['base_file'] = 'nav.php';
|
||||
$_CONF['type'] = 'static';
|
||||
$_CONF['install'] = 'install.php';
|
||||
|
||||
$_CONF['menu_top'] = '<i class="fa fa-bars"></i> ' . $lang->get('nav_title');
|
||||
$_CONF['menu'] = ['menu_top' => 'index.php'];
|
||||
|
||||
$_CONF['css'] = ['css/nav.css'];
|
||||
|
||||
$_CONF['dependencies'] = ['apps' => ['SimplePages']];
|
123
apps/Navigation/css/nav.css
Executable file
123
apps/Navigation/css/nav.css
Executable file
|
@ -0,0 +1,123 @@
|
|||
.pseudo-table{
|
||||
display: table;
|
||||
|
||||
box-shadow: 1px 1px 2px 0 rgba(0, 0, 0, .14);
|
||||
border: 1px solid #E0E0E0;
|
||||
border-collapse: collapse;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
margin: 15px 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.pseudo-table .row{
|
||||
display: table-row;
|
||||
|
||||
padding: 0 5px;
|
||||
cursor: hand;
|
||||
}
|
||||
|
||||
.pseudo-table .row{
|
||||
border-bottom: 1px solid #E0E0E0;
|
||||
padding: 0 5px 0 0;
|
||||
transition: 0.1s ease;
|
||||
-webkit-transition: 0.1s ease;
|
||||
|
||||
margin: 0 -15px 0 0 !important;
|
||||
}
|
||||
|
||||
.pseudo-table .row:hover{
|
||||
background: #EEEEEE;
|
||||
}
|
||||
|
||||
.pseudo-table .row:last-child{
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.pseudo-table .top{
|
||||
text-align: left;
|
||||
padding: 10px;
|
||||
background: rgb(246, 246, 246);
|
||||
}
|
||||
|
||||
.pseudo-table .col{
|
||||
display: table-cell;
|
||||
|
||||
padding: 10px 5px 10px 10px;
|
||||
}
|
||||
|
||||
.sortable-placeholder{
|
||||
width: 100%;
|
||||
height: 41px;
|
||||
}
|
||||
|
||||
.row{
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.col i{
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
/*Window*/
|
||||
.overlay {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.window {
|
||||
width: 100%;
|
||||
max-width: 984px;
|
||||
left: calc((50vw - 366px));
|
||||
top: 40px;
|
||||
background: #fff;
|
||||
padding: 10px 10px 20px;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
|
||||
z-index: 1;
|
||||
border-radius: 2px;
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
max-height: calc(100vh - 80px);
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.window .head {
|
||||
margin: -10px -10px 20px;
|
||||
padding: 10px 10px;
|
||||
background: #eaeaea;
|
||||
border-radius: 2px 2px 0 0;
|
||||
-moz-user-select: -moz-none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: default;
|
||||
position: fixed;
|
||||
width: 984px;
|
||||
}
|
||||
|
||||
.window .head .closeMsg {
|
||||
color: #212121;
|
||||
}
|
||||
|
||||
.window .head .closeMsg:hover {
|
||||
color: #5d5d5d;
|
||||
}
|
||||
|
||||
.window #content {
|
||||
margin-top: 60px;
|
||||
}
|
||||
|
||||
.window-confirm, .window-confirm .head {
|
||||
width: 350px;
|
||||
text-align: center;
|
||||
left: calc(50vw - 175px);
|
||||
}
|
||||
|
||||
.window-confirm .head {
|
||||
margin: -10px -10px 10px 0;
|
||||
text-align: left;
|
||||
}
|
173
apps/Navigation/index.php
Executable file
173
apps/Navigation/index.php
Executable file
|
@ -0,0 +1,173 @@
|
|||
<?php
|
||||
require_once '../../inc/autoload.php';
|
||||
printHeader($lang->get('nav_title'));
|
||||
|
||||
//Get all pages and build a dropdown list
|
||||
$pages = '';
|
||||
$db->setCol('simplePages_pages');
|
||||
$db->get();
|
||||
foreach ($db->data as $page)
|
||||
{
|
||||
$pages .= '<option value="' . $page['id'] . '">' . $page['title'] . '</option>';
|
||||
}
|
||||
|
||||
function getParents($exclude = null)
|
||||
{
|
||||
global $db;
|
||||
//Get all parents and build a dropdown list
|
||||
$parents = '<option value="0">--</option>';
|
||||
$db->setCol('nav_nav');
|
||||
$db->get(null, null, 'nav_order');
|
||||
$parentdata = $db->data;
|
||||
foreach ($parentdata as $parent)
|
||||
{
|
||||
if((isset($exclude) && $parent['id'] !== $exclude) || !isset($exclude))
|
||||
{
|
||||
//If we don't have a parent from the Nav itself, take the page's title
|
||||
if ($parent['title'] === '')
|
||||
{
|
||||
$db->setCol('simplePages_pages');
|
||||
$db->data['id'] = $parent['page'];
|
||||
$db->get();
|
||||
if (isset($db->data[0]))
|
||||
{
|
||||
$parents .= '<option value="' . $parent['id'] . '">' . $db->data[0]['title'] . '</option>';
|
||||
}
|
||||
} else
|
||||
{
|
||||
$parents .= '<option value="' . $parent['id'] . '">' . $parent['title'] . '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $parents;
|
||||
}
|
||||
|
||||
//Show
|
||||
function buildNav($nav, $lvl = 0)
|
||||
{
|
||||
global $db;
|
||||
foreach ($nav as $site)
|
||||
{
|
||||
//Reset level
|
||||
if ($site['parent'] == 0)
|
||||
{
|
||||
$lvl = 0;
|
||||
}
|
||||
|
||||
echo '<div class="row" id="navID_' . $site['id'] . '">';
|
||||
$pageUrl = '#';
|
||||
$db->setCol('simplePages_pages');
|
||||
$db->data['id'] = $site['page'];
|
||||
$db->get();
|
||||
|
||||
$title = $site['title'];
|
||||
if ($title == '') $title = $db->data[0]['title'];
|
||||
|
||||
//Display Level
|
||||
echo '<div class="col"><i class="fa fa-bars" aria-hidden="true" style="color: #ccc;"></i> ';
|
||||
for ($i = 1; $i <= $lvl; $i++)
|
||||
{
|
||||
echo ' ';
|
||||
}
|
||||
|
||||
$title = $site['title'];
|
||||
if ($title == '') $title = $db->data[0]['title'];
|
||||
|
||||
echo $title . '</div><div class="col">';
|
||||
|
||||
//Don't show edit-link if the entry is external
|
||||
if($site['external'] === '')
|
||||
{
|
||||
echo '<a href="../SimplePages/backend/edit.php?id=' . $site['page'] . '"><i class="fa fa-pencil" aria-hidden="true"></i> ' . $db->data[0]['title'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo substr($site['external'], 0, 30);
|
||||
if(strlen($site['external']) > 30) echo '...';
|
||||
}
|
||||
|
||||
echo '</div>
|
||||
<div class="col"><select id="parentChange_' . $site['id'] . '" data-nav-id="' . $site['id'] . '" onchange="update(\'' . $site['id'] . '\')">' . str_replace('value="' . $site['parent'] . '"', 'value="' . $site['parent'] . '" selected', getParents($site['id'])) . '</select></div>
|
||||
<div class="col"><a onclick="del(' . $site['id'] . ');" class="del" title="' . $GLOBALS['lang']->get('nav_delete') . '"><i class="fa fa-trash-o" aria-hidden="true"></i></a></div>';
|
||||
|
||||
echo "</div>\n";
|
||||
|
||||
//Look for childs
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['parent'] = $site['id'];
|
||||
$db->get(null, null, 'nav_order');
|
||||
$navd = $db->data;
|
||||
if (!empty($navd))
|
||||
{
|
||||
$lvl++;
|
||||
buildNav($navd, $lvl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (hasPerm('edit_nav'))
|
||||
{
|
||||
?>
|
||||
<div class="main">
|
||||
<p><i class="fa fa-info-circle"></i> <?php echo $lang->get('nav_drag') ?></p>
|
||||
<p><a onclick="createItem();" class="button"><i class="fa fa-plus"
|
||||
aria-hidden="true"></i> <?php echo $lang->get('nav_create'); ?>
|
||||
</a></p>
|
||||
<div id="sortable" class="pseudo-table">
|
||||
<div class="row top" id="top notSort">
|
||||
<div class="col"><?php echo $lang->get('nav_pageTitle') ?></div>
|
||||
<div class="col"><?php echo $lang->get('nav_page') ?></div>
|
||||
<div class="col"><?php echo $lang->get('nav_parent') ?></div>
|
||||
<div class="col"><?php echo $lang->get('nav_action') ?></div>
|
||||
</div>
|
||||
<?php
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['parent'] = 0;
|
||||
$db->get(null, null, 'nav_order');
|
||||
buildNav($db->data);
|
||||
?>
|
||||
</div>
|
||||
<div id="extra"></div>
|
||||
</div>
|
||||
|
||||
<script src="js/jquery-ui.js"></script>
|
||||
<script src="js/nav.js"></script>
|
||||
<script>
|
||||
//Create Dropdowns
|
||||
var parents = '<?php echo getParents();?>';
|
||||
var pages = '<?php echo $pages;?>';
|
||||
//Make Language Strings available in JS
|
||||
var lang = {
|
||||
nav_saved_success: '<?php echo $lang->get('nav_saved_success') ?>',
|
||||
nav_saved_fail: '<?php echo $lang->get('nav_saved_fail') ?>',
|
||||
nav_delete: '<?php echo $lang->get('nav_delete') ?>',
|
||||
nav_delete_confirm: '<?php echo $lang->get('nav_delete_confirm') ?>',
|
||||
nav_delete_confirm_yes: '<?php echo $lang->get('nav_delete_confirm_yes') ?>',
|
||||
nav_delete_confirm_abort: '<?php echo $lang->get('nav_delete_confirm_abort') ?>',
|
||||
nav_deleted_success: '<?php echo $lang->get('nav_deleted_success') ?>',
|
||||
nav_deleted_fail: '<?php echo $lang->get('nav_deleted_fail') ?>',
|
||||
nav_create: '<?php echo $lang->get('nav_create') ?>',
|
||||
nav_create_title: '<?php echo $lang->get('nav_create_title') ?>',
|
||||
nav_create_title_noptoption: '<?php echo $lang->get('nav_create_title_noptoption') ?>',
|
||||
nav_create_page: '<?php echo $lang->get('nav_create_page') ?>',
|
||||
nav_create_parents: '<?php echo $lang->get('nav_create_parents') ?>',
|
||||
nav_create_create: '<?php echo $lang->get('nav_create_create') ?>',
|
||||
nav_create_abort: '<?php echo $lang->get('nav_create_abort') ?>',
|
||||
nav_create_success: '<?php echo $lang->get('nav_create_success') ?>',
|
||||
nav_create_fail: '<?php echo $lang->get('nav_create_fail') ?>',
|
||||
nav_update_success: '<?php echo $lang->get('nav_update_success') ?>',
|
||||
nav_update_fail: '<?php echo $lang->get('nav_update_fail') ?>',
|
||||
not_found: '<?php echo $lang->get('404_not_found') ?>',
|
||||
nav_create_external_url_invalid: '<?php echo $lang->get('nav_create_external_url_invalid') ?>',
|
||||
nav_create_external_needs_title: '<?php echo $lang->get('nav_create_external_needs_title') ?>',
|
||||
nav_create_external: '<?php echo $lang->get('nav_create_external') ?>',
|
||||
nav_create_external_input: '<?php echo $lang->get('nav_create_external_input') ?>'
|
||||
};
|
||||
</script>
|
||||
<?php
|
||||
} else
|
||||
{
|
||||
echo msg('info', 'missing_permission');
|
||||
}
|
||||
require_once '../../inc/footer.php';
|
30
apps/Navigation/install-dev.php
Executable file
30
apps/Navigation/install-dev.php
Executable file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
if(isset($_POST['submit']))
|
||||
{
|
||||
if($db->query('CREATE TABLE `' . $_POST['db_prefix'] . 'nav_nav` (
|
||||
`id` int(11) NOT NULL,
|
||||
`title` text CHARACTER SET latin1 NOT NULL,
|
||||
`page` int(11) NOT NULL,
|
||||
`parent` int(11) NOT NULL,
|
||||
`nav_order` int(11) NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
|
||||
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav` ADD external VARCHAR(300) NULL;
|
||||
ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav`
|
||||
MODIFY COLUMN external VARCHAR(300) AFTER page;
|
||||
'))
|
||||
{
|
||||
echo msg('success', 'Navigation was installed successfully.');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', 'An error occured while installing Navigation.');
|
||||
exit;
|
||||
}
|
||||
}
|
18706
apps/Navigation/js/jquery-ui.js
vendored
Executable file
18706
apps/Navigation/js/jquery-ui.js
vendored
Executable file
File diff suppressed because it is too large
Load Diff
192
apps/Navigation/js/nav.js
Executable file
192
apps/Navigation/js/nav.js
Executable file
|
@ -0,0 +1,192 @@
|
|||
//Create the Spinner
|
||||
$('#title').append('<div class="spinner-container" style="display:inline-block;vertical-align: middle;padding: 0px 10px;"><svg class="spinner" style="width: 25px;" viewBox="0 0 44 44"><circle class="path" cx="22" cy="22" r="20" fill="none" stroke-width="4"></circle></svg></div>');
|
||||
//Hide it
|
||||
$('.spinner-container').hide();
|
||||
|
||||
$(function () {
|
||||
$("#sortable").sortable({
|
||||
axis: "y",
|
||||
cursor: "move",
|
||||
items: 'div:not(.top).row',
|
||||
placeholder: "sortable-placeholder",
|
||||
over: function (event, ui) {
|
||||
console.log(event, ui)
|
||||
},
|
||||
stop: function (event, ui) {// When finished sorting, send all data to the server to process
|
||||
$('.spinner-container').show(); //Show loader
|
||||
$.ajax({
|
||||
url: 'action.php?save',
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
data: $("#sortable").sortable("serialize"), //Get the newly sorted array
|
||||
success: function (result) { // On success, display a message..
|
||||
if (result == 'success') {
|
||||
showMsg(lang.nav_saved_success);
|
||||
} else {
|
||||
showMsg(lang.nav_saved_fail);
|
||||
}
|
||||
|
||||
//And reload the content. We do this to display everything including their childs
|
||||
reloadNav();
|
||||
|
||||
$('.spinner-container').hide(); //Hide the Loader
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.log(status, error);
|
||||
showMsg(lang.nav_saved_fail);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//Delete
|
||||
function del(id) {
|
||||
|
||||
$('#extra').html('<div class="overlay" style="display:none;"><div class="window window-confirm"><div class="head">' + lang.nav_delete + '<a onclick="closeW();" class="closeMsg"><i class="fa fa-close"></i></a></div><div id="content"><p>' + lang.nav_delete_confirm + '</p><p><a class="button btn_del" id="deleteConfirm"><i class="fa fa-trash-o"></i> ' + lang.nav_delete_confirm_yes + '</a><a onclick="closeW();" class="button">' + lang.nav_delete_confirm_abort + '</a></p></div></div></div>');
|
||||
//uuund einbelnden
|
||||
$(".overlay").fadeIn(250);
|
||||
|
||||
$('#deleteConfirm').click(function () {
|
||||
closeW();
|
||||
$.ajax({
|
||||
url: 'action.php?del',
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
data: 'id=' + id,
|
||||
success: function (result) { // On success, display a message...
|
||||
console.log(result);
|
||||
if (result == 'success') {
|
||||
showMsg(lang.nav_deleted_success);
|
||||
} else {
|
||||
showMsg(lang.nav_deleted_fail);
|
||||
}
|
||||
|
||||
//...and reload the content. We do this to display everything including their childs
|
||||
reloadNav();
|
||||
|
||||
$('.spinner-container').hide(); //Hide the Loader
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.log(status, error);
|
||||
showMsg(lang.nav_deleted_fail);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//Create menuitem
|
||||
function createItem() {
|
||||
$('#extra').html('<div class="overlay" style="display:none;"><div class="window window-confirm"><div class="head">' + lang.nav_create + '<a onclick="closeW();" class="closeMsg"><i class="fa fa-close"></i></a></div><div id="content"><p><input type="text" name="nav_title" id="nav_title" placeholder="' + lang.nav_create_title + '"/></p><p>' + lang.nav_create_page + ' <input type="checkbox" id="externalCheck"/><label for="externalCheck"><i></i>' + lang.nav_create_external + ' </label> <select name="nav_page" id="nav_page">' + pages + '</select><input type="text" name="nav_external" id="nav_external" style="display: none;" placeholder="' + lang.nav_create_external_input + '"/></p><p>' + lang.nav_create_parents + ': <select name="nav_parent" id="nav_parent">' + parents + '</select></p><p><a class="button" id="createConfirm"><i class="fa fa-plus"></i> ' + lang.nav_create_create + '</a><a onclick="closeW();" class="button btn_del">' + lang.nav_create_abort + '</a></p></div></div></div>');
|
||||
$(".overlay").fadeIn(250);
|
||||
|
||||
//Check for checked
|
||||
$('#externalCheck').change(function () {
|
||||
if (this.checked) {
|
||||
$('#nav_page').hide();
|
||||
$('#nav_external').show().focus();
|
||||
$('#nav_title').attr('placeholder', lang.nav_create_title_noptoption);
|
||||
} else {
|
||||
$('#nav_page').show();
|
||||
$('#nav_external').hide();
|
||||
$('#nav_title').attr('placeholder', lang.nav_create_title);
|
||||
}
|
||||
});
|
||||
|
||||
//Send
|
||||
$('#createConfirm').click(function () {
|
||||
|
||||
var external = $('#nav_external').val();
|
||||
var sendReady = true;
|
||||
if ($('#externalCheck').is(':checked')) {
|
||||
if ($('#nav_title').val() == '') {
|
||||
sendReady = false;
|
||||
showMsg(lang.nav_create_external_needs_title);
|
||||
}
|
||||
}
|
||||
|
||||
//Send
|
||||
if (sendReady) {
|
||||
$.ajax({
|
||||
url: 'action.php?create',
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
data: 'title=' + $('#nav_title').val() + '&page=' + $('#nav_page').val() + '&parent=' + $('#nav_parent').val() + '&external=' + external,
|
||||
success: function (result) { // On success, display a message...
|
||||
if (result == 'success') {
|
||||
showMsg(lang.nav_create_success);
|
||||
reloadNav();//...and reload the content. We do this to display everything properly including their childs
|
||||
} else if(result == 'url_invalid') {
|
||||
showMsg(lang.nav_create_external_url_invalid);
|
||||
$('#nav_external').focus();
|
||||
} else {
|
||||
showMsg(lang.nav_create_fail);
|
||||
reloadNav();//...and reload the content. We do this to display everything properly including their childs
|
||||
}
|
||||
|
||||
$('.spinner-container').hide(); //Hide the Loader
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
showMsg(lang.nav_create_fail);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function update(id) {
|
||||
var newParent = $('#parentChange_' + id).val();
|
||||
|
||||
$.ajax({
|
||||
url: 'action.php?update',
|
||||
type: 'POST',
|
||||
cache: false,
|
||||
data: 'id=' + id + '&parent=' + newParent,
|
||||
success: function (result) { // On success, display a message...
|
||||
if (result == 'success') {
|
||||
showMsg(lang.nav_update_success);
|
||||
} else {
|
||||
showMsg(lang.nav_update_fail);
|
||||
}
|
||||
|
||||
//...and reload the content. We do this to display everything including their childs
|
||||
reloadNav();
|
||||
|
||||
$('.spinner-container').hide(); //Hide the Loader
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
showMsg(lang.nav_update_fail);
|
||||
$('.spinner-container').hide(); //Hide the Loader
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Reload
|
||||
function reloadNav() {
|
||||
$.get('index.php?direct', function (data) {
|
||||
$("#loader").html(data);
|
||||
}).fail(function (e) {
|
||||
if (e.status == 404) {
|
||||
showMsg(lang.not_found + ' (' + e.statusText + ')');
|
||||
} else {
|
||||
showMsg('Error.');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//Close Window
|
||||
function closeW() {
|
||||
console.log('close');
|
||||
$(".overlay").fadeOut(200);
|
||||
setTimeout(function () {
|
||||
$('#extra').html('');
|
||||
}, 300);
|
||||
}
|
||||
|
||||
window.onclick = function (event) {
|
||||
if (event.target.parentElement != null) {
|
||||
if (event.target.parentElement.id == 'extra') {
|
||||
closeW();
|
||||
}
|
||||
}
|
||||
}
|
48
apps/Navigation/lang/lang.de.php
Executable file
48
apps/Navigation/lang/lang.de.php
Executable file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'German (Deutsch)';
|
||||
$lang['__LangCode__'] = 'de';
|
||||
$lang['__Countrycode__'] = 'de_DE';
|
||||
|
||||
$lang['nav_title'] = 'Navigation';
|
||||
$lang['nav_id'] = 'ID';
|
||||
$lang['nav_pageTitle'] = 'Titel';
|
||||
$lang['nav_page'] = 'Seite';
|
||||
$lang['nav_parent'] = 'Übergeordnet';
|
||||
$lang['nav_drag'] = 'Ziehen Sie Menüpunkte herum, um sie anzuordnen.';
|
||||
$lang['nav_saved_success'] = 'Die neue Reihenfolge wurde erfolgreich gespeichert.';
|
||||
$lang['nav_saved_fail'] = 'Beim Speichern der neuen Reihenfolge trat ein Fehler auf.';
|
||||
$lang['nav_action'] = 'Aktionen ausführen';
|
||||
$lang['nav_delete'] = 'Menüeintrag löschen';
|
||||
$lang['nav_deleted_success'] = 'Der Menüeintrag wurde erfolgreich gelöscht.';
|
||||
$lang['nav_deleted_fail'] = 'Beim Löschen des Menüeintrags trat ein Fehler auf.';
|
||||
$lang['nav_delete_confirm'] = 'Möchten Sie diesen Menüeintrag wirklich löschen?';
|
||||
$lang['nav_delete_confirm_yes'] = 'Löschen!';
|
||||
$lang['nav_delete_confirm_abort'] = 'Abbrechen';
|
||||
$lang['nav_create'] = 'Neuen Menüeintrag erstellen';
|
||||
$lang['nav_create_title'] = 'Titel (Optional)';
|
||||
$lang['nav_create_title_noptoption'] = 'Titel';
|
||||
$lang['nav_create_create'] = 'Erstellen';
|
||||
$lang['nav_create_abort'] = 'Abbrechen';
|
||||
$lang['nav_create_parents'] = 'Übergeordnet';
|
||||
$lang['nav_create_page'] = 'Seite';
|
||||
$lang['nav_create_success'] = 'Der neue Menüeintrag wurde erfolgreich angelegt.';
|
||||
$lang['nav_create_fail'] = 'Beim Anlegen des neuen Menüeintrags trat ein Fehler auf.';
|
||||
$lang['nav_update_success'] = 'Der Menüeintrag wurde erfolgreich geändert.';
|
||||
$lang['nav_update_fail'] = 'Beim Ändern des Menüeintrags trat ein Fehler auf.';
|
||||
$lang['nav_create_external'] = 'Extern';
|
||||
$lang['nav_create_external_input'] = 'Externe URL';
|
||||
$lang['nav_create_external_needs_title'] = 'Bitte geben Sie einen Titel an, wenn sie einen Externen Menüeinrag anlegen.';
|
||||
$lang['nav_create_external_url_invalid'] = 'Die angegebene URL ist ungültig.';
|
||||
|
||||
//Stream
|
||||
$lang['nav_stream_edited'] = '{user} hat einen Menüeintrag geändert ({extra})';
|
||||
$lang['nav_stream_deleted'] = '{user} hat einen Menüeintrag gelöscht ({extra})';
|
||||
$lang['nav_stream_created'] = '{user} hat einen Menüeintrag hinzugefügt ({extra})';
|
48
apps/Navigation/lang/lang.en.php
Executable file
48
apps/Navigation/lang/lang.en.php
Executable file
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'English (English)';
|
||||
$lang['__LangCode__'] = 'en';
|
||||
$lang['__Countrycode__'] = 'en';
|
||||
|
||||
$lang['nav_title'] = 'Navigation';
|
||||
$lang['nav_id'] = 'ID';
|
||||
$lang['nav_pageTitle'] = 'Title';
|
||||
$lang['nav_page'] = 'Page';
|
||||
$lang['nav_parent'] = 'Child of';
|
||||
$lang['nav_drag'] = 'Drag & Drop entries to arrange them.';
|
||||
$lang['nav_saved_success'] = 'The new order was successfully saved.';
|
||||
$lang['nav_saved_fail'] = 'An error occured while saving the new order.';
|
||||
$lang['nav_action'] = 'Action';
|
||||
$lang['nav_delete'] = 'Delete';
|
||||
$lang['nav_deleted_success'] = 'The item was successfully deleted.';
|
||||
$lang['nav_deleted_fail'] = 'An error occured while deleting this item.';
|
||||
$lang['nav_delete_confirm'] = 'Are you sure you want to delete this item?';
|
||||
$lang['nav_delete_confirm_yes'] = 'Delete!';
|
||||
$lang['nav_delete_confirm_abort'] = 'Cancel';
|
||||
$lang['nav_create'] = 'Create a new item';
|
||||
$lang['nav_create_title'] = 'Title (Optional)';
|
||||
$lang['nav_create_title_noptoption'] = 'Title';
|
||||
$lang['nav_create_create'] = 'Create';
|
||||
$lang['nav_create_abort'] = 'Cancel';
|
||||
$lang['nav_create_parents'] = 'Child of';
|
||||
$lang['nav_create_page'] = 'Page';
|
||||
$lang['nav_create_success'] = 'The new item was successfully created.';
|
||||
$lang['nav_create_fail'] = 'An error occured while saving the new item.';
|
||||
$lang['nav_update_success'] = 'The item was successfully updated.';
|
||||
$lang['nav_update_fail'] = 'An error occured while updating the item.';
|
||||
$lang['nav_create_external'] = 'External';
|
||||
$lang['nav_create_external_input'] = 'External URL';
|
||||
$lang['nav_create_external_needs_title'] = 'Please provide a title when creating an external nav entry.';
|
||||
$lang['nav_create_external_url_invalid'] = 'The provided URL is invalid.';
|
||||
|
||||
//Stream
|
||||
$lang['nav_stream_edited'] = '{user} edited a nav entry ({extra})';
|
||||
$lang['nav_stream_deleted'] = '{user} deleted a nav entry ({extra})';
|
||||
$lang['nav_stream_created'] = '{user} created a nav entry ({extra})';
|
51
apps/Navigation/nav.php
Executable file
51
apps/Navigation/nav.php
Executable file
|
@ -0,0 +1,51 @@
|
|||
<?php
|
||||
$navTree = '';
|
||||
//Show
|
||||
function buildNav($nav)
|
||||
{
|
||||
global $navTree, $db;
|
||||
$navTree .= '<ul>';
|
||||
foreach ($nav as $site)
|
||||
{
|
||||
//Get the Page URL
|
||||
$pageUrl = '#';
|
||||
if ($site['external'] === '')
|
||||
{
|
||||
$db->setCol('simplePages_pages');
|
||||
$db->data['id'] = $site['page'];
|
||||
$db->get();
|
||||
if (!empty($db->data)) $pageUrl = $GLOBALS['MCONF']['web_uri'].$db->data[0]['alias'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$pageUrl = $site['external'];
|
||||
}
|
||||
|
||||
//Get the page title
|
||||
$title = $site['title'];
|
||||
if($title == '') $title = $db->data[0]['title'];
|
||||
|
||||
$navTree .= '<li><a href="'.$pageUrl.'">'.$title.'</a>';
|
||||
|
||||
//Look for childs
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['parent'] = $site['id'];
|
||||
$db->get(null, null, 'nav_order');
|
||||
$navd = $db->data;
|
||||
//If this site has any childs, build the navtree for them
|
||||
if (!empty($navd))
|
||||
{
|
||||
buildNav($navd);
|
||||
}
|
||||
$navTree .= '</li>';
|
||||
}
|
||||
$navTree .= '</ul>';
|
||||
}
|
||||
|
||||
//Create the Navigation, start with all top-level pages
|
||||
$db->setCol('nav_nav');
|
||||
$db->data['parent'] = 0;
|
||||
$db->get(null, null, 'nav_order');
|
||||
buildNav($db->data);
|
||||
|
||||
$page->assign('navTree', $navTree);
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"permissions": [
|
||||
{
|
||||
"key": "view_logfiles",
|
||||
"name": "Logfiles ansehen",
|
||||
"key": "edit_nav",
|
||||
"name": "Edit the Navigation",
|
||||
"description": "",
|
||||
"critical": false
|
||||
}
|
|
@ -1,3 +1,2 @@
|
|||
confirmationRequierd = true
|
||||
confirmationUser = 1
|
||||
confirmationUserMail = 'k@knt.li'
|
||||
confirmationRequierd = false
|
||||
confirmationUser = 0
|
|
@ -1,52 +1,69 @@
|
|||
<?php
|
||||
require_once '../../../inc/autoload.php';
|
||||
printHeader($lang->get('sp_confirm'));
|
||||
|
||||
require_once 'confirmConfig.php';
|
||||
|
||||
if (isset($_GET['page']))
|
||||
{
|
||||
if ($_SESSION['userid'] == $confirmationUser)
|
||||
{
|
||||
//Get the new Content
|
||||
$hasContent = false;
|
||||
$created = false;
|
||||
$db->setCol('simplePages_pages_confirm');
|
||||
$db->data['page_id'] = $_GET['page'];
|
||||
$db->get();
|
||||
|
||||
if (isset($db->data[0]))
|
||||
{
|
||||
$hasContent = true;
|
||||
$data_new = $db->data[0];
|
||||
} else
|
||||
{
|
||||
$db->setCol('simplePages_pages');
|
||||
$db->data['page_id'] = $_GET['page'];
|
||||
$db->data['status'] = 2;
|
||||
$db->get();
|
||||
|
||||
$data_new = [];
|
||||
|
||||
$hasContent = true;
|
||||
$created = true;
|
||||
}
|
||||
|
||||
if ($hasContent)
|
||||
{
|
||||
//If submitted, insert the new content
|
||||
if(isset($_POST['confirm']))
|
||||
if (isset($_POST['confirm']))
|
||||
{
|
||||
$db->setCol('simplePages_pages');
|
||||
$db->data = json_decode($_POST['contentToUpdate'], true);
|
||||
if($db->update(['id' => $_GET['page']]))
|
||||
if ($db->update(['id' => $_GET['page']]))
|
||||
{
|
||||
//Delete the old data
|
||||
$db->setCol('simplePages_pages_confirm');
|
||||
$db->data['page_id'] = $_GET['page'];
|
||||
$db->delete();
|
||||
echo msg('success', $lang->get('sp_confirm_success').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
else
|
||||
echo msg('success', $lang->get('sp_confirm_success') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
stream_message('{user} confirmed contents of the page "{extra}".', 3, $_GET['page']);
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('sp_confirm_fail').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('fail', $lang->get('sp_confirm_fail') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
|
||||
}//If request to delete, delete it
|
||||
elseif(isset($_POST['delete']))
|
||||
elseif (isset($_POST['delete']))
|
||||
{
|
||||
$db->setCol('simplePages_pages_confirm');
|
||||
$db->data['page_id'] = $_GET['page'];
|
||||
if($db->delete())
|
||||
if ($db->delete())
|
||||
{
|
||||
echo msg('success', $lang->get('sp_confirm_delete_success').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
else
|
||||
echo msg('success', $lang->get('sp_confirm_delete_success') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('sp_confirm_delete_fail').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('fail', $lang->get('sp_confirm_delete_fail') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
//Get the old Content
|
||||
$db->setCol('simplePages_pages');
|
||||
|
@ -57,25 +74,46 @@ if (isset($_GET['page']))
|
|||
$changed = false;
|
||||
$data_old = $db->data[0];
|
||||
|
||||
//Find differences between them
|
||||
$data_display = [];
|
||||
foreach ($data_new as $key => $new_data)
|
||||
//If The page to confirm was just created
|
||||
if ($created)
|
||||
{
|
||||
if (array_key_exists($key, $data_old))
|
||||
$changed = true;
|
||||
$data_new = $data_old;
|
||||
$data_display = $data_old;
|
||||
unset($data_display['id']);
|
||||
unset($data_display['user']);
|
||||
unset($data_display['lastedit']);
|
||||
unset($data_display['created']);
|
||||
} else
|
||||
{
|
||||
//Find differences between them
|
||||
$data_display = [];
|
||||
foreach ($data_new as $key => $new_data)
|
||||
{
|
||||
if ($new_data != $data_old[$key] && $key != 'id' && $key != 'user' && $key != 'lastedit')
|
||||
if (array_key_exists($key, $data_old))
|
||||
{
|
||||
$changed = true;
|
||||
$data_display[$key] = $new_data;
|
||||
if ($new_data != $data_old[$key] && $key != 'id' && $key != 'user' && $key != 'lastedit' && $key != 'created')
|
||||
{
|
||||
$changed = true;
|
||||
$data_display[$key] = $new_data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Only display differences if any found
|
||||
if($changed)
|
||||
if ($changed)
|
||||
{
|
||||
echo '<div class="main">';
|
||||
echo '<p>'.sprintf($lang->get('sp_confirm_changed'), date('d.m.Y \u\m H:i', $data_new['lastedit']), getUserByID($data_new['user'])).':</p>';
|
||||
if ($created)
|
||||
{
|
||||
echo '<p>' . sprintf($lang->get('sp_confirm_created'), date('d.m.Y \u\m H:i', $data_new['lastedit']), getUserByID($data_new['user'])) . ':</p>';
|
||||
} else
|
||||
{
|
||||
|
||||
echo '<p>' . sprintf($lang->get('sp_confirm_changed'), date('d.m.Y \u\m H:i', $data_new['lastedit']), getUserByID($data_new['user'])) . ':</p>';
|
||||
}
|
||||
|
||||
$msg = [
|
||||
'title' => $lang->get('sp_edit_title'),
|
||||
'alias' => $lang->get('sp_edit_alias'),
|
||||
|
@ -91,30 +129,27 @@ if (isset($_GET['page']))
|
|||
|
||||
$data_display['user'] = $data_new['user'];
|
||||
$data_display['lastedit'] = $data_new['lastedit'];
|
||||
$data_display['status'] = 1;
|
||||
|
||||
//echo '<pre>'.print_r($data_old, true).'</pre>';
|
||||
echo '<form action="<?php echo $_SERVER['REQUEST_URI']?>" method="post"><input type="hidden" name="contentToUpdate" value=\'' . json_encode($data_display) . '\'/><input type="submit" name="confirm" value="'.$lang->get('sp_confirm_confirm').'"/><input type="submit" name="delete" value="'.$lang->get('sp_confirm_delete').'" class="btn_del"/></form>';
|
||||
echo '<form action="' . $_SERVER['REQUEST_URI'] . '" method="post"><input type="hidden" name="contentToUpdate" value=\'' . json_encode($data_display) . '\'/><input type="submit" name="confirm" value="' . $lang->get('sp_confirm_confirm') . '"/><input type="submit" name="delete" value="' . $lang->get('sp_confirm_delete') . '" class="btn_del"/></form>';
|
||||
echo '</div>';
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('sp_confirm_no_changes').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('info', $lang->get('sp_confirm_no_changes') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('sp_confirm_no_changes').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('info', $lang->get('sp_confirm_no_changes') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('sp_confirm_no_changes').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('info', $lang->get('sp_confirm_no_changes') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('missing_permission').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('info', $lang->get('missing_permission') . ' <a href="management.php">' . $lang->get('back') . '</a>');
|
||||
}
|
||||
}
|
||||
require_once '../../../inc/footer.php';
|
26
apps/SimplePages/backend/confirmConfig.php
Executable file
26
apps/SimplePages/backend/confirmConfig.php
Executable file
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
$confirmationRequierd = false;
|
||||
$iniFile = 'confirm.ini';
|
||||
if(strpos($_SERVER['SCRIPT_FILENAME'], '/apps/') === false)
|
||||
{
|
||||
$iniFile = '../SimplePages/backend/confirm.ini';
|
||||
}
|
||||
|
||||
if(file_exists($iniFile))
|
||||
{
|
||||
$config = parse_ini_file($iniFile);
|
||||
//print_r($config);exit;
|
||||
$confirmationRequierd = $config['confirmationRequierd'];
|
||||
$confirmationUserMail = null;
|
||||
$confirmationUser = null;
|
||||
|
||||
if($confirmationRequierd)
|
||||
{
|
||||
$confirmationUser = $config['confirmationUser'];
|
||||
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $confirmationUser;
|
||||
$db->get();
|
||||
$confirmationUserMail = $db->data[0]['mail'];
|
||||
}
|
||||
}
|
|
@ -1,13 +1,14 @@
|
|||
<?php
|
||||
if (hasPerm('view_dashboard'))
|
||||
{
|
||||
$lang->set('Seiten zum Freischalten', 'sp_pages_confirm', 'de');
|
||||
$lang->set('Seiten zum Freischalten', 'sp_edit_pages_to_confirm', 'de');
|
||||
$lang->set('Seiten, die Sie editieren dürfen', 'sp_edit_pages_to_edit', 'de');
|
||||
|
||||
$lang->set('Seiten zum Freischalten', 'sp_pages_confirm', 'en');
|
||||
$lang->set('Seiten, die Sie editieren dürfen', 'sp_edit_pages_to_edit', 'en');
|
||||
$lang->set('Pages pending confirmation', 'sp_edit_pages_to_confirm', 'en');
|
||||
$lang->set('Pages you can edit', 'sp_edit_pages_to_edit', 'en');
|
||||
|
||||
//If pages are available for confirmation, show them
|
||||
// TODO: Check if the config exists
|
||||
$config = parse_ini_file('../apps/SimplePages/backend/confirm.ini');
|
||||
if ($_SESSION['userid'] == $config['confirmationUser'])
|
||||
{
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<?php
|
||||
require_once '../../../inc/autoload.php';
|
||||
printHeader($lang->get('sp_edit'));
|
||||
|
||||
require_once 'confirmConfig.php';
|
||||
|
||||
if (hasPerm('manage_pages'))
|
||||
{
|
||||
tinymce();
|
||||
|
@ -17,77 +20,6 @@ if (hasPerm('manage_pages'))
|
|||
$content = strip_tags($content);
|
||||
}
|
||||
|
||||
/*if (!$confirmationRequierd)
|
||||
{
|
||||
$time = time();
|
||||
$seite = str_replace('-', ' ', $seite);
|
||||
$seite = str_replace('ä', 'ä', $seite);
|
||||
$seite = str_replace('ö', 'ö', $seite);
|
||||
$seite = str_replace('ü', 'ü', $seite);
|
||||
//echo $seite;
|
||||
$stmt = $DBH->prepare("UPDATE " . $MCONF['db_prefix'] . "seiten SET inhalt=:inhalt, datel=:datel, userl=:userl WHERE name=:seite");
|
||||
$stmt->bindParam(':inhalt', $content);
|
||||
$stmt->bindParam(':datel', $time);
|
||||
$stmt->bindParam(':userl', $_SESSION['user']);
|
||||
$stmt->bindParam(':seite', $seite);
|
||||
|
||||
if ($stmt->execute())
|
||||
{
|
||||
echo msg('succes', 'Die Seite "' . $seite . '" wurde erfolgreich geändert. <a href="management.php">Zurück</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail');
|
||||
}
|
||||
} else
|
||||
{
|
||||
$bnutzrid = $_SESSION['user'];
|
||||
//echo $seite;
|
||||
$seite = str_replace('-', ' ', $seite);
|
||||
$seite = str_replace('ä', 'ä', $seite);
|
||||
$seite = str_replace('ö', 'ö', $seite);
|
||||
$seite = str_replace('ü', 'ü', $seite);
|
||||
//echo $seite;
|
||||
if ($_SESSION['user'] === $confirmationUser)
|
||||
{
|
||||
$time = time();
|
||||
$STH = $DBH->prepare("UPDATE " . $MCONF['db_prefix'] . "seiten SET inhalt=:inhalt, datel=:datel, userl=:userl WHERE name=:seite");
|
||||
$STH->bindParam(':inhalt', $content);
|
||||
$STH->bindParam(':datel', $time);
|
||||
$STH->bindParam(':userl', $_SESSION['user']);
|
||||
$STH->bindParam(':seite', $seite);
|
||||
|
||||
if ($STH->execute())
|
||||
{
|
||||
$STH2 = $DBH->prepare("DELETE FROM " . $MCONF['db_prefix'] . "seitenneu WHERE name=:name");
|
||||
$STH2->bindParam(':name', $seite);
|
||||
if ($STH2->execute())
|
||||
{
|
||||
echo msg('succes', 'Die Seite "' . $seite . '" wurde erfolgreich geändert. <a href="management.php">Zurück</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail');
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('fail');
|
||||
}
|
||||
} else
|
||||
{
|
||||
$time = time();
|
||||
$stmt2 = $DBH->prepare("INSERT INTO " . $MCONF['db_prefix'] . "seitenneu (name, inhalt, geaendertby, datum) VALUES (:name, :inhalt, :geaendertby, :datum)");
|
||||
$stmt2->bindParam(':name', $seite);
|
||||
$stmt2->bindParam(':inhalt', $content);
|
||||
$stmt2->bindParam(':geaendertby', $bnutzrid);
|
||||
$stmt2->bindParam(':datum', $time);
|
||||
|
||||
if ($stmt2->execute() and freischaltemail($seite))
|
||||
{
|
||||
echo msg('succes', 'Die Seite ' . $seite . ' wurde erfolgreich geändert. Diese Änderungen werden öffentlich, sobald ' . $confirmationUser . ' sie Freigegeben hat. <a href="management.php">Zurück</a>');
|
||||
} else
|
||||
{
|
||||
echo msg('fail');
|
||||
}
|
||||
}*/
|
||||
//
|
||||
$db->clear();
|
||||
//If a confirmation by user is requiered, insert it in another table and send an email
|
||||
|
@ -99,14 +31,23 @@ if (hasPerm('manage_pages'))
|
|||
}
|
||||
else
|
||||
{
|
||||
//Delete old pages, we only want the newest version in the database
|
||||
$db->clear();
|
||||
$db->setCol('simplePages_pages_confirm');
|
||||
$db->data['page_id'] = $_GET['id'];
|
||||
$db->delete();
|
||||
//If New Page created
|
||||
if(isset($_GET['new']))
|
||||
{
|
||||
$status = 2;
|
||||
$db->setCol('simplePages_pages');
|
||||
}
|
||||
else
|
||||
{
|
||||
//Delete old pages, we only want the newest version in the database
|
||||
$db->clear();
|
||||
$db->setCol('simplePages_pages_confirm');
|
||||
$db->data['page_id'] = $_GET['id'];
|
||||
$db->delete();
|
||||
|
||||
$db->setCol('simplePages_pages_confirm');
|
||||
$db->data['page_id'] = $_GET['id'];
|
||||
$db->setCol('simplePages_pages_confirm');
|
||||
$db->data['page_id'] = $_GET['id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -118,12 +59,23 @@ if (hasPerm('manage_pages'))
|
|||
$db->data['alias'] = str_replace(' ', '-', $_POST['alias']);
|
||||
$db->data['content'] = $_POST['content'];
|
||||
$db->data['user'] = $_SESSION['userid'];
|
||||
$status = 0;
|
||||
if (isset($_POST['status'])) $status = $_POST['status'];
|
||||
if(!isset($status))
|
||||
{
|
||||
$status = 0;
|
||||
if (isset($_POST['status']))
|
||||
{
|
||||
$status = $_POST['status'];
|
||||
if($_POST['status'] == 'true') $status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$db->data['status'] = $status;
|
||||
$db->data['meta_description'] = $_POST['meta_description'];
|
||||
$db->data['meta_keywords'] = $_POST['meta_keywords'];
|
||||
$db->data['lastedit'] = time();
|
||||
if(isset($_GET['new'])) $db->data['created'] = time();
|
||||
|
||||
//print_r($_POST);
|
||||
|
||||
//$db->update(['id' => $_GET['id']]);
|
||||
$id = 0;
|
||||
|
@ -136,12 +88,13 @@ if (hasPerm('manage_pages'))
|
|||
$id = $db->lastID();
|
||||
if($confirmationRequierd && ($_SESSION['userid'] != $confirmationUser))
|
||||
{
|
||||
echo msg('succes', sprintf($lang->get('sp_edit_created'), $_POST['title']).' '.sprintf($lang->get('sp_edit_edited_need_confirm'), getUserByID($confirmationUser)).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('success', sprintf($lang->get('sp_edit_created'), $_POST['title']).' '.sprintf($lang->get('sp_edit_edited_need_confirm'), getUserByID($confirmationUser)).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('succes', sprintf($lang->get('sp_edit_created'), $_POST['title']).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('success', sprintf($lang->get('sp_edit_created'), $_POST['title']).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
}
|
||||
stream_message('{user} created the page "{extra}".', 3, $_POST['title'].' ('.$id.')');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -160,7 +113,8 @@ if (hasPerm('manage_pages'))
|
|||
{
|
||||
if ($db->insert())
|
||||
{
|
||||
echo msg('succes', sprintf($lang->get('sp_edit_edited'), $_POST['title']).' '.sprintf($lang->get('sp_edit_edited_need_confirm'), getUserByID($confirmationUser)).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('success', sprintf($lang->get('sp_edit_edited'), $_POST['title']).' '.sprintf($lang->get('sp_edit_edited_need_confirm'), getUserByID($confirmationUser)).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
stream_message('{user} edited the page "{extra}".', 3, $_POST['title'].' ('.$id.')');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -171,7 +125,8 @@ if (hasPerm('manage_pages'))
|
|||
{
|
||||
if ($db->update(['id' => $_GET['id']]))
|
||||
{
|
||||
echo msg('succes', sprintf($lang->get('sp_edit_edited'), $_POST['title']).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('success', sprintf($lang->get('sp_edit_edited'), $_POST['title']).' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
stream_message('{user} edited the page "{extra}".', 3, $_POST['title'].' ('.$id.')');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -184,13 +139,21 @@ if (hasPerm('manage_pages'))
|
|||
if($confirmationRequierd && ($_SESSION['userid'] != $confirmationUser))
|
||||
{
|
||||
$subject = sprintf($lang->get('sp_edit_confirm_subject'), $_POST['title']);
|
||||
$message = sprintf($lang->get('sp_edit_confirm_message'), $_SESSION['user'], $_POST['title'], $MCONF['web_uri'] . 'apps/SimplePages/backend/confirm.php?page=' . $id);
|
||||
$header = 'From: noreply@' . $_SERVER['SERVER_NAME'] . "\r\n" .
|
||||
'Reply-To: noreply@' . $_SERVER['SERVER_NAME'] . "\r\n" .
|
||||
'X-Mailer: PHP/' . phpversion() .
|
||||
'MIME-Version: 1.0' . "\r\n" .
|
||||
'content-type: text/html; charset=UTF-8' . "\r\n";
|
||||
mail($confirmationUserMail, $subject, $message, $header);
|
||||
if(isset($_GET['new']))
|
||||
{
|
||||
$message = sprintf($lang->get('sp_edit_confirm_message'), $_SESSION['user'], $_POST['title'], $MCONF['web_uri'] . 'apps/SimplePages/backend/confirm.php?page=' . $id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = sprintf($lang->get('sp_create_confirm_message'), $_SESSION['user'], $_POST['title'], $MCONF['web_uri'] . 'apps/SimplePages/backend/confirm.php?page=' . $id);
|
||||
}
|
||||
|
||||
//Get the user's email
|
||||
$db->setCol('system_admins');
|
||||
$db->data['id'] = $confirmationUser;
|
||||
$db->get();
|
||||
if(isset($db->data[0])) $confirmationUserMail = $db->data[0]['mail'];
|
||||
mmail($confirmationUserMail, $subject, $message, 'noreply@' . $_SERVER['SERVER_NAME'], true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -202,7 +165,8 @@ if (hasPerm('manage_pages'))
|
|||
$db->data['id'] = $_GET['id'];
|
||||
if ($db->delete())
|
||||
{
|
||||
echo msg('succes', $lang->get('sp_edit_delete_success').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
echo msg('success', $lang->get('sp_edit_delete_success').' <a href="management.php">'.$lang->get('back').'</a>');
|
||||
stream_message('{user} deleted the page "{extra}".', 3, $_GET['id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -278,11 +242,11 @@ if (hasPerm('manage_pages'))
|
|||
<form id="edit" method="post" action="<?php echo $_SERVER['REQUEST_URI']?>" class="form">
|
||||
<p><span><?php echo $lang->get('sp_edit_title');?>:</span><input type="text" name="title" value="<?php echo $data[0]['title']; ?>"/>
|
||||
</p>
|
||||
<p><span><?php echo $lang->get('sp_edit_alias');?>:</span><input type="text" name="alias"
|
||||
<p><span data-toggle="tooltip" title="Die URL der Seite, ohne '/' am Anfang."><?php echo $lang->get('sp_edit_alias');?>:</span><input type="text" name="alias"
|
||||
value="<?php echo $data[0]['alias']; ?>" autocomplete="off"/>
|
||||
</p>
|
||||
<p><span><?php echo $lang->get('sp_edit_public');?>:</span><input type="checkbox" name="status" id="status" value="1"<?php
|
||||
if ($data[0]['status'] == 1) echo ' checked';
|
||||
if ($data[0]['status'] == 1 || isset($_GET['new'])) echo ' checked';
|
||||
?>/><label for="status"><i></i></label></p>
|
||||
<p><span><?php echo $lang->get('sp_edit_keywords');?>:</span><input type="text" name="meta_keywords"
|
||||
value="<?php echo $data[0]['meta_keywords']; ?>"/></p>
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
<?php
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
$dbtables = "CREATE TABLE IF NOT EXISTS `seiten` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` text NOT NULL,
|
||||
`inhalt` longtext NOT NULL,
|
||||
`mailadresse` text NOT NULL,
|
||||
`datel` int(11) NOT NULL,
|
||||
`userl` text NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
|
||||
|
||||
INSERT INTO `".$MCONF['db_prefix']."seiten` (`name`, `inhalt`, `mailadresse`) VALUES
|
||||
('Home', '<h1>Installation erfolgreich</h1><p>Diese Meldung siehst du, wenn die Installation erfolgreich war. Jetzt geh <a href=\"admin/\">schnell in den Adminbereich</a> um die erste Seite vernünftig anzulegen.</p>', ''),
|
||||
('Impressum', '<h1>Impressum</h1><p>Bitte schnellstmöglichst ein Impressum einfügen, z.B. <a href=\"http://www.e-recht24.de/impressum-generator.html\">hier</a>.</p>', ''),
|
||||
('Kontakt', '<p>Hier können Kontaktdaten eingetragen werden, diese erscheinen dann oben über dem Kontaktforumlar.</p>', ''),
|
||||
('Datenschutzerklaerung', '<h1>Datenschutzerklärung</h1><p><strong>Geltungsbereich</strong></p><p>Diese Datenschutzerklärung klärt Nutzer über die Art, den Umfang und Zwecke der Erhebung und Verwendung personenbezogener Daten durch den verantwortlichen Anbieter [HIER BITTE IHREN NAMEN, ADRESSE, EMAIL UND TELEFONNUMMER EINTRAGEN] auf dieser Website (im folgenden “Angebot”) auf.<br />
|
||||
<br />
|
||||
Die rechtlichen Grundlagen des Datenschutzes finden sich im Bundesdatenschutzgesetz (BDSG) und dem Telemediengesetz (TMG).<br />
|
||||
<br />
|
||||
</p><p><strong>Zugriffsdaten/ Server-Logfiles</strong></p><p><span class=\"sd-muster-content\">Der Anbieter (beziehungsweise sein Webspace-Provider) erhebt Daten über jeden Zugriff auf das Angebot (so genannte Serverlogfiles). Zu den Zugriffsdaten gehören:<br />
|
||||
<br />
|
||||
Name der abgerufenen Webseite, Datei, Datum und Uhrzeit des Abrufs, übertragene Datenmenge, Meldung über erfolgreichen Abruf, Browsertyp nebst Version, das Betriebssystem des Nutzers, Referrer URL (die zuvor besuchte Seite), IP-Adresse und der anfragende Provider.<br />
|
||||
<br />
|
||||
Der Anbieter verwendet die Protokolldaten nur für statistische Auswertungen zum Zweck des Betriebs, der Sicherheit und der Optimierung des Angebotes. Der Anbieterbehält sich jedoch vor, die Protokolldaten nachträglich zu überprüfen, wenn aufgrund konkreter Anhaltspunkte der berechtigte Verdacht einer rechtswidrigen Nutzung besteht.</span></p><p><strong>Umgang mit personenbezogenen Daten</strong></p><p><span class=\"sd-muster-content\">Personenbezogene Daten sind Informationen, mit deren Hilfe eine Person bestimmbar ist, also Angaben, die zurück zu einer Person verfolgt werden können. Dazu gehören der Name, die Emailadresse oder die Telefonnummer. Aber auch Daten über Vorlieben, Hobbies, Mitgliedschaften oder welche Webseiten von jemandem angesehen wurden zählen zu personenbezogenen Daten.<br />
|
||||
<br />
|
||||
Personenbezogene Daten werden von dem Anbieter nur dann erhoben, genutzt und weiter gegeben, wenn dies gesetzlich erlaubt ist oder die Nutzer in die Datenerhebung einwilligen.</span></p><p><strong>Kontaktaufnahme</strong></p><p><span class=\"sd-muster-content\">Bei der Kontaktaufnahme mit dem Anbieter (zum Beispiel per Kontaktformular oder E-Mail) werden die Angaben des Nutzers zwecks Bearbeitung der Anfrage sowie für den Fall, dass Anschlussfragen entstehen, gespeichert.</span></p><p><strong>Kommentare und Beiträge</strong></p><p><span class=\"sd-muster-content\">Wenn Nutzer Kommentare im Blog oder sonstige Beiträge hinterlassen, werden ihre IP-Adressen gespeichert. Das erfolgt zur Sicherheit des Anbieters, falls jemand in Kommentaren und Beiträgen widerrechtliche Inhalte schreibt (Beleidigungen, verbotene politische Propaganda, etc.). In diesem Fall kann der Anbieter selbst für den Kommentar oder Beitrag belangt werden und ist daher an der Identität des Verfassers interessiert.</span></p><p><strong>Newsletter</strong></p><p><span class=\"sd-muster-content\">Mit dem Newsletter informieren wir Sie über uns und unsere Angebote.<br />
|
||||
<br />
|
||||
Wenn Sie den Newsletter empfangen möchten, benötigen wir von Ihnen eine valide Email-Adresse sowie Informationen, die uns die Überprüfung gestatten, dass Sie der Inhaber der angegebenen Email-Adresse sind bzw. deren Inhaber mit dem Empfang des Newsletters einverstanden ist. Weitere Daten werden nicht erhoben. Diese Daten werden nur für den Versand der Newsletter verwendet und werden nicht an Dritte weiter gegeben.<br />
|
||||
<br />
|
||||
Mit der Anmeldung zum Newsletter speichern wir Ihre IP-Adresse und das Datum der Anmeldung. Diese Speicherung dient alleine dem Nachweis im Fall, dass ein Dritter eine Emailadresse missbraucht und sich ohne Wissen des Berechtigten für den Newsletterempfang anmeldet.<br />
|
||||
<br />
|
||||
Ihre Einwilligung zur Speicherung der Daten, der Email-Adresse sowie deren Nutzung zum Versand des Newsletters können Sie jederzeit widerrufen. Der Widerruf kann über einen Link in den Newslettern selbst, in Ihrem Profilbereich oder per Mitteilung an die oben stehenden Kontaktmöglichkeiten erfolgen.<br />
|
||||
</span></p><p><strong>Einbindung von Diensten und Inhalten Dritter</strong></p><p><span class=\"sd-muster-content\">Es kann vorkommen, dass innerhalb dieses Onlineangebotes Inhalte Dritter, wie zum Beispiel Videos von YouTube, Kartenmaterial von Google-Maps, RSS-Feeds oder Grafiken von anderen Webseiten eingebunden werden. Dies setzt immer voraus, dass die Anbieter dieser Inhalte (nachfolgend bezeichnet als \"Dritt-Anbieter\") die IP-Adresse der Nutzer wahr nehmen. Denn ohne die IP-Adresse, könnten sie die Inhalte nicht an den Browser des jeweiligen Nutzers senden. Die IP-Adresse ist damit für die Darstellung dieser Inhalte erforderlich. Wir bemühen uns nur solche Inhalte zu verwenden, deren jeweilige Anbieter die IP-Adresse lediglich zur Auslieferung der Inhalte verwenden. Jedoch haben wir keinen Einfluss darauf, falls die Dritt-Anbieter die IP-Adresse z.B. für statistische Zwecke speichern. Soweit dies uns bekannt ist, klären wir die Nutzer darüber auf.<br />
|
||||
</span></p><p><strong>Cookies</strong></p><p><span class=\"sd-muster-content\">Cookies sind kleine Files, die es ermöglichen, auf dem Zugriffsgerät der Nutzer (PC, Smartphone o.ä.) spezifische, auf das Gerät bezogene Informationen zu speichern. Sie dienen zum einem der Benutzerfreundlichkeit von Webseiten und damit den Nutzern (z.B. Speicherung von Logindaten). Zum anderen dienen sie, um die statistische Daten der Webseitennutzung zu erfassen und sie zwecks Verbesserung des Angebotes analysieren zu können. Die Nutzer können auf den Einsatz der Cookies Einfluss nehmen. Die meisten Browser verfügen eine Option mit der das Speichern von Cookies eingeschränkt oder komplett verhindert wird. Allerdings wird darauf hingewiesen, dass die Nutzung und insbesondere der Nutzungskomfort ohne Cookies eingeschränkt werden.<br />
|
||||
<br />
|
||||
Sie können viele Online-Anzeigen-Cookies von Unternehmen über die US-amerikanische Seite <a href=\"http://www.aboutads.info/choices/\">http://www.aboutads.info/choices/</a> oder die EU-Seite <a href=\"http://www.youronlinechoices.com/uk/your-ad-choices/ \">http://www.youronlinechoices.com/uk/your-ad-choices/ </a> verwalten.</span></p><p><strong>Widerruf, Änderungen, Berichtigungen und Aktualisierungen</strong></p><p>Der Nutzer hat das Recht, auf Antrag unentgeltlich Auskunft zu erhalten über die personenbezogenen Daten, die über ihn gespeichert wurden. Zusätzlich hat der Nutzer das Recht auf Berichtigung unrichtiger Daten, Sperrung und Löschung seiner personenbezogenen Daten, soweit dem keine gesetzliche Aufbewahrungspflicht entgegensteht.<br />
|
||||
</p><p><a href=\"http://rechtsanwalt-schwenke.de/smmr-buch/datenschutz-muster-generator-fuer-webseiten-blogs-und-social-media/\"><strong>Datenschutz-Muster von Rechtsanwalt Thomas Schwenke - I LAW it</strong></a></p>', '');
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `seitenneu` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` text NOT NULL,
|
||||
`inhalt` longtext NOT NULL,
|
||||
`geaendertby` text NOT NULL,
|
||||
`datum` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;";
|
||||
$dbtables = $DBH->prepare($dbtables);
|
||||
if($dbtables->execute())
|
||||
{
|
||||
$configini = fopen('freischalt.ini', "w") or die("Unable to open file!");
|
||||
$txt = 'freischaltmailReq = '.$_POST['freischalt_y'].' \n mail_adresse_freischalttyp = "'.$_POST['freischalt_m'].'" \n freischalten_name = "'.$_POST['freischalt_n'].'"';
|
||||
fwrite($configini, $txt);
|
||||
fclose($configini);
|
||||
echo msg('succes', 'Das Seitenmodul wurde erfolgreich eingerichtet.<br/>');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', 'Fehler beim Einrichten des Seitenmoduls.');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span>Benötigt Freischaltung der Inhalte</span><select name="freischalt_y"><option value="true">Ja</option><option value="false">Nein</option></select><br/><br/>
|
||||
<span>Benutzername des Freischaltenden Benutzers</span><input type="text" placeholder="Benutzername des Freischaltenden Benutzers" name="freischalt_n" value=""/><br/><br/>
|
||||
<span>Mailadressen des Freischaltenden Benutzers</span><input type="text" placeholder="Mailadressen des Freischaltenden Benutzers" name="freischalt_m" value=""/><br/><br/>';
|
||||
}
|
||||
?>
|
|
@ -1,71 +0,0 @@
|
|||
<?php
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
$dbtables = "CREATE TABLE IF NOT EXISTS `seiten` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` text NOT NULL,
|
||||
`inhalt` longtext NOT NULL,
|
||||
`mailadresse` text NOT NULL,
|
||||
`datel` int(11) NOT NULL,
|
||||
`userl` text NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `id` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
|
||||
|
||||
INSERT INTO `".$MCONF['db_prefix']."seiten` (`name`, `inhalt`, `mailadresse`) VALUES
|
||||
('Home', '<h1>Installation erfolgreich</h1><p>Diese Meldung siehst du, wenn die Installation erfolgreich war. Jetzt geh <a href=\"admin/\">schnell in den Adminbereich</a> um die erste Seite vernünftig anzulegen.</p>', ''),
|
||||
('Impressum', '<h1>Impressum</h1><p>Bitte schnellstmöglichst ein Impressum einfügen, z.B. <a href=\"http://www.e-recht24.de/impressum-generator.html\">hier</a>.</p>', ''),
|
||||
('Kontakt', '<p>Hier können Kontaktdaten eingetragen werden, diese erscheinen dann oben über dem Kontaktforumlar.</p>', ''),
|
||||
('Datenschutzerklaerung', '<h1>Datenschutzerklärung</h1><p><strong>Geltungsbereich</strong></p><p>Diese Datenschutzerklärung klärt Nutzer über die Art, den Umfang und Zwecke der Erhebung und Verwendung personenbezogener Daten durch den verantwortlichen Anbieter [HIER BITTE IHREN NAMEN, ADRESSE, EMAIL UND TELEFONNUMMER EINTRAGEN] auf dieser Website (im folgenden “Angebot”) auf.<br />
|
||||
<br />
|
||||
Die rechtlichen Grundlagen des Datenschutzes finden sich im Bundesdatenschutzgesetz (BDSG) und dem Telemediengesetz (TMG).<br />
|
||||
<br />
|
||||
</p><p><strong>Zugriffsdaten/ Server-Logfiles</strong></p><p><span class=\"sd-muster-content\">Der Anbieter (beziehungsweise sein Webspace-Provider) erhebt Daten über jeden Zugriff auf das Angebot (so genannte Serverlogfiles). Zu den Zugriffsdaten gehören:<br />
|
||||
<br />
|
||||
Name der abgerufenen Webseite, Datei, Datum und Uhrzeit des Abrufs, übertragene Datenmenge, Meldung über erfolgreichen Abruf, Browsertyp nebst Version, das Betriebssystem des Nutzers, Referrer URL (die zuvor besuchte Seite), IP-Adresse und der anfragende Provider.<br />
|
||||
<br />
|
||||
Der Anbieter verwendet die Protokolldaten nur für statistische Auswertungen zum Zweck des Betriebs, der Sicherheit und der Optimierung des Angebotes. Der Anbieterbehält sich jedoch vor, die Protokolldaten nachträglich zu überprüfen, wenn aufgrund konkreter Anhaltspunkte der berechtigte Verdacht einer rechtswidrigen Nutzung besteht.</span></p><p><strong>Umgang mit personenbezogenen Daten</strong></p><p><span class=\"sd-muster-content\">Personenbezogene Daten sind Informationen, mit deren Hilfe eine Person bestimmbar ist, also Angaben, die zurück zu einer Person verfolgt werden können. Dazu gehören der Name, die Emailadresse oder die Telefonnummer. Aber auch Daten über Vorlieben, Hobbies, Mitgliedschaften oder welche Webseiten von jemandem angesehen wurden zählen zu personenbezogenen Daten.<br />
|
||||
<br />
|
||||
Personenbezogene Daten werden von dem Anbieter nur dann erhoben, genutzt und weiter gegeben, wenn dies gesetzlich erlaubt ist oder die Nutzer in die Datenerhebung einwilligen.</span></p><p><strong>Kontaktaufnahme</strong></p><p><span class=\"sd-muster-content\">Bei der Kontaktaufnahme mit dem Anbieter (zum Beispiel per Kontaktformular oder E-Mail) werden die Angaben des Nutzers zwecks Bearbeitung der Anfrage sowie für den Fall, dass Anschlussfragen entstehen, gespeichert.</span></p><p><strong>Kommentare und Beiträge</strong></p><p><span class=\"sd-muster-content\">Wenn Nutzer Kommentare im Blog oder sonstige Beiträge hinterlassen, werden ihre IP-Adressen gespeichert. Das erfolgt zur Sicherheit des Anbieters, falls jemand in Kommentaren und Beiträgen widerrechtliche Inhalte schreibt (Beleidigungen, verbotene politische Propaganda, etc.). In diesem Fall kann der Anbieter selbst für den Kommentar oder Beitrag belangt werden und ist daher an der Identität des Verfassers interessiert.</span></p><p><strong>Newsletter</strong></p><p><span class=\"sd-muster-content\">Mit dem Newsletter informieren wir Sie über uns und unsere Angebote.<br />
|
||||
<br />
|
||||
Wenn Sie den Newsletter empfangen möchten, benötigen wir von Ihnen eine valide Email-Adresse sowie Informationen, die uns die Überprüfung gestatten, dass Sie der Inhaber der angegebenen Email-Adresse sind bzw. deren Inhaber mit dem Empfang des Newsletters einverstanden ist. Weitere Daten werden nicht erhoben. Diese Daten werden nur für den Versand der Newsletter verwendet und werden nicht an Dritte weiter gegeben.<br />
|
||||
<br />
|
||||
Mit der Anmeldung zum Newsletter speichern wir Ihre IP-Adresse und das Datum der Anmeldung. Diese Speicherung dient alleine dem Nachweis im Fall, dass ein Dritter eine Emailadresse missbraucht und sich ohne Wissen des Berechtigten für den Newsletterempfang anmeldet.<br />
|
||||
<br />
|
||||
Ihre Einwilligung zur Speicherung der Daten, der Email-Adresse sowie deren Nutzung zum Versand des Newsletters können Sie jederzeit widerrufen. Der Widerruf kann über einen Link in den Newslettern selbst, in Ihrem Profilbereich oder per Mitteilung an die oben stehenden Kontaktmöglichkeiten erfolgen.<br />
|
||||
</span></p><p><strong>Einbindung von Diensten und Inhalten Dritter</strong></p><p><span class=\"sd-muster-content\">Es kann vorkommen, dass innerhalb dieses Onlineangebotes Inhalte Dritter, wie zum Beispiel Videos von YouTube, Kartenmaterial von Google-Maps, RSS-Feeds oder Grafiken von anderen Webseiten eingebunden werden. Dies setzt immer voraus, dass die Anbieter dieser Inhalte (nachfolgend bezeichnet als \"Dritt-Anbieter\") die IP-Adresse der Nutzer wahr nehmen. Denn ohne die IP-Adresse, könnten sie die Inhalte nicht an den Browser des jeweiligen Nutzers senden. Die IP-Adresse ist damit für die Darstellung dieser Inhalte erforderlich. Wir bemühen uns nur solche Inhalte zu verwenden, deren jeweilige Anbieter die IP-Adresse lediglich zur Auslieferung der Inhalte verwenden. Jedoch haben wir keinen Einfluss darauf, falls die Dritt-Anbieter die IP-Adresse z.B. für statistische Zwecke speichern. Soweit dies uns bekannt ist, klären wir die Nutzer darüber auf.<br />
|
||||
</span></p><p><strong>Cookies</strong></p><p><span class=\"sd-muster-content\">Cookies sind kleine Files, die es ermöglichen, auf dem Zugriffsgerät der Nutzer (PC, Smartphone o.ä.) spezifische, auf das Gerät bezogene Informationen zu speichern. Sie dienen zum einem der Benutzerfreundlichkeit von Webseiten und damit den Nutzern (z.B. Speicherung von Logindaten). Zum anderen dienen sie, um die statistische Daten der Webseitennutzung zu erfassen und sie zwecks Verbesserung des Angebotes analysieren zu können. Die Nutzer können auf den Einsatz der Cookies Einfluss nehmen. Die meisten Browser verfügen eine Option mit der das Speichern von Cookies eingeschränkt oder komplett verhindert wird. Allerdings wird darauf hingewiesen, dass die Nutzung und insbesondere der Nutzungskomfort ohne Cookies eingeschränkt werden.<br />
|
||||
<br />
|
||||
Sie können viele Online-Anzeigen-Cookies von Unternehmen über die US-amerikanische Seite <a href=\"http://www.aboutads.info/choices/\">http://www.aboutads.info/choices/</a> oder die EU-Seite <a href=\"http://www.youronlinechoices.com/uk/your-ad-choices/ \">http://www.youronlinechoices.com/uk/your-ad-choices/ </a> verwalten.</span></p><p><strong>Widerruf, Änderungen, Berichtigungen und Aktualisierungen</strong></p><p>Der Nutzer hat das Recht, auf Antrag unentgeltlich Auskunft zu erhalten über die personenbezogenen Daten, die über ihn gespeichert wurden. Zusätzlich hat der Nutzer das Recht auf Berichtigung unrichtiger Daten, Sperrung und Löschung seiner personenbezogenen Daten, soweit dem keine gesetzliche Aufbewahrungspflicht entgegensteht.<br />
|
||||
</p><p><a href=\"http://rechtsanwalt-schwenke.de/smmr-buch/datenschutz-muster-generator-fuer-webseiten-blogs-und-social-media/\"><strong>Datenschutz-Muster von Rechtsanwalt Thomas Schwenke - I LAW it</strong></a></p>', '');
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `seitenneu` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` text NOT NULL,
|
||||
`inhalt` longtext NOT NULL,
|
||||
`geaendertby` text NOT NULL,
|
||||
`datum` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;";
|
||||
$dbtables = $DBH->prepare($dbtables);
|
||||
if($dbtables->execute())
|
||||
{
|
||||
$configini = fopen('freischalt.ini', "w") or die("Unable to open file!");
|
||||
$txt = 'freischaltmailReq = '.$_POST['freischalt_y'].' \n mail_adresse_freischalttyp = "'.$_POST['freischalt_m'].'" \n freischalten_name = "'.$_POST['freischalt_n'].'"';
|
||||
fwrite($configini, $txt);
|
||||
fclose($configini);
|
||||
echo msg('succes', 'Das Seitenmodul wurde erfolgreich eingerichtet.<br/>');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', 'Fehler beim Einrichten des Seitenmoduls.');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h2>SimplePages</h2><span>Benötigt Freischaltung der Inhalte</span><select name="freischalt_y"><option value="true">Ja</option><option value="false">Nein</option></select><br/><br/>
|
||||
<span>Benutzername des Freischaltenden Benutzers</span><input type="text" placeholder="Benutzername des Freischaltenden Benutzers" name="freischalt_n" value=""/><br/><br/>
|
||||
<span>Mailadressen des Freischaltenden Benutzers</span><input type="text" placeholder="Mailadressen des Freischaltenden Benutzers" name="freischalt_m" value=""/><br/><br/>';
|
||||
}
|
||||
?>
|
|
@ -16,6 +16,7 @@ if (hasPerm('manage_pages'))
|
|||
<tr>
|
||||
<th><?php echo $lang->get('sp_page');?></th>
|
||||
<th><?php echo $lang->get('sp_last_edit');?></th>
|
||||
<th><?php echo $lang->get('sp_edit_status');?></th>
|
||||
<th><?php echo $lang->get('sp_action');?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -31,6 +32,7 @@ if (hasPerm('manage_pages'))
|
|||
|
||||
if (hasPerm('admin_manage'))//If the User has the persmission to edit every page
|
||||
{
|
||||
$status = [$lang->get('sp_status_inactive'), $lang->get('sp_status_active'), $lang->get('sp_status_pending_confirmation')];
|
||||
foreach ($pages as $id => $pageitem)
|
||||
{
|
||||
echo '<tr>';
|
||||
|
@ -43,6 +45,7 @@ if (hasPerm('manage_pages'))
|
|||
{
|
||||
echo '<td>'.$lang->get('sp_never').'</td>';
|
||||
}
|
||||
echo '<td>'.$status[$pageitem['status']].'</td>';
|
||||
echo '<td><a href="edit.php?id=' . $pageitem['id'] . '"><i class="fa fa-pencil"></i> '.$lang->get('sp_edit').'</a> | <a href="edit.php?id=' . $pageitem['id'] . '&del"><i class="fa fa-trash-o"></i> '.$lang->get('sp_delete').'</a> | <a href="' . $MCONF['web_uri'] . $pageitem['alias'] . '" target="_blank"><i class="fa fa-external-link"></i> '.$lang->get('sp_preview').'</a></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
|
|
@ -40,7 +40,8 @@ if (hasPerm('grant_permissions'))
|
|||
$db->data['lastedit'] = time();
|
||||
if ($db->insert())
|
||||
{
|
||||
echo msg('succes', $lang->get('sp_grant_permissions_success'));
|
||||
echo msg('success', $lang->get('sp_grant_permissions_success'));
|
||||
stream_message('{user} granted permissions to "{extra}".', 3, getUserByID($_POST['user']). ' ('.$_POST['user'].')');
|
||||
} else
|
||||
{
|
||||
echo msg('fail', $lang->get('sp_grant_permissions_fail'));
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
<?php
|
||||
//langstrings
|
||||
$GLOBALS['lang']->set('Seiten', 'sp_pages', 'de');
|
||||
$GLOBALS['lang']->set('Seitenverwaltung', 'sp_manage_pages', 'de');
|
||||
$GLOBALS['lang']->set('Berechtigungen verwalten', 'sp_manage_permissions', 'de');
|
||||
$GLOBALS['lang']->set('Neue Seite erstellen', 'sp_create_new', 'de');
|
||||
|
||||
$GLOBALS['lang']->set('Pages', 'sp_pages', 'en');
|
||||
$GLOBALS['lang']->set('Manage Pages', 'sp_manage_pages', 'en');
|
||||
$GLOBALS['lang']->set('Manage Permissions', 'sp_manage_permissions', 'en');
|
||||
$GLOBALS['lang']->set('Create New Page', 'sp_create_new', 'en');
|
||||
|
||||
$_CONF['mod_name'] = 'SimplePages';
|
||||
$_CONF['mod_desc'] = 'Wird benutzt, um Einfache statische Seitn zu erzeugen und zu verwalten.';
|
||||
$_CONF['app_name'] = 'SimplePages';
|
||||
$_CONF['app_build'] = 2;
|
||||
$_CONF['app_version'] = 'v0.9 Beta';
|
||||
$_CONF['base_url'] = '/'; //Basisurl des moduls, wenn es über das Frontend aufgerufen wird
|
||||
$_CONF['base_file'] = 'front/page.php'; //Datei, die angezeigt wird, wenn die basisurl aufgerufen wird
|
||||
$_CONF['menu_top'] = '<i class="fa fa-file-text"></i> '.$GLOBALS['lang']->get('sp_pages'); //Name des Moduls, wie es im Adminbereich im Hauptmenü auftaucht
|
||||
$_CONF['menu'] = ['<i class="fa fa-th-list"></i> '.$GLOBALS['lang']->get('sp_manage_pages') => 'backend/management.php',
|
||||
'<i class="fa fa-lock"></i> '.$GLOBALS['lang']->get('sp_manage_permissions') => 'backend/permissions.php',
|
||||
'<i class="fa fa-file"></i> '.$GLOBALS['lang']->get('sp_create_new') => 'backend/edit.php?new']; //Ein Array mit menüpunkten im adminbereich
|
||||
$_CONF['menu_top'] = '<i class="fa fa-file-text"></i> '.$lang->get('sp_pages'); //Name des Moduls, wie es im Adminbereich im Hauptmenü auftaucht
|
||||
$_CONF['menu'] = ['<i class="fa fa-th-list"></i> '.$lang->get('sp_manage_pages') => 'backend/management.php',
|
||||
'<i class="fa fa-lock"></i> '.$lang->get('sp_manage_permissions') => 'backend/permissions.php',
|
||||
'<i class="fa fa-file"></i> '.$lang->get('sp_create_new') => 'backend/edit.php?new']; //Ein Array mit menüpunkten im adminbereich
|
||||
$_CONF['dashboard'] = 'backend/dashboard.php';
|
||||
$_CONF['type'] = 'page';
|
||||
$_CONF['install'] = 'install.php';
|
||||
|
@ -26,15 +19,12 @@ $confirmationRequierd = false;
|
|||
$iniFile = 'confirm.ini';
|
||||
if(strpos($_SERVER['SCRIPT_FILENAME'], '/apps/') === false)
|
||||
{
|
||||
$iniFile = '../SimplePages/backend/confirm.ini';
|
||||
$iniFile = __DIR__.'/../SimplePages/backend/confirm.ini';
|
||||
}
|
||||
|
||||
if(file_exists($iniFile))
|
||||
{
|
||||
$config = parse_ini_file($iniFile);
|
||||
$confirmationRequierd = $config['confirmationRequierd'];
|
||||
$confirmationUserMail = $config['confirmationUserMail'];
|
||||
$confirmationUser = $config['confirmationUser'];
|
||||
}
|
||||
|
||||
//print_r($config);
|
|
@ -9,7 +9,7 @@ if(isset($db->data[0]['title']))
|
|||
{
|
||||
$page->setResponseCode(200);
|
||||
$page->setTitle($db->data[0]['title']);
|
||||
$meta = '';
|
||||
$meta = [];
|
||||
|
||||
//gucken ob das was auszuführren ist
|
||||
$pos = strpos($db->data[0]['content'], 'EXEC ');
|
||||
|
@ -22,21 +22,19 @@ if(isset($db->data[0]['title']))
|
|||
} else
|
||||
{
|
||||
$page->setContent($db->data[0]['content']);
|
||||
|
||||
//Meta
|
||||
if(isset($db->data[0]['meta_description']) && $db->data[0]['meta_description'] != '') $meta .= ' <meta name="description" content="' . $db->data[0]['meta_description'] . '">' . "\n";
|
||||
if(isset($db->data[0]['meta_keywords']) && $db->data[0]['meta_keywords'] != '') $meta .= ' <meta name="keywords" content="' . $db->data[0]['meta_keywords'] . '">' . "\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$page->setContent($db->data[0]['content']);
|
||||
|
||||
//Meta
|
||||
if(isset($db->data[0]['meta_description']) && $db->data[0]['meta_description'] != '') $meta .= ' <meta name="description" content="' . $db->data[0]['meta_description'] . '">' . "\n";
|
||||
if(isset($db->data[0]['meta_keywords']) && $db->data[0]['meta_keywords'] != '') $meta .= ' <meta name="keywords" content="' . $db->data[0]['meta_keywords'] . '">' . "\n";
|
||||
}
|
||||
|
||||
//Meta
|
||||
if(isset($db->data[0]['meta_description']) && $db->data[0]['meta_description'] != '')
|
||||
$meta['description'] = $db->data[0]['meta_description'];
|
||||
if(isset($db->data[0]['meta_keywords']) && $db->data[0]['meta_keywords'] != '')
|
||||
$meta['keywords'] = $db->data[0]['meta_keywords'];
|
||||
$page->assign('meta', $meta, true);
|
||||
$page->assign('pageID', $db->data[0]['id']);
|
||||
}
|
||||
}
|
83
apps/SimplePages/install-dev.php
Executable file
83
apps/SimplePages/install-dev.php
Executable file
|
@ -0,0 +1,83 @@
|
|||
<?php
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
if($db->query('CREATE TABLE `' . $_POST['db_prefix'] . 'simplePages_pages` (
|
||||
`id` int(11) NOT NULL,
|
||||
`title` text CHARACTER SET utf8 NOT NULL,
|
||||
`alias` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`content` text CHARACTER SET utf8 NOT NULL,
|
||||
`user` int(11) NOT NULL,
|
||||
`status` int(11) NOT NULL,
|
||||
`meta_description` text CHARACTER SET utf8 NOT NULL,
|
||||
`meta_keywords` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`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,
|
||||
`title` text CHARACTER SET utf8 NOT NULL,
|
||||
`alias` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`content` text CHARACTER SET utf8 NOT NULL,
|
||||
`user` int(11) NOT NULL,
|
||||
`status` int(11) NOT NULL,
|
||||
`meta_description` text CHARACTER SET utf8 NOT NULL,
|
||||
`meta_keywords` longtext CHARACTER SET utf8 NOT NULL,
|
||||
`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;
|
||||
|
||||
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'] . '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;
|
||||
'))
|
||||
{
|
||||
$confirmIni = 'confirmationRequierd = false
|
||||
confirmationUser = 0';
|
||||
if(isset($_POST['confirmationRequired']))
|
||||
{
|
||||
$db->setCol('system_admins');
|
||||
$db->data['username'] = $_POST['confirmationUser'];
|
||||
$db->get();
|
||||
$confirmIni = 'confirmationRequierd = false
|
||||
confirmationUser = '.$db->data[0]['id'];
|
||||
}
|
||||
|
||||
file_put_contents('backend/confirm.ini', $confirmIni, FILE_USE_INCLUDE_PATH);
|
||||
echo msg('success', 'SimplePages was installed successfully.');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', 'An error occured while installing SimplePages.');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<h2>SimplePages</h2>
|
||||
<span> </span>
|
||||
<input type="checkbox" name="confirmationRequired" value="true" id="confirmationRequired" onchange="fadeInput('confirmationUser');"/>
|
||||
<label for="confirmationRequired"><i></i> Needs confirmation for contents</label>
|
||||
<div id="confirmationUser" style="display:none;">
|
||||
<span>Confirmation User:</span> <input type="text" name="confirmationUser" placeholder="Confirmation User"/>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
|
@ -18,7 +18,7 @@ $lang['sp_manage_permissions'] = 'Berechtigungen verwalten';
|
|||
$lang['sp_create_new'] = 'Neue Seite erstellen';
|
||||
$lang['sp_confirm'] = 'Änderungen Freischalten';
|
||||
|
||||
$lang['sp_edit_pages_to_edit'] = 'Seiten, die Sie editieren dürfen';
|
||||
$lang['sp_edit_pages_to_edit'] = 'Pages you can edit';
|
||||
$lang['sp_edit_pages_to_confirm'] = 'Seiten zum Freischalten';
|
||||
|
||||
//Manage Pages
|
||||
|
@ -33,6 +33,11 @@ $lang['sp_preview'] = 'Vorschau';
|
|||
$lang['sp_permissions'] = 'Berechtigungen';
|
||||
$lang['sp_manage_permission'] = 'Berechtigungen vergeben';
|
||||
|
||||
//Status
|
||||
$lang['sp_status_inactive'] = 'Inaktiv';
|
||||
$lang['sp_status_active'] = 'Aktiv';
|
||||
$lang['sp_status_pending_confirmation'] = 'Warte auf Freischaltung';
|
||||
|
||||
//Permissions
|
||||
$lang['sp_user_already_access'] = '%1$s hat schon Zugriff auf diese Seite.';
|
||||
$lang['sp_grant_permissions_success'] = 'Die neuen Berechtigungen wurden erfolgreich vergeben';
|
||||
|
@ -45,7 +50,8 @@ $lang['sp_confirm_success'] = 'Die Änderungen wurden erfolgreich freigeschaltet
|
|||
$lang['sp_confirm_fail'] = 'Fehler beim Freischalten der Änderungen.';
|
||||
$lang['sp_confirm_delete_success'] = 'Die Änderungen wurden erfolgreich gelöscht.';
|
||||
$lang['sp_confirm_delete_fail'] = 'Fehler beim Löschen der Änderungen.';
|
||||
$lang['sp_confirm_changed'] = 'Wurde geändert am %1$s von %2$s (Veränderte Felder werden angezeigt)';
|
||||
$lang['sp_confirm_changed'] = 'Wurde am %1$s von %2$s geändert (Veränderte Felder werden angezeigt)';
|
||||
$lang['sp_confirm_created'] = 'Wurde am %1$s von %2$s erstellt';
|
||||
$lang['sp_confirm_confirm'] = 'Freischalten';
|
||||
$lang['sp_confirm_delete'] = 'Verwerfen';
|
||||
$lang['sp_confirm_no_changes'] = 'Es wurden keine Änderungen zum Freischalten gefunden.';
|
||||
|
@ -65,6 +71,7 @@ $lang['sp_edit_edited_need_confirm'] = 'Diese Änderungen werden öffentlich, so
|
|||
$lang['sp_edit_edit_error'] = 'Fehler beim Ändern der Seite.';
|
||||
$lang['sp_edit_confirm_subject'] = 'Freischaltung der Seite "%1$s"';
|
||||
$lang['sp_edit_confirm_message'] = '%1$s hat die Seite "%2$s" geändert. Diese steht jetzt zum Freischalten für dich bereit. <a href="%3$s">Freischalten</a>';
|
||||
$lang['sp_create_confirm_message'] = '%1$s hat die Seite "%2$s" erstellt. Diese steht jetzt zum Freischalten für dich bereit. <a href="%3$s">Freischalten</a>';
|
||||
$lang['sp_edit_delete_success'] = 'Die Seite wurde erfolgreich gelöscht.';
|
||||
$lang['sp_edit_delete'] = '"%1$s" löschen';
|
||||
$lang['sp_edit_delete_confirm'] = 'Soll die Seite "%1$s" wirklich gelöscht werden?<br/><b>Dieser Vorgang kann nicht rückgängig gemacht werden!</b>';
|
||||
|
@ -74,4 +81,23 @@ $lang['sp_edit_create_new'] = 'Neue Seite erstellen';
|
|||
$lang['sp_edit_edit_page'] = '"%1$s" bearbeiten';
|
||||
$lang['sp_edit_last_edited'] = 'Zuletzt bearbeitet von %1$s am %2$s';
|
||||
$lang['sp_edit_save'] = 'Speichern';
|
||||
$lang['sp_edit_no_page_defined'] = 'Es ist keine Seite definiert.';
|
||||
$lang['sp_edit_no_page_defined'] = 'Es ist keine Seite definiert.';
|
||||
|
||||
//Stream
|
||||
$lang['sp_stream_cofirmed'] = '{user} hat Seitenänderungen der Seite "{extra}" freigeschaltet.';
|
||||
$lang['sp_stream_page_edited'] = '{user} hat die Seite "{extra}" bearbeitet.';
|
||||
$lang['sp_stream_page_created'] = '{user} hat die Seite "{extra}" erstellt.';
|
||||
$lang['sp_stream_page_deleted'] = '{user} hat die Seite "{extra}" gelöscht.';
|
||||
$lang['sp_stream_granted_permissions'] = '{user} hat Berechtigungen an "{extra}" vergeben.';
|
||||
|
||||
//Permissions
|
||||
$lang['sp_perm_manage_pages_name'] = 'Seiten verwalten';
|
||||
$lang['sp_perm_manage_pages_description'] = '';
|
||||
$lang['sp_perm_admin_manage_name'] = 'Alle Seiten verwalten';
|
||||
$lang['sp_perm_admin_manage_description'] = 'Administrativ alle Seiten verwalten. Nutzer ohne diese Berechtigung dürfen nur ihnen zugewiesene Seiten bearbeiten.';
|
||||
$lang['sp_perm_create_new_name'] = 'Neue Seiten erstellen';
|
||||
$lang['sp_perm_create_new_description'] = 'Darf der Nutzer neue Seiten erstellen?';
|
||||
$lang['sp_perm_grant_permissions_name'] = 'Berechtigungen vergeben';
|
||||
$lang['sp_perm_grant_permissions_description'] = 'Anderen Nutzern erlauben, bestimmte Seiten zu bearbeiten.';
|
||||
$lang['sp_perm_view_dashboard_name'] = 'Dashboard ansehen';
|
||||
$lang['sp_perm_view_dashboard_description'] = 'Auf dem Dashboard eine Liste von Seiten einsehen.';
|
|
@ -19,7 +19,7 @@ $lang['sp_create_new'] = 'Create New Page';
|
|||
$lang['sp_confirm'] = 'Confirm Changes';
|
||||
|
||||
$lang['sp_edit_pages_to_edit'] = 'Pages you can edit';
|
||||
$lang['sp_edit_pages_to_confirm'] = 'Pages to confirm';
|
||||
$lang['sp_edit_pages_to_confirm'] = 'Pages pending confirmation';
|
||||
|
||||
//Manage Pages
|
||||
$lang['sp_page'] = 'Page';
|
||||
|
@ -33,6 +33,11 @@ $lang['sp_preview'] = 'Preview';
|
|||
$lang['sp_permissions'] = 'Permissions';
|
||||
$lang['sp_manage_permission'] = 'Grant Permissions';
|
||||
|
||||
//Status
|
||||
$lang['sp_status_inactive'] = 'Inactive';
|
||||
$lang['sp_status_active'] = 'Active';
|
||||
$lang['sp_status_pending_confirmation'] = 'Waiting for Confirmation';
|
||||
|
||||
//Permissions
|
||||
$lang['sp_user_already_access'] = '%1$s has already access to that page.';
|
||||
$lang['sp_grant_permissions_success'] = 'The new permissions were granted successfully';
|
||||
|
@ -46,6 +51,7 @@ $lang['sp_confirm_fail'] = 'An error occured while confirming changes.';
|
|||
$lang['sp_confirm_delete_success'] = 'Changes were successfully deleted.';
|
||||
$lang['sp_confirm_delete_fail'] = 'An error occured while deleting changes.';
|
||||
$lang['sp_confirm_changed'] = 'Was changed at %1$s by %2$s (Showing changed Contents)';
|
||||
$lang['sp_confirm_created'] = 'Was created at %1$s by %2$s';
|
||||
$lang['sp_confirm_confirm'] = 'Confirm';
|
||||
$lang['sp_confirm_delete'] = 'Dismiss';
|
||||
$lang['sp_confirm_no_changes'] = 'No changes for confirmation were found.';
|
||||
|
@ -65,6 +71,7 @@ $lang['sp_edit_edited_need_confirm'] = 'These changes get public, when %1$s conf
|
|||
$lang['sp_edit_edit_error'] = 'An error occured while saving the changes.';
|
||||
$lang['sp_edit_confirm_subject'] = 'Confirmation of "%1$s"';
|
||||
$lang['sp_edit_confirm_message'] = '%1$s edited the page "%2$s". It is now ready for you to confirm. <a href="%3$s">Confirm</a>';
|
||||
$lang['sp_create_confirm_message'] = '%1$s created the page "%2$s". It is now ready for you to confirm. <a href="%3$s">Confirm</a>';
|
||||
$lang['sp_edit_delete_success'] = 'The page was deleted successfully.';
|
||||
$lang['sp_edit_delete'] = 'Delete "%1$s"';
|
||||
$lang['sp_edit_delete_confirm'] = 'Are you sure to delete the page "%1$s"?<br/><b>You cannot undo this!</b>';
|
||||
|
@ -74,4 +81,23 @@ $lang['sp_edit_create_new'] = 'Create new page';
|
|||
$lang['sp_edit_edit_page'] = 'Edit "%1$s"';
|
||||
$lang['sp_edit_last_edited'] = 'Last modified by %1$s at %2$s';
|
||||
$lang['sp_edit_save'] = 'Save';
|
||||
$lang['sp_edit_no_page_defined'] = 'No page defined.';
|
||||
$lang['sp_edit_no_page_defined'] = 'No page defined.';
|
||||
|
||||
//Stream
|
||||
$lang['sp_stream_cofirmed'] = '{user} confirmed contents of the page "{extra}".';
|
||||
$lang['sp_stream_page_edited'] = '{user} edited the page "{extra}".';
|
||||
$lang['sp_stream_page_created'] = '{user} created the page "{extra}".';
|
||||
$lang['sp_stream_page_deleted'] = '{user} deleted the page "{extra}".';
|
||||
$lang['sp_stream_granted_permissions'] = '{user} granted permissions to "{extra}".';
|
||||
|
||||
//Permissions
|
||||
$lang['sp_perm_manage_pages_name'] = 'Manage Pages';
|
||||
$lang['sp_perm_manage_pages_description'] = '';
|
||||
$lang['sp_perm_admin_manage_name'] = 'Manage All Pages';
|
||||
$lang['sp_perm_admin_manage_description'] = 'Manage all pages. Users without this setting can only edit pages they are allowed to edit.';
|
||||
$lang['sp_perm_create_new_name'] = 'Create New Pages';
|
||||
$lang['sp_perm_create_new_description'] = '';
|
||||
$lang['sp_perm_grant_permissions_name'] = 'Grant Page-Permissions';
|
||||
$lang['sp_perm_grant_permissions_description'] = 'Allow other users to grant permissions on pages.';
|
||||
$lang['sp_perm_view_dashboard_name'] = 'View Dashboard';
|
||||
$lang['sp_perm_view_dashboard_description'] = 'See a list of pages on the dashboard.';
|
|
@ -2,32 +2,32 @@
|
|||
"permissions": [
|
||||
{
|
||||
"key": "manage_pages",
|
||||
"name": "Seiten verwalten",
|
||||
"description": "",
|
||||
"name": "sp_perm_manage_pages_name",
|
||||
"description": "sp_perm_manage_pages_description",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "admin_manage",
|
||||
"name": "Alle Seiten verwalten",
|
||||
"description": "Administrativ alle Seiten verwalten. Nutzer ohne diese Berechtigung dürfen nur ihnen zugewiesene Seiten bearbeiten.",
|
||||
"name": "sp_perm_admin_manage_name",
|
||||
"description": "sp_perm_admin_manage_description",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "create_new",
|
||||
"name": "Neue Seiten erstellen",
|
||||
"description": "Darf der Nutzer neue Seiten erstellen?",
|
||||
"name": "sp_perm_create_new_name",
|
||||
"description": "sp_perm_create_new_description",
|
||||
"critical": false
|
||||
},
|
||||
{
|
||||
"key": "grant_permissions",
|
||||
"name": "Berechtigungen vergeben",
|
||||
"description": "Anderen Nutzern erlauben, bestimmte Seiten zu bearbeiten.",
|
||||
"name": "sp_perm_grant_permissions_name",
|
||||
"description": "sp_perm_grant_permissions_description",
|
||||
"critical": true
|
||||
},
|
||||
{
|
||||
"key": "view_dashboard",
|
||||
"name": "Dashboard ansehen",
|
||||
"description": "Auf dem Dashboard eine Liste von Seiten einsehen.",
|
||||
"name": "sp_perm_view_dashboard_name",
|
||||
"description": "sp_perm_view_dashboard_description",
|
||||
"critical": false
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,398 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Logging {
|
||||
|
||||
//globals
|
||||
var $logDir="";
|
||||
var $logFile="";
|
||||
var $countFile="";
|
||||
var $headerTitle="";
|
||||
var $logMode="";
|
||||
var $logNumber="";
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @desc
|
||||
Class constructor.
|
||||
Prepares files for first run.
|
||||
Global variables setting.
|
||||
*/
|
||||
function Logging($logDir='log', $logFile='log_', $headerTitle='LOG', $logMode='oneFile', $countFile="counter"){
|
||||
//-----------------------------------------------------
|
||||
//set global variables //es: seteo variables globales
|
||||
$this->logDir=$logDir;
|
||||
$this->logFile=$logFile;
|
||||
if($countFile) $this->countFile=$this->logDir . "/$countFile";
|
||||
$this->headerTitle=$headerTitle;
|
||||
$this->logMode=$logMode;
|
||||
|
||||
|
||||
|
||||
//generate log number //es: genero el NRO DE LOG
|
||||
//set counter file and log folder //es: seteo el archivo contador y la carpeta de logs
|
||||
$countFile=$this->countFile;
|
||||
$logDir=$this->logDir;
|
||||
|
||||
//verify log folder existence //es: verifico que exista la carpeta de logs
|
||||
//if it doesn't I create it //es: si no existe la creo
|
||||
if(!is_dir($logDir)){
|
||||
if(mkdir($logDir)===FALSE){
|
||||
echo "Could not create log dir"; //es: 'No es posible crear el directorio de logs';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Counter INICILIZATION //es: INICIALIZACIÓN del Counter
|
||||
if(file_exists($countFile)===FALSE){
|
||||
//if log counter file does not exist, I create it //es: si el archivo de conteo de logs no existe lo genero
|
||||
touch($countFile);
|
||||
|
||||
//inicializing file in 0 //es: inicializo el archivo en 0
|
||||
$initNumber=0;
|
||||
$fp=fopen($countFile,"a");
|
||||
if(fwrite($fp,$initNumber)===FALSE){
|
||||
echo "Could not write Counter file"; //es: "No es posible escribir el archivo Contador";
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
//------------------------------------------------------------
|
||||
|
||||
|
||||
//INCREMENT Counter //es: AUMENTO del Counter
|
||||
//read counter //es: leo el contador
|
||||
$logNumber=trim(file_get_contents($countFile));
|
||||
$logNumber++; //increment counter //es: incremento el contador
|
||||
|
||||
//set log number in class var //es: seteo la variable de Clase con el nro de log
|
||||
$this->logNumber=$logNumber;
|
||||
|
||||
//write incremented counter value //es: escribo el contador aumentado en 1
|
||||
$fp=fopen($countFile,"w+");
|
||||
if(fwrite($fp,$logNumber)===FALSE){
|
||||
echo "Could not write Counter file"; //es: "No es posible escribir el archivo Contador";
|
||||
}
|
||||
fclose($fp);
|
||||
//-----------------------------------------------------
|
||||
}//end function
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @param String $logString
|
||||
* @desc
|
||||
Recieves the string you want lo log.
|
||||
This function is used by "logThis" function,
|
||||
which offers simplified logging with
|
||||
some practical functions.
|
||||
|
||||
//spanish
|
||||
Recibe la cadena a loggear en el archivo de logs.
|
||||
Esta función es utilizada por "logThis",
|
||||
función que ofrece un uso simplificado de logging
|
||||
con varias funciones prácticas.
|
||||
*/
|
||||
function writeLogging($logString){
|
||||
global $logNumber;
|
||||
|
||||
|
||||
//depending on selected log mode... //es: según el modo de log definido...
|
||||
//use only one log file, or one file per log instance //es: uso un único archivo o un archivo por log
|
||||
if($this->logMode=='oneFilePerLogging'){
|
||||
$logFile=$this->logDir . "/" . $this->logFile . $logNumber . '.log';
|
||||
} else {
|
||||
//"oneFile" mode
|
||||
$logFile=$this->logDir . "/" . $this->logFile . '.log';
|
||||
}
|
||||
|
||||
//in case file does not exist //es: considero que el archivo no exista
|
||||
if(file_exists($logFile)===FALSE){
|
||||
//if log file does not exist, I create it //es: si el archivo de log no existe lo genero
|
||||
touch($logFile);
|
||||
|
||||
//generate file header //es: genero el encabezado del archivo
|
||||
$logHeader =$this->headerTitle . "\n"; //. " " . $logNumber . "\n";
|
||||
$logHeader.='--------------------------------------------------------------------' . "\n";
|
||||
|
||||
$fp=fopen($logFile,"w+");
|
||||
if(fwrite($fp,$logHeader)===FALSE){
|
||||
echo "Could not write LOG Header"; //es: "No es posible escribir el Header del archivo de LOG";
|
||||
}
|
||||
fclose($fp);
|
||||
}//end if fileExists
|
||||
//-----------------------------------
|
||||
|
||||
|
||||
|
||||
//write to log file //es: escribo el archivo de LOG
|
||||
$fp=fopen($logFile,"a");
|
||||
if(fwrite($fp,$logString)===FALSE){
|
||||
echo "Could not write to LOG file"; //es: "No es posible escribir el archivo de LOG";
|
||||
}
|
||||
fclose($fp);
|
||||
}//end function
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @param String $string
|
||||
* @param String $modifier
|
||||
* @desc
|
||||
Writes to LOG File each recieved value.
|
||||
To write the log we use the function "writeLogging".
|
||||
|
||||
Esta función va escribiendo en el archivo de LOG
|
||||
a medida que recibe valores.
|
||||
Para escribir el log se recurre a la función "writeLogging".
|
||||
|
||||
Output: $this->writeLogging()
|
||||
Will directly write to log file
|
||||
*/
|
||||
function logThis($string,$modifier="empty"){
|
||||
//provides a global counter //es: la función provee un contador global
|
||||
global $logThisCounter;
|
||||
|
||||
|
||||
|
||||
|
||||
//for logThisCounter to start in 1 //es: para que el logThisCounter comience en 1
|
||||
if(!isset($logThisCounter)){
|
||||
$logThisCounter=0;
|
||||
}
|
||||
|
||||
|
||||
//set "line" separator //es: seteo el separador "line"
|
||||
$line="\n" . '--------------------------------------------------------------------' . "\n";
|
||||
|
||||
|
||||
|
||||
|
||||
//it uses modifiers only if a log function has not
|
||||
//been passed
|
||||
|
||||
//spanish
|
||||
//uso los modificadores sólo si no se ha seteado el uso
|
||||
//de una función de log en forma directa.
|
||||
//se considera la posibilidad de pasar sólo una línea, por ej,
|
||||
//como: logThis('f:line'), en tal caso no se usan modificadores
|
||||
if(substr($string,0,2)!='f:'){
|
||||
//manejo distintos tipos de modificadores
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$this->writeLogging($string . "\n");
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
$this->writeLogging($string . "\n");
|
||||
break;
|
||||
|
||||
case '2n':
|
||||
$this->writeLogging($string . "\n\n");
|
||||
break;
|
||||
|
||||
case '3n':
|
||||
$this->writeLogging($string . "\n\n\n");
|
||||
break;
|
||||
|
||||
case 'line':
|
||||
$this->writeLogging($string . $line);
|
||||
break;
|
||||
|
||||
case '2line':
|
||||
$this->writeLogging($string . $line . $line);
|
||||
break;
|
||||
|
||||
case 'nLine':
|
||||
$this->writeLogging($string . "\n" . $line);
|
||||
break;
|
||||
|
||||
case '2nLine':
|
||||
$this->writeLogging($string . "\n\n" . $line);
|
||||
break;
|
||||
|
||||
case 'n2Line':
|
||||
$this->writeLogging($string . "\n" . $line . $line);
|
||||
break;
|
||||
}//end switch $modifier
|
||||
} else {
|
||||
//----------------
|
||||
//FUNCTIONS - "F:"
|
||||
//--------------------------------------------------
|
||||
//using a log function passed in $string //es: aquí estoy utilizando una función de log pasada en $string
|
||||
//example: logThis('f:line')
|
||||
switch($string){
|
||||
case 'f:line':
|
||||
$this->writeLogging($line);
|
||||
break;
|
||||
|
||||
case 'f:2line':
|
||||
$this->writeLogging($line . $line);
|
||||
break;
|
||||
|
||||
case 'f:nl':
|
||||
$this->writeLogging("\n");
|
||||
break;
|
||||
|
||||
case 'f:2nl':
|
||||
$this->writeLogging("\n\n");
|
||||
break;
|
||||
|
||||
case 'f:logNumber':
|
||||
$this->writeLogging('+ LOG Number: ' . $this->logNumber . "\n");
|
||||
break;
|
||||
|
||||
case 'f:counter':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($logThisCounter);
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($modifier . $logThisCounter);
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
|
||||
case 'f:counter.nl':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($logThisCounter . "\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging($modifier . $logThisCounter . "\n");
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
|
||||
case 'f:nl.counter':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $logThisCounter);
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $modifier . $logThisCounter);
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
|
||||
case 'f:nl.counter.nl':
|
||||
switch($modifier){
|
||||
case 'empty':
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $logThisCounter . "\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
$logThisCounter++;
|
||||
$this->writeLogging("\n" . $modifier . $logThisCounter . "\n");
|
||||
break;
|
||||
}//end switch f:counter
|
||||
break;
|
||||
}//end switch $string
|
||||
|
||||
}//end if "f:"
|
||||
|
||||
|
||||
}
|
||||
|
||||
//----------------------------------------------
|
||||
|
||||
/**
|
||||
* @return String $fecha
|
||||
* @desc
|
||||
Return formatted actual date.
|
||||
Example: 28.08.2005 - 01:14
|
||||
|
||||
|
||||
//spanish
|
||||
Devuelve la fecha actual formateada.
|
||||
*/
|
||||
function get_formatted_date(){
|
||||
$fecha=date("d.m.Y - ") . (date("H")) . date(":i");
|
||||
|
||||
return $fecha;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
/**
|
||||
* Delete a file, or a folder and its contents
|
||||
*
|
||||
* @author Aidan Lister <aidan@php.net>
|
||||
* @version 1.0.2
|
||||
* @param string $dirname Directory to delete
|
||||
* @return bool Returns TRUE on success, FALSE on failure
|
||||
*/
|
||||
function rmdirr($dirname)
|
||||
{
|
||||
// Sanity check
|
||||
if (!file_exists($dirname)) {
|
||||
//echo 'dir not exist: ' . $dirname . "<br>\n";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Simple delete for a file
|
||||
if (is_file($dirname)) {
|
||||
return unlink($dirname); //delete files inside dir //acá elimina los archivos dentro del dir
|
||||
//echo 'DELETED FILE: ' . $dirname . "<br>\n";
|
||||
}
|
||||
|
||||
|
||||
if(is_dir($dirname)){
|
||||
// Loop through the folder
|
||||
$dir = dir($dirname);
|
||||
while (false !== $entry = $dir->read()) {
|
||||
// Skip pointers
|
||||
if ($entry == '.' || $entry == '..') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Recurse
|
||||
$this->rmdirr("$dirname/$entry");
|
||||
}
|
||||
|
||||
// Clean up
|
||||
$dir->close();
|
||||
return rmdir($dirname); //delete empty dir //acá elimina el directorio que ya quedó vacío
|
||||
//echo 'DELETED DIR : ' . $dirname . "<br>\n";
|
||||
}//fin if is dir
|
||||
|
||||
|
||||
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @desc
|
||||
Deletes log dir and its contents.
|
||||
|
||||
//spanish
|
||||
Elimina el directorio de Loggings y su contenido
|
||||
para comenzar un nuevo proceso de log desde cero.
|
||||
*/
|
||||
function clean(){
|
||||
$this->rmdirr($this->logDir);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} //end class Logging
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
$GLOBALS['lang']->set('Logfiles', 'log_title', 'de');
|
||||
$GLOBALS['lang']->set('Logfiles', 'log_title', 'en');
|
||||
|
||||
$_CONF['mod_name'] = 'Logfiles';
|
||||
$_CONF['mod_desc'] = 'Logfiles';
|
||||
//$_CONF['base_url'] = 'demomodul/'; //Basisurl des moduls, wenn es über das Frontend aufgerufen wird
|
||||
$_CONF['base_file'] = 'log.php'; //Datei, die angezeigt wird, wenn die basisurl aufgerufen wird
|
||||
$_CONF['menu_top'] = '<i class="fa fa-server"></i> '.$GLOBALS['lang']->get('log_title'); //Name des Moduls, wie es im Adminbereich im Hauptmenü auftaucht
|
||||
$_CONF['menu'] = ['menu_top' => 'index.php']; //Ein Array mit menüpunkten im Backoffice
|
||||
//$_CONF['dashboard'] = 'dashboard.php'; //Optional, eine Datei, welche im admindashboard angezeigt wird
|
||||
$_CONF['type'] = 'static';
|
||||
$_CONF['install'] = 'install.php';
|
||||
?>
|
|
@ -1,176 +0,0 @@
|
|||
<?php
|
||||
require_once '../../inc/autoload.php';
|
||||
printHeader('Logfiles');
|
||||
?>
|
||||
<div class="main">
|
||||
<?php
|
||||
if (hasPerm('view_logfiles'))
|
||||
{
|
||||
$monate = array('01' => "Januar",
|
||||
'02' => "Februar",
|
||||
'03' => "März",
|
||||
'04' => "April",
|
||||
'05' => "Mai",
|
||||
'06' => "Juni",
|
||||
'07' => "Juli",
|
||||
'08' => "August",
|
||||
'09' => "September",
|
||||
'10' => "Oktober",
|
||||
'11' => "November",
|
||||
'12' => "Dezember");
|
||||
if (isset($_GET['detail']))
|
||||
{
|
||||
$logfile = $_GET['detail'] . '.log';
|
||||
$logN = explode('-', str_replace('.log', '', $logfile));
|
||||
echo '<h1>'. $lang->get('log_detail_title'). ' ' . $logN[2] . '. ' . $monate[$logN[1]] . ' ' . $logN[0] . '</h1>';
|
||||
//var_dump($_SERVER);
|
||||
?>
|
||||
<form action="?detail=<?php echo $_GET['detail']; ?>" method="post">
|
||||
<input type="text" name="filter" value="" placeholder="<?php echo $lang->get('log_filter_logs');?>"/>
|
||||
<input type="submit" value="<?php echo $lang->get('log_filter_logs');?>"/>
|
||||
</form>
|
||||
<?php
|
||||
$i = 0;
|
||||
if (file_exists('../../' . $MCONF['log_uri'] . '/' . $logfile))
|
||||
{
|
||||
$lines = file('../../' . $MCONF['log_uri'] . '/' . $logfile);
|
||||
foreach ($lines as $line_num => $line)//logfile ausgeben
|
||||
{
|
||||
if ($line_num > 1)
|
||||
{
|
||||
if (isset($_POST['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_POST['filter']) !== false)//mit post
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
//echo $line . '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} elseif (isset($_GET['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_GET['filter']) !== false)//mit get
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} else//ungefiltert
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<b>'.$i . ' ' . $lang->get('log_views_total').'</b>';
|
||||
} else
|
||||
{
|
||||
echo '<p>'.$lang->get('log_file_not_found').'</p>';
|
||||
}
|
||||
} elseif (isset($_GET['detailmon']))
|
||||
{
|
||||
$logmon = $_GET['detailmon'];
|
||||
$logmonN = explode('-', $logmon);
|
||||
|
||||
echo '<h1>'.$lang->get('log_detail_title_from').' ' . $monate[$logmonN[0]] . ' ' . $logmonN[1] . '</h1>';
|
||||
?>
|
||||
<form action="?detailmon=<?php echo $_GET['detailmon']; ?>" method="post">
|
||||
<input type="text" name="filter" value="" placeholder="<?php echo $lang->get('log_filter_logs');?>"/>
|
||||
<input type="submit" value="<?php echo $lang->get('log_filter_logs');?>" class="speichern"/>
|
||||
</form>
|
||||
<?php
|
||||
$i = 0;
|
||||
if ($handle = opendir('../../' . $MCONF['log_uri'] . ''))//logs anzeiugen
|
||||
{
|
||||
while ((false !== ($file = readdir($handle))))
|
||||
{
|
||||
if (strpos($file, $logmonN[1] . '-' . $logmonN[0]) !== false)//nur zum monat passende logs anzeigen
|
||||
{
|
||||
$lines = file('../../' . $MCONF['log_uri'] . '/' . $file);
|
||||
foreach ($lines as $line_num => $line)//ausgeben
|
||||
{
|
||||
if ($line_num > 1)
|
||||
{
|
||||
if (isset($_POST['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_POST['filter']) !== false)//mit post
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} elseif (isset($_GET['filter']))//filtern
|
||||
{
|
||||
if (strpos($line, $_GET['filter']) !== false)//mit get
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
} else//ungefiltert
|
||||
{
|
||||
$line_s = explode(' ', $line);
|
||||
echo '<b>'.$line_s[0].'</b> '.str_replace($line_s[0], '', $line). '<br/>';
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '<b>'.$i . ' ' . $lang->get('log_views_total').'</b>';
|
||||
} else
|
||||
{
|
||||
echo '<h2>'.$lang->get('log_total_pageviews').' ' . file_get_contents('../../' . $MCONF['log_uri'] . '/count.counter') . '</h2>';
|
||||
$monatelogs = [];
|
||||
//monatslogliste erstellen
|
||||
if ($handle = opendir('../../' . $MCONF['log_uri'] . ''))
|
||||
{
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if ($file != "." && $file != ".." && $file != 'count.counter')
|
||||
{
|
||||
$strtiel = [];
|
||||
$strtiel = explode('-', str_replace('.log', '', $file));
|
||||
$logsatr = $strtiel[0] . '-' . $strtiel[1];
|
||||
if (!in_array($logsatr, $monatelogs))
|
||||
{
|
||||
$monatelogs[] = $strtiel[0] . '-' . $strtiel[1];
|
||||
}
|
||||
//echo '<a href="?detail='.$file.'">'.$file.'</a><br/>';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
//var_dump($monatelogs);
|
||||
//monatsloglist ausgeben
|
||||
asort($monatelogs);
|
||||
foreach ($monatelogs as $log)
|
||||
{
|
||||
$logN = explode('-', $log);
|
||||
echo '<h2>' . $monate[$logN[1]] . ' ' . $logN[0] . '</h2>';
|
||||
if ($handle = opendir('../../' . $MCONF['log_uri'] . ''))
|
||||
{
|
||||
while (false !== ($file = readdir($handle)))
|
||||
{
|
||||
if ($file != "." && $file != ".." && strpos($file, $log) !== false)
|
||||
{
|
||||
echo '<a href="?detail=' . str_replace('.log', '', $file) . '">' . str_replace('.log', '', $file) . '</a><br/>';
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
echo '<a href="?detailmon=' . $logN[1] . '-' . $logN[0] . '">'.sprintf($lang->get('log_show_full_logs'), $monate[$logN[1]], $logN[0]) . '</a>';
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
echo msg('info', $lang->get('missing_permission'));
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
require_once '../../inc/footer.php';
|
||||
?>
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
if(isset($_POST['log_folder']))
|
||||
{
|
||||
$CONFIG['General']['log_uri'] = $_POST['log_folder'];
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<h2>Logfiles</h2>
|
||||
<span>Log-Folder</span>
|
||||
<input type="text" name="log_folder"/>
|
||||
<?php
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* Logfiles apps
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'German (Deutsch)';
|
||||
$lang['__LangCode__'] = 'de';
|
||||
$lang['__Countrycode__'] = 'de_DE';
|
||||
|
||||
$lang['log_detail_title'] = 'Logfile vom';
|
||||
$lang['log_detail_title_from'] = 'Logfiles von';
|
||||
$lang['log_filter_logs'] = 'Logs Filtern';
|
||||
$lang['log_views_total'] = 'Aufrufe insgesamt.';
|
||||
$lang['log_file_not_found'] = 'Logfile nicht gefunden';
|
||||
$lang['log_total_pageviews'] = 'Gesamte Seitenaufrufe';
|
||||
$lang['log_show_full_logs'] = 'Gesamte Logdateien für %1$s %2$s anzeigen';
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* Logfiles apps
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'English (English)';
|
||||
$lang['__LangCode__'] = 'en';
|
||||
$lang['__Countrycode__'] = 'en';
|
||||
|
||||
$lang['log_detail_title'] = 'Logfile of';
|
||||
$lang['log_detail_title_from'] = 'Logfiles from';
|
||||
$lang['log_filter_logs'] = 'Filter logs';
|
||||
$lang['log_views_total'] = 'views in total.';
|
||||
$lang['log_file_not_found'] = 'Logfile not found';
|
||||
$lang['log_total_pageviews'] = 'Total pageviews';
|
||||
$lang['log_show_full_logs'] = 'Show all logfiles from %1$s %2$s';
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
require_once $appUri.'/Log.class.php';
|
||||
|
||||
$logFileName = date('Y-m-d');
|
||||
$headerTitle = 'Logfiles from '.$_SERVER['SERVER_NAME'];
|
||||
$logMode = 'oneFile';
|
||||
$counterFile = 'count.counter';
|
||||
$log = new Logging($MCONF['log_uri'],$logFileName,$headerTitle, $logMode, $counterFile);
|
||||
|
||||
$charset = '';
|
||||
if(isset($_SERVER['HTTP_ACCEPT_CHARSET']))
|
||||
{
|
||||
$charset = $_SERVER['HTTP_ACCEPT_CHARSET'];
|
||||
}
|
||||
$logstring = $_SERVER['REMOTE_ADDR'].' - '.$_SERVER['SERVER_NAME'].' - ['.date('d.m.Y:H:i:s').'] '.$_SERVER['SERVER_PROTOCOL'].' '.http_response_code().' "'.$_SERVER['REQUEST_METHOD'].' '.$_SERVER['REQUEST_URI'].'" "'.$_SERVER['HTTP_USER_AGENT'].'" '.$charset.' '.$_SERVER['HTTP_ACCEPT_LANGUAGE'].' '.$_SERVER['HTTP_CONNECTION'];
|
||||
$log->logThis($logstring);
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
$_CONF['mod_name'] = 'Meta';
|
||||
$_CONF['mod_desc'] = 'Sorgt dafür, das Metadaten auf der Homepage angezeigt werden.';
|
||||
$_CONF['app_name'] = 'Meta';
|
||||
$_CONF['app_desc'] = 'Sorgt dafür, das Metadaten auf der Homepage angezeigt werden.';
|
||||
$_CONF['app_build'] = 1;
|
||||
$_CONF['app_version'] = 'v0.9 Beta';
|
||||
$_CONF['menu_top'] = '';
|
||||
$_CONF['base_file'] = 'meta.php';
|
||||
$_CONF['type'] = 'static';
|
||||
|
|
|
@ -13,28 +13,45 @@ if (isset($_POST['metaconf']))
|
|||
if($metaName!='' && $_POST['metaContent'][$pos]!='')
|
||||
{
|
||||
$db->data = ['name' => $metaName, 'content' => $_POST['metaContent'][$pos]];
|
||||
$db->insert();
|
||||
if($db->insert())
|
||||
{
|
||||
$success = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$success = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($success)
|
||||
{
|
||||
echo msg('success', $lang->get('meta_saved_success'));
|
||||
stream_message('{user} edited meta.', 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', $lang->get('meta_saved_fail'));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<h1>Metadaten </h1><p>Leere Metafelder werden nicht gespeichert.</p><div id="meta_container"><input type="hidden" name="metaconf" value="snd"/>';
|
||||
echo '<h1>'.$lang->get('meta_title').'</h1><p>'.$lang->get('meta_wont_save_empty').'</p><div id="meta_container"><input type="hidden" name="metaconf" value="snd"/>';
|
||||
$i = 1;
|
||||
$db->setCol('meta_meta');
|
||||
$db->get();
|
||||
foreach ($db->data as $data)
|
||||
{
|
||||
echo '<p id="'.$i.'"><span><a onclick="delMeta('.$i.');" title="Meta-Feld löschen" class="del"><i class="fa fa-trash-o"></i></a> '.$data['name'].':</span><input type="text" name="metaContent[]" value="' . $data['content'] . '"/><input type="hidden" name="metaName[]" value="'.$data['name'].'"/></p>';
|
||||
echo '<p id="'.$i.'"><span><a onclick="delMeta('.$i.');" title="'.$lang->get('meta_delete').'" class="del"><i class="fa fa-trash-o"></i></a> '.$data['name'].':</span><input type="text" name="metaContent[]" value="' . $data['content'] . '"/><input type="hidden" name="metaName[]" value="'.$data['name'].'"/></p>';
|
||||
$i++;
|
||||
}
|
||||
echo '</div>';
|
||||
?>
|
||||
<p><a onclick="addMeta()" class="button">Metafeld hinzufügen</a></p>
|
||||
<p><a onclick="addMeta()" class="button"><?php echo $lang->get('meta_add');?></a></p>
|
||||
<script>
|
||||
function addMeta(){
|
||||
var i = Math.floor((Math.random() * 10000) + 9000);
|
||||
$('#meta_container').append('<p id="' + i + '"><span><a onclick="delMeta(\'' + i + '\');" title="Meta-Feld löschen" class="del"><i class="fa fa-trash-o"></i></a> <input type="text" name="metaName[]" placeholder="Name" style="width: 160px; margin-top: 0px;"/>:</span><input type="text" name="metaContent[]" placeholder="Meta-Inhalt" style="margin-top: 5px;"/></p>');
|
||||
$('#meta_container').append('<p id="' + i + '"><span><a onclick="delMeta(\'' + i + '\');" title="<?php echo $lang->get('meta_delete');?>" class="del"><i class="fa fa-trash-o"></i></a> <input type="text" name="metaName[]" placeholder="<?php echo $lang->get('meta_name');?>" style="width: 160px; margin-top: 0px;"/>:</span><input type="text" name="metaContent[]" placeholder="<?php echo $lang->get('meta_content');?>" style="margin-top: 5px;"/></p>');
|
||||
}
|
||||
|
||||
function delMeta(metaCont){
|
||||
|
|
16
apps/meta/install-dev.php
Executable file
16
apps/meta/install-dev.php
Executable file
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
if(isset($_POST['submit']))
|
||||
{
|
||||
if($db->query('CREATE TABLE `' . $_POST['db_prefix'] . 'meta_meta` (
|
||||
`name` text NOT NULL,
|
||||
`content` text NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;'))
|
||||
{
|
||||
echo msg('success', 'Meta was installed successfully.');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', 'An error occured while installing Meta.');
|
||||
exit;
|
||||
}
|
||||
}
|
25
apps/meta/lang/lang.de.php
Executable file
25
apps/meta/lang/lang.de.php
Executable file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* Meta app
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'German (Deutsch)';
|
||||
$lang['__LangCode__'] = 'de';
|
||||
$lang['__Countrycode__'] = 'de_DE';
|
||||
|
||||
$lang['meta_title'] = 'Metadaten';
|
||||
$lang['meta_wont_save_empty'] = 'Leere Metafelder werden nicht gespeichert.';
|
||||
$lang['meta_delete'] = 'Meta-Feld löschen';
|
||||
$lang['meta_content'] = 'Meta-Inhalt';
|
||||
$lang['meta_name'] = 'Name';
|
||||
$lang['meta_add'] = 'Metafeld hinzufügen';
|
||||
$lang['meta_saved_success'] = 'Metadaten wurden erfolgreich gespeichert.';
|
||||
$lang['meta_saved_fail'] = 'Fehler beim Speichern der Metadaten.';
|
||||
|
||||
//Stream
|
||||
$lang['meta_stream_edit'] = '{user} hat Metadaten bearbeitet.';
|
25
apps/meta/lang/lang.en.php
Executable file
25
apps/meta/lang/lang.en.php
Executable file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: English
|
||||
* Meta app
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'English (English)';
|
||||
$lang['__LangCode__'] = 'en';
|
||||
$lang['__Countrycode__'] = 'en';
|
||||
|
||||
$lang['meta_title'] = 'Metadata';
|
||||
$lang['meta_wont_save_empty'] = 'Empty meta fields aren\'t saved.';
|
||||
$lang['meta_delete'] = 'Delete Meta-field';
|
||||
$lang['meta_content'] = 'Meta-Contents';
|
||||
$lang['meta_name'] = 'Name';
|
||||
$lang['meta_add'] = 'Add Meta';
|
||||
$lang['meta_saved_success'] = 'Meta was saved successfully.';
|
||||
$lang['meta_saved_fail'] = 'An error occured while saving metadata.';
|
||||
|
||||
//Stream
|
||||
$lang['meta_stream_edit'] = '{user} edited meta.';
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
$_CONF['mod_name'] = 'Sidebar';
|
||||
$_CONF['mod_desc'] = 'Baut (falls aktiviert) eine Sidebar mit beliebigem Inhalt auf der Seite ein';
|
||||
$_CONF['app_name'] = 'Sidebar';
|
||||
$_CONF['app_desc'] = 'Baut (falls aktiviert) eine Sidebar mit beliebigem Inhalt auf der Seite ein';
|
||||
$_CONF['app_build'] = 1;
|
||||
$_CONF['app_version'] = 'v0.9 Beta';
|
||||
$_CONF['base_file'] = 'sidebar.php';
|
||||
$_CONF['type'] = 'static';
|
||||
$_CONF['general_conf'] = 'genConf.php';
|
||||
|
|
|
@ -13,7 +13,8 @@ if (isset($_POST['sidebarconf']))
|
|||
$db->data = ['active' => $active, 'content' => $text];
|
||||
if ($db->update())
|
||||
{
|
||||
echo msg('success', 'Die Änderungen der Sidebar wurden erfolgreich gespeichert.');
|
||||
echo msg('success', $lang->get('sidebar_edit_success'));
|
||||
stream_message('{user} edited sidebar.', 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -22,21 +23,23 @@ if (isset($_POST['sidebarconf']))
|
|||
}
|
||||
else
|
||||
{
|
||||
echo '<h1>Sidebar</h1>';
|
||||
echo '<h1>'.$lang->get('sidebar_title').'</h1>';
|
||||
|
||||
$db->setCol('sidebar_sidebar');
|
||||
$db->get();
|
||||
|
||||
$active = '';
|
||||
if(!$db->data[0]['active']) $active = ' selected';
|
||||
if(isset($db->data[0])) {
|
||||
if(!$db->data[0]['active']) $active = ' selected';
|
||||
}
|
||||
?>
|
||||
<p>
|
||||
<input type="checkbox" name="active" value="y" id="activeswitch" onchange="toggleTextField()"/>
|
||||
<label for="activeswitch"><i></i>Sidebar anzeigen</label>
|
||||
<label for="activeswitch"><i></i><?php echo $lang->get('sidebar_show');?></label>
|
||||
</p>
|
||||
</div>
|
||||
<div id="editorContainer">
|
||||
Sidebar-Inhalt:
|
||||
<?php echo $lang->get('sidebar_content');?>:
|
||||
<br/>
|
||||
<textarea type="text" name="sidebar_inhalt" id="editor"><?php echo $db->data[0]['content']; ?></textarea>
|
||||
</div>
|
||||
|
|
18
apps/sidebar/install-dev.php
Executable file
18
apps/sidebar/install-dev.php
Executable file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
if(isset($_POST['submit']))
|
||||
{
|
||||
if($db->query('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, \'\');'))
|
||||
{
|
||||
echo msg('success', 'Sidebar was installed successfully.');
|
||||
}
|
||||
else
|
||||
{
|
||||
echo msg('fail', 'An error occured while installing Sidebar.');
|
||||
exit;
|
||||
}
|
||||
}
|
21
apps/sidebar/lang/lang.de.php
Executable file
21
apps/sidebar/lang/lang.de.php
Executable file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: German
|
||||
* Sidebar app
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'German (Deutsch)';
|
||||
$lang['__LangCode__'] = 'de';
|
||||
$lang['__Countrycode__'] = 'de_DE';
|
||||
|
||||
$lang['sidebar_edit_success'] = 'Die Änderungen der Sidebar wurden erfolgreich gespeichert.';
|
||||
$lang['sidebar_title'] = 'Sidebar';
|
||||
$lang['sidebar_show'] = 'Sidebar anzeigen';
|
||||
$lang['sidebar_conten'] = 'Sidebar-Inhalt';
|
||||
|
||||
//Stream
|
||||
$lang['sidebar_stream_edit'] = '{user} hat die Sidebar bearbeitet.';
|
21
apps/sidebar/lang/lang.en.php
Executable file
21
apps/sidebar/lang/lang.en.php
Executable file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/*
|
||||
* Mowie Language Class
|
||||
*
|
||||
* -----------------
|
||||
* LANGUAGE: English
|
||||
* Sidebar app
|
||||
* -----------------
|
||||
*/
|
||||
$lang = [];
|
||||
$lang['__Lang__'] = 'English (English)';
|
||||
$lang['__LangCode__'] = 'en';
|
||||
$lang['__Countrycode__'] = 'en';
|
||||
|
||||
$lang['sidebar_edit_success'] = 'The sidebar changes were saved successfully.';
|
||||
$lang['sidebar_title'] = 'Sidebar';
|
||||
$lang['sidebar_show'] = 'Show sidebar';
|
||||
$lang['sidebar_conten'] = 'Sidebar-Contents';
|
||||
|
||||
//Stream
|
||||
$lang['sidebar_stream_edit'] = '{user} edited sidebar.';
|
13
composer.json
Normal file
13
composer.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"require": {
|
||||
"smarty/smarty": "~3.1.30",
|
||||
"phpmailer/phpmailer": "~6.1.6",
|
||||
"symfony/yaml": "~3.3.9",
|
||||
"erusev/parsedown": "~1.6.3",
|
||||
"hgg/dbcmd": "~0.0.1",
|
||||
"pragmarx/google2fa": "~2.0.6",
|
||||
"bacon/bacon-qr-code": "~1.0.1",
|
||||
|
||||
"alchemy/zippy": "~0.4.8"
|
||||
}
|
||||
}
|
952
composer.lock
generated
Normal file
952
composer.lock
generated
Normal file
|
@ -0,0 +1,952 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "84bc9f991786c643846d05d0c065d5f4",
|
||||
"packages": [
|
||||
{
|
||||
"name": "alchemy/zippy",
|
||||
"version": "0.4.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/alchemy-fr/Zippy.git",
|
||||
"reference": "59fbeefb9a249122867ef25e53addfcce31850d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/alchemy-fr/Zippy/zipball/59fbeefb9a249122867ef25e53addfcce31850d7",
|
||||
"reference": "59fbeefb9a249122867ef25e53addfcce31850d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/collections": "~1.0",
|
||||
"php": ">=5.5",
|
||||
"symfony/filesystem": "^2.0.5 || ^3.0 || ^4.0",
|
||||
"symfony/polyfill-mbstring": "^1.3",
|
||||
"symfony/process": "^2.1 || ^3.0 || ^4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-zip": "*",
|
||||
"guzzle/guzzle": "~3.0",
|
||||
"guzzlehttp/guzzle": "^6.0",
|
||||
"phpunit/phpunit": "^4.0 || ^5.0",
|
||||
"symfony/finder": "^2.0.5 || ^3.0 || ^4.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-zip": "To use the ZipExtensionAdapter",
|
||||
"guzzle/guzzle": "To use the GuzzleTeleporter with Guzzle 3",
|
||||
"guzzlehttp/guzzle": "To use the GuzzleTeleporter with Guzzle 6"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Alchemy\\Zippy\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Alchemy",
|
||||
"email": "dev.team@alchemy.fr",
|
||||
"homepage": "http://www.alchemy.fr/"
|
||||
}
|
||||
],
|
||||
"description": "Zippy, the archive manager companion",
|
||||
"keywords": [
|
||||
"bzip",
|
||||
"compression",
|
||||
"tar",
|
||||
"zip"
|
||||
],
|
||||
"time": "2018-02-22T13:58:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "bacon/bacon-qr-code",
|
||||
"version": "1.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Bacon/BaconQrCode.git",
|
||||
"reference": "5a91b62b9d37cee635bbf8d553f4546057250bee"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/5a91b62b9d37cee635bbf8d553f4546057250bee",
|
||||
"reference": "5a91b62b9d37cee635bbf8d553f4546057250bee",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-iconv": "*",
|
||||
"php": "^5.4|^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gd": "to generate QR code images"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"BaconQrCode": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-2-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ben Scholzen 'DASPRiD'",
|
||||
"email": "mail@dasprids.de",
|
||||
"homepage": "http://www.dasprids.de",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "BaconQrCode is a QR code generator for PHP.",
|
||||
"homepage": "https://github.com/Bacon/BaconQrCode",
|
||||
"time": "2017-10-17T09:59:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/collections",
|
||||
"version": "1.6.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/collections.git",
|
||||
"reference": "fc0206348e17e530d09463fef07ba8968406cd6d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/collections/zipball/fc0206348e17e530d09463fef07ba8968406cd6d",
|
||||
"reference": "fc0206348e17e530d09463fef07ba8968406cd6d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^6.0",
|
||||
"phpstan/phpstan-shim": "^0.9.2",
|
||||
"phpunit/phpunit": "^7.0",
|
||||
"vimeo/psalm": "^3.8.1"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.",
|
||||
"homepage": "https://www.doctrine-project.org/projects/collections.html",
|
||||
"keywords": [
|
||||
"array",
|
||||
"collections",
|
||||
"iterators",
|
||||
"php"
|
||||
],
|
||||
"time": "2020-05-25T19:24:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"version": "1.6.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/erusev/parsedown.git",
|
||||
"reference": "fbe3fe878f4fe69048bb8a52783a09802004f548"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/fbe3fe878f4fe69048bb8a52783a09802004f548",
|
||||
"reference": "fbe3fe878f4fe69048bb8a52783a09802004f548",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.35"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Parsedown": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Emanuil Rusev",
|
||||
"email": "hello@erusev.com",
|
||||
"homepage": "http://erusev.com"
|
||||
}
|
||||
],
|
||||
"description": "Parser for Markdown.",
|
||||
"homepage": "http://parsedown.org",
|
||||
"keywords": [
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"time": "2017-11-14T20:44:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "hgg/dbcmd",
|
||||
"version": "v0.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/hglattergotz/dbcmd.git",
|
||||
"reference": "7aeca6bf33b3bb52f42f56281aaf251c0d7a8818"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/hglattergotz/dbcmd/zipball/7aeca6bf33b3bb52f42f56281aaf251c0d7a8818",
|
||||
"reference": "7aeca6bf33b3bb52f42f56281aaf251c0d7a8818",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"symfony/process": ">=2.1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"HGG\\DbCmd\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Henning Glatter-Götz",
|
||||
"email": "henning@glatter-gotz.com",
|
||||
"homepage": "http://glatter-gotz.com"
|
||||
}
|
||||
],
|
||||
"description": "Wrappter to build and execute management commands against a DB",
|
||||
"homepage": "http://github.com/hglattergotz/dbcmd",
|
||||
"keywords": [
|
||||
"backup",
|
||||
"dump",
|
||||
"mysql"
|
||||
],
|
||||
"time": "2014-11-07T11:28:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/constant_time_encoding",
|
||||
"version": "v2.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/constant_time_encoding.git",
|
||||
"reference": "47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2",
|
||||
"reference": "47a1cedd2e4d52688eb8c96469c05ebc8fd28fa2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7|^8"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^6|^7",
|
||||
"vimeo/psalm": "^1|^2|^3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"ParagonIE\\ConstantTime\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paragon Initiative Enterprises",
|
||||
"email": "security@paragonie.com",
|
||||
"homepage": "https://paragonie.com",
|
||||
"role": "Maintainer"
|
||||
},
|
||||
{
|
||||
"name": "Steve 'Sc00bz' Thomas",
|
||||
"email": "steve@tobtu.com",
|
||||
"homepage": "https://www.tobtu.com",
|
||||
"role": "Original Developer"
|
||||
}
|
||||
],
|
||||
"description": "Constant-time Implementations of RFC 4648 Encoding (Base-64, Base-32, Base-16)",
|
||||
"keywords": [
|
||||
"base16",
|
||||
"base32",
|
||||
"base32_decode",
|
||||
"base32_encode",
|
||||
"base64",
|
||||
"base64_decode",
|
||||
"base64_encode",
|
||||
"bin2hex",
|
||||
"encoding",
|
||||
"hex",
|
||||
"hex2bin",
|
||||
"rfc4648"
|
||||
],
|
||||
"time": "2019-11-06T19:20:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
"version": "v2.0.18",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/random_compat.git",
|
||||
"reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
|
||||
"reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.*|5.*"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"files": [
|
||||
"lib/random.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paragon Initiative Enterprises",
|
||||
"email": "security@paragonie.com",
|
||||
"homepage": "https://paragonie.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
|
||||
"keywords": [
|
||||
"csprng",
|
||||
"polyfill",
|
||||
"pseudorandom",
|
||||
"random"
|
||||
],
|
||||
"time": "2019-01-03T20:59:08+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.1.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3",
|
||||
"reference": "c2796cb1cb99d7717290b48c4e6f32cb6c60b7b3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-ctype": "*",
|
||||
"ext-filter": "*",
|
||||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/annotations": "^1.2",
|
||||
"friendsofphp/php-cs-fixer": "^2.2",
|
||||
"phpunit/phpunit": "^4.8 || ^5.7"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "Needed to send email in multibyte encoding charset",
|
||||
"hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication",
|
||||
"league/oauth2-google": "Needed for Google XOAUTH2 authentication",
|
||||
"psr/log": "For optional PSR-3 debug logging",
|
||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PHPMailer\\PHPMailer\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-2.1-only"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Marcus Bointon",
|
||||
"email": "phpmailer@synchromedia.co.uk"
|
||||
},
|
||||
{
|
||||
"name": "Jim Jagielski",
|
||||
"email": "jimjag@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Andy Prevost",
|
||||
"email": "codeworxtech@users.sourceforge.net"
|
||||
},
|
||||
{
|
||||
"name": "Brent R. Matzelle"
|
||||
}
|
||||
],
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"time": "2020-05-27T12:24:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "pragmarx/google2fa",
|
||||
"version": "v2.0.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/antonioribeiro/google2fa.git",
|
||||
"reference": "5a818bda62fab0c0a79060b06d50d50b5525d631"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/5a818bda62fab0c0a79060b06d50d50b5525d631",
|
||||
"reference": "5a818bda62fab0c0a79060b06d50d50b5525d631",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"paragonie/constant_time_encoding": "~1.0|~2.0",
|
||||
"paragonie/random_compat": "~1.4|~2.0",
|
||||
"php": ">=5.4",
|
||||
"symfony/polyfill-php56": "~1.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"bacon/bacon-qr-code": "~1.0",
|
||||
"phpunit/phpunit": "~4|~5|~6"
|
||||
},
|
||||
"suggest": {
|
||||
"bacon/bacon-qr-code": "Required to generate inline QR Codes."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"component": "package",
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PragmaRX\\Google2FA\\": "src/",
|
||||
"PragmaRX\\Google2FA\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Antonio Carlos Ribeiro",
|
||||
"email": "acr@antoniocarlosribeiro.com",
|
||||
"role": "Creator & Designer"
|
||||
}
|
||||
],
|
||||
"description": "A One Time Password Authentication package, compatible with Google Authenticator.",
|
||||
"keywords": [
|
||||
"2fa",
|
||||
"Authentication",
|
||||
"Two Factor Authentication",
|
||||
"google2fa",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2018-01-06T16:21:07+00:00"
|
||||
},
|
||||
{
|
||||
"name": "smarty/smarty",
|
||||
"version": "v3.1.36",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/smarty-php/smarty.git",
|
||||
"reference": "fd148f7ade295014fff77f89ee3d5b20d9d55451"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/smarty-php/smarty/zipball/fd148f7ade295014fff77f89ee3d5b20d9d55451",
|
||||
"reference": "fd148f7ade295014fff77f89ee3d5b20d9d55451",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "6.4.1",
|
||||
"smarty/smarty-lexer": "^3.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"libs/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"LGPL-3.0"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Monte Ohrt",
|
||||
"email": "monte@ohrt.com"
|
||||
},
|
||||
{
|
||||
"name": "Uwe Tews",
|
||||
"email": "uwe.tews@googlemail.com"
|
||||
},
|
||||
{
|
||||
"name": "Rodney Rehm",
|
||||
"email": "rodney.rehm@medialize.de"
|
||||
}
|
||||
],
|
||||
"description": "Smarty - the compiling PHP template engine",
|
||||
"homepage": "http://www.smarty.net",
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2020-04-14T14:44:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v4.4.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "a3ebf3bfd8a98a147c010a568add5a8aa4edea0f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/a3ebf3bfd8a98a147c010a568add5a8aa4edea0f",
|
||||
"reference": "a3ebf3bfd8a98a147c010a568add5a8aa4edea0f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"symfony/polyfill-ctype": "~1.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Filesystem\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2020-04-12T14:39:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
|
||||
"reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-ctype": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.17-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Ctype\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Gert de Pagter",
|
||||
"email": "BackEndTea@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for ctype functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"ctype",
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2020-05-12T16:14:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "fa79b11539418b02fc5e1897267673ba2c19419c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c",
|
||||
"reference": "fa79b11539418b02fc5e1897267673ba2c19419c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.17-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Mbstring\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for the Mbstring extension",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"mbstring",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-05-12T16:47:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php56",
|
||||
"version": "v1.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php56.git",
|
||||
"reference": "e3c8c138280cdfe4b81488441555583aa1984e23"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/e3c8c138280cdfe4b81488441555583aa1984e23",
|
||||
"reference": "e3c8c138280cdfe4b81488441555583aa1984e23",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"symfony/polyfill-util": "~1.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.17-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php56\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-05-12T16:47:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-util",
|
||||
"version": "v1.17.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-util.git",
|
||||
"reference": "4afb4110fc037752cf0ce9869f9ab8162c4e20d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-util/zipball/4afb4110fc037752cf0ce9869f9ab8162c4e20d7",
|
||||
"reference": "4afb4110fc037752cf0ce9869f9ab8162c4e20d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.17-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Util\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony utilities for portability of PHP codes",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compat",
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"shim"
|
||||
],
|
||||
"time": "2020-05-12T16:14:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v4.4.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/4b6a9a4013baa65d409153cbb5a895bf093dc7f4",
|
||||
"reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Process\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2020-04-15T15:56:18+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v3.3.18",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "af615970e265543a26ee712c958404eb9b7ac93d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/af615970e265543a26ee712c958404eb9b7ac93d",
|
||||
"reference": "af615970e265543a26ee712c958404eb9b7ac93d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.5.9|>=7.0.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/console": "~2.8|~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/console": "For validating YAML files using the lint command"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "3.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Yaml\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2018-01-20T15:04:53+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
2
content/.system/construction2.txt
Normal file
2
content/.system/construction2.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
<h1>Maintenance</h1>
|
||||
<p><a href="http://mowie.cc">mowie.cc</a></p>
|
|
@ -12,13 +12,14 @@
|
|||
<div class="container">
|
||||
{$menu}
|
||||
<div class="seite">
|
||||
{$navTree}
|
||||
{$sidebar}
|
||||
{$inhalt}
|
||||
{$content}
|
||||
{$test}
|
||||
{$test2}
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>© 2015 | <a href="http://kola-entertainments.de" target="_blank">KoLa Entertainments</a> | <a href="{$website_uri}Impressum">Impressum</a></p>
|
||||
<p>© {$copyright} | <a href="http://kola-entertainments.de" target="_blank">KoLa Entertainments</a> | <a href="{$website_uri}Impressum">Impressum</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
|
21
docker-compose.yml
Executable file
21
docker-compose.yml
Executable file
|
@ -0,0 +1,21 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
web:
|
||||
build: ./docker-dev/
|
||||
image: mowie/mowiedev:latest
|
||||
volumes:
|
||||
- ./:/var/www
|
||||
ports:
|
||||
- 8081:80
|
||||
depends_on:
|
||||
- db
|
||||
db:
|
||||
image: mariadb:latest
|
||||
volumes:
|
||||
- ./.db-data:/var/lib/mysql
|
||||
ports:
|
||||
- 127.0.0.1:3361:3306
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=1234
|
||||
- MYSQL_DATABASE=mowie
|
36
docker-dev/Dockerfile
Executable file
36
docker-dev/Dockerfile
Executable file
|
@ -0,0 +1,36 @@
|
|||
FROM alpine:3.5
|
||||
MAINTAINER kolaente - mowie.cc
|
||||
|
||||
ENV TZ "Europe/Berlin"
|
||||
|
||||
RUN apk update && \
|
||||
apk --no-cache add bash tzdata curl ca-certificates s6 ssmtp mysql-client \
|
||||
nginx nginx-mod-http-headers-more
|
||||
|
||||
RUN ln -sf "/usr/share/zoneinfo/$TZ" /etc/localtime && \
|
||||
echo "$TZ" > /etc/timezone && date
|
||||
|
||||
RUN apk --no-cache add \
|
||||
php7 php7-phar php7-curl php7-fpm php7-json php7-zlib php7-gd \
|
||||
php7-xml php7-dom php7-ctype php7-opcache php7-zip php7-iconv \
|
||||
php7-pdo php7-pdo_mysql php7-mysqli php7-mbstring php7-session \
|
||||
php7-mcrypt php7-openssl php7-sockets php7-posix
|
||||
|
||||
RUN rm -rf /var/cache/apk/* && \
|
||||
ln -s /usr/bin/php7 /usr/bin/php && \
|
||||
rm -f /etc/php7/php-fpm.d/www.conf && \
|
||||
touch /etc/php7/php-fpm.d/env.conf
|
||||
|
||||
RUN rm -rf /var/www
|
||||
|
||||
COPY conf/services.d /etc/services.d
|
||||
COPY conf/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY conf/php/php-fpm.conf /etc/php7/
|
||||
COPY conf/php/conf.d/php.ini /etc/php7/conf.d/zphp.ini
|
||||
|
||||
VOLUME /var/www
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
|
||||
CMD []
|
88
docker-dev/conf/nginx/nginx.conf
Executable file
88
docker-dev/conf/nginx/nginx.conf
Executable file
|
@ -0,0 +1,88 @@
|
|||
load_module modules/ngx_http_headers_more_filter_module.so;
|
||||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
server_tokens off;
|
||||
|
||||
log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for" '
|
||||
'$request_time $upstream_response_time $pipe $upstream_cache_status';
|
||||
|
||||
#access_log off;
|
||||
#error_log /dev/stderr;
|
||||
access_log /dev/stdout main_timed;
|
||||
error_log /dev/stderr;
|
||||
|
||||
server {
|
||||
listen [::]:80 default_server;
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
index index.php;
|
||||
root /var/www;
|
||||
client_max_body_size 1G;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/var/run/php-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~* ^.+\.(log|sqlite|yml|yaml|ini)$ {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
return 404;
|
||||
}
|
||||
|
||||
location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ {
|
||||
log_not_found off;
|
||||
expires 7d;
|
||||
etag on;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_comp_level 3;
|
||||
gzip_disable "msie6";
|
||||
gzip_vary on;
|
||||
gzip_types
|
||||
text/plain
|
||||
text/css
|
||||
text/javascript
|
||||
text/xml
|
||||
application/javascript
|
||||
application/json
|
||||
application/xml
|
||||
application/rss+xml;
|
||||
}
|
||||
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
more_clear_headers 'X-Powered-By';
|
||||
more_clear_headers 'Server';
|
||||
}
|
9
docker-dev/conf/nginx/security.conf
Executable file
9
docker-dev/conf/nginx/security.conf
Executable file
|
@ -0,0 +1,9 @@
|
|||
server_tokens off;
|
||||
|
||||
add_header X-Frame-Options SAMEORIGIN;
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
|
||||
more_clear_headers 'X-Powered-By';
|
||||
more_clear_headers 'Server';
|
||||
|
10
docker-dev/conf/php/conf.d/php.ini
Executable file
10
docker-dev/conf/php/conf.d/php.ini
Executable file
|
@ -0,0 +1,10 @@
|
|||
expose_php = Off
|
||||
error_reporting = E_ALL
|
||||
display_errors = On
|
||||
log_errors = On
|
||||
error_log = /dev/stderr
|
||||
cgi.fix_pathinfo=0
|
||||
date.timezone = Europe/Berlin
|
||||
allow_url_fopen = On
|
||||
post_max_size = 2500M
|
||||
upload_max_filesize = 2G
|
20
docker-dev/conf/php/php-fpm.conf
Executable file
20
docker-dev/conf/php/php-fpm.conf
Executable file
|
@ -0,0 +1,20 @@
|
|||
[global]
|
||||
error_log = /proc/self/fd/2
|
||||
log_level = error
|
||||
daemonize = no
|
||||
|
||||
[www]
|
||||
catch_workers_output = yes
|
||||
user = nginx
|
||||
group = nginx
|
||||
listen.owner = nginx
|
||||
listen.group = nginx
|
||||
listen = /var/run/php-fpm.sock
|
||||
pm = dynamic
|
||||
pm.max_children = 20
|
||||
pm.start_servers = 1
|
||||
pm.min_spare_servers = 1
|
||||
pm.max_spare_servers = 3
|
||||
pm.max_requests = 2048
|
||||
include = /etc/php7/php-fpm.d/env.conf
|
||||
|
2
docker-dev/conf/services.d/.s6-svscan/crash
Executable file
2
docker-dev/conf/services.d/.s6-svscan/crash
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
/bin/true
|
2
docker-dev/conf/services.d/.s6-svscan/finish
Executable file
2
docker-dev/conf/services.d/.s6-svscan/finish
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
/bin/true
|
2
docker-dev/conf/services.d/nginx/run
Executable file
2
docker-dev/conf/services.d/nginx/run
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/execlineb -P
|
||||
nginx -g "daemon off;"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user