bebeboutik/modules/expeditor/getFmt.php
Srv Bebeboutik 6c0978166c add modules
2016-01-04 12:49:26 +01:00

29 lines
761 B
PHP

<?php
include(dirname(__FILE__).'/../../config/config.inc.php');
if(file_exists(_PS_ROOT_DIR_.'/classes/ExpeditorModule.php'))
include_once(_PS_ROOT_DIR_.'/classes/ExpeditorModule.php');
else
include_once(_PS_ROOT_DIR_.'/modules/expeditor/ExpeditorModule.php');
$cookie = new Cookie('psAdmin', substr($_SERVER['PHP_SELF'], strlen(__PS_BASE_URI__), -10));
Tools::setCookieLanguage();
$file = './expeditor_format.fmt';
$handle = fopen($file, "r");
$len = filesize($file);
$filename_download = 'expeditor_format.fmt';
header('Content-Transfer-Encoding: none');
header('Content-Type: text/plain');
header('Content-Length: ' . $len);
header('Content-Disposition: attachment; filename="' . $filename_download . '"');
readfile($file);
fclose($handle);
?>