Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit 62ddf4d

Browse files
committed
Merge branch 'develop'
2 parents 259f3a2 + dced53f commit 62ddf4d

File tree

643 files changed

+55928
-37291
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

643 files changed

+55928
-37291
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,23 @@ flatCore is a lightweight Content Management System based on PHP and SQLite. MyS
1717

1818
__You are very welcome to take part in this project.__ We are happy for every contribution. Please submit your code to the develop branch, and start a pull request.
1919

20-
This branch will be merged into master, as soon as a new stable version is ready.
20+
This branch will be merged into main branch, as soon as a new stable version is ready.
2121

2222
#### 3rd Party Frameworks and Plugins
2323

2424
+ Medoo - https://github.com/catfan/Medoo
2525
+ TinyMCE - http://www.tinymce.com/
2626
+ Ace Editor - http://ace.c9.io/
2727
+ Smarty - http://www.smarty.net/
28-
+ Swift Mailer - http://swiftmailer.org/
28+
+ PHPMailer - https://github.com/PHPMailer/PHPMailer
2929
+ Bootstrap - http://getbootstrap.com/
3030
+ jQuery - https://jquery.com/
3131
+ fancyBox - http://fancyapps.com/fancybox/3/
32-
+ Masonry - http://masonry.desandro.com
32+
+ featherlight - https://github.com/noelboss/featherlight/
3333
+ DropzoneJS - http://www.dropzonejs.com
3434
+ jquery.dirtyforms - https://github.com/snikch/jquery.dirtyforms
3535
+ matchHeight - http://brm.io/jquery-match-height/
3636
+ bootstrap-tagsinput - https://github.com/bootstrap-tagsinput/bootstrap-tagsinput
3737
+ image-picker - https://github.com/rvera/image-picker
38+
+ Spyc - https://github.com/mustangostang/spyc/
39+
+ Parsedown - https://parsedown.org

acp/acp.php

Lines changed: 120 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
require '../lib/Medoo.php';
66
use Medoo\Medoo;
77

8+
require '../lib/Spyc/Spyc.php';
9+
810
require '../config.php';
911
if(is_file('../'.FC_CONTENT_DIR.'/config.php')) {
1012
include '../'.FC_CONTENT_DIR.'/config.php';
1113
}
14+
if(is_file('../'.FC_CONTENT_DIR.'/config_smtp.php')) {
15+
include '../'.FC_CONTENT_DIR.'/config_smtp.php';
16+
}
1217

1318

1419
if(is_file('../config_database.php')) {
@@ -31,7 +36,8 @@
3136

3237
$db_content = $database;
3338
$db_user = $database;
34-
$db_statistics = $database;
39+
$db_statistics = $database;
40+
$db_posts = $database;
3541

3642

3743

@@ -46,7 +52,8 @@
4652

4753
define("CONTENT_DB", "../$fc_db_content");
4854
define("USER_DB", "../$fc_db_user");
49-
define("STATS_DB", "../$fc_db_stats");
55+
define("STATS_DB", "../$fc_db_stats");
56+
define("POSTS_DB", "../$fc_db_posts");
5057

5158
$db_content = new Medoo([
5259
'database_type' => 'sqlite',
@@ -61,20 +68,28 @@
6168
$db_statistics = new Medoo([
6269
'database_type' => 'sqlite',
6370
'database_file' => STATS_DB
64-
]);
71+
]);
72+
73+
$db_posts = new Medoo([
74+
'database_type' => 'sqlite',
75+
'database_file' => POSTS_DB
76+
]);
6577

6678
}
6779

68-
69-
70-
7180
define("INDEX_DB", "../$fc_db_index");
7281
define("FC_ROOT", str_replace("/acp","",FC_INC_DIR));
7382
define("IMAGES_FOLDER", "$img_path");
7483
define("FILES_FOLDER", "$files_path");
7584
define("FC_SOURCE", "backend");
7685

7786

87+
$db_index = new Medoo([
88+
'database_type' => 'sqlite',
89+
'database_file' => INDEX_DB
90+
]);
91+
92+
7893

7994
require 'core/access.php';
8095
include 'versions.php';
@@ -131,6 +146,7 @@
131146

132147
require '../lib/lang/index.php';
133148
require 'core/functions.php';
149+
require '../global/functions.php';
134150
require 'core/switch.php';
135151

136152
$all_mods = get_all_moduls();
@@ -187,18 +203,15 @@
187203
<script language="javascript" type="text/javascript" src="../lib/js/tinymce/jquery.tinymce.min.js"></script>
188204

189205
<!-- Add fancyBox -->
190-
<link rel="stylesheet" href="./css/jquery.fancybox.min.css?v=2.1.5" type="text/css" media="screen" />
191206
<script type="text/javascript" src="./js/jquery.fancybox.min.js?v=2.1.5"></script>
192207

193208
<script type="text/javascript" src="../lib/js/jquery/jquery.textareaCounter.plugin.js"></script>
194-
195-
<link rel="stylesheet" href="css/bootstrap.min.css?v=4.5.2" type="text/css" media="screen, projection">
196209

197210
<?php
198211
if($acptheme == 'dark') {
199-
$style_file = 'css/styles_dark.css?v='.time();
212+
$style_file = 'theme/css/styles_dark.css?v='.time();
200213
} else {
201-
$style_file = 'css/styles_light.css?v='.time();
214+
$style_file = 'theme/css/styles_light.css?v='.time();
202215
}
203216
echo '<link rel="stylesheet" href="'.$style_file.'" type="text/css" media="screen, projection">';
204217
?>
@@ -222,7 +235,6 @@
222235

