CMXX - First candidate

This commit is contained in:
“VeLiTi”
2025-03-05 20:45:35 +01:00
parent 3a52632d61
commit faf5a5156b
29 changed files with 588 additions and 1053 deletions

View File

@@ -42,13 +42,6 @@ $query_total = ioServer($api_url,'');
//Decode Payload
if (!empty($query_total)){$query_total = json_decode($query_total,);}else{$query_total = null;}
//CALL TO API
$api_url = '/v2/media/';
$media_responses = ioServer($api_url,'');
//Decode Payload
if (!empty($media_responses)){$media_responses = json_decode($media_responses,true);}else{$media_responses = null;}
// Handle success messages
if (isset($_GET['success_msg'])) {
if ($_GET['success_msg'] == 1) {
@@ -133,23 +126,14 @@ $view .= '
}
else {
foreach ($responses as $response){
//GET PATH OF ASSIGNED MEDIA
$full_path = '';
foreach ($media_responses as $media){
if($response->product_media == $media['rowID']){
$full_path = $media['full_path'];
}
}
$view .= '
<tr>
<td>'.$response->productcode.'</td>
<td>'.${'part_type'.$response->parttype}.'</td>
<td>'.${'product_category'.$response->product_category}.'</td>
<td class="responsive-hidden">
'.(($full_path !='')?'<img style="border-radius: 4px;height: 50px;" src="'.$full_path.'" alt="">' : '').'
'.(($response->full_path !='')?'<img style="border-radius: 4px;height: 50px;" src="'.$response->full_path.'" alt="">' : '').'
</td>
<td>'.(${$response->productname} ?? $response->productname).'</td>
<td><a href="index.php?page=product&rowID='.$response->rowID.'" class="btn_link">'.$general_view .'</a></td>