function_bar.php 14 KB

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