diff options
| author | Horus3 | 2014-10-05 22:00:46 +0200 |
|---|---|---|
| committer | Horus3 | 2014-10-05 22:00:46 +0200 |
| commit | a3009bf57d50fbc25a707b32fb3c5c170d011680 (patch) | |
| tree | 4c65be59038335b14cf5c7bfabc98e6c7dee13c9 /functions.php | |
| parent | 1851c3a180eafb4563a9f6e4dd40fcc5e925896a (diff) | |
| parent | 3833ab7e3588b4f5c05f440713f5cdf30b9029ae (diff) | |
| download | jungegemeinde-a3009bf57d50fbc25a707b32fb3c5c170d011680.tar.gz | |
Merge branch 'master' of git.iamfabulous.de:jungegemeinde
Diffstat (limited to 'functions.php')
| -rw-r--r-- | functions.php | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/functions.php b/functions.php index 62d5299..9f5ff49 100644 --- a/functions.php +++ b/functions.php @@ -162,6 +162,15 @@ function print_list($option = false){ <?php } ?> +<?php +# start caching + if ( $c->exists(CACHEPREFIX . "adressliste.html")){ + echo $c->getValue(CACHEPREFIX . "adressliste.html"); + header("X-Cache-Table: Hit"); + return; + } + ob_start(); +?> </div> <div class="row"> <div class="table-responsive"> @@ -188,10 +197,10 @@ function print_list($option = false){ <td>".htmlentities($row['adresse'])."</td> <td>".htmlentities($row['telefonnummer'])."</td> <td>".htmlentities($row['handynummer'])."</td> - <td>".htmlentities($row['email'])."</td> + <td><a href='mailto:".htmlentities($row['email'])."' title='Sende ".htmlentities($row['name'])." eine E-Mail'>".htmlentities($row['email'])."</a></td> <td>".htmlentities($row['geburtstag'])."</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> + <td><a href='/?page=update&id=".htmlentities($row['member_id'])."' title='Ändere den Eintrag'><span class='glyphicon glyphicon-pencil'></span></a></td> </tr>"; $count++; } @@ -204,8 +213,10 @@ function print_list($option = false){ </form> </div> </div> - <?php + $table = ob_get_contents(); + $c->setKey(CACHEPREFIX . "adressliste.html", $table); + ob_end_flush(); } function print_update_list($id){ @@ -617,7 +628,7 @@ function print_download(){ lredirect("download;type=".$type); header($_SERVER["SERVER_PROTOCOL"] . " 302 Moved"); - header("Refresh: 2; ".DOMAIN."/?page=action&task=download&type=".$type); + header("Refresh: 0; ".DOMAIN."/?page=action&task=download&type=".$type); ?> <h1>Download</h1> <h4>Der Download der Adressliste (vom Typ 'text/<?php echo $type; ?>') sollte automatisch starten.</h4> |
