/**
* Main content template for the Unraid web interface.
* Handles the rendering of tabs and page content.
*/
$defaultIcon = "";
// Helper function to process icon
function process_icon($icon, $docroot, $root) {
global $defaultIcon;
if (substr($icon, -4) == '.png') {
if (file_exists("$docroot/$root/images/$icon")) {
return "";
} elseif (file_exists("$docroot/$root/$icon")) {
return "
";
}
return $defaultIcon;
} elseif (substr($icon, 0, 5) == 'icon-') {
return "";
} elseif ($icon[0] != '<') {
if (substr($icon, 0, 3) != 'fa-') {
$icon = "fa-$icon";
}
return "";
}
return $icon;
}
$tab = 1;
// even if DisplaySettings is not enabled for tabs, pages with Tabs="true" will use tabs
$display['tabs'] = isset($myPage['Tabs']) ? (strtolower($myPage['Tabs']) == 'true' ? 0 : 1) : 1;
$tabbed = $display['tabs'] == 0 && count($pages) > 1;
?>