-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateCaisseOut.php
118 lines (95 loc) · 5.73 KB
/
updateCaisseOut.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
<!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.0">
<title>Gestion</title>
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-grid.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-grid.min.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-grid.rtl.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-reboot.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-reboot.rtl.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-utilities.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-utilities.rtl.css">
<link rel="stylesheet" href="bootstrap-5.0.2-dist/css/bootstrap-utilities.rtl.min.css">
<script defer src="bootstrap-5.0.2-dist/js/bootstrap.js"></script>
<script defer src="bootstrap-5.0.2-dist/js/bootstrap.min.js"></script>
<script defer src="bootstrap-5.0.2-dist/js/bootstrap.bundle.js"></script>
<script defer src="./navbar.js"></script>
<script defer src="./jsfile/takeCaisseout.js"></script>
<link rel="stylesheet" href="index.css">
</head>
<?php
function dataCaisseOut(){
include 'connexion.php';
$sql = ("SELECT * FROM Sortie order by idSortie desc");
$result = mysqli_query($db, $sql);
if(mysqli_num_rows($result)>0){
while($row= mysqli_fetch_assoc($result)){
echo"<option value='ID ::".$row["idSortie"].":: Montant ::".$row["Montant"].":: Motif ::".$row["il_pris_quoi"].":: Type ::".$row["TypeD"].":: Dates ::".$row["DatesD"]."'>montant = ".$row["Montant"]." commentaire : ".$row["il_pris_quoi"]."</option>";
}
}else{echo "Une erreur s est produite ";}
}
?>
<body class="back">
<main>
<div class="container bg-transparent pt-5">
<div class=" p-3 mb-5 border border-1 rounded mt-5" id="sa">
<h2 class="p-2">Modifier sortie dans caisse</h2>
<hr class="w-auto">
<div class="ps-1 pe-1 pt-3 pb-3">
<!--<form class="ps-1 pe-1 pt-3 pb-3" method= "POST" action="<?php //echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">-->
<div class="input-group mb-3 mx-auto d-block">
<span class="input-group-text " id="id">Identifiant*</span>
<input required type="text" list="dataBesoin" id="identifiantM" class="form-control w-50" placeholder="entrer identifiant" aria-label="Username" aria-describedby="nom" >
<datalist id="dataBesoin">
<?php
dataCaisseOut();
?>
</datalist>
</div>
<div class="input-group mb-3 w-50 mx-auto d-block">
<span class="input-group-text w-50" id="dates">Dates *</span>
<input required type="date" name="dates" id="datesout" class="form-control w-50" placeholder="mettre la date" aria-label="Username" aria-describedby="nom" value="<?php $d = strtotime("today"); echo date('Y-m-d',$d); ?>">
</div>
<div class="row">
<div class="input-group mb-3 col-md-6">
<label class="input-group-text" for="type">Type de sorties</label>
<select class="form-select" id="type">
<option selected value="Aucun">Aucun</option>
<option value="Charge">Charge</option>
<option value="Depense">Depense</option>
<option value="Autres">Autres</option>
</select>
</div>
<div class="col-md-7 mt-5 mb-4">
<div class="input-group ">
<span class="input-group-text">Montant*</span>
<input required type="float" id="montant" name="CM" class="form-control" placeholder="entrer montant sortie" aria-label="Amount (to the nearest cdf)">
<span class="input-group-text">$</span>
</div>
<small id="montantVide"></small>
</div>
</div>
<div class="row">
<div class="input-group">
<span class="input-group-text">Commentaires</span>
<textarea class="form-control" name="commentaire" id="commentaire" aria-label="With textarea" placeholder="Entrer commentaire"></textarea>
</div>
<p id="txtHint"></p>
<input type="hidden" value="update" id="typeFormulaire">
<button id='envoie' class="btn btn-primary p-3 fs-4 mt-4 w-25">Modifier</button>
<!-- <p id='envoie' class=" bg-primary p-2 mt-4">Envoie</p>-->
</div>
</div>
</div>
</main>
<footer>
<hr class="w-100">
<p class="text-secondary text-center p-3">© copyright franck</p>
</footer>
</body>
</html>