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 /action.php | |
| parent | 1851c3a180eafb4563a9f6e4dd40fcc5e925896a (diff) | |
| parent | 3833ab7e3588b4f5c05f440713f5cdf30b9029ae (diff) | |
| download | jungegemeinde-a3009bf57d50fbc25a707b32fb3c5c170d011680.tar.gz | |
Merge branch 'master' of git.iamfabulous.de:jungegemeinde
Diffstat (limited to 'action.php')
| -rw-r--r-- | action.php | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -259,23 +259,27 @@ JG Adlershof"; $suffix = ".csv"; } lredirect("download;type=".$type); - $res = $db->doQuery("SELECT * FROM " . DBPREFIX . "member;"); - $content .= "\n"; - $count = 1; - while ($row = $res->fetch_array() ){ + if ( $c->exists(CACHEPREFIX . "adressliste".$suffix) ){ + $content = $c->getValue(CACHEPREFIX . "adressliste".$suffix); + } else { + $res = $db->doQuery("SELECT * FROM " . DBPREFIX . "member;"); + $content .= "\n"; + $count = 1; + while ($row = $res->fetch_array() ){ - if ( $type == "plain" ){ - $content .= $count . " | " . $row["name"] . " | " . $row["adresse"] . " | " . $row["telefonnummer"] . " | " . $row["handynummer"] . " | " . $row["email"] . " | " . $row["geburtstag"] . "\n"; - } else { - $content .= $count; - for ( $i=1;$i<7;$i++){ - $content .= ';' . $row[$i]; + if ( $type == "plain" ){ + $content .= $count . " | " . $row["name"] . " | " . $row["adresse"] . " | " . $row["telefonnummer"] . " | " . $row["handynummer"] . " | " . $row["email"] . " | " . $row["geburtstag"] . "\n"; + } else { + $content .= $count; + for ( $i=1;$i<7;$i++){ + $content .= ';' . $row[$i]; + } + $content .= "\n"; } - $content .= "\n"; + $count++; } - $count++; + $c->setKey(CACHEPREFIX . "adressliste".$suffix, $content); } - ob_clean(); header("Content-Type: text/".$type."; Charset=UTF-8"); header("Content-Disposition: attachment; filename=\"JG Adressliste ".date("j.n.Y", time()).$suffix."\""); |
