src/web/app/themes/atahualpa/download.php
author ymh <ymh.work@gmail.com>
Fri, 06 Dec 2019 00:53:05 +0100
changeset 3 5301eb6ce6e2
parent 0 505fe5249d9c
permissions -rw-r--r--
add missing files

<?php if (!empty($_SERVER['SCRIPT_FILENAME']) AND 'download.php' == basename($_SERVER['SCRIPT_FILENAME'])) {
	die ('Please do not load this page directly.');
}
global $user_ID; 
if( $user_ID ) { 
	if( current_user_can('level_10') ) { 
		header('Content-Description: File Transfer');
		header('Content-Disposition: attachment; filename="ata-' . str_replace('.','', $_SERVER['SERVER_NAME']) . '-' . date('Y') . date('m') . date('d') . '.txt"');
		header('Content-Type: text/plain; charset=utf-8');
		// output the file
		// Since 3.5.2: Use JSON 
		echo json_encode( get_option('bfa_ata4') );
	}
}
die();
?>