Add software tool functionality with device connection and upgrade options

- Implemented the software tool page with user interface for connecting devices.
- Added functionality to display connection status and software upgrade options.
- Included a help modal with step-by-step instructions for users.
- Integrated error handling and user permission checks.
- Enhanced user experience with dynamic content updates and visual feedback.
This commit is contained in:
“VeLiTi”
2025-12-21 14:16:55 +01:00
parent e57e0edbc4
commit 653e33d7e9
34 changed files with 2915 additions and 169 deletions

View File

@@ -9,8 +9,6 @@ defined($security_key) or exit;
//Connect to DB
$pdo = dbConnect($dbname);
var_dump($_GET);
// STEP 1: Validate token parameter exists
if (!isset($_GET['token']) || $_GET['token'] == '') {
http_response_code(400);
@@ -135,8 +133,10 @@ if ($assignment['assigned'] == 0) {
}
// STEP 6: Hardware version compatibility
if ($version['hw_version'] && $version['hw_version'] != '' && $equipment['hw_version']) {
if ($version['hw_version'] != $equipment['hw_version']) {
// Only check if version has hw_version requirement (not NULL or empty)
// Match logic from software_update.php line 103
if ($version['hw_version'] && $version['hw_version'] != '') {
if ($equipment['hw_version'] && $version['hw_version'] != $equipment['hw_version']) {
http_response_code(403);
log_download([
'user_id' => $user_data['id'],