diff --git a/booking.earlyaccess_admin.inc b/booking.earlyaccess_admin.inc index f4428cc..6eafde9 100644 --- a/booking.earlyaccess_admin.inc +++ b/booking.earlyaccess_admin.inc @@ -108,7 +108,7 @@ function booking_earlyaccess_generate_codes() { * @see https://stackoverflow.com/questions/1846202/php-how-to-generate-a-random-unique-alphanumeric-string * Requires PHP7 */ -function booking_getToken($length){ +function booking_getToken($length) { $token = ""; $codeAlphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; //$codeAlphabet.= "abcdefghijklmnopqrstuvwxyz"; @@ -120,4 +120,12 @@ function booking_getToken($length){ } return $token; +} + + +/** + * Function to generate csv of early access codes for the current event + */ +function booking_earlyaccess_csv_report() { + } \ No newline at end of file diff --git a/booking.module b/booking.module index 8191dbb..ac7e333 100644 --- a/booking.module +++ b/booking.module @@ -725,6 +725,14 @@ function booking_menu() { 'access arguments' => array('access administration pages'), 'file' => 'booking.earlyaccess_admin.inc', 'type' => MENU_LOCAL_ACTION, + ); + $items['admin/config/booking/earlyaccess/csv'] = array( + 'title' => 'Download Early Access Codes CSV', + 'description' => 'Download Early Access Codes CSV', + 'page callback' => 'booking_earlyaccess_csv_report', + 'access arguments' => array('access administration pages'), + 'file' => 'booking.earlyaccess_admin.inc', + 'type' => MENU_LOCAL_ACTION, ); //the paypal IPN diff --git a/booking.reports.inc b/booking.reports.inc index 1c1e4b9..f86df64 100644 --- a/booking.reports.inc +++ b/booking.reports.inc @@ -789,7 +789,7 @@ function booking_csv_report() { //@fwrite($handle, $header . "\n"); $csv .= $header . "\n"; //each record - foreach ($result as $record) { + foreach ($result as $record) { //watchdog('booking', "CSV raw data entry: @info", array('@info' => var_export($record, TRUE)));