48 lines
1.4 KiB
PHP
48 lines
1.4 KiB
PHP
<?php
|
|
|
|
require_once 'vendor/autoload.php';
|
|
|
|
|
|
$modus = isset($_GET['modus']) ? $_GET['modus'] : "";
|
|
|
|
$form = new Formr\Formr('bootstrap');
|
|
$form->required = '*';
|
|
|
|
if ($form->submitted())
|
|
{
|
|
// get our form values and assign them to a variable
|
|
$data = $form->validate('Vorname, Name');
|
|
|
|
// show a success message if no errors
|
|
if($form->ok()) {
|
|
$form->success_message = "Thank you, {$data['name']}!";
|
|
}
|
|
}
|
|
require_once "header.php";
|
|
require_once "navbar.php";
|
|
|
|
switch ($modus){
|
|
case "Stunden":
|
|
echo "<h1>Stunden erfassen!</h1>";
|
|
$form->messages();
|
|
$form->create_form('Kunde, Wohnanlage, Arbeit, Stunden, Stundenlohn, Comments|textarea');
|
|
break;
|
|
case "Kunden":
|
|
$form->messages();
|
|
$form->create_form('Firma, Vorname, Name, Strasse, PLZ, Ort, Email, Stundenlohn, Comments|textarea');
|
|
break;
|
|
case "Wohnanlagen":
|
|
$form->messages();
|
|
$form->create_form('Wohnanlage, Strasse, PLZ, Ort, Comments|textarea');
|
|
break;
|
|
case "Arbeiten":
|
|
$form->messages();
|
|
$form->create_form('Firma, Vorname, Name, Strasse, PLZ, Ort, Email, Stundenlohn, Comments|textarea');
|
|
break;
|
|
default:
|
|
$form->messages();
|
|
$form->create_form('Kunde, Wohnanlage, Arbeit, Stunden, Stundenlohn, Comments|textarea');
|
|
}
|
|
|
|
require_once "footer.php";
|
|
|