Software Licenses ('.$query_total.')

Manage and create software licenses for devices

'; if ($create_allowed === 1){ $view .= ''; } $view .= '
'; if (isset($success_msg)){ $view .= '

'.$success_msg.'

'; } $view .= ' '; $view .= '
'; if (empty($responses)){ $view .= ' '; } else { foreach ($responses as $response){ // Check if license is expired based on timestamp $actual_status = $response->status; if (!empty($response->expires_at)) { $expiry_time = strtotime($response->expires_at); $current_time = time(); if ($current_time > $expiry_time) { // License is expired - override status $actual_status = 2; } } // Status display based on actual status $status_text = ''; if ($actual_status == 0) { $status_text = 'Inactive'; } elseif ($actual_status == 1) { $status_text = 'Assigned'; } elseif ($actual_status == 2) { $status_text = 'Expired'; } // Format dates $starts_display = '-'; if (!empty($response->starts_at)) { $starts_display = date('Y-m-d', strtotime($response->starts_at)); } $expires_display = '-'; if (!empty($response->expires_at)) { $expires_display = date('Y-m-d', strtotime($response->expires_at)); } $view .= ' '; } } $view .= '
License Key Software Version Status Transaction ID Starts At Expires Assigned To (Serial)
No licenses found
'.$response->license_key.' '.$response->version_name.' '.$status_text.' '.($response->transaction_id ?? '-').' '.$starts_display.' '.$expires_display.' '.($response->assigned_serial ?? '-').'
'; $view.=''; // Bulk License Modal $view .= ' '; // License Details Modal $view .= ' '; //OUTPUT echo $view; // Add JavaScript for modals and API calls echo ' '; template_footer(); ?>