Compare commits

..

No commits in common. "master" and "v1.3" have entirely different histories.
master ... v1.3

7 changed files with 8 additions and 44 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -86,7 +86,3 @@ 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)

View File

@ -1,13 +0,0 @@
<?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>";
};
?>

View File

@ -1,13 +0,0 @@
<?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>
<button onclick="window.location.href='saisie.php'" class="button">Saisir des congés</button> <a href="saisie.php">Saisir des congés</a>
<br><br> <br><br>
<?php <?php
$sql = "SELECT * FROM $table"; $sql = "SELECT * FROM $table";
@ -42,10 +42,7 @@ 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"];
$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><a href=\"class/class.remove.php?datedebut=" . $row["datedebut"] . "&datefin=" . $row["datefin"]. "\">Supprimer la ligne</a></td></tr>";
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>";
@ -54,9 +51,6 @@ $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,6 +38,12 @@ 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,9 +1,3 @@
button {
padding: 10px 20px;
background-color: blue;
color: white;
!important;
}
table, table,
td { td {
border: 1px solid #333; border: 1px solid #333;