$device['device_id'], 'app_type' => $app], 'applications'); } } if ($updated) { print_message("Applications updated!"); } else { print_message("No changes."); } } } # Show list of apps with checkboxes $apps_enabled = dbFetchRows("SELECT * from `applications` WHERE `device_id` = ? ORDER BY app_type", [ $device['device_id'] ]); if (safe_count($apps_enabled)) { $app_enabled = []; foreach ($apps_enabled as $application) { $app_enabled[] = $application['app_type']; } ?>
'Applications', 'header-border' => TRUE]); ?> $info) { if (!str_ends_with($info->getFilename(), '.inc.php')) { continue; } $applications[] = str_replace(".inc.php", "", $info->getFilename()); } //r($applications); foreach ($applications as $app) { if (in_array($app, $app_enabled)) { echo(" "); //echo(" '); //echo(" "); echo(" "); echo(" "); } } ?>
Enable Application
"); $item = [ 'id' => 'app_' . $app, 'type' => 'switch-ng', 'off-text' => 'Yes', 'off-color' => 'success', 'on-color' => 'danger', 'on-text' => 'No', 'size' => 'mini', //'height' => '15px', //'title' => 'Show/Hide Removed', //'placeholder' => 'Removed', 'readonly' => $readonly, //'disabled' => TRUE, //'submit_by_key' => TRUE, 'value' => 1 ]; echo('' . generate_form_element($item) . '" . nicecase($app) . "