diff options
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> |
