From 2b842d2bbb10ade8c91b69ef87ac11d832eff2d8 Mon Sep 17 00:00:00 2001 From: Wruczek Date: Fri, 28 Oct 2016 03:11:10 +0200 Subject: [PATCH] Recovered missing index.php --- index.php | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 index.php diff --git a/index.php b/index.php new file mode 100644 index 0000000..2e94e63 --- /dev/null +++ b/index.php @@ -0,0 +1,75 @@ + + +
+
+

+
+
+ + + +

' . translate($lang["index"]["errortitle"]) . '

' . translate($lang["index"]["errorsubtitle"]) . '

'; + +// ******* +// METHODS +// ******* + +function showNews($path) { + global $parsedown; + + $files = array_diff(scandir($path), array('..', '.')); + foreach ($files as $newsFile) { + + if(!endsWith($newsFile, ".md")) + continue; + + $file = readFileContent($path . "/" . $newsFile); + $lines = explode("\n", $file); + + $title = $lines[0]; + $author = $lines[1]; + $text = implode("\n", array_slice($lines, 3)); + + generateNewsBox($title, $author, $parsedown->text($text)); + } +} + +function generateNewsBox($title, $author, $text) { ?> +
+
+

+
+
+ +
+
+= 0 && strpos($haystack, $needle, $temp) !== false); +} + + +require_once __DIR__ . "/include/footer.php"; +?>