AdminPanel Formulare hinzugefügt, .gitignore aktualisiert
This commit is contained in:
33
admin/formulare/ergebnisse.php
Executable file
33
admin/formulare/ergebnisse.php
Executable file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
include("../../../mysqlverbinden.php");
|
||||
include("../secret.php");
|
||||
include("../../vendor/autoload.php");
|
||||
|
||||
include("../check.php");
|
||||
|
||||
$payload=getUserInfo();
|
||||
|
||||
$username=$payload->username;
|
||||
$id=$payload->id;
|
||||
|
||||
if(!isset($_GET["formular"])) die("GET formular fehlt");
|
||||
$formular=$_GET["formular"];
|
||||
|
||||
$data=[];
|
||||
|
||||
foreach(mysqli_execute_query($db_id,"SELECT `id` FROM `formulare-ergebnisse` WHERE `formular`=?;",[$formular]) as $ergebnisidrow){
|
||||
$ergebnisid=$ergebnisidrow["id"];
|
||||
$ergebnis=[];
|
||||
|
||||
foreach(mysqli_execute_query($db_id,"SELECT `name`, `value` FROM `formulare-ergebnis` WHERE ergebnisid=?;",[$ergebnisid]) as $row){
|
||||
|
||||
$ergebnis[$row["name"]]=$row["value"];
|
||||
|
||||
}
|
||||
$data[]=$ergebnis;
|
||||
|
||||
}
|
||||
|
||||
echo json_encode($data,JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user