/**
 * Prints the style sheet link tags, if desired (based on inputs in footer forms)
 *
 * @param type $deviceData
 * @return type style sheet file name (for footer forms)
 */
function printStyleSheetLinkTags($deviceData)
{
    $styleSheetFile = getStyleSheetFile($deviceData);
    $rmAllDevicesCss = filter_input(INPUT_GET, 'rmAllDevicesCss', FILTER_SANITIZE_NUMBER_INT);
    if (!$rmAllDevicesCss) {
        print '<link rel="stylesheet" type="text/css" href="../../css/allDevices.css" />';
    }
    $rmStyleSheetCss = filter_input(INPUT_GET, 'rmStyleSheetCss', FILTER_SANITIZE_NUMBER_INT);
    if (!$rmStyleSheetCss) {
        $rmStyleSheetCssChecked = '';
        print '<link rel="stylesheet" type="text/css" href="' . $styleSheetFile . '" />';
    }
    print '<!--[if IE]>';
    print '<link rel="stylesheet" type="text/css" href="../../css/device/explorer.css" media="all" />';
    print '<![endif]-->';
    return $styleSheetFile;
}
<html lang='en'>
<?php 
$pageTitle = basename($_SERVER['PHP_SELF'], '.php');
require_once 'php/detectmobilebrowser.php';
require_once '../../php/IdMyGadgetDetectMobileBrowsers.php';
require_once '../all_detectors/getGadgetString.php';
require_once '../all_detectors/printStyleSheetLinkTags.php';
require_once '../all_detectors/printSampleContent.php';
require_once '../all_detectors/printFooterForms.php';
$debugging = FALSE;
$allowOverridesInUrl = TRUE;
// Needed for footer forms to work
$idMyGadget = new IdMyGadgetDetectMobileBrowsers($debugging, $allowOverridesInUrl);
$deviceData = $idMyGadget->getDeviceData();
$gadgetString = getGadgetString($deviceData);
$styleSheetFile = getStyleSheetFile($deviceData);
?>

<head>
	<title><?php 
print $pageTitle;
?>
</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<?php 
$styleSheetFile = printStyleSheetLinkTags($deviceData);
?>
</head>

<body>
<div id="container">