function_bar.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <?php
  2. include_once 'auth.php';
  3. ?>
  4. <html>
  5. <?php
  6. include_once("header_std.php");
  7. include_once("SystemAOB/functions/personalization/configIO.php");
  8. $theme = (getConfig("function_bar"));
  9. ?>
  10. <link rel="stylesheet" type="text/css" href="script/jsCalendar/jsCalendar.css">
  11. <link rel="stylesheet" type="text/css" href="script/jsCalendar/jsCalendar.clean.min.css">
  12. <script type="text/javascript" src="script/jsCalendar/jsCalendar.js"></script>
  13. <body>
  14. <style>
  15. .hover_cc div:hover {
  16. background: #444;
  17. }
  18. body{
  19. overflow-y:hidden;
  20. }
  21. #menuBar{
  22. overflow: hidden;
  23. background-color: <?php echo $theme["Function Bar"]["background-color"];?>;
  24. position: fixed;
  25. bottom: 0;
  26. width: 100%;
  27. z-index:110;
  28. background:<?php echo $theme["Function Bar"]["background"];?>;
  29. }
  30. .notificationbar{
  31. position:fixed;
  32. top:0px;
  33. z-index:119;
  34. height: auto;
  35. width:350px;
  36. bottom: 34px;
  37. background:<?php echo $theme["Notification Bar"]["background"];?>;
  38. right:0px;
  39. border-left: 1px solid #4c4c4c;
  40. padding: 20px;
  41. padding-left: 25px;
  42. color: <?php echo $theme["Notification Bar"]["color"];?>;
  43. }
  44. .messagebox{
  45. border-bottom: 1px solid #727272;
  46. padding-top:5px;
  47. padding-bottom:5px;
  48. }
  49. .pressable{
  50. cursor: pointer;
  51. margin: 5px;
  52. }
  53. .pressable:hover{
  54. background-color:#494949;
  55. }
  56. .hidden{
  57. }
  58. #stickingIndictor{
  59. position: fixed;
  60. top:4px;
  61. bottom:4px;
  62. background:rgba(255,255,255,0.1);
  63. width: 50%;
  64. box-shadow: 1px 1px rgba(45,45,45,0.2);
  65. }
  66. .resizeWindow{
  67. position:absolute;
  68. right:0;
  69. bottom:0;
  70. width:20px;
  71. height:15px;
  72. color:<?php echo $theme["Resize Indicator"]["color"];?>;
  73. cursor: nw-resize;
  74. background-image:<?php echo $theme["Resize Indicator"]["background-image"];?>;
  75. }
  76. .selectable{
  77. cursor:pointer;
  78. }
  79. .selectable:hover{
  80. background-color:#424242;
  81. }
  82. </style>
  83. <?php
  84. //Simple script for searching all usable FloatWindow modules with "embedded.php" in module directory
  85. $folders = glob("*");
  86. $supportedModules = [];
  87. foreach ($folders as $module){
  88. if (is_dir($module)){
  89. if (file_exists($module . "/FloatWindow.php")){
  90. array_push($supportedModules,$module);
  91. }
  92. }
  93. }
  94. ?>
  95. <!-- Main Interface for normal module access-->
  96. <iframe id="interface" src="index.php" style="width:100%;height:100%;top:0;bottom:0;" onLoad="updateURL();" allowfullscreen></iframe>
  97. <!-- Transparent iframe covering layer-->
  98. <div id="backdrop" style="position:fixed;width:100%; height:100%; top:0;bottom:0;z-index:99;background-color:rgba(255,255,255,0);display:none;"></div>
  99. <!-- Menu Bar, Desktop Only -->
  100. <div id="menuBar">
  101. <div class="ts fluid container" style="color:white;height:40px;">
  102. <div class="ts grid" style="line-height: 35px;" align="center">
  103. <!-- First Left hand side system icons-->
  104. <div class="eight wide column" style="left:2%;">
  105. <div id="activatedModuleIcons" class="ts grid" style="line-height: 35px;" align="center">
  106. <div class="one wide column" style="cursor: pointer;" onClick="ToogleMenuBar();"><i class="dropdown large icon" style="line-height: 35px;"></i></div>
  107. <div class="one wide column" style="background-color:#111111;cursor: pointer;height:60px;" onClick="TooglePowerManuel(this);"><i class="cloud large icon" style="line-height: 35px;padding-top:3px;"></i></div>
  108. <div id="folderBtn" class="one wide column" style="cursor: pointer;background-color: #333;height:60px;" onClick="ToogleFileExplorer();">
  109. <i class="folder outline icon" style="line-height: 35px;"></i>
  110. </div>
  111. <!-- New windows will be added here-->
  112. <div id="moreBtn" class="one wide column" style="cursor: pointer;background-color: #333;height:60px;" onClick="AddWindows();" ><i class="plus icon" style="line-height: 35px;"></i></div>
  113. </div>
  114. </div>
  115. <!-- Second Right hand side tray icons -->
  116. <div class="eight wide column" align="right" style="right:2%;">
  117. <div class="ts grid" style="line-height: 35px;" align="center">
  118. <div class="nine wide column"></div>
  119. <div class="two wide column" id="USBopr" onclick="CheckUSBNoDifferent();" style="cursor: pointer;">Detecting</div>
  120. <div class="two wide column" id="gVol" onClick="ToggleGlobalVol();" style="cursor: pointer;"><i class="volume down icon"></i>N/A</div>
  121. <div class="two wide column" id="clock" onmouseover="ShowCalender();" onmouseleave="HideCalender();">Loading</div>
  122. <div class="one wide column" style="padding-top:18px;" onClick="toggleNoticeBoard();"><i class="mail icon"></i></div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. <div id="showMenuButton" style="overflow: hidden;position: fixed;left: 0;width: 50px;bottom:0px;height:35px;display:none;background-color:rgba(0,3,51,0.4);color:white;cursor: pointer;z-index:999;" align="center" onClick="ToogleMenuBar();">
  129. <i class="triangle up large icon" style="line-height: 35px;"></i>
  130. </div>
  131. <!-- Power menu bar-->
  132. <div id="powerMenu" style="overflow: hidden;position: fixed;left: 0;width: 400px;bottom:34px;height:550px;display:;z-index:150;">
  133. <iframe style="height:550px; width: 100%; z-index:152;" src="SystemAOB/functions/list_menu/index.php" frameborder="0"></iframe>
  134. </div>
  135. <!-- floatWindow List Window -->
  136. <div id="fwListWindow" style="overflow: hidden;position: fixed;left: 100;min-width: 250px;bottom:34px;min-height:40px;display:none;background-color:#282828;z-index:150;">
  137. <div class="selectable" style="border:1px solid transparent;padding:10px;"><p class="ts inverted header" style="font-size:0.9em;">
  138. <i class="spinner loading icon"></i>Loading...
  139. </p></div>
  140. </div>
  141. <!-- File menu bar-->
  142. <!--
  143. <div id="fileMenu" style="border: 2px #333 transparent;box-shadow:1px 1px 4px #3d3d3d;overflow: hidden;position: fixed;left: 0;width: 1080px;bottom:33px;height:580px;display:none;z-index:1;">
  144. <div id="topbar" class="floatWindow" style="width:100%; position: relative; background-color:rgba(33, 33, 33, 0.8);color:white;left:0;top:0;height:20px;z-index:8;cursor: context-menu;">  <i class="folder icon"></i>File Explorer
  145. <div style="top:2px;right:3px;cursor: pointer;position:absolute;" onmousedown="closeAndReloadIframe();" ontouchstart="closeAndReloadIframe();"><i class="remove icon"></i></div>
  146. <div style="top:5px;right:25px;cursor: pointer;position:absolute;" class="maximizeWindow"><i class="small window maximize icon"></i></div>
  147. <div style="top:5px;right:47px;cursor: pointer;position:absolute;" onmousedown="ToogleFileExplorer();" ontouchstart="ToogleFileExplorer();"><i class="minus icon"></i></div></div>
  148. <iframe id="filebrowser" style="width:100%;height:97%; bottom:0;position:absolute;top:20px;background-color:white;" src="SystemAOB/functions/file_system/embedded.php?controlLv=2" frameborder="1"></iframe>
  149. <div class="resizeWindow" style="position:absolute;right:0;bottom:0;background-color:#333;width:20px;height:15px;color:white;cursor: nw-resize;" align="center"></div>
  150. </div>
  151. -->
  152. <!-- My Host Window-->
  153. <!--
  154. <div id="HostServer" style="border: 2px #333 solid;overflow: hidden;position: fixed;left: 0;width: 720px;bottom:44px;height:522px;display:none;z-index:1;">
  155. <div class="floatWindow" style="width:100%; position: relative; background-color:#333;color:white;left:0;top:0;height:20px;z-index:8;cursor: context-menu;">  <i class="disk outline icon"></i>Host Server <div style="float:right;right:5px;cursor: pointer;" onmousedown="CloseHS();" ontouchstart="CloseHS();"><i class="remove icon"></i></div><div style="float:right;right:10px;cursor: pointer;" onmousedown="ToogleHS();" ontouchstart="ToogleHS();"><i class="minus icon"></i></div></div>
  156. <iframe id="hostView" style="width:100%;height:97%; bottom:0;position:absolute;top:20px;background-color:white;" src="SystemAOB/functions/system_statistic/index.php" frameborder="1"></iframe>
  157. <div class="resizeWindow" style="position:absolute;right:0;bottom:0;background-color:#333;width:20px;height:15px;color:white;cursor: nw-resize;" align="center"></div>
  158. </div>
  159. -->
  160. <!-- Add Window Button-->
  161. <div id="addWindow" style="border: 0px #222 solid;overflow: hidden;position: fixed;background-color:#222;background:rgba(0,0,0,1);height:240px;width:180px;left:0px;bottom:33px;display:none;z-index:118;">
  162. <div class="item" style="width:180px;left:0;position:relative;background-color:#333;">
  163. <div class="content">
  164. <div class="header" style="color:white;"><i class="window maximize icon"></i>New Float Window</div>
  165. </div>
  166. </div>
  167. <?php
  168. $template = '<div class="item hover_cc" style="width:180px;left:0;position:relative;" onClick="LaunchFloatWindowFromModule(%MODULENAME%);">
  169. <div class="content" style="cursor: pointer;">
  170. <div class="header" style="color:white;"><i class="plus icon"></i>%MODULEPATH%</div>
  171. </div>
  172. </div>';
  173. //newEmbededWindow('SystemAOB/functions/file_system/embedded.php?moduleName=../../../../media&dir=../../../../media&controlLv=2','USB Drives','usb','usbDriveDisplay');
  174. //Append USB Driver windows to the menu
  175. if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
  176. $box = str_replace("LaunchFloatWindowFromModule(%MODULENAME%);","newEmbededWindow('SystemAOB/functions/file_system/embedded.php?moduleName=../../../../media&dir=../../../../media&controlLv=2','USB Drives','usb','usbDriveDisplay');AddWindows();",$template);
  177. $box = str_replace("%MODULEPATH%","USB Drives",$box);
  178. $box = str_replace('<i class="plus icon">','<i class="usb icon">',$box);
  179. echo $box;
  180. }
  181. foreach ($supportedModules as $module){
  182. $box = str_replace("%MODULEPATH%",$module,$template);
  183. $box = str_replace("%MODULENAME%","'" . $module . "'",$box);
  184. echo $box;
  185. }
  186. ?>
  187. </div>
  188. <!-- Global Vol Adjusting window-->
  189. <div id="globVolInterface" style="border: 0px #222 solid;overflow: hidden;position: fixed;background-color:#222;background:rgba(48,48,48,0.7);height:30px;width:240px;right:0px;bottom:34px;display:none;z-index:118;">
  190. <div class="ts narrow container" style="color:white;position:aboslute;top:10px;">
  191. <i class="volume down icon" style="float: left;" onClick="mutevol();"></i><i class="volume up icon" style="float: right;"></i>
  192. <div id="globVolBar" class="ts small progress" style="background:rgba(255,255,255,0.2);">
  193. <div id="volDisplay" class="bar" style="width:50%;background:white;"></div>
  194. </div>
  195. </div>
  196. </div>
  197. <!-- Movement Cover for iframe drag drop-->
  198. <div id="iframeCover" style="position:absolute;background-color:rgba(255,255,255,0.1);z-index:115;display:none;top:20px;">
  199. </div>
  200. <!-- USB Reminder Interface -->
  201. <div id="USBList" style="border: 2px #333 solid;overflow: hidden;position: fixed;right: 0;width: 450px;bottom:32px;height:500px;display:none;z-index:118;background-color:white;">
  202. <div style="width:100%; position: relative; background-color:#333;color:white;left:0;top:0;height:20px;z-index:8;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;cursor: context-menu;"><i class="usb icon"></i>USB Device List</div>
  203. <iframe id="USBListDisplay" style="width:100%;height:100%;position:absolute;top:20px;" src="SystemAOB/functions/usbMount.php"></iframe>
  204. </div>
  205. </div>
  206. <!-- USB Monitoring Warning -->
  207. <div id="umw" class="ts active bottom right snackbar" style="bottom:28px;display:none;" >
  208. <div class="content">
  209. <i class="usb icon"></i>fstab listener
  210. <div id="umw_head" style="font-size: 1em;">USB Device Monitoring Service</div>
  211. <div id="umw_text" style="font-size: 0.8em;">USB Storage Device Detected</div>
  212. <div id="umw_list" style="font-size: 0.8em;">Auto-mounting in progress...</div>
  213. </div>
  214. </div>
  215. <!-- Display the calender grid -->
  216. <div id="calGrid" style="display:none;position:fixed;right:0;bottom:28px;height:330px;width:300px;z-index:115;">
  217. <div class="auto-jsCalendar white-theme" data-navigator="false"></div>
  218. </div>
  219. <!-- New Window Cloning Code -->
  220. <div id="newWindow" style="border: 0px;overflow: hidden;position: fixed;left: 0;width: 720px;bottom:45px;height:480px;display:none;z-index:1;background-color:white;">
  221. <div class="floatWindow" style="width:100%; position: relative; background-color:#333;color:white;left:0;top:0;height:20px;z-index:8;overflow:hidden;text-overflow: ellipsis;white-space: nowrap;cursor: context-menu;">
  222.   <i class="folder icon"></i>%WINDOW_TITLE%
  223. <div style="top:2px;right:3px;cursor: pointer;position:absolute;" class="closeWindow"><i class="remove icon"></i></div>
  224. <div style="top:5px;right:25px;cursor: pointer;position:absolute;" class="maximizeWindow"><i class="small window maximize icon"></i></div>
  225. <div style="top:5px;right:47px;cursor: pointer;position:absolute;" class="minimizeWindow"><i class="minus icon"></i></div>
  226. </div>
  227. <iframe style="width:100%;height: -webkit-calc(100% - 20px);height: -moz-calc(100% - 20px);height:calc(100% - 20px); bottom:0;position:absolute;top:20px;" src="%srcPath%" frameborder="1"></iframe>
  228. <div class="resizeWindow" align="center"></div>
  229. </div>
  230. <!-- Side bar / Notification bar-->
  231. <div id="notificationbar" class="notificationbar hidden">
  232. <div>
  233. <div class="ts header" style="color:white;font-size:160%;">
  234. Notification Board
  235. </div>
  236. <a style="float: right;cursor: pointer;display:inline;position:absolute;top:0;right:0;" onClick="clearAllNotification();">
  237. Clear All
  238. </a>
  239. </div>
  240. <div class="ts divider"></div>
  241. <div id="messageBoard">
  242. </div>
  243. </div>
  244. <!-- Screen Sticking Indicator-->
  245. <div id="stickingIndictor" attach="" style="display:none;"></div>
  246. <input id="hiddenInput" style="display:none;"></input>
  247. <!-- PHP -> JS Passthrough -->
  248. <div style="display:none;">
  249. <div id="DATA_PIPELINE_supportedModules"><?php echo json_encode($supportedModules); ?></div>
  250. <div id="DATA_PIPELINE_windowID"><?php $date = date_create(); echo date_timestamp_get($date);?></div>
  251. </div>
  252. <script src="function_bar.js"></script>
  253. </body>
  254. </html>