v1.3
This commit is contained in:
parent
2ae9bb9cee
commit
808ae02761
|
@ -4,11 +4,10 @@
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<?php
|
<?php
|
||||||
require('sqlconnect.php');
|
require('class.sqlconnect.php');
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
require('sqlconnect.php');
|
|
||||||
|
|
||||||
$datedebut = $_POST['datedebut'];
|
$datedebut = $_POST['datedebut'];
|
||||||
$datefin = $_POST['datefin'];
|
$datefin = $_POST['datefin'];
|
||||||
|
@ -21,7 +20,7 @@ $req = "INSERT INTO $table VALUES ('$datedebut','$datefin','$nbjours','$type');"
|
||||||
$resultat = $mysqli->query($req);
|
$resultat = $mysqli->query($req);
|
||||||
if ($resultat) {
|
if ($resultat) {
|
||||||
echo "<p>La saisie a été ajoutée !</p>";
|
echo "<p>La saisie a été ajoutée !</p>";
|
||||||
header("refresh:2; url=index.php");
|
header("refresh:2; url=../index.php");
|
||||||
}else{
|
}else{
|
||||||
echo "<p>Erreur</p>";
|
echo "<p>Erreur</p>";
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,12 +4,12 @@
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<?php
|
<?php
|
||||||
require('sqlconnect.php');
|
require('class.sqlconnect.php');
|
||||||
|
//require('config.php');
|
||||||
|
//require('class.functions.php');
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
require('sqlconnect.php');
|
|
||||||
|
|
||||||
$actual_link = $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
$actual_link = $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
|
||||||
$url_components = parse_url($actual_link);
|
$url_components = parse_url($actual_link);
|
||||||
parse_str($url_components['query'], $params);
|
parse_str($url_components['query'], $params);
|
||||||
|
@ -22,8 +22,8 @@ $req = "DELETE FROM $table WHERE datedebut = '$datedebut' AND datefin = '$datefi
|
||||||
$resultat = $mysqli->query($req);
|
$resultat = $mysqli->query($req);
|
||||||
if ($resultat) {
|
if ($resultat) {
|
||||||
echo "<p>La saisie a été supprimée !</p>";
|
echo "<p>La saisie a été supprimée !</p>";
|
||||||
header("refresh:2; url=index.php");
|
header("refresh:2; url=../index.php");
|
||||||
}else{
|
}else{
|
||||||
echo "<p>Erreur</p>";
|
echo "<p>Erreur</p>";
|
||||||
};
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -42,7 +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"];
|
||||||
echo "<tr><td> " . $datedebut. " </td><td> " . $datefin. " </td><td> " . $nombrejours . " jour(s) </td><td> ". $row["type"]." </td><td><a href=\"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><a href=\"class/class.remove.php?datedebut=" . $row["datedebut"] . "&datefin=" . $row["datefin"]. "\">Supprimer la ligne</a></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>";
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<body>
|
<body>
|
||||||
<h1>Gestion des congés - Saisie</h1>
|
<h1>Gestion des congés - Saisie</h1>
|
||||||
<a href="index.php">Afficher les congés</a><br><br>
|
<a href="index.php">Afficher les congés</a><br><br>
|
||||||
<form class="generated-form" method="POST" action="class.ajout.php" target="_self">
|
<form class="generated-form" method="POST" action="class/class.ajout.php" target="_self">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend> Saisie de congés </legend>
|
<legend> Saisie de congés </legend>
|
||||||
<label for="datedebut">Date de début :</label><br>
|
<label for="datedebut">Date de début :</label><br>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user