function guts() { if (isset($_GET['go'])) { header(sprintf('Content-Disposition: attachment;filename="vaf-export-%s.csv"', time())); header('Content-Type: text/csv'); $exporter = new VF_Tire_Catalog_TireProduct_Export($_FILES['file']['tmp_name']); echo $exporter->export(); exit; } }
/** * Vehicle Fits * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to sales@vehiclefits.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Vehicle Fits to newer * versions in the future. If you wish to customize Vehicle Fits for your * needs please refer to http://www.vehiclefits.com for more information. * @copyright Copyright (c) 2013 Vehicle Fits, llc * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ require_once 'config.php'; // DO NOT EDIT BELOW HERE $db = Zend_Db::factory('pdo_mysql', $params); $db->getConnection(); Zend_Registry::set('db', $db); $file = 'product-tire-sizes-export.csv'; $exporter = new VF_Tire_Catalog_TireProduct_Export(); file_put_contents($file, $exporter->export());