Sponsorenverwaltung - Team StarCraft e.V.
 All Data Structures Files Functions Variables
functions_export.php File Reference

Functions used for export. More...

Go to the source code of this file.

Functions

 writeCsvFile (&$array, $headline=TRUE, $delimiter=",", $windowsLinebreak=TRUE)
 
 fetchMailAdressesNewsletter ($sponsorIds=NULL)
 
 fetchMailAdresses ($sponsorIds=NULL)
 
 fetchSponsorMailNewsletter ($sponsorIdList=NULL)
 
 fetchContactPersonsWithMailAdresses ($sponsorIds=NULL)
 
 fetchSponsorAddresses ($sponsorIds=NULL)
 
 downloadCsvFile ($filename)
 

Detailed Description

Functions used for export.

Provides a wide range of functions to fetch specific information from the database as well as functions for forming the output as .csv-file.

Version
1.0.0
Author
Niklas Engelhardt
Clemens Heinrich
Alexander Vorndran
Date
02.07.2013

Definition in file functions_export.php.

Function Documentation

downloadCsvFile (   $filename)

Provides some header information for a downloadable .csv-file

Parameters
string$filenamethe desired filename
Author
Niklas Engelhardt
Clemens Heinrich

Definition at line 339 of file functions_export.php.

fetchContactPersonsWithMailAdresses (   $sponsorIds = NULL)

Fetches contact information of contact persons from the database and writes them into an array

Parameters
array$sponsorIds[optional]
  • NULL: fetches all contact persons and their contact information from the db
  • Else: fetches the contact information for the contact persons with the given ids
  • Default: NULL
Returns
array $mailAddresses an array containing the information
Author
Niklas Engelhardt
Clemens Heinrich
Alexander Vorndran

Definition at line 232 of file functions_export.php.

References $db, $mysqli, exitWithErrorTemplate(), fetchSponsorContactPersons(), and fetchSponsorDetails().

+ Here is the call graph for this function:

fetchMailAdresses (   $sponsorIds = NULL)

Fetches mail addresses from the database and writes them into an array

Parameters
array$sponsorIds[optional]
  • NULL: fetches all mail addresses from the db
  • Else: fetches mail addresses for the contact persons with the given ids
  • Default: NULL
Returns
array $mailAddresses an array containing the information
Author
Niklas Engelhardt
Clemens Heinrich
Alexander Vorndran

Definition at line 127 of file functions_export.php.

References $db, $mysqli, exitWithErrorTemplate(), and fetchSponsorContactPersons().

+ Here is the call graph for this function:

fetchMailAdressesNewsletter (   $sponsorIds = NULL)

Fetches mail addresses that are used for newsletter from the database and writes them into an array

Parameters
array$sponsorIds[optional]
  • NULL: fetches all mail addresses that are used for newsletter from the db
  • Else: fetches mail addresses that are used for newsletter for the contact persons with the given ids
  • Default: NULL
Returns
array $mailAddresses an array containing the information
Author
Niklas Engelhardt
Clemens Heinrich
Alexander Vorndran

Definition at line 82 of file functions_export.php.

References $db, $mysqli, exitWithErrorTemplate(), and fetchSponsorContactPersons().

+ Here is the call graph for this function:

fetchSponsorAddresses (   $sponsorIds = NULL)

Fetches addresses of sponsors from the database and writes them into an array

Function is used in export_addresses

Parameters
array$sponsorIds[optional]
  • NULL: fetches all sponsors and their addressdata from the db
  • Else: fetches the addressdata for the sponsors with the given ids
  • Default: NULL
Returns
array $addresses an array containing the information
Author
Niklas Engelhardt
Clemens Heinrich
Alexander Vorndran

Definition at line 289 of file functions_export.php.

References $db, $mysqli, exitWithErrorTemplate(), and fetchSponsorDetails().

+ Here is the call graph for this function:

fetchSponsorMailNewsletter (   $sponsorIdList = NULL)

Fetches contact information of contact persons from the database to be used for newsletter and writes them into an array

Parameters
array$sponsorIdList[optional]
  • NULL: fetches contact persons that are used for newsletter and their contact information from the db
  • Else: fetches the contact information for the contact persons with the given ids
  • Default: NULL
Returns
array $mailAddressesNewsletter an array containing the information
Author
Niklas Engelhardt
Clemens Heinrich
Alexander Vorndran

Definition at line 172 of file functions_export.php.

References $db, $mysqli, exitWithErrorTemplate(), fetchSponsorContactPersons(), and fetchSponsorDetails().

+ Here is the call graph for this function:

writeCsvFile ( $array,
  $headline = TRUE,
  $delimiter = ",",
  $windowsLinebreak = TRUE 
)

Writes the content of the array to a .csv-file in php://output

Parameters
array$arrayan array to write down to the .csv-file
boolean$headline[optional]
  • TRUE if a headline should be created out of the keys of the given array
  • FALSE if there should be no headline
  • Default: TRUE
string$delimiter[optional] the delimiter that should be used for the .csv-file
  • Default: ","
boolean$windowsLinebreak[optional]
  • TRUE if an additional Windows-linebreak should be added
  • FALSE if not
  • Default: TRUE
Returns
boolean FALSE if the array was empty
Author
Niklas Engelhardt
Clemens Heinrich
Alexander Vorndran

Definition at line 37 of file functions_export.php.

References isUserLoggedIn().

+ Here is the call graph for this function: