aboutsummaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php51
1 files changed, 39 insertions, 12 deletions
diff --git a/functions.php b/functions.php
index 854489f..fcebb9f 100644
--- a/functions.php
+++ b/functions.php
@@ -95,7 +95,7 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) {
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
- <button id="submit" name="submit" class="btn btn-info">Log In</button>
+ <button id="submit" name="submit" class="btn btn-info"><span class="glyphicon glyphicon-log-in"></span> Lass mich rein</button>
</div>
</div>
@@ -111,6 +111,8 @@ if( isset($_GET["goto"]) && $_GET["goto"] != "" ) {
}
function print_logout(){
+ global $cache;
+ $cache = false;
global $user;
if ( $user->isLoggedIn() ){
$user->logout();
@@ -186,7 +188,8 @@ function print_list($option = false){
<td>".htmlentities($row['handynummer'])."</td>
<td>".htmlentities($row['email'])."</td>
<td>".htmlentities($row['geburtstag'])."</td>
- <td><a href='/?page=update&id=".htmlentities($row['member_id'])."'><input type='checkbox' name='change' value='true'></a></td>
+ <!--td><a href='/?page=update&id=".htmlentities($row['member_id'])."' onclick=\"window.location='/?page=update&id=".htmlentities($row['member_id'])."'\"><input type='checkbox' name='change' value='true'></a></td-->
+ <td><a href='/?page=update&id=".htmlentities($row['member_id'])."'><span class='glyphicon glyphicon-pencil'></span></a></td>
</tr>";
$count++;
}
@@ -194,8 +197,8 @@ function print_list($option = false){
</tbody>
</table>
</div>
- <form method="POST" action="/?page=add&_flush="<?php echo $c->token; ?>>
- <button id="singlebutton" class="btn btn-info" type="submit">Füge jemanden hinzu</button>
+ <form method="POST" action="/?page=add&_flush=<?php echo $c->token; ?>">
+ <button id="singlebutton" class="btn btn-info" type="submit"><span class="glyphicon glyphicon-ok-sign"></span> Füge jemanden hinzu</button>
</form>
</div>
</div>
@@ -251,7 +254,7 @@ function print_update_list($id){
</table>
</div>
- <button id="singlebutton" name="singlebutton" class="btn btn-info" type="submit">Ändere!</button>
+ <button id="singlebutton" name="singlebutton" class="btn btn-info" type="submit"><span class="glyphicon glyphicon-cog"></span> Ändere!</button>
@@ -264,7 +267,7 @@ function print_update_list($id){
<div class="form-group">
<label class="col-md-4 control-label" for="singlebutton"></label>
<div class="col-md-4">
- <button id="singlebutton" name="singlebutton" class="btn btn-danger" type="submit" onclick="return confirm('Bist du dir sicher? Der Datensatz wird unwiederbringlich gelöscht werden!');">Löschen!</button>
+ <button id="singlebutton" name="singlebutton" class="btn btn-danger" type="submit" onclick="return confirm('Bist du dir sicher? Der Datensatz wird unwiederbringlich gelöscht werden!');"><span class="glyphicon glyphicon-warning-sign"></span> Löschen!</button>
</div>
</div>
</fieldset>
@@ -313,7 +316,7 @@ function print_add_entry_to_list(){
</tbody>
</table>
</div>
- <button id="singlebutton" name="singlebutton" class="btn btn-info" type="submit">Hinzufügen!</button>
+ <button id="singlebutton" name="singlebutton" class="btn btn-info" type="submit"><span class="glyphicon glyphicon-check"></span> Hinzufügen!</button>
</form>
</div>
<?php
@@ -332,6 +335,8 @@ function _add_entry(){
function print_404(){
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+ global $cache;
+ $cache = false;
?>
<!--h1 style="color:red;font-size:3.0em;">404 - Not Found</h1-->
<h1>Error 404 - Not Found</h1>
@@ -340,7 +345,13 @@ function print_404(){
</div>
<div class="row video">
<div class="embed-responsive embed-responsive-16by9">
- <video class="embed-responsive-item" src="/static/error.webm" controls autoplay loop></video>
+ <!--video class="embed-responsive-item" src="/static/error.webm" controls autoplay loop></video-->
+ <video class="embed-responsive-item" autoplay loop>
+ <source src="/static/error.webm" type="video/webm" media="all and (min-width: 720px)">
+ <source src="/static/error-480.webm" type="video/webm" media="all and (min-width: 480px)">
+ <source src="/static/error-320.webm" type="video/webm" media="all and (max-width: 479px)">
+ Tja, tut mir Leid. Leider unterstützt dein Browser keine HTML5 Videos. Schon mal über ein Upgrade nachgedacht?
+ </video>
</div>
<br>
<p>Wir haben die Seite <strong>'<?php echo htmlentities($_SERVER['REQUEST_URI']); ?>'</strong> nicht gefunden!</p>
@@ -439,7 +450,7 @@ function print_register($option = false){
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
- <button id="submit" name="submit" class="btn btn-info">Registrieren</button>
+ <button id="submit" name="submit" class="btn btn-info"><span class="glyphicon glyphicon-share-alt"></span> Registrieren</button>
</div>
</div>
@@ -452,6 +463,8 @@ function print_register($option = false){
}
function print_account($option = false){
+ global $cache;
+ $cache = false;
lredirect("account");
global $user;
?>
@@ -530,7 +543,7 @@ function print_account($option = false){
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
- <button id="submit" name="submit" class="btn btn-primary">Ändere!</button>
+ <button id="submit" name="submit" class="btn btn-primary"><span class="glyphicon glyphicon-cog"></span> Ändere!</button>
</div>
</div>
@@ -581,7 +594,7 @@ function print_recover($option = false){
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
- <button id="submit" name="submit" class="btn btn-primary">Recover!</button>
+ <button id="submit" name="submit" class="btn btn-primary"><span class="glyphicon glyphicon-export"></span> Recover!</button>
</div>
</div>
@@ -593,13 +606,15 @@ function print_recover($option = false){
}
function print_download(){
+ global $cache;
+ $cache = false;
if ( ! isset($_GET["type"]) || $_GET["type"] == "plain" )
$type = "plain";
else
$type = "csv";
lredirect("download;type=".$type);
- header($_SERVER["SERVER_PROTOCOL"] . " 301 Moved");
+ header($_SERVER["SERVER_PROTOCOL"] . " 302 Moved");
header("Refresh: 2; ".DOMAIN."/?page=action&task=download&type=".$type);
?>
<h1>Download</h1>
@@ -613,6 +628,18 @@ function print_download(){
<?php
}
+function flush_cache(){
+ lredirect("cache");
+ global $c;
+ $c->flush();
+ global $cache;
+ $cache = false;
+?>
+<h1>Cache flushed!</h1>
+</div>
+<?php
+}
+
function minify($buffer){
$search = array(
'/\>[^\S ]+/s', // strip whitespaces after tags, except space