equal
deleted
inserted
replaced
|
1 <?php if (!empty($_SERVER['SCRIPT_FILENAME']) AND 'download.php' == basename($_SERVER['SCRIPT_FILENAME'])) { |
|
2 die ('Please do not load this page directly.'); |
|
3 } |
|
4 global $user_ID; |
|
5 if( $user_ID ) { |
|
6 if( current_user_can('level_10') ) { |
|
7 header('Content-Description: File Transfer'); |
|
8 header('Content-Disposition: attachment; filename="ata-' . str_replace('.','', $_SERVER['SERVER_NAME']) . '-' . date('Y') . date('m') . date('d') . '.txt"'); |
|
9 header('Content-Type: text/plain; charset=utf-8'); |
|
10 // output the file |
|
11 // Since 3.5.2: Use JSON |
|
12 echo json_encode( get_option('bfa_ata4') ); |
|
13 } |
|
14 } |
|
15 die(); |
|
16 ?> |