223236
<!-- uploader -->
224237
<script src="../lib/js/dropzone.js"></script>
225-
<link rel="stylesheet" href="../lib/css/dropzone.css" type="text/css" media="screen, projection">
226238

227239
<!-- ACE Editor -->
228240
<script src="../lib/js/ace/ace.js" data-ace-base="../lib/js/ace" type="text/javascript" charset="utf-8"></script>
@@ -236,7 +248,96 @@
236248

237249
<!-- image picker -->
238250
<script type="text/javascript" src="../lib/js/jquery/image-picker.min.js"></script>
239-
251+
252+
<!-- date/time picker -->
253+
<script type="text/javascript" src="js/moment.min.js"></script>
254+
<script type="text/javascript" src="js/bootstrap-datetimepicker.min.js"></script>
255+
256+
<script type="text/javascript" src="js/accounting.min.js"></script>
257+
258+
<script type="text/javascript">
259+
260+
$.extend(true, $.fn.datetimepicker.defaults, {
261+
icons: {
262+
time: 'far fa-clock',
263+
date: 'far fa-calendar',
264+
up: 'fas fa-arrow-up',
265+
down: 'fas fa-arrow-down',
266+
previous: 'fas fa-chevron-left',
267+
next: 'fas fa-chevron-right',
268+
today: 'fas fa-calendar-check',
269+
clear: 'far fa-trash-alt',
270+
close: 'far fa-times-circle'
271+
}
272+
});
273+
274+
$(function(){
275+
276+
$('.dp').datetimepicker({
277+
timeZone: 'UTC',
278+
format: 'YYYY-MM-DD HH:mm'
279+
});
280+
281+
if($("#price").val()) {
282+
283+
get_netto = $("#price").val();
284+
285+
var e = document.getElementById("tax");
286+
var get_tax = e.options[e.selectedIndex].text;
287+
get_tax = parseInt(get_tax);
288+
get_netto_calc = get_netto.replace(/\./g, '');
289+
get_netto_calc = get_netto_calc.replace(",",".");
290+
current_brutto = get_netto_calc*(get_tax+100)/100;
291+
current_brutto = accounting.formatNumber(current_brutto,4,".",",");
292+
$('#price_total').val(current_brutto);
293+
294+
$('#price').keyup(function(){
295+
get_netto = $('#price').val();
296+
//get_tax = parseInt($('#tax').val());
297+
get_netto_calc = get_netto.replace(/\./g, '');
298+
get_netto_calc = get_netto_calc.replace(",",".");
299+
current_brutto = get_netto_calc*(get_tax+100)/100;
300+
current_brutto = accounting.formatNumber(current_brutto,4,".",",");
301+
$('#price_total').val(current_brutto);
302+
});
303+
304+
$('#price_total').keyup(function(){
305+
get_brutto = $('#price_total').val();
306+
//get_tax = parseInt($('#tax').val());
307+
get_brutto_calc = get_brutto.replace(/\./g, '');
308+
get_brutto_calc = get_brutto_calc.replace(",",".");
309+
current_netto = get_brutto_calc*100/(get_tax+100);
310+
current_netto = accounting.formatNumber(current_netto,4,".",",");
311+
$('#price').val(current_netto);
312+
});
313+
314+
$('#tax').bind("change keyup", function(){
315+
316+
var e = document.getElementById("tax");
317+
var get_tax = e.options[e.selectedIndex].text;
318+
get_tax = parseInt(get_tax);
319+
320+
get_netto = $('#price').val();
321+
get_netto_calc = get_netto.replace(",",".");
322+
323+
current_brutto = get_netto_calc*(get_tax+100)/100;
324+
current_brutto = accounting.formatNumber(current_brutto,4,".",",");
325+
326+
get_brutto_calc = current_brutto.replace(",",".");
327+
current_netto = get_brutto_calc*100/(get_tax+100);
328+
current_netto = accounting.formatNumber(current_netto,4,".",",");
329+
330+
$('#price_total').val(current_brutto);
331+
$('#price').val(current_netto);
332+
});
333+
334+
}
335+
336+
337+
});
338+
339+
</script>
340+
240341

241342
<?php
242343

@@ -317,9 +418,12 @@
317418
}
318419
?>
319420
</p>
320-
321-
<p><b>flatCore</b> Content Management System (<?php echo $fc_version_name . ' <small>B: ' . $fc_version_build; ?>)</small><br />
322-
copyright © <?php echo date('Y'); ?>, <a href="https://www.flatcore.org/" target="_blank">flatCore.org</a> | <a href="https://github.com/flatCore/flatCore-CMS"><i class="fab fa-github"></i> flatCore-CMS</a></p>
421+
<hr>
422+
<p>
423+
<img src="images/fc-logo.svg" alt="fc-logo" width="60px"><br>
424+
<b>flatCore</b> Content Management System (<?php echo $fc_version_name . ' <small>B: ' . $fc_version_build; ?>)</small><br>
425+
copyright © <?php echo date('Y'); ?>, <a href="https://flatcore.org/" target="_blank">flatCore.org</a> | <a href="https://github.com/flatCore/flatCore-CMS"><i class="fab fa-github"></i> flatCore-CMS</a>
426+
</p>
323427
<p class="d-none"><?php echo microtime(true)-$_SERVER['REQUEST_TIME_FLOAT']; ?></p>
324428
</div>
325429

acp/core/ajax.chat.php

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)