-
Notifications
You must be signed in to change notification settings - Fork 0
/
blocnote.php
187 lines (150 loc) · 6.13 KB
/
blocnote.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
<?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 Client -->
<p class="tagline"><b style="font-size:16px">BLOC NOTE: Création</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>
<form name="formoccas" id="formoccas" method="post" action="blocnote_add.php" enctype="multipart/form-data" onSubmit="return verification()">
<table border="0" cellspacing="0" cellpadding="0" class="tab_client" align="center">
<tr>
<td width="90" class="client_td">Titre</td>
<td width="350" class="client_td2"><input type="text" name="titre" size="12" /></td>
</tr>
<tr>
<td width="90" class="client_td">Description</td>
<td width="350" class="client_td2"><textarea name="description" rows="6" cols="50" placeholder="texte..."></textarea></td>
</tr>
<tr>
<td width="90" class="client_td">Date</td>
<td width="350" class="client_td2"><input type="date" name="date" size="12" /></td>
</tr>
</table>
<div id="titre1"> </div>
<div align="center"><input name='envoyer' type='submit' value='Enregistrer'></div>
</form>
<div id="titre1"> </div>
<!-- fin fiche occas -->
</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>
<!-- AJAX -->
<script>
function afficheClient(txtcli) {
var txtcli;
//alert(txtcli);
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlArt=new XMLHttpRequest();
} else { // code for IE6, IE5
xmlArt=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlArt.onreadystatechange=function() {
if (xmlArt.readyState==4 && xmlArt.status==200) {
var texte = xmlArt.responseText;
var info = texte.split(" | ");
//var i = info.length;
//alert (i);
$ ('#clientID').empty()
var a = 1;
var b = 2;
var c = 3;
var d = 4;
var e = 5;
var inc = (info.length / 6) - 1;
alert ('Recherche trouvé');
for (var i = 0; i < inc; i++) {
$ ('#clientID').append('<option value="' +info[a]+ '" >' +info[b]+ ' / ' +info[c]+ ' / ' +info[d]+ ' / ' +info[d]+ '</option>');
var a = a + 6;
var b = b + 6;
var c = c + 6;
var d = d + 6;
var e = e + 6;
}
//document.formInter.client.removeChild(document.formInter.client.options[1]);
//document.formInter.client.options[document.formInter.client.length] = new Option(texteCliId, texteCliNom, true, true);
//document.form_articles.artTTC.value = info[4];
}
}
xmlArt.open("GET","ajax_clients.php?gettxt="+txtcli,true);
xmlArt.send();
}
</script>
</body>
</html>