$device['device_id'], 'app_type' => $app), 'applications'); } } if ($updated) { print_message("Applications updated!"); } else { print_message("No changes."); } } # Show list of apps with checkboxes echo('
'); $apps_enabled = dbFetchRows("SELECT * from `applications` WHERE `device_id` = ? ORDER BY app_type", array($device['device_id'])); if (count($apps_enabled)) { foreach ($apps_enabled as $application) { $app_enabled[] = $application['app_type']; } } echo("
"); $row = 1; foreach ($applications as $app) { if (is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } echo(" "); echo(" "); echo(" "); echo(" "); $row++; } echo(''); echo('
Enable Application
"); echo(" "); echo(" ". ucfirst($app) . "
'); echo('
'); echo('
'); ?>