From 4173577f3f5ebfdc48727cd6065b5de5ac6c4383 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sat, 2 Dec 2017 00:13:10 +0100 Subject: admin enhanced; list all stories if no current story is set --- index.php | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6ccf8d7..85b72ff 100644 --- a/index.php +++ b/index.php @@ -15,7 +15,8 @@ $characters = array(); foreach ($storiesDirContent as $storyName) { $storyPath = $storiesDir.DIRECTORY_SEPARATOR.$storyName; if (is_dir($storyPath)) { - array_push($stories, $storyName); + $storyDescription = file_get_contents($storyPath.DIRECTORY_SEPARATOR.'description.txt'); + $stories[$storyName] = $storyDescription; if ($currentStoryIsSet && $currentStory == $storyName) { $charactersDirContent = array_diff(scandir($storyPath), array('..', '.')); foreach ($charactersDirContent as $character) { @@ -72,22 +73,23 @@ $currentStoryName = visibleName($currentStory); +
+
- +
-->
- <?=$characterName;?> + <?=$characterName;?>

@@ -109,7 +111,24 @@ $currentStoryName = visibleName($currentStory);
+} else { + foreach ($stories as $story=>$storyDescription) { + $storyName = visibleName($story); +?> +
+
+ +
+
+

+

+
+
+
+
-- cgit v1.2.3