2024-12-04 07:50:06 +00:00
|
|
|
<?php
|
|
|
|
require_once('config.php');
|
2024-12-04 08:23:17 +00:00
|
|
|
session_start();
|
|
|
|
|
2024-12-04 07:50:06 +00:00
|
|
|
|
2024-12-04 08:23:17 +00:00
|
|
|
if (!isset($_SESSION["datainserted"])){
|
|
|
|
if(
|
|
|
|
isset($_POST["vnev"]) &&
|
|
|
|
isset($_POST["knev"]) &&
|
|
|
|
isset($_POST["email"]) &&
|
|
|
|
isset($_POST["telefon"]) &&
|
|
|
|
isset($_POST["lakcim"]) &&
|
|
|
|
isset($_POST["tagsag_kezdete"]) &&
|
|
|
|
isset($_POST["aktiv_tagsagi_statusz"])
|
|
|
|
){
|
|
|
|
//TODO ADD tagsag kezdete
|
|
|
|
if ($_POST["aktiv_tagsagi_statusz"]==true){
|
|
|
|
$aktiv = 1;
|
|
|
|
} else {
|
|
|
|
$aktiv = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
$parsql = "INSERT INTO tagok (vnev, knev, email, telefon, lakcim, aktiv_tagsagi_statusz, tagsag_kezdete)
|
|
|
|
VALUES (?,?,?,?,?,?,?)";
|
|
|
|
|
|
|
|
$durr = $conn->prepare($parsql);
|
|
|
|
$durr->bind_param("sssssss",
|
|
|
|
$_POST["vnev"],
|
|
|
|
$_POST["knev"],
|
|
|
|
$_POST["email"],
|
|
|
|
$_POST["telefon"],
|
|
|
|
$_POST["lakcim"],
|
|
|
|
$aktiv,
|
|
|
|
$_POST["aktiv_tagsagi_statusz"]
|
|
|
|
);
|
|
|
|
|
|
|
|
if ($durr->execute()==true){
|
|
|
|
echo '<b>sikeres feltöltés</b>';
|
|
|
|
$_SESSION["datainserted"] == true;
|
|
|
|
}
|
2024-12-04 07:50:06 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-12-04 08:23:17 +00:00
|
|
|
if(isset($_SESSION["datainserted"])){
|
|
|
|
if($_SESSION["datainserted"]){
|
|
|
|
unset($_SESSION["datainserted"]);
|
|
|
|
}
|
|
|
|
}
|
2024-12-04 07:50:06 +00:00
|
|
|
?>
|
|
|
|
|
2024-12-03 11:57:17 +00:00
|
|
|
<script>
|
|
|
|
|
|
|
|
</script>
|
2024-12-03 10:17:19 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Document</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
2024-12-03 11:57:17 +00:00
|
|
|
<label>Válaszd ki a táblát amit szerkeszteni szeretnél:</label>
|
2024-12-03 10:17:19 +00:00
|
|
|
<select name="tabla" id="tabla">
|
2024-12-03 11:57:17 +00:00
|
|
|
<option disabled selected value> -- Válassz egy opciót -- </option>
|
2024-12-03 10:17:19 +00:00
|
|
|
<option value="tagok">Tagok</option>
|
|
|
|
<option value="tagsag">Tagság</option>
|
|
|
|
<option value="jelenlet">Jelenlét</option>
|
|
|
|
<option value="esemenyek">Események</option>
|
|
|
|
<option value="visszajelzes">Visszajelzés</option>
|
|
|
|
</select>
|
|
|
|
<br>
|
2024-12-03 11:57:17 +00:00
|
|
|
<div id="root">
|
|
|
|
|
2024-12-03 10:17:19 +00:00
|
|
|
</div>
|
|
|
|
<script src="index.js" defer></script>
|
|
|
|
</body>
|
2024-12-04 07:50:06 +00:00
|
|
|
</html>
|