Merge branch 'development'
@@ -147,12 +147,7 @@ $view .= '</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.$view_account_information.'</a>
|
||||
<a href="#">'.$view_account_contact.'</a>
|
||||
<a href="#">'.$account_billing.'</a>
|
||||
<a href="#">'.$account_shipping.'</a>
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>
|
||||
';
|
||||
</div>';
|
||||
//Define Permission & Profile
|
||||
|
||||
$view .= '<div class="content-block tab-content active">
|
||||
@@ -186,8 +181,10 @@ $view .= '<div class="content-block tab-content active">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$view_account_contact.'</a>
|
||||
</div>
|
||||
<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="">'.$account_contactfirstname.'</label>
|
||||
<input name="accountdetails[contactfirstname]" type="text" value="'.$accountdetails->contactfirstname.'">
|
||||
@@ -206,8 +203,10 @@ $view .= '<div class="content-block tab-content">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$account_billing.'</a>
|
||||
</div>
|
||||
<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="">'.$account_billstreetadress.'</label>
|
||||
<input name="accountdetails[billstreetadress]" type="text" value="'.$accountdetails->billstreetadress.'">
|
||||
@@ -231,7 +230,10 @@ $view .= '<div class="content-block tab-content">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$account_shipping.'</a>
|
||||
</div>
|
||||
<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="">'.$account_streetadress.'</label>
|
||||
<input name="accountdetails[streetadress]" type="text" value="'.$accountdetails->streetadress.'">
|
||||
@@ -272,8 +274,10 @@ $view .= '<div class="content-block tab-content">
|
||||
$partner_data = json_decode($_SESSION['partnerhierarchy']);
|
||||
$soldto_dropdown = listPartner('soldto',$_SESSION['permission'],$accounthierarchy->soldto,'');
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>
|
||||
<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="">'.$general_salesid.'</label>
|
||||
<input name="salesid" type="text" value="'.$partner_data->salesid.'">
|
||||
|
||||
@@ -161,25 +161,8 @@ if ($sw_version_latest_update == 1){
|
||||
//------------------------------------------
|
||||
//UPDATE SW_STATUS
|
||||
//------------------------------------------
|
||||
//UPDATE ASSETS-> SW_LATEST_VERSION WITH NO PRODUCT_SOFTWARE TO 2
|
||||
$sql = 'UPDATE equipment e LEFT JOIN products_software ps ON e.productrowid = ps.productrowid SET e.sw_version_latest = 2 WHERE ps.rowID IS NULL';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
//UPDATE ASSETS-> SW_LATEST_VERSION WITH PRODUCT_SOFTWARE FROM 2 TO 0
|
||||
$sql = 'UPDATE equipment e LEFT JOIN products_software ps ON e.productrowid = ps.productrowid SET e.sw_version_latest = 0 WHERE ps.rowID IS NOT NULL AND sw_version_latest = 2';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
//UPDATE LATEST TO NO IN CASE HW_VERSION ARE EQUAL AND SW_VERSIONS NOT AND NOT LATEST
|
||||
$sql = 'UPDATE equipment e JOIN products_software ps ON e.productrowid = ps.productrowid SET e.sw_version_latest = 0 WHERE ps.latest = 1 AND lower(e.sw_version) <> lower(ps.version) AND lower(e.hw_version) = lower(ps.hw_version) AND e.sw_version_latest = 1';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute();
|
||||
|
||||
//UPDATE LATEST TO YES IN CASE HW_VERSION ARE EQUAL AND SW_VERSIONS ARE EQUAL
|
||||
$sql = 'UPDATE equipment e JOIN products_software ps ON e.productrowid = ps.productrowid SET e.sw_version_latest = 1 WHERE ps.latest = 1 AND lower(e.sw_version) = lower(ps.version) AND lower(e.hw_version) = lower(ps.hw_version) AND e.sw_version_latest = 0';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute();
|
||||
// Use the reusable function to update software version status for all equipment
|
||||
updateSoftwareVersionStatus($pdo);
|
||||
//------------------------------------------
|
||||
//------------------------------------------
|
||||
}
|
||||
|
||||
196
api/v2/get/software_available.php
Normal file
@@ -0,0 +1,196 @@
|
||||
<?php
|
||||
defined($security_key) or exit;
|
||||
ini_set('display_errors', '1');
|
||||
ini_set('display_startup_errors', '1');
|
||||
error_reporting(E_ALL);
|
||||
//------------------------------------------
|
||||
// Software Available Check API
|
||||
// Returns boolean indicating if software updates are available
|
||||
//------------------------------------------
|
||||
|
||||
//Connect to DB
|
||||
$pdo = dbConnect($dbname);
|
||||
|
||||
//NEW ARRAY
|
||||
$criterias = [];
|
||||
$clause = '';
|
||||
|
||||
//Check for $_GET variables and build up clause
|
||||
if(isset($get_content) && $get_content!=''){
|
||||
//GET VARIABLES FROM URL
|
||||
$requests = explode("&", $get_content);
|
||||
//Check for keys and values
|
||||
foreach ($requests as $y){
|
||||
$v = explode("=", $y);
|
||||
//INCLUDE VARIABLES IN ARRAY
|
||||
$criterias[$v[0]] = $v[1];
|
||||
}
|
||||
}
|
||||
|
||||
// IF SN IS PROVIDED, CHECK FOR AVAILABLE UPGRADES
|
||||
if (isset($criterias['sn']) && $criterias['sn'] != ''){
|
||||
|
||||
//default response
|
||||
$software_available = "no";
|
||||
|
||||
//check if current version is send and update the equipment record
|
||||
if(isset($criterias['version']) && $criterias['version'] !=''){
|
||||
$sql = 'UPDATE equipment SET sw_version = ?, updatedby = ? WHERE serialnumber = ? ';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$criterias['version'],$username,$criterias['sn']]);
|
||||
}
|
||||
|
||||
//check if current hw_version is send and update the equipment record
|
||||
if(isset($criterias['hw_version']) && $criterias['hw_version'] !=''){
|
||||
$sql = 'UPDATE equipment SET hw_version = ?, updatedby = ? WHERE serialnumber = ? ';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$criterias['hw_version'],$username,$criterias['sn']]);
|
||||
}
|
||||
|
||||
//GET EQUIPMENT AND PRODUCT DATA BASED ON SERIAL NUMBER
|
||||
$sql = 'SELECT
|
||||
p.rowID as product_rowid,
|
||||
p.productcode,
|
||||
e.sw_version as current_sw_version,
|
||||
e.hw_version,
|
||||
e.sw_version_license,
|
||||
e.rowID as equipment_rowid
|
||||
FROM equipment e
|
||||
JOIN products p ON e.productrowid = p.rowID
|
||||
WHERE e.serialnumber = ?';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$criterias['sn']]);
|
||||
$equipment_data = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if (!$equipment_data) {
|
||||
$messages = ["error" => "No equipment found for serialnumber"];
|
||||
} else {
|
||||
$product_rowid = $equipment_data['product_rowid'];
|
||||
$productcode = $equipment_data['productcode'];
|
||||
$current_sw_version = $equipment_data['current_sw_version'];
|
||||
$hw_version = $equipment_data['hw_version'];
|
||||
$sw_version_license = $equipment_data['sw_version_license'];
|
||||
$equipment_rowid = $equipment_data['equipment_rowid'];
|
||||
|
||||
//GET ALL DATA: active assignments, version details, and upgrade paths
|
||||
//Filter on active status, hw_version compatibility, and exclude current version
|
||||
$sql = 'SELECT
|
||||
psv.rowID as version_id,
|
||||
psv.version,
|
||||
psv.name,
|
||||
psv.description,
|
||||
psv.mandatory,
|
||||
psv.latest,
|
||||
psv.hw_version,
|
||||
psv.file_path,
|
||||
pup.price,
|
||||
pup.currency,
|
||||
pup.from_version_id,
|
||||
from_ver.version as from_version
|
||||
FROM products_software_assignment psa
|
||||
JOIN products_software_versions psv ON psa.software_version_id = psv.rowID
|
||||
LEFT JOIN products_software_upgrade_paths pup ON pup.to_version_id = psv.rowID AND pup.is_active = 1
|
||||
LEFT JOIN products_software_versions from_ver ON pup.from_version_id = from_ver.rowID
|
||||
WHERE psa.product_id = ?
|
||||
AND psa.status = 1
|
||||
AND (psv.hw_version = ? OR psv.hw_version IS NULL OR psv.hw_version = "")
|
||||
AND psv.version != ?';
|
||||
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$product_rowid, $hw_version, $current_sw_version ?? '']);
|
||||
$versions = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
|
||||
if (empty($versions)) {
|
||||
// No versions available
|
||||
$software_available = "no";
|
||||
} else {
|
||||
$has_priced_options = false;
|
||||
$has_latest_version_different = false;
|
||||
|
||||
foreach ($versions as $version) {
|
||||
//Check if this version should be shown (same logic as software_update)
|
||||
$show_version = false;
|
||||
if (!$current_sw_version || $current_sw_version == '') {
|
||||
//No current version - show all
|
||||
$show_version = true;
|
||||
} elseif ($version['from_version'] == $current_sw_version) {
|
||||
//Upgrade path exists from current version
|
||||
$show_version = true;
|
||||
} else {
|
||||
//Check if any upgrade paths exist for this version
|
||||
$sql = 'SELECT COUNT(*) as path_count
|
||||
FROM products_software_upgrade_paths
|
||||
WHERE to_version_id = ? AND is_active = 1';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$version['version_id']]);
|
||||
$path_check = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($path_check['path_count'] == 0) {
|
||||
//No paths exist at all - show as free upgrade
|
||||
$show_version = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($show_version) {
|
||||
//Check if there's a valid license for this upgrade
|
||||
$final_price = $version['price'] ?? '0.00';
|
||||
|
||||
if ($final_price > 0 && $sw_version_license) {
|
||||
//Check if the license is valid
|
||||
$sql = 'SELECT status, start_at, expires_at
|
||||
FROM products_software_licenses
|
||||
WHERE license_key = ? AND equipment_id = ?';
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute([$sw_version_license, $equipment_rowid]);
|
||||
$license = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
if ($license && $license['status'] == 1) {
|
||||
$now = date('Y-m-d H:i:s');
|
||||
$start_at = $license['start_at'];
|
||||
$expires_at = $license['expires_at'];
|
||||
|
||||
//Check if license is within valid date range
|
||||
if ((!$start_at || $start_at <= $now) && (!$expires_at || $expires_at >= $now)) {
|
||||
$final_price = '0.00';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check for priced options
|
||||
if ($final_price > 0) {
|
||||
$has_priced_options = true;
|
||||
}
|
||||
|
||||
// Check if there's a "latest" flagged version that's different from current
|
||||
if ($version['latest'] == 1 && $version['version'] != $current_sw_version) {
|
||||
$has_latest_version_different = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Apply the logic:
|
||||
// 1. If there are priced options -> "yes"
|
||||
// 2. If no priced options but current version != latest flagged version -> "yes"
|
||||
// 3. Default -> "no"
|
||||
if ($has_priced_options) {
|
||||
$software_available = "yes";
|
||||
} elseif ($has_latest_version_different) {
|
||||
$software_available = "yes";
|
||||
} else {
|
||||
$software_available = "no";
|
||||
}
|
||||
}
|
||||
|
||||
$messages = ["software_available" => $software_available];
|
||||
}
|
||||
} else {
|
||||
$messages = ["error" => "No serialnumber found"];
|
||||
}
|
||||
|
||||
//Encrypt results
|
||||
$messages = json_encode($messages, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
//Send results
|
||||
echo $messages;
|
||||
|
||||
?>
|
||||
@@ -23,17 +23,37 @@ document.querySelector('.responsive-toggle').onclick = event => {
|
||||
document.querySelectorAll('.tabs a').forEach((element, index) => {
|
||||
element.onclick = event => {
|
||||
event.preventDefault();
|
||||
document.querySelectorAll('.tabs a').forEach(element => element.classList.remove('active'));
|
||||
document.querySelectorAll('.tab-content').forEach((element2, index2) => {
|
||||
if (index == index2) {
|
||||
element.classList.add('active');
|
||||
element2.style.display = 'block';
|
||||
} else {
|
||||
element2.style.display = 'none';
|
||||
}
|
||||
|
||||
// Toggle the clicked tab
|
||||
const isActive = element.classList.contains('active');
|
||||
const tabContent = document.querySelectorAll('.tab-content')[index];
|
||||
|
||||
// Remove active class from all tabs and contents
|
||||
document.querySelectorAll('.tabs a').forEach(el => el.classList.remove('active'));
|
||||
document.querySelectorAll('.tab-content').forEach(content => {
|
||||
content.classList.remove('active');
|
||||
content.style.display = 'none';
|
||||
});
|
||||
|
||||
// If it wasn't active, make it active (collapsible behavior)
|
||||
if (!isActive && tabContent) {
|
||||
element.classList.add('active');
|
||||
tabContent.classList.add('active');
|
||||
tabContent.style.display = 'block';
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
// Initialize first tab as open by default
|
||||
if (document.querySelectorAll('.tabs a').length > 0) {
|
||||
const firstTab = document.querySelectorAll('.tabs a')[0];
|
||||
const firstContent = document.querySelectorAll('.tab-content')[0];
|
||||
if (firstTab && firstContent) {
|
||||
firstTab.classList.add('active');
|
||||
firstContent.classList.add('active');
|
||||
firstContent.style.display = 'block';
|
||||
}
|
||||
}
|
||||
if (document.querySelector('.filters a')) {
|
||||
let filtersList = document.querySelector('.filters .list');
|
||||
let filtersListStyle = window.getComputedStyle(filtersList);
|
||||
|
||||
@@ -1490,6 +1490,7 @@ function getProfile($profile, $permission){
|
||||
'com_log' => 'U',
|
||||
'software_update' => 'R',
|
||||
'software_download' => 'R',
|
||||
'software_available' => 'R'
|
||||
];
|
||||
|
||||
// Group permissions: [granting_page => [collection => allowed_actions_string]]
|
||||
@@ -5111,3 +5112,83 @@ function checkAndInsertIdentityDealer($pdo, $identityUserkey) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// Update software version status for equipment
|
||||
// Parameters:
|
||||
// $pdo - PDO database connection
|
||||
// $serialnumber - Optional serial number. If null, updates all equipment
|
||||
// Returns: boolean - true on success, false on error
|
||||
//------------------------------------------
|
||||
function updateSoftwareVersionStatus($pdo, $serialnumber = null) {
|
||||
try {
|
||||
// Build WHERE clause for serial number filtering if provided
|
||||
$sn_clause = '';
|
||||
$bind_params = [];
|
||||
|
||||
if ($serialnumber !== null) {
|
||||
$sn_clause = ' AND e.serialnumber = ?';
|
||||
$bind_params = [$serialnumber];
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// STEP 1: Set sw_version_latest = 2 for equipment with NO software assignments
|
||||
//------------------------------------------
|
||||
$sql = 'UPDATE equipment e
|
||||
LEFT JOIN products_software_assignment psa ON e.productrowid = psa.product_id AND psa.status = 1
|
||||
SET e.sw_version_latest = 2
|
||||
WHERE psa.product_id IS NULL' . $sn_clause;
|
||||
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute($bind_params);
|
||||
|
||||
//------------------------------------------
|
||||
// STEP 2: Set sw_version_latest = 0 for equipment WITH software assignments (from previous 2)
|
||||
//------------------------------------------
|
||||
$sql = 'UPDATE equipment e
|
||||
JOIN products_software_assignment psa ON e.productrowid = psa.product_id AND psa.status = 1
|
||||
SET e.sw_version_latest = 0
|
||||
WHERE e.sw_version_latest = 2' . $sn_clause;
|
||||
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute($bind_params);
|
||||
|
||||
//------------------------------------------
|
||||
// STEP 3: Set sw_version_latest = 0 for equipment NOT matching latest version
|
||||
//------------------------------------------
|
||||
$sql = 'UPDATE equipment e
|
||||
JOIN products_software_assignment psa ON e.productrowid = psa.product_id AND psa.status = 1
|
||||
JOIN products_software_versions psv ON psa.software_version_id = psv.rowID
|
||||
SET e.sw_version_latest = 0
|
||||
WHERE psv.latest = 1
|
||||
AND psv.status = 1
|
||||
AND lower(e.sw_version) <> lower(psv.version)
|
||||
AND (psv.hw_version = e.hw_version OR psv.hw_version IS NULL OR psv.hw_version = "")
|
||||
AND e.sw_version_latest = 1' . $sn_clause;
|
||||
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute($bind_params);
|
||||
|
||||
//------------------------------------------
|
||||
// STEP 4: Set sw_version_latest = 1 for equipment matching latest version
|
||||
//------------------------------------------
|
||||
$sql = 'UPDATE equipment e
|
||||
JOIN products_software_assignment psa ON e.productrowid = psa.product_id AND psa.status = 1
|
||||
JOIN products_software_versions psv ON psa.software_version_id = psv.rowID
|
||||
SET e.sw_version_latest = 1
|
||||
WHERE psv.latest = 1
|
||||
AND psv.status = 1
|
||||
AND lower(e.sw_version) = lower(psv.version)
|
||||
AND (psv.hw_version = e.hw_version OR psv.hw_version IS NULL OR psv.hw_version = "")
|
||||
AND e.sw_version_latest = 0' . $sn_clause;
|
||||
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$stmt->execute($bind_params);
|
||||
|
||||
return true;
|
||||
|
||||
} catch (PDOException $e) {
|
||||
error_log('Database error in updateSoftwareVersionStatus: ' . $e->getMessage());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 203 KiB |
|
After Width: | Height: | Size: 212 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 203 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 205 KiB |
|
After Width: | Height: | Size: 176 KiB |
|
After Width: | Height: | Size: 204 KiB |
BIN
assets/images/media/67fbcc9ac57a5_Swim-Spas-Image-1.jpg
Normal file
|
After Width: | Height: | Size: 250 KiB |
BIN
assets/images/media/67fbcda135a98_hotspringworld-42.webp
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
assets/images/media/Band_0000_Layer-1-copy normaal.png
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
assets/images/media/Band_0001_Layer-2-copy normaal.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
assets/images/media/Band_0002_Layer-3-copy normaal.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
assets/images/media/Band_0003_Layer-4-copy normaal.png
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
assets/images/media/Band_0004_Layer-1 normaal.png
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
assets/images/media/Band_0005_Layer-2 normaal.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
assets/images/media/Band_0006_Layer-4 normaal.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
assets/images/media/Band_0007_Layer-3 normaal.png
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
assets/images/media/EPH2NA1.png
Normal file
|
After Width: | Height: | Size: 672 KiB |
BIN
assets/images/media/EPSK01.jpg
Normal file
|
After Width: | Height: | Size: 913 KiB |
BIN
assets/images/media/Morval-Watches2024-V1-Blue-Black normaal.png
Normal file
|
After Width: | Height: | Size: 207 KiB |
|
After Width: | Height: | Size: 203 KiB |
BIN
assets/images/media/Morval-Watches2024-V1-Blue-Brown normaal.png
Normal file
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 212 KiB |
BIN
assets/images/media/Morval-Watches2024-V1-Blue-Calf normaal.png
Normal file
|
After Width: | Height: | Size: 223 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 218 KiB |
|
After Width: | Height: | Size: 214 KiB |
BIN
assets/images/media/Morval-Watches2024-V1-Blue-Steel normaal.png
Normal file
|
After Width: | Height: | Size: 189 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 208 KiB |
|
After Width: | Height: | Size: 203 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 210 KiB |
|
After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 205 KiB |
|
After Width: | Height: | Size: 176 KiB |
|
After Width: | Height: | Size: 207 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 220 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 187 KiB |
BIN
assets/images/media/Morval-Watches2024-V1-Grey-Black normaal.png
Normal file
|
After Width: | Height: | Size: 203 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 209 KiB |
|
After Width: | Height: | Size: 215 KiB |
|
After Width: | Height: | Size: 216 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 169 KiB |
|
After Width: | Height: | Size: 191 KiB |
|
After Width: | Height: | Size: 202 KiB |
|
After Width: | Height: | Size: 204 KiB |
|
After Width: | Height: | Size: 198 KiB |
|
After Width: | Height: | Size: 186 KiB |
|
After Width: | Height: | Size: 196 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 218 KiB |
|
After Width: | Height: | Size: 211 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 206 KiB |
|
After Width: | Height: | Size: 199 KiB |
|
After Width: | Height: | Size: 184 KiB |
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 211 KiB |
BIN
assets/images/media/Morval_achterkant.png
Normal file
|
After Width: | Height: | Size: 25 MiB |
BIN
assets/images/media/SP1.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
assets/images/media/band_black.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
assets/images/media/band_black_croc.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
assets/images/media/band_blue.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
assets/images/media/band_dark_brown.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
assets/images/media/band_light_brown.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/images/media/band_steel.png
Normal file
|
After Width: | Height: | Size: 53 KiB |
BIN
assets/images/media/morval-crown.jpg
Normal file
|
After Width: | Height: | Size: 414 KiB |
BIN
assets/images/media/morval_band_connect1.jpg
Normal file
|
After Width: | Height: | Size: 288 KiB |
BIN
assets/images/media/morval_band_connect2.jpg
Normal file
|
After Width: | Height: | Size: 346 KiB |
BIN
assets/images/media/morval_box.jpg
Normal file
|
After Width: | Height: | Size: 300 KiB |
BIN
assets/images/media/morval_closure.jpg
Normal file
|
After Width: | Height: | Size: 270 KiB |
@@ -256,9 +256,15 @@ $view .= '</div>';
|
||||
foreach($arrayQuestions_cartest as $group){
|
||||
|
||||
if ($group['Group_sequence'] == 1){
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.$group['Group'].'</a>
|
||||
</div>';
|
||||
$view .= '<div class="content-block tab-content active">
|
||||
<div class="form responsive-width-100">';
|
||||
} else {
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$group['Group'].'</a>
|
||||
</div>';
|
||||
$view .= '<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">';
|
||||
}
|
||||
|
||||
@@ -127,11 +127,8 @@ if ($update_allowed === 1){
|
||||
$view .= '</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.$tab1 .'</a>
|
||||
<a href="#">'.$tab2.'</a>
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>
|
||||
';
|
||||
<a href="#" class="active">'.$tab1.'</a>
|
||||
</div>';
|
||||
|
||||
$view .='<div class="content-block tab-content active">
|
||||
<div class="form responsive-width-100">
|
||||
@@ -257,6 +254,10 @@ $shipto_dropdown = listPartner('shipto',$_SESSION['permission'],$partner_data->s
|
||||
$location_dropdown = listPartner('location',$_SESSION['permission'],$partner_data->location,'');
|
||||
|
||||
//DISPLAY
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab2.'</a>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
';
|
||||
@@ -273,6 +274,10 @@ $view .= '
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="">'.$general_created.'</label>
|
||||
|
||||
@@ -155,13 +155,7 @@ $view .= '</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.($view_dealers_information ?? 'Dealer information').'</a>
|
||||
<a href="#">'.($view_dealer_details_1 ?? 'Descriptions').'</a>
|
||||
<a href="#">'.($view_dealer_details_3 ?? 'Location').'</a>
|
||||
<a href="#">'.($dealers_openinghours ?? 'opening_hours').'</a>
|
||||
<a href="#">'.($view_dealer_details_2 ?? 'Settings').'</a>
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>
|
||||
';
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content active">
|
||||
<div class="form responsive-width-100">
|
||||
@@ -190,6 +184,10 @@ $view .= '<div class="content-block tab-content active">
|
||||
$view .= '<input type="hidden" name="rowID" value="'.($responses['rowID'] ?? '').'">';
|
||||
}
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.($view_dealers_descriptions ?? 'Description').'</a>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="dealerdescription">'.($dealers_short_description ?? 'short').'</label>
|
||||
@@ -325,6 +323,10 @@ $view .= '
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="dealercode">'.$general_created.'</label>
|
||||
|
||||
@@ -157,13 +157,6 @@ if ($update_allowed === 1 || $equipment_owner === 1){
|
||||
|
||||
$view .= '</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.$tab1.'</a>
|
||||
<a href="#">'.$tab2.'</a>
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>
|
||||
';
|
||||
|
||||
//create product option list
|
||||
$product_option_list ='';
|
||||
foreach ($products as $product){
|
||||
@@ -188,7 +181,10 @@ if (isset($products_software) && $products_software !=''){
|
||||
$product_software_list .= '</select>';
|
||||
}
|
||||
|
||||
$view .= '<div class="content-block tab-content active">
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.$tab1.'</a>
|
||||
</div>
|
||||
<div class="content-block tab-content active">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="status">'.$equipment_label3.'</label>
|
||||
<select id="status" name="status" '.($update_allowed_special==0? 'disabled':'').'>
|
||||
@@ -232,8 +228,11 @@ $location_dropdown = listPartner('location',$_SESSION['permission'],$partner_dat
|
||||
if (isset($partner_data->section)){$section = getPartnerName($partner_data->section) ?? 'Not specified';} else {$section = 'Not specified';}
|
||||
|
||||
|
||||
//DISPLAY
|
||||
$view .= '<div class="content-block tab-content">
|
||||
//DISPLAY TAB 2
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab2.'</a>
|
||||
</div>
|
||||
<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
';
|
||||
$view .= '<label for="status">'.$general_salesid.'</label>';
|
||||
@@ -266,24 +265,28 @@ if (is_array($geo_details)) {
|
||||
$geodetails_lon = '';
|
||||
}
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="productcode">'.$general_created.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_created.'" value="'.$equipment['created'].'" readonly>
|
||||
<label for="productcode">'.$general_createdby.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_createdby.'" value="'.$equipment['createdby'].'" readonly>
|
||||
<label for="productcode">'.$general_updated.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_updated.'" value="'.$equipment['updated'].'" readonly>
|
||||
<label for="productcode">'.$general_updatedby.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_updatedby.'" value="'.$equipment['updatedby'].'" readonly>
|
||||
<label for="productcode">'.$equipment_label11.'</label>
|
||||
<input id="name" type="text" name="order_ref" placeholder="'.$equipment_label11.'" value="'.$equipment['order_ref'].'">
|
||||
<label for="productcode">'.$equipment_label12.'</label>
|
||||
<input id="name" type="text" name="geolocation[]" placeholder="'.$equipment_label12.'" value="'.$geodetails_lat.'">
|
||||
<input id="name" type="text" name="geolocation[]" placeholder="'.$equipment_label12.'" value="'.$geodetails_lon.'">
|
||||
'.($update_allowed_special==1? $changelog:'').'
|
||||
</div>
|
||||
</div>';
|
||||
//DISPLAY TAB 3
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>
|
||||
<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="productcode">'.$general_created.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_created.'" value="'.$equipment['created'].'" readonly>
|
||||
<label for="productcode">'.$general_createdby.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_createdby.'" value="'.$equipment['createdby'].'" readonly>
|
||||
<label for="productcode">'.$general_updated.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_updated.'" value="'.$equipment['updated'].'" readonly>
|
||||
<label for="productcode">'.$general_updatedby.'</label>
|
||||
<input id="name" type="text" name="" placeholder="'.$general_updatedby.'" value="'.$equipment['updatedby'].'" readonly>
|
||||
<label for="productcode">'.$equipment_label11.'</label>
|
||||
<input id="name" type="text" name="order_ref" placeholder="'.$equipment_label11.'" value="'.$equipment['order_ref'].'">
|
||||
<label for="productcode">'.$equipment_label12.'</label>
|
||||
<input id="name" type="text" name="geolocation[]" placeholder="'.$equipment_label12.'" value="'.$geodetails_lat.'">
|
||||
<input id="name" type="text" name="geolocation[]" placeholder="'.$equipment_label12.'" value="'.$geodetails_lon.'">
|
||||
'.($update_allowed_special==1? $changelog:'').'
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
|
||||
$view .= '</form>';
|
||||
|
||||
@@ -115,9 +115,7 @@ $view .= '</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.$tab1.'</a>
|
||||
<a href="#" class="">'.$tab3.'</a>
|
||||
</div>
|
||||
';
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content active">
|
||||
<div class="form responsive-width-100">
|
||||
@@ -152,6 +150,10 @@ $view .= '<div class="content-block tab-content active">
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
|
||||
<div class="form responsive-width-100">
|
||||
|
||||
44
logfile.php
@@ -7,12 +7,14 @@ if (isAllowed('logfile',$_SESSION['profile'],$_SESSION['permission'],'R') === 0)
|
||||
exit;
|
||||
}
|
||||
|
||||
// Define logs directory path
|
||||
$logs_dir = __DIR__ . '/log/';
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// POST HANDLER - Delete all logs
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
$delete_message = '';
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['delete_all_logs'])) {
|
||||
$logs_dir = __DIR__ . '/log/';
|
||||
$deleted_count = 0;
|
||||
|
||||
if (is_dir($logs_dir)) {
|
||||
@@ -37,6 +39,28 @@ if (isset($_GET['deleted'])) {
|
||||
$delete_message = "Successfully deleted " . intval($_GET['deleted']) . " log file(s).";
|
||||
}
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// DOWNLOAD HANDLER
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
if (isset($_GET['download']) && $_GET['download']) {
|
||||
$filename = $_GET['download'];
|
||||
$filepath = $logs_dir . $filename;
|
||||
|
||||
// Security check: ensure file exists and is within logs directory
|
||||
if (file_exists($filepath) && strpos(realpath($filepath), realpath($logs_dir)) === 0) {
|
||||
// Set headers for file download
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-Disposition: attachment; filename="' . $filename . '"');
|
||||
header('Content-Length: ' . filesize($filepath));
|
||||
header('Cache-Control: must-revalidate');
|
||||
header('Pragma: public');
|
||||
|
||||
// Output file content
|
||||
readfile($filepath);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
// GET HANDLER
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
@@ -45,7 +69,6 @@ if (isset($_GET['deleted'])) {
|
||||
$selected_log = $_GET['log'] ?? '';
|
||||
|
||||
// Scan logs directory for all log files
|
||||
$logs_dir = __DIR__ . '/log/';
|
||||
$log_files = [];
|
||||
|
||||
if (is_dir($logs_dir)) {
|
||||
@@ -113,6 +136,9 @@ if (file_exists($filelocation_webserver)){
|
||||
<button type="button" onclick="refreshLog()" class="btn" >
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
<button type="button" onclick="downloadLogFile()" class="btn" style="background: #3498db; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer;">
|
||||
<i class="fas fa-download"></i>
|
||||
</button>
|
||||
<button type="submit" name="delete_all_logs" onclick="return confirmDeleteAll()" class="btn" style="background: #e74c3c; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer;">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
@@ -165,6 +191,20 @@ function loadLogFile(filename) {
|
||||
}
|
||||
}
|
||||
|
||||
// Download current log file
|
||||
function downloadLogFile() {
|
||||
const selector = document.getElementById('log-file-selector');
|
||||
const selectedFile = selector.value;
|
||||
|
||||
if (selectedFile) {
|
||||
const url = new URL(window.location.href);
|
||||
url.searchParams.set('download', selectedFile);
|
||||
window.location.href = url.toString();
|
||||
} else {
|
||||
alert('No log file selected to download.');
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh log functionality
|
||||
function refreshLog() {
|
||||
const button = event.target.closest('button');
|
||||
|
||||
@@ -123,9 +123,7 @@ $view .= '</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#" class="active">'.$tab1 .'</a>
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>
|
||||
';
|
||||
</div>';
|
||||
|
||||
//Define Service and User enabled
|
||||
$view .= '<div class="content-block tab-content active">
|
||||
@@ -141,6 +139,10 @@ $view .= '<div class="content-block tab-content active">
|
||||
$view .= '</div>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="tabs">
|
||||
<a href="#">'.$tab3.'</a>
|
||||
</div>';
|
||||
|
||||
$view .= '<div class="content-block tab-content">
|
||||
<div class="form responsive-width-100">
|
||||
<label for="">'.$general_created.'</label>
|
||||
|
||||