From 391875ea8389d043360961cf2c5a69f2b6d7a91a Mon Sep 17 00:00:00 2001 From: steckbrief Date: Thu, 28 Dec 2017 13:46:55 +0100 Subject: update and delete added --- deleteCharacter.php | 22 ++++++++++ deleteStory.php | 21 ++++++++++ editCharacter.php | 44 ++++++++++++++++++++ editStory.php | 40 +++++++++++++++++++ index.php | 86 ++++++++++++++++++++++++++++++++++++++-- js/stories.js | 4 +- lib/commons | 2 +- lib/functions.stories.inc.php | 30 +++++++++----- lib/new-character-dialog.inc.php | 14 ++++++- lib/new-story-dialog.inc.php | 14 ++++++- 10 files changed, 257 insertions(+), 20 deletions(-) create mode 100644 deleteCharacter.php create mode 100644 deleteStory.php create mode 100644 editCharacter.php create mode 100644 editStory.php diff --git a/deleteCharacter.php b/deleteCharacter.php new file mode 100644 index 0000000..33e0b9b --- /dev/null +++ b/deleteCharacter.php @@ -0,0 +1,22 @@ + diff --git a/deleteStory.php b/deleteStory.php new file mode 100644 index 0000000..17a4901 --- /dev/null +++ b/deleteStory.php @@ -0,0 +1,21 @@ + diff --git a/editCharacter.php b/editCharacter.php new file mode 100644 index 0000000..eb9bee3 --- /dev/null +++ b/editCharacter.php @@ -0,0 +1,44 @@ + diff --git a/editStory.php b/editStory.php new file mode 100644 index 0000000..2e8284d --- /dev/null +++ b/editStory.php @@ -0,0 +1,40 @@ + diff --git a/index.php b/index.php index 1d1dbbe..ded66bd 100644 --- a/index.php +++ b/index.php @@ -2,6 +2,7 @@ include_once(__DIR__.'/lib/commons/functions.common.inc.php'); include_once(__DIR__.'/lib/commons/functions.http.inc.php'); +require_once(__DIR__.'/lib/commons/functions.files.inc.php'); include_once(__DIR__.'/lib/functions.stories.inc.php'); $config = require(__DIR__.'/config/config.inc.php'); @@ -44,6 +45,7 @@ ksort($stories, SORT_STRING); $currentStoryName = visibleName($currentStory); function printEntities($entities, $storyName = NULL) { + global $isAdmin, $isAuthenticated; foreach ($entities as $entity=>$description) { $name = visibleName($entity); $imgName = (NULL != $storyName) ? 'passphoto.png' : 'logo.png'; @@ -56,8 +58,18 @@ function printEntities($entities, $storyName = NULL) { <?=$name;?>
-

-

+

+ + + + + +

+

@@ -76,6 +88,74 @@ function printEntities($entities, $storyName = NULL) { +