PEEL Shopping
Open source ecommerce : PEEL Shopping
commande_pdf.php
Go to the documentation of this file.
1 <?php
2 // This file should be in UTF8 without BOM - Accents examples: éèê
3 // +----------------------------------------------------------------------+
4 // | Copyright (c) 2004-2015 Advisto SAS, service PEEL - contact@peel.fr |
5 // +----------------------------------------------------------------------+
6 // | This file is part of PEEL Shopping 8.0.0, which is subject to an |
7 // | opensource GPL license: you are allowed to customize the code |
8 // | for your own needs, but must keep your changes under GPL |
9 // | More information: https://www.peel.fr/lire/licence-gpl-70.html |
10 // +----------------------------------------------------------------------+
11 // | Author: Advisto SAS, RCS 479 205 452, France, https://www.peel.fr/ |
12 // +----------------------------------------------------------------------+
13 // $Id: commande_pdf.php 46935 2015-09-18 08:49:48Z gboussin $
14 include("../configuration.inc.php");
15 
16 if (!empty($_GET['code_facture']) && !empty($_GET['mode']) && in_array($_GET['mode'], array('standard', 'facture', 'bdc', 'proforma', 'devis')) && !is_user_bot()) {
17  $mode = $_GET['mode'];
18  $code_facture = $_GET['code_facture'];
19 
20  include("../lib/class/Invoice.php");
21  $invoice_object = new Invoice('P', 'mm', 'A4');
22  $is_pdf_generated = $invoice_object->FillDocument($code_facture, null, null, null, null, null, null, $mode, false);
23  if (!$is_pdf_generated) {
24  include($GLOBALS['repertoire_modele'] . '/haut.php');
25  echo $GLOBALS['tplEngine']->createTemplate('global_error.tpl', array('message' => $GLOBALS['STR_SEARCH_NO_RESULT']))->fetch();
26  include($GLOBALS['repertoire_modele'] . '/bas.php');
27  }
28 } else {
29  redirect_and_die(get_url('/'), true);
30 }
31 
redirect_and_die($url, $permanent_redirection=false, $avoid_loop=false)
Redirige vers l'URL demandée et arrête le programme.
Definition: fonctions.php:1551
$mode
if(!function_exists('ipGet')) if(!function_exists('isPublicIP')) is_user_bot($ip=null, $user_agent=null)
Renvoie si le visiteur est un robot ou non.
Definition: fonctions.php:3083
$GLOBALS['page_columns_count']

This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:29:52 - Peel ecommerce is a product of Agence web Advisto SAS. All rights reserved.