Sponsorenverwaltung - Team StarCraft e.V.
All
Data Structures
Files
Functions
Variables
export_list_newsletter.php
Go to the documentation of this file.
1
<?php
2
/**
3
* @file export_list_newsletter.php
4
*
5
* @brief Displays a list with E-mail addresses of contact persons to be used for the newsletter.
6
*
7
* @details
8
* Has the possiblities to load all email addresses from the database or just
9
* the ones the user has chosen to export.
10
*
11
* @copyright (c) 2013, Team StarCraft e.V.
12
* @version 1.0.0
13
* @author Niklas Engelhardt
14
* @author Alexander Vorndran
15
* @date 02.07.2013
16
*/
17
18
/// @cond MAINPART
19
// include
20
include(
"inc/common.php"
);
21
22
// UserCake
23
if
(!
accessGranted
($_SERVER[
'PHP_SELF'
])) {
24
if
(
isUserLoggedIn
()) {
25
exitWithErrorTemplate
(array(
'Die angeforderte Seite ist gesperrt.'
));
26
}
27
else
{
28
exitWithErrorTemplateAndRedirect
(array(
'Die angeforderte Seite ist gesperrt oder geschützt.'
),
'login.php'
, 2);
29
}
30
}
31
else
{
32
if
(isset($_GET[
'result'
])) {
33
// this result identifier is the key to obtain the data the user has selected for export
34
$resultIdentifier = $_GET[
'result'
];
35
if
(ctype_alnum($resultIdentifier)) {
36
$sponsorIds = $loggedInUser->loadResult($_GET[
'result'
]);
37
$mailaddresses =
fetchMailAdressesNewsletter
($sponsorIds);
38
}
39
else
{
40
$err[] =
"Token ungültig!"
;
41
exitWithErrorTemplate
($err);
42
}
43
}
44
else
{
45
$mailaddresses=(
fetchMailAdressesNewsletter
());
46
}
47
48
echo
writeCsvFile
($mailaddresses,
false
);
49
die();
50
}
51
/// @endcond
52
?>
53
54
55
export_list_newsletter.php
Generated by
1.8.4