1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
<?php
/**
* Created by PhpStorm.
* User: jean
* Date: 01/10/2014
* Time: 13:52
*/
session_start();
include_once "../classes/products.php";
include_once "../classes/bdd.php";
?>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<script type="text/javascript" src="../js/scripts.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<?php
if (isset($_GET['datede'])&&(isset($_GET['datea'])))
{
$datede = $_GET['datede'];
$datea = $_GET['datea'];
$datede = $datede." 00:00:01";
$datea = $datea." 23:59:59";
$bdd = new bdd();
$listeproduit = array();
$listeproduit = $bdd->GetListeProduits($datede, $datea);
$liste2 = array('place', 'id', 'shipping', 'date', 'lang', 'idprod', 'nom', 'qte', 'prix', 'ean');
foreach ($listeproduit as $order)
{
$place = $order->GetPlace();
$idOrder = $order->GetId_order();
$port = $order->GetTotal_shipping();
$date = $order->GetDate_add();
$date = date_create($date);
$date = date_format($date, "d/m/y");
$datede = $order->GetDatede();
$datede = date_create($datede);
$datede = date_format($datede, "d/m/y");
$datea = $order->GetDatea();
$datea = date_create($datea);
$datea = date_format($datea, "d/m/y");
$lang = $order->GetLang();
$listeprod = array();
$listeprod = $order->GetListeproducts();
foreach ($listeprod as $prod)
{
$id = $prod->GetId_product();
$nom = $prod->GetNom();
$quant = $prod->GetQte();
$prix = $prod->GetPrix();
$ean = $prod->GetEan13();
$liste2['place']=$place;
$liste2['id']=$idOrder;
$liste2['shipping']=$port;
$liste2['date']=$date;
$liste2['lang']=$lang;
$liste2['idprod']=$id;
$liste2['nom']=$nom;
$liste2['qte']=$quant;
$liste2['prix']=$prix;
$liste2['ean']=$ean;
}
}
$_SESSION['produits']=serialize($liste2);
}
else
{
echo "<h1>pas de valeurs</h1>";
} |
Partager