1<?php 2/** 3 * 2007-2016 PrestaShop 4 * 5 * thirty bees is an extension to the PrestaShop e-commerce software developed by PrestaShop SA 6 * Copyright (C) 2017-2018 thirty bees 7 * 8 * NOTICE OF LICENSE 9 * 10 * This source file is subject to the Open Software License (OSL 3.0) 11 * that is bundled with this package in the file LICENSE.txt. 12 * It is also available through the world-wide-web at this URL: 13 * http://opensource.org/licenses/osl-3.0.php 14 * If you did not receive a copy of the license and are unable to 15 * obtain it through the world-wide-web, please send an email 16 * to license@thirtybees.com so we can send you a copy immediately. 17 * 18 * DISCLAIMER 19 * 20 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer 21 * versions in the future. If you wish to customize PrestaShop for your 22 * needs please refer to https://www.thirtybees.com for more information. 23 * 24 * @author thirty bees <contact@thirtybees.com> 25 * @author PrestaShop SA <contact@prestashop.com> 26 * @copyright 2017-2018 thirty bees 27 * @copyright 2007-2016 PrestaShop SA 28 * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 29 * PrestaShop is an internationally registered trademark & property of PrestaShop SA 30 */ 31 32if (!defined('_PS_ADMIN_DIR_')) { 33 define('_PS_ADMIN_DIR_', getcwd()); 34} 35include(_PS_ADMIN_DIR_.'/../config/config.inc.php'); 36 37/** 38 * @deprecated 1.5.0 39 * This file is deprecated, please use AdminPdfController instead 40 */ 41Tools::displayFileAsDeprecated(); 42 43if (!Context::getContext()->employee->id) { 44 Tools::redirectAdmin('index.php?controller=AdminLogin'); 45} 46 47$function_array = [ 48 'pdf' => 'generateInvoicePDF', 49 'id_order_slip' => 'generateOrderSlipPDF', 50 'id_delivery' => 'generateDeliverySlipPDF', 51 'delivery' => 'generateDeliverySlipPDF', 52 'invoices' => 'generateInvoicesPDF', 53 'invoices2' => 'generateInvoicesPDF2', 54 'slips' => 'generateOrderSlipsPDF', 55 'deliveryslips' => 'generateDeliverySlipsPDF', 56 'id_supply_order' => 'generateSupplyOrderFormPDF' 57]; 58 59$pdf_controller = new AdminPdfController(); 60foreach ($function_array as $var => $function) { 61 if (isset($_GET[$var])) { 62 $pdf_controller->{'process'.$function}(); 63 exit; 64 } 65} 66 67exit; 68