132 lines
4.7 KiB
PHP
132 lines
4.7 KiB
PHP
<?php
|
|
function print_username() {
|
|
echo <<<HEREDOC
|
|
<!-- Username ---------------------------------- -->
|
|
<label for="username"><strong>Ihr Name oder Pseudonym:</strong></label>
|
|
<input type="text" name="username" maxlength="16" id="username" placeholder="Name" class="text" required="required">
|
|
<br>
|
|
HEREDOC;
|
|
}
|
|
|
|
function print_userinfo() {
|
|
global $arrAge;
|
|
global $arrTransport;
|
|
echo <<<HEREDOC
|
|
<!-- Userinfo ---------------------------------- -->
|
|
<label><strong>Die Fragen nach Alter und Verkehrsmittel können Sie freiwillig beantworten:</strong></label>
|
|
<br>
|
|
<label for="ext_age">Ihr Alter:</label>
|
|
<select name="ext_age" id="ext_age">
|
|
HEREDOC;
|
|
foreach ($arrAge as $age) {
|
|
echo "<option value='$age'>$age</option>";
|
|
}
|
|
echo <<<HEREDOC
|
|
</select>
|
|
<br>
|
|
<label for="ext_transport">Ihr hauptsächlich genutztes Verkehrsmittel:</label>
|
|
<select name="ext_transport" id="ext_transport">
|
|
HEREDOC;
|
|
foreach ($arrTransport as $transport) {
|
|
echo " <option value='$transport'>$transport</option>";
|
|
}
|
|
echo "</select><br>";
|
|
}
|
|
|
|
|
|
function print_category(){
|
|
global $arrDefect;
|
|
echo <<<HEREDOC
|
|
<!-- Mängelkategorie -------------------------------- -->
|
|
|
|
<label for="defect"><strong>Art des Hindernisses:</strong></label>
|
|
<select name="defect" id="defect">
|
|
HEREDOC;
|
|
foreach ($arrDefect as $defectKey => $defectVal) {
|
|
echo " <option value='$defectKey'>$defectVal</option>";
|
|
}
|
|
echo "</select><br>";
|
|
}
|
|
|
|
function print_description(){
|
|
echo <<<HEREDOC
|
|
<!-- Beschreibung ---------------------------------- -->
|
|
<label for="description"><strong>Beschreibung:</strong></label><br>
|
|
<textarea name="description" id="description" maxlength="1001" placeholder="Beschreiben Sie Ihren Eintrag" required="required"></textarea>
|
|
HEREDOC;
|
|
}
|
|
|
|
function print_topics(){
|
|
global $arrTopic;
|
|
echo <<<HEREDOC
|
|
<!-- Themenfelder ---------------------------------- -->
|
|
<strong>Wählen Sie ein Themenfeld aus:</strong></br>
|
|
<div class="row">
|
|
HEREDOC;
|
|
$first=true;
|
|
foreach ($arrTopic as $keyTopic => $valTopic) {
|
|
$checked = ($first) ? "checked=\"checked\"" : "";
|
|
$first=false;
|
|
echo '<div class="col-6-md col-6">
|
|
<input type="radio" id="topic'.$keyTopic.'" name="topic" value="'.$keyTopic.'" $checked/>
|
|
<label for="topic$keyTopic">'.$valTopic.'</label>
|
|
</div>';
|
|
};
|
|
echo "</div> <!-- row -->";
|
|
}
|
|
?>
|
|
|
|
<div id="dialog" class="card" title="Neuer Eintrag in die Karte">
|
|
<div class="card-header">Hindernismelder des ADFC NRW
|
|
<span id="hint"></span>
|
|
<span id="close" type="button" class="close right text-danger">
|
|
<i class="fa fa-window-close"></i>
|
|
</span>
|
|
</div>
|
|
|
|
<div class="card-body">
|
|
<form id="newobjectform" enctype="multipart/form-data" action="#" method="post" >
|
|
<?php
|
|
print_username();
|
|
if ($boolUserinfo) print_userinfo();
|
|
if ($boolDefect) print_category();
|
|
print_description();
|
|
if ($boolTopics) print_topics();
|
|
?>
|
|
|
|
<!-- Lokalisierung ---------------------------------- -->
|
|
|
|
<input type="hidden" id="lng" name="lng" value="0" />
|
|
<input type="hidden" id="lat" name="lat" value="0" />
|
|
<input type="hidden" id="district" name="district" value="<?=$strDistrict?>" />
|
|
|
|
<!-- Dateiupload ---------------------------------- -->
|
|
|
|
<?php if ($boolUpload): ?>
|
|
<label>Bildupload:</label>
|
|
<input type="file" id="photo" name="uploadfile" size="60" maxlength="255" />
|
|
<?php endif; ?>
|
|
|
|
<!-- Einverständnis ---------------------------------- -->
|
|
|
|
<strong>Einverständnis:</strong><br>
|
|
|
|
<label for="consent">
|
|
<input type="checkbox" id="consent" name="consent" value="1" required="required" />
|
|
Ich bin einverstanden, dass die von mir eingegebenen Daten in der
|
|
Karte veröffentlicht
|
|
<?= $boolUserinfo ? " (außer Alter und Verkehrsmittel) " : ""?>und im Rahmen der
|
|
<a href="https://nrw.adfc.de/datenschutz" target="_blank">Datenschutzerklärung</a>
|
|
verarbeitet werden dürfen.<br>
|
|
<?php if ($boolUpload): ?>
|
|
Wenn Sie ein <strong>Bild</strong> hochladen, achten Sie bitte auf
|
|
<strong>Urheber- und Persönlichkeitsrechte</strong>.
|
|
<?php endif; ?>
|
|
</label>
|
|
<input type="submit" id="submit" class="btn btn-primary" value="Meldung abgeben" tabindex="-1">
|
|
</form>
|
|
|
|
</div> <!-- card-body -->
|
|
</div> <!-- card -->
|
|
|