summaryrefslogtreecommitdiff
path: root/intern.gospeladlershof.de/index.php
blob: 2ec7ccbe1d842748287342c5555216ed761b058c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
$title="Gospelchor Adlershof";
$class_index = 'class="active"';
$class_konzert= '';
$class_proben= '';
$class_chor= '';
require_once __DIR__ . '/header.php';
?>

      <!-- Main component for a primary marketing message or call to action -->
      <div class="jumbotron">
        <h1>Willkommen</h1>
        <p>
          <a class="btn btn-lg btn-primary" href="/proben.php" role="button">Proben eintragen &raquo;</a>
          <a class="btn btn-lg btn-primary" href="/konzert.php" role="button">Konzert eintragen &raquo;</a>
          <a class="btn btn-lg btn-primary" href="/chor.php" role="button">Chorbeschreibung ändern &raquo;</a>
        </p>
      </div>

<?php
require_once __DIR__ . '/modal.html';
require_once __DIR__ . '/code/termine.php';
$konzert = $konzert[0];

if ( isset($_SESSION["error"]) && ! is_null($_SESSION["error"]) ) {
?>
<div class="alert alert-danger" role="alert">
<?php
	echo htmlentities($_SESSION["error"]);
	unset($_SESSION["error"]);
?>
</div>
<?php
} else if ( isset($_SESSION["success"]) && ! is_null($_SESSION["success"]) ) {
?>
<div class="alert alert-success" role="alert">
<?php
	echo htmlentities($_SESSION["success"]);

	if ( isset($_SESSION["dontdisplaydeploybutton"]) ) {
		unset($_SESSION["dontdisplaydeploybutton"]);
	} else {
?>
		<hr>
		Um die Änderung zu veröffentlichen, klicke auf den Button "Webseite aktualisieren".
<?php
	}

	unset($_SESSION["success"]);
?>
</div>
<?php
} else if ( isset($_REQUEST["deploy"]) ) {
	/*
	 * Die Webseite wurde neu gebaut.
	 */
	if ( "1" === $_REQUEST["deploy"] ) {
?>
		<div class="alert alert-success" role="alert">
			Die Webseite wurde aktualisiert und veröffentlicht!
		</div>
<?php

	} else {
?>
		<div class="alert alert-danger" role="alert">
			Es trat ein Fehler beim Erstellen der Webseite auf.
		</div>
<?php
	}
}
?>
        <h3>Das nächste Konzert</h3>
<div class="table-responsive">
  <table class="table table-striped table-condensed">
	<thead>
		<tr>
		<th>Termin</th>
		<th>Uhrzeit</th>
		<th>Beschreibung</th>
		<th>Anfahrt</th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
	<?php
		echo htmlentities($konzert["termin"]);
	?>
			</td>
			<td>
	<?php
		echo htmlentities($konzert["uhrzeit"]);
	?>
			</td>
			<td>
	<?php
		echo str_replace("&lt;strong&gt;", "<strong>", str_replace("&lt;/strong&gt;", "</strong>", htmlentities($konzert["beschreibung"])));
	?>
			</td>
			<td>
	<?php
		echo htmlentities($konzert["anfahrt"]);
	?>
			</td>
		</tr>
	</tbody>
  </table>
</div>

        <h3>All unsere Probentermine:</h3>
<div class="table-responsive">
  <table class="table table-striped table-condensed">
	<thead>
		<tr>
		<th>Termin</th>
		<th>Uhrzeit</th>
		<th>Aktualisieren</th>
		<th>Löschen</th>
		</tr>
	</thead>
	<tbody>
	<?php
	foreach($proben as $item) {
	?>
		<!--div class="col-12-sm col-12-xs col-6-md col-6-lg">
		Termin: <?php echo htmlentities($item["termin"]); ?>
		</div>
		<div class="col-12-sm col-12-xs col-6-md col-6-lg">
		Uhrzeit: <?php echo htmlentities($item["uhrzeit"]); ?> 
		</div>
		<hr-->
		<tr>
			<td><?php echo htmlentities($item["termin"]); ?></td>
			<td><?php echo htmlentities($item["uhrzeit"]); ?></td>
			<td><a href="update_proben.php?id=<?php echo htmlentities($item["id"]);?>" title="Den Eintrag ändern"><span class="glyphicon glyphicon-pencil"></span></a></td>
			<td><a href="code/proben/delete.php?id=<?php echo htmlentities($item["id"]);?>" title="Den Termin löschen"><span style="color: red;" class="glyphicon glyphicon-remove"></span></a></td>
		</tr>
	<?php
	}
	?>
	</tbody>
  </table>
</div>
<a href="/code/export.php" class="btn btn-primary"><span class="glyphicon glyphicon-export"></span> Download als Textdatei</a>
<hr>
<p>Mit Klick auf den Button wird die Webseite <a href="//www.gospeladlershof.de/">https://www.gospeladlershof.de</a> aktualisiert.</p>
<a id="deploy" href="/code/deploy.php" class="btn btn-success"><span class="glyphicon glyphicon-refresh"></span> Webseite aktualisieren</a>

    </div> <!-- /container -->

<?php
require_once __DIR__ . '/footer.php';
?>