-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtrisel.php
109 lines (83 loc) · 3.71 KB
/
trisel.php
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
include 'db_conf.php';
?>
<?php
$q=$_GET['q'];
$val= $_GET['val'];
$str = strtoupper($val);
if($str=="ELECTRONICS"){
$req="SELECT * FROM produit Order by($q) ";
if($q=="prixdes"){
$req="SELECT * FROM produit Order by(prix) desc ";
}
if($q=="titledes"){
$req="SELECT * FROM produit Order by(marque) desc ";
}
}elseif($str=="MOBILE"){
$req="SELECT * FROM produit where categorie='$str' Order by($q) ";
if($q=="titledes"){
$req="SELECT * FROM produit where categorie='$str' Order by(marque) desc ";
}if($q=="prixdes"){
$req="SELECT * FROM produit where categorie='$str' Order by(prix) desc ";
}
}elseif($str=="LAPTOP"){
$req="SELECT * FROM produit where categorie='$str' Order by($q) ";
if($q=="titledes"){
$req="SELECT * FROM produit where categorie='$str' Order by(marque) desc ";
}if($q=="prixdes"){
$req="SELECT * FROM produit where categorie='$str' Order by(prix) desc ";
}
}else{
$req="SELECT * FROM produit where model='$str' Order by($q) ";
if($q=="titledes"){
$req="SELECT * FROM produit where model='$str' Order by(marque) desc ";
}if($q=="prixdes"){
$req="SELECT * FROM produit where model='$str' Order by(prix) desc ";
}
}
$reponse = $DB_con->query($req);
while ($donnees = $reponse->fetch()){
echo'<div class="col-sm-3 product-left chang-list">
<div class="product-main col-sm-12 simpleCart_shelfItem">
<div class="col-sm-12 chang-one">
<a href="single.php?id='.$donnees['id'].'" class="mask">
<img class="img-responsive zoom-img" src="produit/'.$donnees['img'].'" alt="" >
</a>
</div>
<div class="col-sm-12 change-two" >
<div class="product-bottom">
<a href="single.php?id='.$donnees['id'].'" >'.$donnees['marque'].'</a>
<h4>'.$donnees['prix'].'</h4>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis scelerisque feugiat dui eget luctus. Aliquam eu leo dolor. Vivamus non neque eu lectus pulvinar aliquet
</p>
<p class="quantitystock">
<span id="quantitynumb">400</span>
<span id="quantitypro">Produits</span>
<span class="quantityins">In stock</span>
</p>
</div>
</div>
<p class="new">New</p>
<div class="srch" id="srch1">
<a href="single.php?id='.$donnees['id'].'"><i class="fa fa-opencart"></i></a>
<a class="open-show" data-id="' .$donnees['id'].'" ><i class="fa fa-eye"></i></a>
</div>
<div class="col-sm-3 ff-right">
<button class="btn-panier">Ajoute Au Panier</button>
<div class="srch">
<a href="single.php?id='.$donnees['id'].'"><i class="fa fa-heart-o"></i></a>
<a class="open-show" data-id="' .$donnees['id'].'" ><i class="fa fa-eye"></i></a>
</div>
</div>
</div>
</div>';
}
?>
</body>
</html>