]> gitweb.morketsmerke.org Git - bugtrack.git/commitdiff
Widoczność ticketów - BT#149
authorxf0r3m <jakubstasinski@protonmail.com>
Tue, 12 Mar 2024 11:50:57 +0000 (12:50 +0100)
committerxf0r3m <jakubstasinski@protonmail.com>
Tue, 12 Mar 2024 11:50:57 +0000 (12:50 +0100)
submit.php

index 4bbcd393b7fa6b6a88fefd9a4560cec6cf4e9acc..680a37505fd10484f8146f4d3616ee34b32b366e 100644 (file)
@@ -5,7 +5,17 @@
     $setValues = intval($_POST["submitProductId"]) . "," . intval($_POST["submitCompId"]) . ",'" . mysqli_real_escape_string($connection, htmlspecialchars($_POST["submitTypeOf"])) . "','" . mysqli_real_escape_string($connection, htmlspecialchars($_POST["submitSubject"])) . "','" . mysqli_real_escape_string($connection, htmlspecialchars($_POST["submitDesc"])) . "',0";
     $result = dbAdd($connection, $tableName, $columnScheme, $setValues);
     if ( $result == true ) {
-      echo "<div class=\"alert alert-success\" role=\"alert\">Zgłoszenie zostało przyjęte. Niebawem pojawi się na stronie zgłoszonych problemów</div>";
+      $tableName = 'bug';
+      $columnScheme = 'id';
+      $whereValue = '1=1 ORDER BY id DESC LIMIT 1';
+      $result = dbQuery($connection, $tableName, $columnScheme, $whereValue);
+      if ( mysqli_num_rows($result) > 0 ) {
+        $bugID = getFieldValue($result);
+      }
+      echo "<div class=\"alert alert-success\" role=\"alert\">Zgłoszenie zostało przyjęte.<br />";
+      echo "Link do śledzenia zmian: <a href=\"index.php?p=comments&bid=" . $bugID . "\">" . $_SERVER['REQUEST_SCHEME'] . "://" . $_SERVER['SERVER_NAME'] . "/index.php?p=comments&bid=" . $bugID . "</a><br />";
+      echo "Link należy zachować, aby móc śledzić zmiany w zgłoszeniach. Niektóre zgłoszenia nie są wyświetlane na stronie.";
+      echo "</div>";
     } else {
       echo "<div class=\"alert alert-danger\" role=\"alert\">Zgłosznie nie zostało przyjęte.</div>";
     }