';
$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 "
';