This commit is contained in:
Walter Hupfeld
2024-03-11 23:06:15 +01:00
parent 4c2d55d699
commit d571968568
10 changed files with 66 additions and 46 deletions

View File

@@ -1,4 +1,3 @@
<div id="dialog_comment" class="card" title="Kommentar">
<div class="card-header">Ihr Kommentar
<span id="close_comment" type="button" class="close right text-danger">

View File

@@ -1,11 +1,11 @@
<?php
function print_username() {
echo <<<EOT
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>
EOT;
HEREDOC;
}
function print_userinfo() {
@@ -57,23 +57,22 @@ function print_description(){
}
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 -->";
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 -->";
}
?>
@@ -86,18 +85,13 @@ echo "</div> <!-- row -->";
</div>
<div class="card-body">
<form id="newobjectform" enctype="multipart/form-data" action="#" method="post" >
<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();
} else {
echo "<input type='hidden' id='topic' name='topic' value='2' />";
}
if ($boolTopics) print_topics();
?>
<!-- Lokalisierung ---------------------------------- -->

View File

@@ -4,8 +4,8 @@
* Ideenmelder
* Autor: Walter Hupfeld, Hamm
* E-Mail: info@hupfeld-software.de
* Version: 1.0
* Datum: 18.05.2021
* Version: 3.0
* Datum: 11.03.2024
******************************** */
@@ -14,12 +14,14 @@ function generate_tooltip_description($row) {
global $boolComment;
global $boolUpload;
global $boolDefect;
global $boolApprove;
global $uploaddir;
global $arrTopic;
global $arrDefect;
global $db;
$description = $row['description'];
$description = ($boolApprove && $row['approval']) ? $row['description'] : "Freigabe in Kürze";
$numUps = $row['thumb_ups'];
$numDowns = $row['thumb_downs'];
$id = $row['id'];
@@ -29,7 +31,7 @@ function generate_tooltip_description($row) {
$strDescription = "<strong>Anmerkung zu ".$arrTopic[$topic]."</strong><br>";
if ($boolUpload && isset($row['filename'])) {
if ($boolUpload && isset($row['filename']) && ($boolApprove && $row['approval'])) {
$strDescription .= "<a href=\'images/".$row['filename']."\' data-lightbox=\'radweg".$id."\'>";
$strDescription .= "<img src=\'images/".$row['filename']."\' style=\'width:200px;\' /></a><br>";
}