summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-11-26 14:40:26 +0100
committersteckbrief <steckbrief@chefmail.de>2017-11-26 14:40:26 +0100
commite753c462386b8dc6a0c9f32c2844f2ee86412e9b (patch)
tree539f755675908102508c5c72ceb07eb68d253b1c
parent66fa1ca8e3ae25af82fb43fb9f79342fc3f65787 (diff)
renaming tv series to story
-rw-r--r--index.php47
m---------lib/commons0
2 files changed, 24 insertions, 23 deletions
diff --git a/index.php b/index.php
index e8b6d5f..6ccf8d7 100644
--- a/index.php
+++ b/index.php
@@ -1,24 +1,25 @@
<?php
+require_once(__DIR__.DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'commons'.DIRECTORY_SEPARATOR.'functions.common.inc.php');
require_once(__DIR__.DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'functions.stories.inc.php');
-$tvSeriesDir = __DIR__.DIRECTORY_SEPARATOR.'stories';
+$storiesDir = __DIR__.DIRECTORY_SEPARATOR.'stories';
-$tvSeriesDirContent = array_diff(scandir($tvSeriesDir), array('..', '.'));
+$storiesDirContent = getDirectoryContent($storiesDir);
-$currentTvSeries = $_GET["series"];
-$currentTvSeriesIsSet = isset($currentTvSeries) && !empty($currentTvSeries);
-$tvSeries = array();
+$currentStory = $_GET['story'];
+$currentStoryIsSet = isset($currentStory) && !empty($currentStory);
+$stories = array();
$characters = array();
-foreach ($tvSeriesDirContent as $tvSeriesName) {
- $tvSeriesPath = $tvSeriesDir.DIRECTORY_SEPARATOR.$tvSeriesName;
- if (is_dir($tvSeriesPath)) {
- array_push($tvSeries, $tvSeriesName);
- if ($currentTvSeriesIsSet && $currentTvSeries == $tvSeriesName) {
- $charactersDirContent = array_diff(scandir($tvSeriesPath), array('..', '.'));
+foreach ($storiesDirContent as $storyName) {
+ $storyPath = $storiesDir.DIRECTORY_SEPARATOR.$storyName;
+ if (is_dir($storyPath)) {
+ array_push($stories, $storyName);
+ if ($currentStoryIsSet && $currentStory == $storyName) {
+ $charactersDirContent = array_diff(scandir($storyPath), array('..', '.'));
foreach ($charactersDirContent as $character) {
- $characterPath = $tvSeriesPath.DIRECTORY_SEPARATOR.$character;
+ $characterPath = $storyPath.DIRECTORY_SEPARATOR.$character;
if (is_dir($characterPath)) {
$characterDescription = file_get_contents($characterPath.DIRECTORY_SEPARATOR.'description.txt');
$characters[$character] = $characterDescription;
@@ -28,7 +29,7 @@ foreach ($tvSeriesDirContent as $tvSeriesName) {
}
}
-$currentTvSeriesName = visibleName($currentTvSeries);
+$currentStoryName = visibleName($currentStory);
?>
<!DOCTYPE html>
@@ -37,7 +38,7 @@ $currentTvSeriesName = visibleName($currentTvSeries);
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://www.sl-its.de/css/bootstrap.spacelab.min.css">
<script src="https://www.sl-its.de/js/jquery-1.11.2.min.js"></script>
- <script src="https://www.sl-its.de/js/bootstrap.min.js"></script>
+ <script src="js/bootstrap.min.js"></script>
<style type="text/css">
.figure-desc {
text-align: justify;
@@ -46,19 +47,19 @@ $currentTvSeriesName = visibleName($currentTvSeries);
height: 300px;
width: 300px;
}
- .series-logo {
+ .story-logo {
font-size: 2em;
}
.spacer {
height: 55px;
}
</style>
- <title>Kinderserienfiguren</title>
+ <title>Kindergeschichten</title>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top navbar-right">
<div class="navbar-header">
- <a class="navbar-brand" href="#">Kinderserienfiguren</a>
+ <a class="navbar-brand" href="#">Kindergeschichten</a>
<button type="button" class="navbar-toggle navbar-toggle-si" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
@@ -70,11 +71,11 @@ $currentTvSeriesName = visibleName($currentTvSeries);
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<?php
- foreach ($tvSeries as $tvSeriesName) {
- $cssClass = ($tvSeriesName == $currentTvSeries) ? " class=\"active\"" : "";
- $visibleName = visibleName($tvSeriesName);
+ foreach ($stories as $storyName) {
+ $cssClass = ($storyName == $currentStory) ? " class=\"active\"" : "";
+ $visibleName = visibleName($storyName);
?>
- <li<?=$cssClass;?>><a href="index.php?series=<?=$tvSeriesName;?>"><?=$visibleName;?></a></li>
+ <li<?=$cssClass;?>><a href="index.php?story=<?=$storyName;?>"><?=$visibleName;?></a></li>
<?php
}
?>
@@ -86,7 +87,7 @@ $currentTvSeriesName = visibleName($currentTvSeries);
<div class="container">
<div class="row">
<div class="col-md-7 text-center">
- <img class="img-fluid mb-3 mb-md-0 series-logo" src="<?=$currentTvSeries?>/logo.png" alt="<?=$currentTvSeriesName;?>" title="<?=$currentTvSeriesName;?>">
+ <img class="img-fluid mb-3 mb-md-0 story-logo" src="<?=$currentStory?>/logo.png" alt="<?=$currentStoryName;?>" title="<?=$currentStoryName;?>">
</div>
</div>
<?php
@@ -96,7 +97,7 @@ $currentTvSeriesName = visibleName($currentTvSeries);
<!-- <?=$characterName;?> -->
<div class="row">
<div class="col-md-7 text-center">
- <img class="img-fluid rounded mb-3 mb-md-0 figure-pic" src="<?=$currentTvSeries?>/<?=$character;?>/passphoto.png" alt="<?=$characterName;?>" title="<?=$characterName;?>">
+ <img class="img-fluid rounded mb-3 mb-md-0 figure-pic" src="<?=$currentStory?>/<?=$character;?>/passphoto.png" alt="<?=$characterName;?>" title="<?=$characterName;?>">
</div>
<div class="col-md-5">
<h3><?=$characterName;?></h3>
diff --git a/lib/commons b/lib/commons
-Subproject b713fcfb99dc9c2061fef5e9d0c074aaf8aac4d
+Subproject c906747e7aef1308b956a62c911d726065a39ad