-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move application logic to separate file, and add "refresh"-button in …
…the menu. - Moved all logic to "mtphp.php" (away from index.php) - Added a button in the top right to refresh (only) the app you're currently using. - Fixed overflow issue on Internet Explorer (scrollbars would appear in the top menu).
- Loading branch information
Showing
4 changed files
with
111 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?php | ||
/* | ||
* DO NOT CHANGE THIS FILE! | ||
* The settings are all in config.ini.php | ||
*/ | ||
|
||
$config = parse_ini_file('config.ini.php', true); | ||
|
||
function menuItems($config) { | ||
if (empty($item)) $item = ''; | ||
foreach ($config as $keyname => $section) { | ||
if(!empty($section["enabled"]) && !($section["enabled"]=="false") && ($section["enabled"]=="true")) { | ||
if(!empty($section["default"]) && !($section["default"]=="false") && ($section["default"]=="true")) { | ||
$item .= "<li><a data-content=\"" . $keyname . "\" class=\"selected\"><span class=\"". $section["icon"] ." fa-lg\"></span> ". $section["name"] ."</a></li>\n"; | ||
} else { | ||
$item .= "<li><a data-content=\"" . $keyname . "\"><span class=\"". $section["icon"] ." fa-lg\"></span> ". $section["name"] ."</a></li>\n"; | ||
} | ||
} | ||
} | ||
return $item; | ||
} | ||
|
||
|
||
function frameContent($config) { | ||
if (empty($item)) $item = ''; | ||
foreach ($config as $keyname => $section) { | ||
if(!empty($section["landingpage"]) && !($section["landingpage"]=="false") && ($section["landingpage"]=="true")) { | ||
$section["url"] = "?landing=" . $keyname; | ||
} | ||
|
||
if(!empty($section["enabled"]) && !($section["enabled"]=="false") && ($section["enabled"]=="true")) { | ||
if(!empty($section["default"]) && !($section["default"]=="false") && ($section["default"]=="true")) { | ||
$item .= "<li data-content=\"". $keyname . "\" class=\"selected\"><iframe scrolling=\"auto\" src=\"". $section["url"] . "\"></iframe></li>\n"; | ||
} else { | ||
$item .= "<li data-content=\"". $keyname . "\"><iframe scrolling=\"auto\" src=\"". $section["url"] . "\"></iframe></li>\n"; | ||
} | ||
} | ||
} | ||
return $item; | ||
} | ||
|
||
|
||
function landingPage($config, $keyname) { | ||
$item = " | ||
<html lang=\"en\"> | ||
<head> | ||
<title>". $config[$keyname]["name"] ."</title> | ||
<link rel=\"stylesheet\" href=\"css/landing.css\"> | ||
</head> | ||
<body> | ||
<div class=\"login\"> | ||
<div class=\"heading\"> | ||
<h2><span class=\"". $config[$keyname]["icon"] ." fa-3x\"></span></h2> | ||
<section> | ||
<a href=\"". $config[$keyname]["url"] ."\" target=\"_self\" title=\"Launch ". $config[$keyname]["name"] ."!\"><button class=\"float\">Launch ". $config[$keyname]["name"] ."</button></a> | ||
</section> | ||
</div> | ||
</div> | ||
</body></html>"; | ||
if (empty($item)) $item = ''; | ||
return $item; | ||
} | ||
|
||
if(isset($_GET['landing'])) { | ||
$keyname = $_GET['landing']; | ||
echo landingPage($config, $keyname); | ||
die(); | ||
} | ||
?> |