-
Notifications
You must be signed in to change notification settings - Fork 3
/
commande.php
214 lines (165 loc) · 6.42 KB
/
commande.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<?php
require_once 'testadmin.php';
$DB_con->exec("UPDATE commande set vu='oui'");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>liste Commandes</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="css/metisMenu.min.css" rel="stylesheet">
<link href="css/sb-admin-2.css" rel="stylesheet">
<link href="vendor/font-awesom/css/font-awesome.css" rel="stylesheet" type="text/css">
</head>
<style type="text/css">
@font-face{
font-family: "Poppins-Regular";
src:url(Poppins-Regular.ttf) format("truetype");
}
.mail-bar .mail-left input{
background: #fff;
border: 1px solid #ccc;
padding: 01px 10px;
width: 200px;
border-right: 0px;
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
height: 35px
}
.mail-bar .mail-left input:hover ,.mail-bar .mail-left input:focus{
border-bottom: 1px solid #ccc;
}
.table > thead > tr {
border-top: 2px solid #00acac;
background: #00acac;
font-size: 13px;
font-weight: 200
}
.table > thead > tr > th{
border: 1px solid #00acac;
color: #fff;
}
.table > tbody > tr > td{
line-height: 55px;
padding:8px;
font-size: 11px
}
.table > tbody > tr > td > span{
width:15px;
height:15px;
border-radius:4px;
display:block;
margin-top: 19px;
}
#page-wrapper{margin-left: 10px; width:1080px;}
</style>
<script>
function showHint(str) {
if (str.length == 0) {
document.getElementById("txtHint").innerHTML = "";
return $('#tab1').css("display",""),$('#mail-bar').css("display","")
;
} else {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
if(this.responseText!=""){
$('#tab1').css("display","none");
$('#mail-bar').css("display","none");
}
}
};
xmlhttp.open("GET", "rescommentair.php?q=" + str, true);
xmlhttp.send();
}
}
</script>
<body>
<div id="wrapper">
<?php
include 'navbar.php';
?>
<div id="page-wrapper">
<div class="row">
<div class="col-lg-12 form-title">
<h1>All Commandes</h1>
<p>home / All Commandes</p>
</div>
<!-- /.col-lg-12 -->
</div>
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-body">
<form method="post">
<div class="col-sm-12 second_block">
<div class="mail-bar">
<a href="commande.php" class="form-btn"><i class="fa fa-refresh"></i></a>
<div class="mail-left">
<input type="text" name="txt-search" onkeyup="showHint(this.value)"><button type="submit" class="serach" name="btn-search">
<i class="fa fa-search"></i></button>
</div>
</div>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>N° Commande</th>
<th>Produit</th>
<th>Description</th>
<th>Quantite</th>
<th>Lien Commande</th>
<th>Date</th>
<th>Paiement</th>
<th>Prix unitaire</th>
</tr>
</thead>
<tbody id="tab1">
<?php
include 'classe/commande.php';
include 'classe/db_conf.php';
$data=[""];
$com=new commande($data);
$rep =$com->readAllcommande();
while ($donnees = $rep->fetch() ){
echo '
<tr>
<td>'.$donnees['numcom'].'</td>
<td><img src="produit/'.$donnees['img'].'" style="width:50px"></td>
<td>'.$donnees['marque'].',Color:'.$donnees['color'].'</td>
<td>'.$donnees['qtee'].'</td>
<td><a href="suivcommande.php?id='.$donnees['numcom'].'">Affiche</a></td>
<td>'.$donnees['date_com'].'</td>
<td>'.$donnees['paiment'].'</td>
<td>'.$donnees['prix'].'</td>
</tr>';
}
?>
</tbody>
<tbody id="txtHint">
</tbody>
</table>
</div>
<!-- /.panel-body -->
</form>
</div>
<!-- /.panel -->
</div>
</div>
<!-- /.row -->
</div>
<!-- /#page-wrapper -->
</div>
<!-- /#wrapper -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/metisMenu.js"></script>
<script src="js/sb-admin-2.js"></script>
</body>
</html>