|
|
@@ -5,9 +5,18 @@ try {
|
|
|
} catch(Exception $e) {
|
|
|
die('<b>Unable to read config.ini.php. Did you rename it from config.ini.php-example?</b><br><br>Error message: ' .$e->getMessage());
|
|
|
}
|
|
|
-
|
|
|
+$i = 0;
|
|
|
+$ii = 0;
|
|
|
foreach ($config as $keyname => $section) {
|
|
|
|
|
|
+ if(($keyname !== "general" && $section["enabled"]=="true")){
|
|
|
+ $i++;
|
|
|
+ if(!empty($section["default"]) && $section["default"]=="true"){
|
|
|
+ $defaulttabuser = "tab$i";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if(!empty($section["useicons"]) && ($section["useicons"]=="true")){
|
|
|
|
|
|
$icons = "active";
|
|
|
@@ -38,7 +47,7 @@ foreach ($config as $keyname => $section) {
|
|
|
if($margins == "active"){
|
|
|
|
|
|
$marginpx = "10px";
|
|
|
- $marginborderpx = "1px";
|
|
|
+ $marginborderpx = "0px";
|
|
|
|
|
|
}else{
|
|
|
|
|
|
@@ -52,6 +61,13 @@ foreach ($config as $keyname => $section) {
|
|
|
if($icons == "active"){ $listicons = "<span><i class=\"fa ". $section["icon"] ."\"></i></span>"; }
|
|
|
$loadedlist .= "<li id=\"". $section["url"] ."x\"><a>" . $keyname . " " . $listicons ."</a></li>\n";
|
|
|
$loadedurls .= "<div class=\"z-nopadding\" data-content-url=\"". $section["url"] ."\" data-content-type=\"iframe\"></div>\n";
|
|
|
+ if(($keyname !== "general" && !empty($section["enabled"]) && $section["enabled"]=="true" && !empty($section["guest"]) && $section["guest"]=="true")){
|
|
|
+ $ii++;
|
|
|
+ if(!empty($section["default"]) && $section["default"]=="true"){
|
|
|
+ $defaulttabguest = "tab$ii";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
//Full Access
|
|
|
@@ -63,23 +79,27 @@ foreach ($config as $keyname => $section) {
|
|
|
}
|
|
|
//General
|
|
|
if (empty($title)) $title = 'Manage My HTPC';
|
|
|
- if(($keyname == "general")) { $title = $section["title"]; $tabcoloractive = $section["tabcoloractive"]; $fontcoloractive = $section["fontcoloractive"]; $tabcolor = $section["tabcolor"]; $fontcolor = $section["fontcolor"]; $tabshadowactive = $section["tabshadowactive"]; $tabshadow = $section["tabshadow"]; $cookiepass = $section["password"];}
|
|
|
+ if(($keyname == "general")) { $title = $section["title"]; $tabcoloractive = $section["tabcoloractive"]; $fontcoloractive = $section["fontcoloractive"]; $tabcolor = $section["tabcolor"]; $fontcolor = $section["fontcolor"]; $tabshadowactive = $section["tabshadowactive"]; $tabshadow = $section["tabshadow"]; $cookiepass = $section["password"]; $bg = $section["bg"]; $tabborder = $section["tabborder"];}
|
|
|
|
|
|
}
|
|
|
-if($_COOKIE["logged"] !== $cookiepass){
|
|
|
- $lasttablist .= "<li><a>Login" . $guesticons . "</a></li>\n";
|
|
|
- $lasttaburl .= "<div class=\"z-nopadding\" data-content-url=\"setup.php\" data-content-type=\"iframe\"></div>\n";
|
|
|
-}
|
|
|
+ if($_COOKIE["logged"] !== $cookiepass){
|
|
|
+ $lasttablist .= "<li><a>Login" . $guesticons . "</a></li>\n";
|
|
|
+ $lasttaburl .= "<div class=\"z-nopadding\" data-content-url=\"setup.php\" data-content-type=\"iframe\"></div>\n";
|
|
|
+ $defaulttab = $defaulttabguest;
|
|
|
+ }
|
|
|
|
|
|
-if($_COOKIE["logged"] == $cookiepass){
|
|
|
- $lasttablist .= "<li><a>Settings" . $adminicons . "</a></li>\n";
|
|
|
- $lasttaburl .= "<div class=\"z-nopadding\" data-content-url=\"setup.php\" data-content-type=\"iframe\"></div>\n";
|
|
|
-}
|
|
|
+ if($_COOKIE["logged"] == $cookiepass){
|
|
|
+ $lasttablist .= "<li><a>Settings" . $adminicons . "</a></li>\n";
|
|
|
+ $lasttaburl .= "<div class=\"z-nopadding\" data-content-url=\"setup.php\" data-content-type=\"iframe\"></div>\n";
|
|
|
+ $defaulttab = $defaulttabuser;
|
|
|
+ }
|
|
|
|
|
|
-if(!file_exists('settings.ini.php')){
|
|
|
- $lasttablist = "<li><a>Setup<span><i class=\"fa fa-spinner\"></i></span></a></li>\n";
|
|
|
- $lasttaburl = "<div class=\"z-nopadding\" data-content-url=\"setup.php\" data-content-type=\"iframe\"></div>\n";
|
|
|
-}
|
|
|
+ if(!file_exists('settings.ini.php')){
|
|
|
+ $lasttablist = "<li><a>Setup<span><i class=\"fa fa-spinner\"></i></span></a></li>\n";
|
|
|
+ $lasttaburl = "<div class=\"z-nopadding\" data-content-url=\"setup.php\" data-content-type=\"iframe\"></div>\n";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(empty($defaulttab)){ $defaulttab = "tab1";}
|
|
|
|
|
|
?>
|
|
|
<!doctype html>
|
|
|
@@ -89,7 +109,11 @@ if(!file_exists('settings.ini.php')){
|
|
|
|
|
|
<title><?=$title;?></title>
|
|
|
<meta charset="utf-8">
|
|
|
- <meta name="viewport" content="width = device-width, initial-scale = 1.0" />
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
|
|
|
+ <meta name="apple-mobile-web-app-capable" content="yes" />
|
|
|
+ <meta name="mobile-web-app-capable" content="yes" />
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
|
+ <meta name="msapplication-tap-highlight" content="no" />
|
|
|
<link href="css/min.css" rel="stylesheet" />
|
|
|
<link href="css/tabs.min.css" rel="stylesheet" />
|
|
|
<script src="js/jquery.min.js"></script>
|
|
|
@@ -103,14 +127,8 @@ if(!file_exists('settings.ini.php')){
|
|
|
color: <?=$fontcolor;?>; background-color: <?=$tabcolor;?>; text-shadow: 0 1px <?=$tabshadow;?>;
|
|
|
}
|
|
|
</style>
|
|
|
- <style>.z-tabs.mobile {
|
|
|
- position: absolute;
|
|
|
- top: 0;
|
|
|
- bottom: 0;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- overflow: overlay;
|
|
|
-}</style>
|
|
|
+ <style>.z-tabs.mobile {position: absolute;top: 0;bottom: 0;left: 0;right: 0;overflow: overlay;}</style>
|
|
|
+ <style>.z-tabs.white > ul, .z-tabs.white > ul > li > a, .z-tabs.white > .z-container {border-color: <?=$tabborder;?>;}</style>
|
|
|
|
|
|
<script>
|
|
|
|
|
|
@@ -126,15 +144,16 @@ if(!file_exists('settings.ini.php')){
|
|
|
|
|
|
</head>
|
|
|
|
|
|
- <body style="position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: white;
|
|
|
+ <body style="position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: <?=$bg;?>;
|
|
|
-webkit-background-size: cover;
|
|
|
-moz-background-size: cover;
|
|
|
-o-background-size: cover;
|
|
|
- background-size: cover;">
|
|
|
+ background-size: cover;
|
|
|
+ overflow: hidden;">
|
|
|
|
|
|
- <span> </span>
|
|
|
+ <!--<span> </span>-->
|
|
|
|
|
|
- <div id="page" style="margin: <?=$marginpx;?>; position: absolute;">
|
|
|
+ <div id="page" style="margin: <?=$marginpx;?>; position: absolute; overflow: hidden;">
|
|
|
|
|
|
<!--Tabs Start-->
|
|
|
<div id="tabbed-nav">
|
|
|
@@ -147,13 +166,13 @@ if(!file_exists('settings.ini.php')){
|
|
|
</ul>
|
|
|
|
|
|
<!-- Content container -->
|
|
|
- <style> .z-container { position: fixed; top: 50px; right: 0px; bottom: 0px; left: 0px; margin: <?=$marginpx;?>; } </style>
|
|
|
+ <style> .z-container { position: absolute; top: 50px; right: 0px; bottom: 0px; left: 0px; margin: <?=$marginpx;?>; } </style>
|
|
|
<style> .z-tabs .z-container{ margin: <?=$marginpx;?>; border-width: <?=$marginborderpx;?>; } </style>
|
|
|
<style> .z-tabs.mobile.top > .z-container {margin-top: <?=$pxmobile;?>;} </style>
|
|
|
<style> .z-video{position: absolute; height: 100%; width: 100%;-webkit-overflow-scrolling: touch; overflow: auto;}</style>
|
|
|
- <!--<style> .z-content-inner{overflow: overlay;}</style>
|
|
|
- <style> .z-nopadding.z-content{overflow-x: hidden;overflow-y: auto;}</style>-->
|
|
|
- <div style="top: <?=$px;?>;overflow: auto;">
|
|
|
+ <style> .z-content-inner{overflow: hidden;}</style>
|
|
|
+ <style> .z-nopadding.z-content{overflow: hidden}</style>
|
|
|
+ <div style="top: <?=$px;?>; overflow: hidden;">
|
|
|
|
|
|
<?=$loadedurls;?>
|
|
|
<?=$lasttaburl;?>
|
|
|
@@ -169,7 +188,7 @@ if(!file_exists('settings.ini.php')){
|
|
|
jQuery(document).ready(function ($) {
|
|
|
/* jQuery activation and setting options for the tabs*/
|
|
|
$("#tabbed-nav").zozoTabs({
|
|
|
- defaultTab: "tab1",
|
|
|
+ defaultTab: "<?=$defaulttab;?>",
|
|
|
multiline: true,
|
|
|
theme: "white",
|
|
|
position: "top-compact",
|
|
|
@@ -177,14 +196,14 @@ if(!file_exists('settings.ini.php')){
|
|
|
animation: {
|
|
|
easing: "easeInOutExpo",
|
|
|
duration: 450,
|
|
|
- effects: "slideRight"
|
|
|
+ effects: "fade"
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
</script>
|
|
|
- <script>
|
|
|
+ <!--<script>
|
|
|
jQuery('iframe','#container').attr('src',url);
|
|
|
- </script>
|
|
|
+ </script>-->
|
|
|
|
|
|
</body>
|
|
|
|