diff options
author | steckbrief <steckbrief@chefmail.de> | 2017-12-28 13:46:55 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2017-12-28 13:46:55 +0100 |
commit | 391875ea8389d043360961cf2c5a69f2b6d7a91a (patch) | |
tree | 7bd8c535cd8c6912f34c193ece35a2efcd73530c /deleteCharacter.php | |
parent | 31ba0cea75b128a664e777a0a2f4180a19501ec3 (diff) |
Diffstat (limited to 'deleteCharacter.php')
-rw-r--r-- | deleteCharacter.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/deleteCharacter.php b/deleteCharacter.php new file mode 100644 index 0000000..33e0b9b --- /dev/null +++ b/deleteCharacter.php @@ -0,0 +1,22 @@ +<?php +require_once(__DIR__.'/lib/commons/functions.common.inc.php'); +require_once(__DIR__.'/lib/commons/functions.http.inc.php'); +require_once(__DIR__.'/lib/commons/functions.files.inc.php'); +require_once(__DIR__.'/lib/functions.stories.inc.php'); + +//print_r($_POST);exit(); + +$storyName = getMandatoryPostParameter('story-name', NULL, true); +$charName = getMandatoryPostParameter('char-name', NULL, true); + +$pathToChar = generatePath(['stories', $storyName, $charName], __DIR__); +echo $pathToChar; +if (dir_exists($pathToChar)) { + rm_dir($pathToChar, TRUE); + echo "dir deleted"; +} else { + echo "dir does not exist"; + return 1; +} + +?> |