Compare commits

...

29 Commits
v1.3 ... master

Author SHA1 Message Date
Alexandre MOTTIER
b14060fd9f
Update index.php 2023-01-15 22:36:32 +01:00
Alexandre MOTTIER
aae15b6693
Update CSS 2023-01-15 22:33:40 +01:00
Alexandre MOTTIER
1361815ceb
Update CSS 2023-01-15 22:33:10 +01:00
Alexandre MOTTIER
fbb806123f
Update index.php 2023-01-15 22:30:32 +01:00
Alexandre MOTTIER
0e88f5691b
Update index.php 2023-01-15 22:28:58 +01:00
Alexandre MOTTIER
d318398632
Update index.php 2023-01-15 22:28:03 +01:00
Alexandre MOTTIER
34234fd5fc
Update index.php 2023-01-15 22:27:30 +01:00
Alexandre MOTTIER
30b3cf0e62
Update index.php 2023-01-15 22:26:06 +01:00
Alexandre MOTTIER
7f42c1dc8f
Update index.php 2023-01-15 22:25:42 +01:00
Alexandre MOTTIER
382275409e
Update index.php 2023-01-15 22:23:02 +01:00
Alexandre MOTTIER
64c161d157
Update index.php 2023-01-15 22:21:11 +01:00
Alexandre MOTTIER
05246a1c9b
Update index.php 2023-01-15 22:18:22 +01:00
Alexandre MOTTIER
479b33b6b5
Update index.php 2023-01-15 22:16:34 +01:00
Alexandre MOTTIER
4dbb9dbb02
Update CSS 2023-01-15 22:10:52 +01:00
Alexandre MOTTIER
e7ccb15c44
Update index.php 2023-01-15 22:06:53 +01:00
Alexandre MOTTIER
0ed841df0f
Update index.php 2023-01-15 22:04:52 +01:00
Alexandre MOTTIER
b07b3ff28f
Update CSS 2023-01-15 22:03:08 +01:00
Alexandre MOTTIER
44e8d2d357
Update CSS 2023-01-15 21:57:07 +01:00
Alexandre MOTTIER
ac9209740d
CSS update 2023-01-15 21:56:03 +01:00
Alexandre MOTTIER
61c8fdc536
Correct error 2023-01-15 21:50:41 +01:00
Alexandre MOTTIER
f1ccd39f15
Remove cumul RTT + création boutons 2023-01-15 21:44:58 +01:00
Runard
901b0b7693
Update class.clearrtt.php 2023-01-01 17:38:52 +01:00
Runard
755a9451b4
Update class.clearcp.php 2023-01-01 17:38:35 +01:00
Runard
0debe9ff84
Update index.php 2023-01-01 17:35:24 +01:00
Runard
22c5a34c06
Update solde.php 2023-01-01 17:34:29 +01:00
Runard
050a79dd07
Update solde.php 2023-01-01 17:31:59 +01:00
Runard
d6ba333df3
Create class.clearcp.php 2023-01-01 17:28:09 +01:00
Runard
d32990ad03
Create class.clearrtt.php 2023-01-01 17:27:32 +01:00
Runard
f914096f8c
Démo 2022-10-22 15:44:51 +02:00
7 changed files with 44 additions and 8 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@ -86,3 +86,7 @@ ATTENTION : Pour la saisie du nombre de jour, le séparateur décimal est le poi
Vous voilà maintenant prêt à utiliser cet utilitaire de gestion des congés ! Vous voilà maintenant prêt à utiliser cet utilitaire de gestion des congés !
Faites-en bon usage ! ;-) Faites-en bon usage ! ;-)
## III. DÉMO
[Accéder à la démo](https://demo.am-networks.fr/GestionConges-PHP)

13
class/class.clearcp.php Normal file
View File

@ -0,0 +1,13 @@
<?php
require('class.sqlconnect.php');
$mysqli = new mysqli($servername, $username, $password, $dbname);
$mysqli->set_charset("utf8");
$req = "DELETE FROM $table WHERE type = 'cp' ;";
$resultat = $mysqli->query($req);
if ($resultat) {
echo "<p>Les congés payés ont été supprimés !</p>";
header("refresh:2; url=../index.php");
}else{
echo "<p>Erreur</p>";
};
?>

13
class/class.clearrtt.php Normal file
View File

@ -0,0 +1,13 @@
<?php
require('class.sqlconnect.php');
$mysqli = new mysqli($servername, $username, $password, $dbname);
$mysqli->set_charset("utf8");
$req = "DELETE FROM $table WHERE type = 'rtt' ;";
$resultat = $mysqli->query($req);
if ($resultat) {
echo "<p>Les RTT ont été supprimés !</p>";
header("refresh:2; url=../index.php");
}else{
echo "<p>Erreur</p>";
};
?>

View File

@ -13,7 +13,7 @@
<body> <body>
<h1>Gestion des congés - Affichage</h1> <h1>Gestion des congés - Affichage</h1>
<h2>Année en cours : <?php echo date('Y'); ?></h2> <h2>Année en cours : <?php echo date('Y'); ?></h2>
<a href="saisie.php">Saisir des congés</a> <button onclick="window.location.href='saisie.php'" class="button">Saisir des congés</button>
<br><br> <br><br>
<?php <?php
$sql = "SELECT * FROM $table"; $sql = "SELECT * FROM $table";
@ -42,7 +42,10 @@ if ($result->num_rows > 0) {
$findate = str_replace('-"', '/', $row["datefin"]); $findate = str_replace('-"', '/', $row["datefin"]);
$datefin = date("d/m/Y", strtotime($findate)); $datefin = date("d/m/Y", strtotime($findate));
$nombrejours = $row["nbjours"]; $nombrejours = $row["nbjours"];
echo "<tr><td> " . $datedebut. " </td><td> " . $datefin. " </td><td> " . $nombrejours . " jour(s) </td><td> ". $row["type"]." </td><td><a href=\"class/class.remove.php?datedebut=" . $row["datedebut"] . "&datefin=" . $row["datefin"]. "\">Supprimer la ligne</a></td></tr>"; $link = 'class/class.remove.php?datedebut=' . $row["datedebut"] . '&datefin=' . $row["datefin"];
echo "<tr><td> " . $datedebut. " </td><td> " . $datefin. " </td><td> " . $nombrejours . " jour(s) </td><td> " . $row["type"] . " </td><td><button onclick='window.location.href=" . '"' . $link . '"' . "' class='button'>Supprimer la ligne</button></td></tr>";
} }
} else { } else {
echo "<tr colspan='4'><td>Pas de résultat</td></tr>"; echo "<tr colspan='4'><td>Pas de résultat</td></tr>";
@ -51,6 +54,9 @@ $conn->close();
?> ?>
</tbody> </tbody>
</table> </table>
<br>
<button onclick="window.location.href='class/class.clearcp.php'" class="button">Supprimer les congés payés</button>
<button onclick="window.location.href='class/class.clearrtt.php'" class="button">Supprimer les RTT</button>
<br><br> <br><br>
<?php require('solde.php') ?> <?php require('solde.php') ?>
</body> </body>

View File

@ -38,12 +38,6 @@ require('config.php');
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr>
<td>RTT</td>
<td><?php echo cumuln1rtt($rttparmois); ?> jour(s)</td>
<td>Entre en vigueur le : 1er janvier <?php anneeplus(); ?></td>
</tr>
<tr> <tr>
<td>Congés payés</td> <td>Congés payés</td>
<td><?php echo cumuln1cp($cpparmois); ?> jour(s)</td> <td><?php echo cumuln1cp($cpparmois); ?> jour(s)</td>

View File

@ -1,3 +1,9 @@
button {
padding: 10px 20px;
background-color: blue;
color: white;
!important;
}
table, table,
td { td {
border: 1px solid #333; border: 1px solid #333;