-
Notifications
You must be signed in to change notification settings - Fork 0
/
intervention_liste_modif.php
313 lines (272 loc) · 13.5 KB
/
intervention_liste_modif.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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
<?php require("auth.php"); require("connect.php");?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Sergey Pozhilov (GetTemplate.com)">
<title>Fiche Intervention</title>
<link rel="shortcut icon" href="assets/images/gt_favicon.png">
<link rel="stylesheet" media="screen" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/css/font-awesome.min.css">
<!-- Custom styles for our template -->
<link rel="stylesheet" href="assets/css/bootstrap-theme.css" media="screen" >
<link rel="stylesheet" href="assets/css/main.css">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="assets/js/html5shiv.js"></script>
<script src="assets/js/respond.min.js"></script>
<![endif]-->
</head>
<body class="home">
<!-- Fixed navbar -->
<?php include 'menu.html'; ?>
<!-- /.navbar -->
<!-- Header -->
<header id="head">
<div class="container">
<div class="row">
<p class="tagline"><b style="font-size:16px">FICHE EN COURS</b> </p>
<p>
<!-- PC à faire -->
<?php
$requete = mysqli_query($conn, "SELECT COUNT(*) as NBafaire FROM interventions WHERE inter_status ='cours' ") or die('Erreur SQL !'.$requete.'<br>'.mysqli_error());
$data=mysqli_fetch_assoc($requete);
$requete2 = mysqli_query($conn, "SELECT COUNT(*) as NBattente FROM interventions WHERE inter_status ='sav' OR inter_status ='electro' OR inter_status ='commande' ") or die('Erreur SQL !'.$requete2.'<br>'.mysqli_error());
$data2=mysqli_fetch_assoc($requete2);
$requete3 = mysqli_query($conn, "SELECT COUNT(*) as NBtermine FROM interventions WHERE inter_status ='termine' ") or die('Erreur SQL !'.$requete.'<br>'.mysqli_error());
$data3=mysqli_fetch_assoc($requete3);
?>
<center style="color:#FFF; " >
<a href="afaire.php" target="_self" style="color:#F90">A faire <?php echo $data['NBafaire']; ?></a>
<a href="attente.php" target="_parent" style="color:#0CC">En attente <?php echo $data2['NBattente']; ?></a>
<a href="termine.php" target="_parent" style="color:#F30">Terminé <?php echo $data3['NBtermine']; ?></a>
<!-- fin -->
</center>
</p>
<p> </p>
<p align="center">---------------------------</p>
<p> </p>
<!-- fiche Intervention -->
<p class="tagline"><b style="font-size:16px">FICHE INTERVENTION: Modification</b></p>
<p>
<script type="text/javascript">
function verification(){
if(document.formclients.nom.value == ""){
alert("Le champ NOM ne peut être vide.");
document.formclients.nom.focus();
return false;
}
return true;
}
</script>
<?php
$idFiche = $_GET['id'];
$numFiche = $_GET['num'];
$sql = mysqli_query($conn, "SELECT * FROM interventions WHERE inter_id = '$idFiche' ") or die('Erreur SQL !'.$sql.'<br>'.mysqli_error());
$req = mysqli_fetch_assoc($sql);
$clientID = $req['inter_cli_id'];
$sql_client = mysqli_query($conn, "SELECT * FROM clients WHERE cli_id = '$clientID'") or die('Erreur SQL !'.$sql_art.'<br>'.mysqli_error());
?>
<form name="formInter" id="formInter" method="post" action="intervention_liste_envoi.php" enctype="multipart/form-data" onSubmit="return verification2()">
<table border="0" cellspacing="0" cellpadding="0" class="tab_client" align="center">
<tr>
<td width="100" class="client_td">Date *<br>(jj/mm/aaaa)</td>
<td class="client_td2"><input type='date' name='info_date' size='20' value="<?php echo $req['inter_date']; ?>"></td>
</tr>
<tr>
<td width="100" class="client_td">Intervenant *</td>
<td width="350" class="client_td2"><SELECT name="intervenant" style="width:100px" >
<OPTION VALUE="<?php echo $req['inter_intervenant']; ?>"><?php echo $req['inter_intervenant']; ?></OPTION>
<OPTION VALUE="Nicolas">Nicolas</OPTION>
<OPTION VALUE="Jeremy">Matthias</OPTION>
<OPTION VALUE="Sandrine">Sandrine</OPTION>
<OPTION VALUE="Autre">Autre</OPTION></SELECT></td>
</tr>
<tr>
<td width="100" class="client_td">Nom*</td>
<td width="350" class="client_td2"><input type="text" name="nom" size="40" placeholder="sans accent" />
<br>
<button onclick="afficheClient(document.formInter.nom.value)" type="button">Rechercher</button>
<SELECT name="client" id="clientID" style="width:240px" >
<?php
while($nb_cli = mysqli_fetch_assoc($sql_client)) {
echo '<OPTION VALUE="' .$nb_cli['cli_id']. '">' .htmlentities($nb_cli['cli_nom'], ENT_QUOTES,'ISO-8859-15',true). ' | ' .$nb_cli['cli_tel1']. ' | ' .$nb_cli['cli_tel2']. ' | ' .$nb_cli['cli_tel3']. '</OPTION>';
}
?>
</SELECT>
</td>
</tr>
<tr>
<td class="client_td"></td>
<td class="client_td2"><b align="center">-----------------------------------------------------------------------</b>
<br>MATERIEL<br></td>
</tr>
<tr>
<td width="100" class="client_td">Type *</td>
<td width="350" class="client_td2">
<?php
$typeMat = "";
if ($req['inter_mat_type'] == 'fixe') { $typeMat = 'Fixe/Tour'; }
if ($req['inter_mat_type'] == 'portable') { $typeMat = 'PC Portable'; }
if ($req['inter_mat_type'] == 'tablette') { $typeMat = 'Tablette'; }
if ($req['inter_mat_type'] == 'imprimante') { $typeMat = 'Imprimante'; }
if ($req['inter_mat_type'] == 'aio') { $typeMat = 'All in One'; }
if ($req['inter_mat_type'] == 'autre') { $typeMat = 'Autre'; }
?>
<SELECT name="type_mat" style="width:150px" >
<OPTION VALUE="<?php echo $req['inter_mat_type']; ?>"><?php echo $typeMat; ?></OPTION>
<OPTION VALUE="">---------</OPTION>
<OPTION VALUE="fixe">Fixe/Tour</OPTION>
<OPTION VALUE="portable">PC Portable</OPTION>
<OPTION VALUE="tablette">Tablette</OPTION>
<OPTION VALUE="imprimante">Imprimante</OPTION>
<OPTION VALUE="aio">All in One</OPTION>
<OPTION VALUE="autre">Autre</OPTION></SELECT></td>
</tr>
<tr>
<td class="client_td">Marque *</td>
<td class="client_td2"><input type="text" name="marque" size="20" placeholder="Nom" value="<?php echo $req['inter_mat_nom']; ?>" /> <input type="text" name="modele" size="20" placeholder="Modèle" value="<?php echo $req['inter_mat_modele']; ?>" /></td>
</tr>
<tr>
<td class="client_td">Périphérique</td>
<td class="client_td2">
<table width="100%" border="0">
<tr>
<td width="40%">
<?php
if ($req['inter_mat_chargeur'] == '1') { echo '<input type="checkbox" name="periph1" checked />Chargeur <br>'; }
else { echo '<input type="checkbox" name="periph1" />Chargeur <br>'; }
if ($req['inter_mat_sacoche'] == '1') { echo '<input type="checkbox" name="periph2" checked />Sacoche <br>'; }
else { echo '<input type="checkbox" name="periph2" />Sacoche <br>'; }
if ($req['inter_mat_souris'] == '1') { echo '<input type="checkbox" name="periph3" checked />Souris <br>'; }
else { echo '<input type="checkbox" name="periph3" />Souris <br>'; }
if ($req['inter_mat_sac'] == '1') { echo '<input type="checkbox" name="periph4" value="chargeur" checked />Sac / carton <br>'; }
else { echo '<input type="checkbox" name="periph4" />Sac / carton <br>'; }
echo "</td><td>";
if ($req['inter_mat_hdd'] == '1') { echo '<input type="checkbox" name="periph5" value="chargeur" checked />HDD / HDD Externe <br>'; }
else { echo '<input type="checkbox" name="periph5" />HDD / HDD Externe <br>'; }
if ($req['inter_mat_cle'] == '1') { echo '<input type="checkbox" name="periph6" value="chargeur" checked />Clé USB <br>'; }
else { echo '<input type="checkbox" name="periph6" />Clé USB <br>'; }
if ($req['inter_mat_ecran'] == '1') { echo '<input type="checkbox" name="periph7" value="chargeur" checked />Ecran <br>'; }
else { echo '<input type="checkbox" name="periph7" />Ecran <br>'; }
if ($req['inter_mat_cd'] == '1') { echo '<input type="checkbox" name="periph8" value="chargeur" checked />CD/DVD <br>'; }
else { echo '<input type="checkbox" name="periph8" />CD/DVD <br>'; }
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="client_td"></td>
<td class="client_td2"><b align="center">-----------------------------------------------------------------------</b>
<br>INFORMATIONS SUPPLEMENTAIRES<br></td>
</tr>
<tr>
<td class="client_td">Mot de passe</td>
<td class="client_td2"><input type="text" name="mdp" size="20" value="<?php echo $req['inter_info_mdp']; ?>" /></td>
</tr>
<tr>
<td class="client_td">Compte</td>
<td class="client_td2"><textarea name="compte" rows="3" cols="40" placeholder="mail/licence/ect..."><?php echo $req['inter_info_compte']; ?></textarea> </td>
</tr>
<tr>
<td class="client_td">Observation*</td>
<td class="client_td2"><textarea name="observations" rows="4" cols="40" placeholder="observations supplémentaires..."><?php echo $req['inter_info_obs']; ?></textarea></td>
</tr>
<tr>
<td class="client_td"></td>
<td class="client_td2"><b align="center">-----------------------------------------------------------------------</b>
<br>STATUS<br></td>
</tr>
<tr>
<td width="100" class="client_td">Status *</td>
<td width="350" class="client_td2">
<?php
$typeStatue = "";
if ($req['inter_status'] == 'cours') { $typeStatue = 'A faire'; }
if ($req['inter_status'] == 'sav') { $typeStatue = 'SAV'; }
if ($req['inter_status'] == 'commande') { $typeStatue = 'Pièce commandée'; }
if ($req['inter_status'] == 'electro') { $typeStatue = 'Chez l\'électronicien'; }
if ($req['inter_status'] == 'termine') { $typeStatue = 'Terminée'; }
if ($req['inter_status'] == 'livre') { $typeStatue = 'Livrée'; }
?>
<SELECT name="status" style="width:150px" >
<OPTION VALUE="<?php echo $req['inter_status']; ?>"><?php echo $typeStatue; ?></OPTION>
<OPTION VALUE="">----------</OPTION>
<OPTION VALUE="cours">A faire</OPTION>
<OPTION VALUE="sav">SAV</OPTION>
<OPTION VALUE="commande">Pièce commandée</OPTION>
<OPTION VALUE="electro">Chez l'électronicien</OPTION>
<OPTION VALUE="termine">Terminée</OPTION>
<OPTION VALUE="livre">Livrée</OPTION></SELECT>
</td>
</tr>
<tr>
<td width="100" class="client_td">Date de commande</td>
<td width="350" class="client_td2">
<input type="date" name="status_date" size="30" value="<?php echo $req['inter_status_date']; ?>" />
</td>
</tr>
<tr>
<td width="100" class="client_td">Chez qui</td>
<td width="350" class="client_td2"><SELECT name="status_gros" style="width:150px" >
<OPTION VALUE="<?php echo $req['inter_status_gros']; ?>"><?php echo $req['inter_status_gros']; ?></OPTION>
<OPTION VALUE="">----------</OPTION>
<OPTION VALUE="S2i">S2i</OPTION>
<OPTION VALUE="Amazon">Amazon</OPTION>
<OPTION VALUE="Pobix">Pobix</OPTION>
<OPTION VALUE="Alexi">Alexi</OPTION>
<OPTION VALUE="Dalle Express">Dalle Express</OPTION></SELECT>
</td>
</tr>
<tr>
<td width="100" class="client_td">Matériel commandé</td>
<td width="350" class="client_td2">
<input type="text" name="status_mat_com" size="30" placeholder="pièce commandée" value="<?php echo htmlentities($req['inter_status_piece'], ENT_QUOTES,'ISO-8859-15',true); ?>" />
</td>
</tr>
<tr>
<td width="100" class="client_td">Par qui</td>
<td width="350" class="client_td2"><SELECT name="status_qui" style="width:100px" >
<OPTION VALUE="<?php echo $req['inter_status_qui']; ?>"><?php echo $req['inter_status_qui']; ?></OPTION>
<OPTION VALUE="">----------</OPTION>
<OPTION VALUE="Nicolas">Nicolas</OPTION>
<OPTION VALUE="Jeremy">Matthias</OPTION>
<OPTION VALUE="Sandrine">Sandrine</OPTION>
<OPTION VALUE="Autre">Autre</OPTION></SELECT></td>
</tr>
</table>
<div id="titre1"> <input type="hidden" name="idInter" value="<?php echo $req['inter_id']; ?>" ><input type="hidden" name="numInter" value="<?php echo $numFiche; ?>" ></div><br>
<div align="center"><input name='envoyer' type='submit' value='Modifier la fiche'></div>
</form>
</p>
<!-- fin fiche client -->
</div>
</div>
</header>
<!-- /Header -->
<!-- Intro -->
<div class="container text-center">
</div>
<!-- /Intro-->
<footer id="footer" class="top-space">
<?php include 'footer.html'; ?>
</footer>
<!-- JavaScript libs are placed at the end of the document so the pages load faster -->
<script src="assets/js/jquery.js"></script>
<script src="assets/js/jquery-ui.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="assets/js/headroom.min.js"></script>
<script src="assets/js/jQuery.headroom.min.js"></script>
<script src="assets/js/template.js"></script>
</body>
</html>