homepage-functions.php 90 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188
  1. <?php
  2. //homepage order
  3. function homepageOrder()
  4. {
  5. $homepageOrder = array(
  6. "homepageOrdercustomhtml" => $GLOBALS['homepageOrdercustomhtml'],
  7. "homepageOrdercustomhtmlTwo" => $GLOBALS['homepageOrdercustomhtmlTwo'],
  8. "homepageOrdernzbget" => $GLOBALS['homepageOrdernzbget'],
  9. "homepageOrderjdownloader" => $GLOBALS['homepageOrderjdownloader'],
  10. "homepageOrdersabnzbd" => $GLOBALS['homepageOrdersabnzbd'],
  11. "homepageOrderplexnowplaying" => $GLOBALS['homepageOrderplexnowplaying'],
  12. "homepageOrderplexrecent" => $GLOBALS['homepageOrderplexrecent'],
  13. "homepageOrderplexplaylist" => $GLOBALS['homepageOrderplexplaylist'],
  14. "homepageOrderembynowplaying" => $GLOBALS['homepageOrderembynowplaying'],
  15. "homepageOrderembyrecent" => $GLOBALS['homepageOrderembyrecent'],
  16. "homepageOrderombi" => $GLOBALS['homepageOrderombi'],
  17. "homepageOrdercalendar" => $GLOBALS['homepageOrdercalendar'],
  18. "homepageOrdertransmission" => $GLOBALS['homepageOrdertransmission'],
  19. "homepageOrderqBittorrent" => $GLOBALS['homepageOrderqBittorrent'],
  20. "homepageOrderdeluge" => $GLOBALS['homepageOrderdeluge'],
  21. "homepageOrderrTorrent" => $GLOBALS['homepageOrderrTorrent'],
  22. "homepageOrderdownloader" => $GLOBALS['homepageOrderdownloader'],
  23. "homepageOrderhealthchecks" => $GLOBALS['homepageOrderhealthchecks'],
  24. "homepageOrderunifi" => $GLOBALS['homepageOrderunifi'],
  25. "homepageOrdertautulli" => $GLOBALS['homepageOrdertautulli'],
  26. "homepageOrderPihole" => $GLOBALS['homepageOrderPihole'],
  27. "homepageOrderMonitorr" => $GLOBALS['homepageOrderMonitorr'],
  28. "homepageOrderWeatherAndAir" => $GLOBALS['homepageOrderWeatherAndAir'],
  29. "homepageOrderSpeedtest" => $GLOBALS['homepageOrderSpeedtest'],
  30. "homepageOrderNetdata" => $GLOBALS['homepageOrderNetdata'],
  31. );
  32. asort($homepageOrder);
  33. return $homepageOrder;
  34. }
  35. function buildHomepage()
  36. {
  37. $homepageOrder = homepageOrder();
  38. $homepageBuilt = '';
  39. foreach ($homepageOrder as $key => $value) {
  40. $homepageBuilt .= buildHomepageItem($key);
  41. }
  42. return $homepageBuilt;
  43. }
  44. function buildHomepageItem($homepageItem)
  45. {
  46. $item = '<div id="' . $homepageItem . '">';
  47. switch ($homepageItem) {
  48. case 'homepageOrdercustomhtml':
  49. if ($GLOBALS['homepagCustomHTMLoneEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLoneAuth'])) {
  50. $item .= ($GLOBALS['customHTMLone'] !== '') ? $GLOBALS['customHTMLone'] : '';
  51. }
  52. break;
  53. case 'homepageOrdercustomhtmlTwo':
  54. if ($GLOBALS['homepagCustomHTMLtwoEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLtwoAuth'])) {
  55. $item .= ($GLOBALS['customHTMLtwo'] !== '') ? $GLOBALS['customHTMLtwo'] : '';
  56. }
  57. break;
  58. case 'homepageOrdernotice':
  59. break;
  60. case 'homepageOrdernoticeguest':
  61. break;
  62. case 'homepageOrderqBittorrent':
  63. if ($GLOBALS['homepageqBittorrentEnabled'] && qualifyRequest($GLOBALS['homepageqBittorrentAuth'])) {
  64. if ($GLOBALS['qBittorrentCombine']) {
  65. $item .= '
  66. <script>
  67. // homepageOrderqBittorrent
  68. buildDownloaderCombined(\'qBittorrent\');
  69. homepageDownloader("qBittorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  70. // End homepageOrderqBittorrent
  71. </script>
  72. ';
  73. } else {
  74. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  75. $item .= '
  76. <script>
  77. // homepageOrderqBittorrent
  78. $("#' . $homepageItem . '").html(buildDownloader("qBittorrent"));
  79. homepageDownloader("qBittorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  80. // End homepageOrderqBittorrent
  81. </script>
  82. ';
  83. }
  84. }
  85. break;
  86. case 'homepageOrderrTorrent':
  87. if ($GLOBALS['homepagerTorrentEnabled'] && qualifyRequest($GLOBALS['homepagerTorrentAuth'])) {
  88. if ($GLOBALS['rTorrentCombine']) {
  89. $item .= '
  90. <script>
  91. // homepageOrderrTorrent
  92. buildDownloaderCombined(\'rTorrent\');
  93. homepageDownloader("rTorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  94. // End homepageOrderrTorrent
  95. </script>
  96. ';
  97. } else {
  98. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  99. $item .= '
  100. <script>
  101. // homepageOrderrTorrent
  102. $("#' . $homepageItem . '").html(buildDownloader("rTorrent"));
  103. homepageDownloader("rTorrent", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  104. // End homepageOrderrTorrent
  105. </script>
  106. ';
  107. }
  108. }
  109. break;
  110. case 'homepageOrderdeluge':
  111. if ($GLOBALS['homepageDelugeEnabled'] && qualifyRequest($GLOBALS['homepageDelugeAuth'])) {
  112. if ($GLOBALS['delugeCombine']) {
  113. $item .= '
  114. <script>
  115. // Deluge
  116. buildDownloaderCombined(\'deluge\');
  117. homepageDownloader("deluge", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  118. // End Deluge
  119. </script>
  120. ';
  121. } else {
  122. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  123. $item .= '
  124. <script>
  125. // Deluge
  126. $("#' . $homepageItem . '").html(buildDownloader("deluge"));
  127. homepageDownloader("deluge", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  128. // End Deluge
  129. </script>
  130. ';
  131. }
  132. }
  133. break;
  134. case 'homepageOrdertransmission':
  135. if ($GLOBALS['homepageTransmissionEnabled'] && qualifyRequest($GLOBALS['homepageTransmissionAuth'])) {
  136. if ($GLOBALS['transmissionCombine']) {
  137. $item .= '
  138. <script>
  139. // Transmission
  140. buildDownloaderCombined(\'transmission\');
  141. homepageDownloader("transmission", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  142. // End Transmission
  143. </script>
  144. ';
  145. } else {
  146. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  147. $item .= '
  148. <script>
  149. // Transmission
  150. $("#' . $homepageItem . '").html(buildDownloader("transmission"));
  151. homepageDownloader("transmission", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  152. // End Transmission
  153. </script>
  154. ';
  155. }
  156. }
  157. break;
  158. case 'homepageOrdernzbget':
  159. if ($GLOBALS['homepageNzbgetEnabled'] && qualifyRequest($GLOBALS['homepageNzbgetAuth'])) {
  160. if ($GLOBALS['nzbgetCombine']) {
  161. $item .= '
  162. <script>
  163. // NZBGet
  164. buildDownloaderCombined(\'nzbget\');
  165. homepageDownloader("nzbget", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  166. // End NZBGet
  167. </script>
  168. ';
  169. } else {
  170. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  171. $item .= '
  172. <script>
  173. // NZBGet
  174. $("#' . $homepageItem . '").html(buildDownloader("nzbget"));
  175. homepageDownloader("nzbget", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  176. // End NZBGet
  177. </script>
  178. ';
  179. }
  180. }
  181. break;
  182. case 'homepageOrderjdownloader':
  183. if ($GLOBALS['homepageJdownloaderEnabled'] && qualifyRequest($GLOBALS['homepageJdownloaderAuth'])) {
  184. if ($GLOBALS['jdownloaderCombine']) {
  185. $item .= '
  186. <script>
  187. // JDownloader
  188. buildDownloaderCombined(\'jdownloader\');
  189. homepageDownloader("jdownloader", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  190. // End JDownloader
  191. </script>
  192. ';
  193. } else {
  194. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  195. $item .= '
  196. <script>
  197. // JDownloader
  198. $("#' . $homepageItem . '").html(buildDownloader("jdownloader"));
  199. homepageDownloader("jdownloader", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  200. // End JDownloader
  201. </script>
  202. ';
  203. }
  204. }
  205. break;
  206. case 'homepageOrdersabnzbd':
  207. if ($GLOBALS['homepageSabnzbdEnabled'] && qualifyRequest($GLOBALS['homepageSabnzbdAuth'])) {
  208. if ($GLOBALS['sabnzbdCombine']) {
  209. $item .= '
  210. <script>
  211. // SabNZBd
  212. buildDownloaderCombined(\'sabnzbd\');
  213. homepageDownloader("sabnzbd", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  214. // End SabNZBd
  215. </script>
  216. ';
  217. } else {
  218. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  219. $item .= '
  220. <script>
  221. // SabNZBd
  222. $("#' . $homepageItem . '").html(buildDownloader("sabnzbd"));
  223. homepageDownloader("sabnzbd", "' . $GLOBALS['homepageDownloadRefresh'] . '");
  224. // End SabNZBd
  225. </script>
  226. ';
  227. }
  228. }
  229. break;
  230. case 'homepageOrderplexnowplaying':
  231. if ($GLOBALS['homepagePlexStreams']) {
  232. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
  233. $item .= '
  234. <script>
  235. // Plex Stream
  236. homepageStream("plex", "' . $GLOBALS['homepageStreamRefresh'] . '");
  237. // End Plex Stream
  238. </script>
  239. ';
  240. }
  241. break;
  242. case 'homepageOrderplexrecent':
  243. if ($GLOBALS['homepagePlexRecent']) {
  244. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
  245. $item .= '
  246. <script>
  247. // Plex Recent
  248. homepageRecent("plex", "' . $GLOBALS['homepageRecentRefresh'] . '");
  249. // End Plex Recent
  250. </script>
  251. ';
  252. }
  253. break;
  254. case 'homepageOrderplexplaylist':
  255. if ($GLOBALS['homepagePlexPlaylist']) {
  256. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Playlists...</h2></div>';
  257. $item .= '
  258. <script>
  259. // Plex Playlist
  260. homepagePlaylist("plex");
  261. // End Plex Playlist
  262. </script>
  263. ';
  264. }
  265. break;
  266. case 'homepageOrderembynowplaying':
  267. if ($GLOBALS['homepageEmbyStreams'] && $GLOBALS['homepageEmbyEnabled']) {
  268. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
  269. $item .= '
  270. <script>
  271. // Emby Stream
  272. homepageStream("emby", "' . $GLOBALS['homepageStreamRefresh'] . '");
  273. // End Emby Stream
  274. </script>
  275. ';
  276. }
  277. break;
  278. case 'homepageOrderembyrecent':
  279. if ($GLOBALS['homepageEmbyRecent'] && $GLOBALS['homepageEmbyEnabled']) {
  280. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
  281. $item .= '
  282. <script>
  283. // Emby Recent
  284. homepageRecent("emby", "' . $GLOBALS['homepageRecentRefresh'] . '");
  285. // End Emby Recent
  286. </script>
  287. ';
  288. }
  289. break;
  290. case 'homepageOrderombi':
  291. if ($GLOBALS['homepageOmbiEnabled']) {
  292. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Requests...</h2></div>';
  293. $item .= '
  294. <script>
  295. // Ombi Requests
  296. homepageRequests("' . $GLOBALS['ombiRefresh'] . '");
  297. // End Ombi Requests
  298. </script>
  299. ';
  300. }
  301. break;
  302. case 'homepageOrdercalendar':
  303. if ($GLOBALS['homepageSonarrEnabled'] && qualifyRequest($GLOBALS['homepageSonarrAuth']) || ($GLOBALS['homepageRadarrEnabled'] && qualifyRequest($GLOBALS['homepageRadarrAuth'])) || ($GLOBALS['homepageSickrageEnabled'] && qualifyRequest($GLOBALS['homepageSickrageAuth'])) || ($GLOBALS['homepageCouchpotatoEnabled'] && qualifyRequest($GLOBALS['homepageCouchpotatoAuth'])) || ($GLOBALS['homepageCalendarEnabled'] && qualifyRequest($GLOBALS['homepageCalendarAuth']) && $GLOBALS['calendariCal'] !== '')) {
  304. $item .= '
  305. <div id="calendar" class="fc fc-ltr m-b-30"></div>
  306. <script>
  307. // Calendar
  308. homepageCalendar("' . $GLOBALS['calendarRefresh'] . '");
  309. // End Calendar
  310. </script>
  311. ';
  312. }
  313. break;
  314. case 'homepageOrderhealthchecks':
  315. if ($GLOBALS['homepageHealthChecksEnabled'] && qualifyRequest($GLOBALS['homepageHealthChecksAuth'])) {
  316. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Health Checks...</h2></div>';
  317. $item .= '
  318. <script>
  319. // Health Checks
  320. homepageHealthChecks("' . $GLOBALS['healthChecksTags'] . '","' . $GLOBALS['homepageHealthChecksRefresh'] . '");
  321. // End Health Checks
  322. </script>
  323. ';
  324. }
  325. break;
  326. case 'homepageOrderunifi':
  327. if ($GLOBALS['homepageUnifiEnabled'] && qualifyRequest($GLOBALS['homepageUnifiAuth'])) {
  328. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Unifi...</h2></div>';
  329. $item .= '
  330. <script>
  331. // Unifi
  332. homepageUnifi("' . $GLOBALS['homepageHealthChecksRefresh'] . '");
  333. // End Unifi
  334. </script>
  335. ';
  336. }
  337. break;
  338. case 'homepageOrdertautulli':
  339. if ($GLOBALS['homepageTautulliEnabled'] && qualifyRequest($GLOBALS['homepageTautulliAuth'])) {
  340. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Tautulli...</h2></div>';
  341. $item .= '
  342. <script>
  343. // Tautulli
  344. homepageTautulli("' . $GLOBALS['homepageTautulliRefresh'] . '");
  345. // End Tautulli
  346. </script>
  347. ';
  348. }
  349. break;
  350. case 'homepageOrderPihole':
  351. if ($GLOBALS['homepagePiholeEnabled']) {
  352. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Pi-hole Stats...</h2></div>';
  353. $item .= '
  354. <script>
  355. // Pi-hole Stats
  356. homepagePihole("' . $GLOBALS['homepagePiholeRefresh'] . '");
  357. // End Pi-hole Stats
  358. </script>
  359. ';
  360. }
  361. break;
  362. case 'homepageOrderMonitorr':
  363. if ($GLOBALS['homepageMonitorrEnabled']) {
  364. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Monitorr...</h2></div>';
  365. $item .= '
  366. <script>
  367. // Monitorr
  368. homepageMonitorr("' . $GLOBALS['homepageMonitorrRefresh'] . '");
  369. // End Monitorr
  370. </script>
  371. ';
  372. }
  373. break;
  374. case 'homepageOrderWeatherAndAir':
  375. if ($GLOBALS['homepageWeatherAndAirEnabled']) {
  376. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Weather And Air...</h2></div>';
  377. $item .= '
  378. <script>
  379. // Weather And Air
  380. homepageWeatherAndAir("' . $GLOBALS['homepageWeatherAndAirRefresh'] . '");
  381. // End Weather And Air
  382. </script>
  383. ';
  384. }
  385. break;
  386. case 'homepageOrderSpeedtest':
  387. if ($GLOBALS['homepageSpeedtestEnabled']) {
  388. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Speedtest...</h2></div>';
  389. $item .= '
  390. <script>
  391. // Speedtest
  392. homepageSpeedtest("' . $GLOBALS['homepageSpeedtestRefresh'] . '");
  393. // End Speedtest
  394. </script>
  395. ';
  396. }
  397. break;
  398. case 'homepageOrderNetdata':
  399. if ($GLOBALS['homepageNetdataEnabled']) {
  400. $item .= '<div class="white-box"><h2 class="text-center" lang="en">Loading Netdata...</h2></div>';
  401. $item .= '
  402. <script>
  403. // Netdata
  404. homepageNetdata("' . $GLOBALS['homepageNetdataRefresh'] . '");
  405. // End Netdata
  406. </script>
  407. ';
  408. }
  409. break;
  410. default:
  411. # code...
  412. break;
  413. }
  414. return $item . '</div>';
  415. }
  416. function getHomepageList()
  417. {
  418. $groups = groupSelect();
  419. $ombiTvOptions = array(
  420. array(
  421. 'name' => 'All Seasons',
  422. 'value' => 'all'
  423. ),
  424. array(
  425. 'name' => 'First Season Only',
  426. 'value' => 'first'
  427. ),
  428. array(
  429. 'name' => 'Last Season Only',
  430. 'value' => 'last'
  431. ),
  432. );
  433. $mediaServers = array(
  434. array(
  435. 'name' => 'N/A',
  436. 'value' => ''
  437. ),
  438. array(
  439. 'name' => 'Plex',
  440. 'value' => 'plex'
  441. ),
  442. array(
  443. 'name' => 'Emby [Not Available]',
  444. 'value' => 'emby'
  445. )
  446. );
  447. $limit = array(
  448. array(
  449. 'name' => '1 Item',
  450. 'value' => '1'
  451. ),
  452. array(
  453. 'name' => '2 Items',
  454. 'value' => '2'
  455. ),
  456. array(
  457. 'name' => '3 Items',
  458. 'value' => '3'
  459. ),
  460. array(
  461. 'name' => '4 Items',
  462. 'value' => '4'
  463. ),
  464. array(
  465. 'name' => '5 Items',
  466. 'value' => '5'
  467. ),
  468. array(
  469. 'name' => '6 Items',
  470. 'value' => '6'
  471. ),
  472. array(
  473. 'name' => '7 Items',
  474. 'value' => '7'
  475. ),
  476. array(
  477. 'name' => '8 Items',
  478. 'value' => '8'
  479. ),
  480. array(
  481. 'name' => 'Unlimited',
  482. 'value' => '1000'
  483. ),
  484. );
  485. $day = array(
  486. array(
  487. 'name' => 'Sunday',
  488. 'value' => '0'
  489. ),
  490. array(
  491. 'name' => 'Monday',
  492. 'value' => '1'
  493. ),
  494. array(
  495. 'name' => 'Tueday',
  496. 'value' => '2'
  497. ),
  498. array(
  499. 'name' => 'Wednesday',
  500. 'value' => '3'
  501. ),
  502. array(
  503. 'name' => 'Thursday',
  504. 'value' => '4'
  505. ),
  506. array(
  507. 'name' => 'Friday',
  508. 'value' => '5'
  509. ),
  510. array(
  511. 'name' => 'Saturday',
  512. 'value' => '6'
  513. )
  514. );
  515. $calendarDefault = array(
  516. array(
  517. 'name' => 'Month',
  518. 'value' => 'month'
  519. ),
  520. array(
  521. 'name' => 'Day',
  522. 'value' => 'basicDay'
  523. ),
  524. array(
  525. 'name' => 'Week',
  526. 'value' => 'basicWeek'
  527. ),
  528. array(
  529. 'name' => 'List',
  530. 'value' => 'list'
  531. )
  532. );
  533. $timeFormat = array(
  534. array(
  535. 'name' => '6p',
  536. 'value' => 'h(:mm)t'
  537. ),
  538. array(
  539. 'name' => '6:00p',
  540. 'value' => 'h:mmt'
  541. ),
  542. array(
  543. 'name' => '6:00',
  544. 'value' => 'h:mm'
  545. ),
  546. array(
  547. 'name' => '18',
  548. 'value' => 'H(:mm)'
  549. ),
  550. array(
  551. 'name' => '18:00',
  552. 'value' => 'H:mm'
  553. )
  554. );
  555. $rTorrentSortOptions = array(
  556. array(
  557. 'name' => 'Date Desc',
  558. 'value' => 'dated'
  559. ),
  560. array(
  561. 'name' => 'Date Asc',
  562. 'value' => 'datea'
  563. ),
  564. array(
  565. 'name' => 'Hash Desc',
  566. 'value' => 'hashd'
  567. ),
  568. array(
  569. 'name' => 'Hash Asc',
  570. 'value' => 'hasha'
  571. ),
  572. array(
  573. 'name' => 'Name Desc',
  574. 'value' => 'named'
  575. ),
  576. array(
  577. 'name' => 'Name Asc',
  578. 'value' => 'namea'
  579. ),
  580. array(
  581. 'name' => 'Size Desc',
  582. 'value' => 'sized'
  583. ),
  584. array(
  585. 'name' => 'Size Asc',
  586. 'value' => 'sizea'
  587. ),
  588. array(
  589. 'name' => 'Label Desc',
  590. 'value' => 'labeld'
  591. ),
  592. array(
  593. 'name' => 'Label Asc',
  594. 'value' => 'labela'
  595. ),
  596. array(
  597. 'name' => 'Status Desc',
  598. 'value' => 'statusd'
  599. ),
  600. array(
  601. 'name' => 'Status Asc',
  602. 'value' => 'statusa'
  603. ),
  604. );
  605. $qBittorrentApiOptions = array(
  606. array(
  607. 'name' => 'V1',
  608. 'value' => '1'
  609. ),
  610. array(
  611. 'name' => 'V2',
  612. 'value' => '2'
  613. ),
  614. );
  615. $qBittorrentSortOptions = array(
  616. array(
  617. 'name' => 'Hash',
  618. 'value' => 'hash'
  619. ),
  620. array(
  621. 'name' => 'Name',
  622. 'value' => 'name'
  623. ),
  624. array(
  625. 'name' => 'Size',
  626. 'value' => 'size'
  627. ),
  628. array(
  629. 'name' => 'Progress',
  630. 'value' => 'progress'
  631. ),
  632. array(
  633. 'name' => 'Download Speed',
  634. 'value' => 'dlspeed'
  635. ),
  636. array(
  637. 'name' => 'Upload Speed',
  638. 'value' => 'upspeed'
  639. ),
  640. array(
  641. 'name' => 'Priority',
  642. 'value' => 'priority'
  643. ),
  644. array(
  645. 'name' => 'Number of Seeds',
  646. 'value' => 'num_seeds'
  647. ),
  648. array(
  649. 'name' => 'Number of Seeds in Swarm',
  650. 'value' => 'num_complete'
  651. ),
  652. array(
  653. 'name' => 'Number of Leechers',
  654. 'value' => 'num_leechs'
  655. ),
  656. array(
  657. 'name' => 'Number of Leechers in Swarm',
  658. 'value' => 'num_incomplete'
  659. ),
  660. array(
  661. 'name' => 'Ratio',
  662. 'value' => 'ratio'
  663. ),
  664. array(
  665. 'name' => 'ETA',
  666. 'value' => 'eta'
  667. ),
  668. array(
  669. 'name' => 'State',
  670. 'value' => 'state'
  671. ),
  672. array(
  673. 'name' => 'Category',
  674. 'value' => 'category'
  675. )
  676. );
  677. $xmlStatus = (extension_loaded('xmlrpc')) ? 'Installed' : 'Not Installed';
  678. return array(
  679. array(
  680. 'name' => 'Calendar',
  681. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  682. 'image' => 'plugins/images/tabs/calendar.png',
  683. 'category' => 'HOMEPAGE',
  684. 'settings' => array(
  685. 'Enable' => array(
  686. array(
  687. 'type' => 'switch',
  688. 'name' => 'homepageCalendarEnabled',
  689. 'label' => 'Enable iCal',
  690. 'value' => $GLOBALS['homepageCalendarEnabled']
  691. ),
  692. array(
  693. 'type' => 'select',
  694. 'name' => 'homepageCalendarAuth',
  695. 'label' => 'Minimum Authentication',
  696. 'value' => $GLOBALS['homepageCalendarAuth'],
  697. 'options' => $groups
  698. ),
  699. array(
  700. 'type' => 'input',
  701. 'name' => 'calendariCal',
  702. 'label' => 'iCal URL\'s',
  703. 'value' => $GLOBALS['calendariCal'],
  704. 'placeholder' => 'separate by comma\'s'
  705. ),
  706. ),
  707. 'Misc Options' => array(
  708. array(
  709. 'type' => 'number',
  710. 'name' => 'calendarStart',
  711. 'label' => '# of Days Before',
  712. 'value' => $GLOBALS['calendarStart'],
  713. 'placeholder' => ''
  714. ),
  715. array(
  716. 'type' => 'number',
  717. 'name' => 'calendarEnd',
  718. 'label' => '# of Days After',
  719. 'value' => $GLOBALS['calendarEnd'],
  720. 'placeholder' => ''
  721. ),
  722. array(
  723. 'type' => 'select',
  724. 'name' => 'calendarFirstDay',
  725. 'label' => 'Start Day',
  726. 'value' => $GLOBALS['calendarFirstDay'],
  727. 'options' => $day
  728. ),
  729. array(
  730. 'type' => 'select',
  731. 'name' => 'calendarDefault',
  732. 'label' => 'Default View',
  733. 'value' => $GLOBALS['calendarDefault'],
  734. 'options' => $calendarDefault
  735. ),
  736. array(
  737. 'type' => 'select',
  738. 'name' => 'calendarTimeFormat',
  739. 'label' => 'Time Format',
  740. 'value' => $GLOBALS['calendarTimeFormat'],
  741. 'options' => $timeFormat
  742. ),
  743. array(
  744. 'type' => 'select',
  745. 'name' => 'calendarLimit',
  746. 'label' => 'Items Per Day',
  747. 'value' => $GLOBALS['calendarLimit'],
  748. 'options' => $limit
  749. ),
  750. array(
  751. 'type' => 'select',
  752. 'name' => 'calendarRefresh',
  753. 'label' => 'Refresh Seconds',
  754. 'value' => $GLOBALS['calendarRefresh'],
  755. 'options' => optionTime()
  756. )
  757. ),
  758. )
  759. ),
  760. array(
  761. 'name' => 'Plex',
  762. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  763. 'image' => 'plugins/images/tabs/plex.png',
  764. 'category' => 'Media Server',
  765. //'license' => $GLOBALS['license'],
  766. 'settings' => array(
  767. 'Enable' => array(
  768. array(
  769. 'type' => 'switch',
  770. 'name' => 'homepagePlexEnabled',
  771. 'label' => 'Enable',
  772. 'value' => $GLOBALS['homepagePlexEnabled']
  773. ),
  774. array(
  775. 'type' => 'select',
  776. 'name' => 'homepagePlexAuth',
  777. 'label' => 'Minimum Authentication',
  778. 'value' => $GLOBALS['homepagePlexAuth'],
  779. 'options' => $groups
  780. )
  781. ),
  782. 'Connection' => array(
  783. array(
  784. 'type' => 'input',
  785. 'name' => 'plexURL',
  786. 'label' => 'URL',
  787. 'value' => $GLOBALS['plexURL'],
  788. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  789. 'placeholder' => 'http(s)://hostname:port'
  790. ),
  791. array(
  792. 'type' => 'password-alt',
  793. 'name' => 'plexToken',
  794. 'label' => 'Token',
  795. 'value' => $GLOBALS['plexToken']
  796. ),
  797. array(
  798. 'type' => 'password-alt',
  799. 'name' => 'plexID',
  800. 'label' => 'Plex Machine',
  801. 'value' => $GLOBALS['plexID']
  802. )
  803. ),
  804. 'Active Streams' => array(
  805. array(
  806. 'type' => 'switch',
  807. 'name' => 'homepagePlexStreams',
  808. 'label' => 'Enable',
  809. 'value' => $GLOBALS['homepagePlexStreams']
  810. ),
  811. array(
  812. 'type' => 'select',
  813. 'name' => 'homepagePlexStreamsAuth',
  814. 'label' => 'Minimum Authorization',
  815. 'value' => $GLOBALS['homepagePlexStreamsAuth'],
  816. 'options' => $groups
  817. ),
  818. array(
  819. 'type' => 'switch',
  820. 'name' => 'homepageShowStreamNames',
  821. 'label' => 'User Information',
  822. 'value' => $GLOBALS['homepageShowStreamNames']
  823. ),
  824. array(
  825. 'type' => 'select',
  826. 'name' => 'homepageShowStreamNamesAuth',
  827. 'label' => 'Minimum Authorization',
  828. 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
  829. 'options' => $groups
  830. ),
  831. array(
  832. 'type' => 'select',
  833. 'name' => 'homepageStreamRefresh',
  834. 'label' => 'Refresh Seconds',
  835. 'value' => $GLOBALS['homepageStreamRefresh'],
  836. 'options' => optionTime()
  837. ),
  838. ),
  839. 'Recent Items' => array(
  840. array(
  841. 'type' => 'switch',
  842. 'name' => 'homepagePlexRecent',
  843. 'label' => 'Enable',
  844. 'value' => $GLOBALS['homepagePlexRecent']
  845. ),
  846. array(
  847. 'type' => 'select',
  848. 'name' => 'homepagePlexRecentAuth',
  849. 'label' => 'Minimum Authorization',
  850. 'value' => $GLOBALS['homepagePlexRecentAuth'],
  851. 'options' => $groups
  852. ),
  853. array(
  854. 'type' => 'number',
  855. 'name' => 'homepageRecentLimit',
  856. 'label' => 'Item Limit',
  857. 'value' => $GLOBALS['homepageRecentLimit'],
  858. ),
  859. array(
  860. 'type' => 'select',
  861. 'name' => 'homepageRecentRefresh',
  862. 'label' => 'Refresh Seconds',
  863. 'value' => $GLOBALS['homepageRecentRefresh'],
  864. 'options' => optionTime()
  865. ),
  866. ),
  867. 'Media Search' => array(
  868. array(
  869. 'type' => 'switch',
  870. 'name' => 'mediaSearch',
  871. 'label' => 'Enable',
  872. 'value' => $GLOBALS['mediaSearch']
  873. ),
  874. array(
  875. 'type' => 'select',
  876. 'name' => 'mediaSearchAuth',
  877. 'label' => 'Minimum Authorization',
  878. 'value' => $GLOBALS['mediaSearchAuth'],
  879. 'options' => $groups
  880. ),
  881. array(
  882. 'type' => 'select',
  883. 'name' => 'mediaSearchType',
  884. 'label' => 'Media Server',
  885. 'value' => $GLOBALS['mediaSearchType'],
  886. 'options' => $mediaServers
  887. ),
  888. ),
  889. 'Playlists' => array(
  890. array(
  891. 'type' => 'switch',
  892. 'name' => 'homepagePlexPlaylist',
  893. 'label' => 'Enable',
  894. 'value' => $GLOBALS['homepagePlexPlaylist']
  895. ),
  896. array(
  897. 'type' => 'select',
  898. 'name' => 'homepagePlexPlaylistAuth',
  899. 'label' => 'Minimum Authorization',
  900. 'value' => $GLOBALS['homepagePlexPlaylistAuth'],
  901. 'options' => $groups
  902. ),
  903. ),
  904. 'Misc Options' => array(
  905. array(
  906. 'type' => 'input',
  907. 'name' => 'plexTabName',
  908. 'label' => 'Plex Tab Name',
  909. 'value' => $GLOBALS['plexTabName'],
  910. 'placeholder' => 'Only use if you have Plex in a reverse proxy'
  911. ),
  912. array(
  913. 'type' => 'input',
  914. 'name' => 'plexTabURL',
  915. 'label' => 'Plex Tab WAN URL',
  916. 'value' => $GLOBALS['plexTabURL'],
  917. 'placeholder' => 'http(s)://hostname:port'
  918. ),
  919. array(
  920. 'type' => 'select',
  921. 'name' => 'cacheImageSize',
  922. 'label' => 'Image Cache Size',
  923. 'value' => $GLOBALS['cacheImageSize'],
  924. 'options' => array(
  925. array(
  926. 'name' => 'Low',
  927. 'value' => '.5'
  928. ),
  929. array(
  930. 'name' => '1x',
  931. 'value' => '1'
  932. ),
  933. array(
  934. 'name' => '2x',
  935. 'value' => '2'
  936. ),
  937. array(
  938. 'name' => '3x',
  939. 'value' => '3'
  940. )
  941. )
  942. )
  943. ),
  944. 'Test Connection' => array(
  945. array(
  946. 'type' => 'blank',
  947. 'label' => 'Please Save before Testing'
  948. ),
  949. array(
  950. 'type' => 'button',
  951. 'label' => '',
  952. 'icon' => 'fa fa-flask',
  953. 'class' => 'pull-right',
  954. 'text' => 'Test Connection',
  955. 'attr' => 'onclick="testAPIConnection(\'plex\')"'
  956. ),
  957. )
  958. )
  959. ),
  960. array(
  961. 'name' => 'Emby-Jellyfin',
  962. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  963. 'image' => 'plugins/images/tabs/emby.png',
  964. 'category' => 'Media Server',
  965. 'settings' => array(
  966. 'Enable' => array(
  967. array(
  968. 'type' => 'switch',
  969. 'name' => 'homepageEmbyEnabled',
  970. 'label' => 'Enable',
  971. 'value' => $GLOBALS['homepageEmbyEnabled']
  972. ),
  973. array(
  974. 'type' => 'select',
  975. 'name' => 'homepageEmbyAuth',
  976. 'label' => 'Minimum Authentication',
  977. 'value' => $GLOBALS['homepageEmbyAuth'],
  978. 'options' => $groups
  979. )
  980. ),
  981. 'Connection' => array(
  982. array(
  983. 'type' => 'input',
  984. 'name' => 'embyURL',
  985. 'label' => 'URL',
  986. 'value' => $GLOBALS['embyURL'],
  987. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too. Make sure if Jelly fin to end url with /jellyfin',
  988. 'placeholder' => 'http(s)://hostname:port - make sure if Jelly fin to end url with /jellyfin'
  989. ),
  990. array(
  991. 'type' => 'password-alt',
  992. 'name' => 'embyToken',
  993. 'label' => 'Token',
  994. 'value' => $GLOBALS['embyToken']
  995. )
  996. ),
  997. 'Active Streams' => array(
  998. array(
  999. 'type' => 'switch',
  1000. 'name' => 'homepageEmbyStreams',
  1001. 'label' => 'Enable',
  1002. 'value' => $GLOBALS['homepageEmbyStreams']
  1003. ),
  1004. array(
  1005. 'type' => 'select',
  1006. 'name' => 'homepageEmbyStreamsAuth',
  1007. 'label' => 'Minimum Authorization',
  1008. 'value' => $GLOBALS['homepageEmbyStreamsAuth'],
  1009. 'options' => $groups
  1010. ),
  1011. array(
  1012. 'type' => 'switch',
  1013. 'name' => 'homepageShowStreamNames',
  1014. 'label' => 'User Information',
  1015. 'value' => $GLOBALS['homepageShowStreamNames']
  1016. ),
  1017. array(
  1018. 'type' => 'select',
  1019. 'name' => 'homepageShowStreamNamesAuth',
  1020. 'label' => 'Minimum Authorization',
  1021. 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
  1022. 'options' => $groups
  1023. ),
  1024. array(
  1025. 'type' => 'select',
  1026. 'name' => 'homepageStreamRefresh',
  1027. 'label' => 'Refresh Seconds',
  1028. 'value' => $GLOBALS['homepageStreamRefresh'],
  1029. 'options' => optionTime()
  1030. ),
  1031. ),
  1032. 'Recent Items' => array(
  1033. array(
  1034. 'type' => 'switch',
  1035. 'name' => 'homepageEmbyRecent',
  1036. 'label' => 'Enable',
  1037. 'value' => $GLOBALS['homepageEmbyRecent']
  1038. ),
  1039. array(
  1040. 'type' => 'select',
  1041. 'name' => 'homepageEmbyRecentAuth',
  1042. 'label' => 'Minimum Authorization',
  1043. 'value' => $GLOBALS['homepageEmbyRecentAuth'],
  1044. 'options' => $groups
  1045. ),
  1046. array(
  1047. 'type' => 'number',
  1048. 'name' => 'homepageRecentLimit',
  1049. 'label' => 'Item Limit',
  1050. 'value' => $GLOBALS['homepageRecentLimit'],
  1051. ),
  1052. array(
  1053. 'type' => 'select',
  1054. 'name' => 'homepageRecentRefresh',
  1055. 'label' => 'Refresh Seconds',
  1056. 'value' => $GLOBALS['homepageRecentRefresh'],
  1057. 'options' => optionTime()
  1058. ),
  1059. ),
  1060. 'Misc Options' => array(
  1061. array(
  1062. 'type' => 'input',
  1063. 'name' => 'embyTabName',
  1064. 'label' => 'Emby Tab Name',
  1065. 'value' => $GLOBALS['embyTabName'],
  1066. 'placeholder' => 'Only use if you have Emby in a reverse proxy'
  1067. ),
  1068. array(
  1069. 'type' => 'input',
  1070. 'name' => 'embyTabURL',
  1071. 'label' => 'Emby Tab WAN URL',
  1072. 'value' => $GLOBALS['embyTabURL'],
  1073. 'placeholder' => 'http(s)://hostname:port'
  1074. ),
  1075. array(
  1076. 'type' => 'select',
  1077. 'name' => 'cacheImageSize',
  1078. 'label' => 'Image Cache Size',
  1079. 'value' => $GLOBALS['cacheImageSize'],
  1080. 'options' => array(
  1081. array(
  1082. 'name' => 'Low',
  1083. 'value' => '.5'
  1084. ),
  1085. array(
  1086. 'name' => '1x',
  1087. 'value' => '1'
  1088. ),
  1089. array(
  1090. 'name' => '2x',
  1091. 'value' => '2'
  1092. ),
  1093. array(
  1094. 'name' => '3x',
  1095. 'value' => '3'
  1096. )
  1097. )
  1098. )
  1099. )
  1100. )
  1101. ),
  1102. array(
  1103. 'name' => 'JDownloader',
  1104. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1105. 'image' => 'plugins/images/tabs/jdownloader.png',
  1106. 'category' => 'Downloader',
  1107. 'settings' => array(
  1108. 'custom' => '
  1109. <div class="row">
  1110. <div class="col-lg-12">
  1111. <div class="panel panel-info">
  1112. <div class="panel-heading">
  1113. <span lang="en">Notice</span>
  1114. </div>
  1115. <div class="panel-wrapper collapse in" aria-expanded="true">
  1116. <div class="panel-body">
  1117. <ul class="list-icons">
  1118. <li><i class="fa fa-chevron-right text-danger"></i> <a href="https://pypi.org/project/myjd-api/" target="_blank">Download [myjd-api] Module</a></li>
  1119. <li><i class="fa fa-chevron-right text-danger"></i> Add <b>/api/myjd</b> to the URL if you are using <a href="https://pypi.org/project/RSScrawler/" target="_blank">RSScrawler</a></li>
  1120. </ul>
  1121. </div>
  1122. </div>
  1123. </div>
  1124. </div>
  1125. </div>
  1126. ',
  1127. 'Enable' => array(
  1128. array(
  1129. 'type' => 'switch',
  1130. 'name' => 'homepageJdownloaderEnabled',
  1131. 'label' => 'Enable',
  1132. 'value' => $GLOBALS['homepageJdownloaderEnabled']
  1133. ),
  1134. array(
  1135. 'type' => 'select',
  1136. 'name' => 'homepageJdownloaderAuth',
  1137. 'label' => 'Minimum Authentication',
  1138. 'value' => $GLOBALS['homepageJdownloaderAuth'],
  1139. 'options' => $groups
  1140. )
  1141. ),
  1142. 'Connection' => array(
  1143. array(
  1144. 'type' => 'input',
  1145. 'name' => 'jdownloaderURL',
  1146. 'label' => 'URL',
  1147. 'value' => $GLOBALS['jdownloaderURL'],
  1148. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1149. 'placeholder' => 'http(s)://hostname:port'
  1150. )
  1151. ),
  1152. 'Misc Options' => array(
  1153. array(
  1154. 'type' => 'select',
  1155. 'name' => 'homepageDownloadRefresh',
  1156. 'label' => 'Refresh Seconds',
  1157. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1158. 'options' => optionTime()
  1159. ),
  1160. array(
  1161. 'type' => 'switch',
  1162. 'name' => 'jdownloaderCombine',
  1163. 'label' => 'Add to Combined Downloader',
  1164. 'value' => $GLOBALS['jdownloaderCombine']
  1165. ),
  1166. ),
  1167. 'Test Connection' => array(
  1168. array(
  1169. 'type' => 'blank',
  1170. 'label' => 'Please Save before Testing'
  1171. ),
  1172. array(
  1173. 'type' => 'button',
  1174. 'label' => '',
  1175. 'icon' => 'fa fa-flask',
  1176. 'class' => 'pull-right',
  1177. 'text' => 'Test Connection',
  1178. 'attr' => 'onclick="testAPIConnection(\'jdownloader\')"'
  1179. ),
  1180. )
  1181. )
  1182. ),
  1183. array(
  1184. 'name' => 'SabNZBD',
  1185. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1186. 'image' => 'plugins/images/tabs/sabnzbd.png',
  1187. 'category' => 'Downloader',
  1188. 'settings' => array(
  1189. 'Enable' => array(
  1190. array(
  1191. 'type' => 'switch',
  1192. 'name' => 'homepageSabnzbdEnabled',
  1193. 'label' => 'Enable',
  1194. 'value' => $GLOBALS['homepageSabnzbdEnabled']
  1195. ),
  1196. array(
  1197. 'type' => 'select',
  1198. 'name' => 'homepageSabnzbdAuth',
  1199. 'label' => 'Minimum Authentication',
  1200. 'value' => $GLOBALS['homepageSabnzbdAuth'],
  1201. 'options' => $groups
  1202. )
  1203. ),
  1204. 'Connection' => array(
  1205. array(
  1206. 'type' => 'input',
  1207. 'name' => 'sabnzbdURL',
  1208. 'label' => 'URL',
  1209. 'value' => $GLOBALS['sabnzbdURL'],
  1210. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1211. 'placeholder' => 'http(s)://hostname:port'
  1212. ),
  1213. array(
  1214. 'type' => 'password-alt',
  1215. 'name' => 'sabnzbdToken',
  1216. 'label' => 'Token',
  1217. 'value' => $GLOBALS['sabnzbdToken']
  1218. )
  1219. ),
  1220. 'Misc Options' => array(
  1221. array(
  1222. 'type' => 'select',
  1223. 'name' => 'homepageDownloadRefresh',
  1224. 'label' => 'Refresh Seconds',
  1225. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1226. 'options' => optionTime()
  1227. ),
  1228. array(
  1229. 'type' => 'switch',
  1230. 'name' => 'sabnzbdCombine',
  1231. 'label' => 'Add to Combined Downloader',
  1232. 'value' => $GLOBALS['sabnzbdCombine']
  1233. ),
  1234. ),
  1235. 'Test Connection' => array(
  1236. array(
  1237. 'type' => 'blank',
  1238. 'label' => 'Please Save before Testing'
  1239. ),
  1240. array(
  1241. 'type' => 'button',
  1242. 'label' => '',
  1243. 'icon' => 'fa fa-flask',
  1244. 'class' => 'pull-right',
  1245. 'text' => 'Test Connection',
  1246. 'attr' => 'onclick="testAPIConnection(\'sabnzbd\')"'
  1247. ),
  1248. )
  1249. )
  1250. ),
  1251. array(
  1252. 'name' => 'NZBGet',
  1253. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1254. 'image' => 'plugins/images/tabs/nzbget.png',
  1255. 'category' => 'Downloader',
  1256. 'settings' => array(
  1257. 'Enable' => array(
  1258. array(
  1259. 'type' => 'switch',
  1260. 'name' => 'homepageNzbgetEnabled',
  1261. 'label' => 'Enable',
  1262. 'value' => $GLOBALS['homepageNzbgetEnabled']
  1263. ),
  1264. array(
  1265. 'type' => 'select',
  1266. 'name' => 'homepageNzbgetAuth',
  1267. 'label' => 'Minimum Authentication',
  1268. 'value' => $GLOBALS['homepageNzbgetAuth'],
  1269. 'options' => $groups
  1270. )
  1271. ),
  1272. 'Connection' => array(
  1273. array(
  1274. 'type' => 'input',
  1275. 'name' => 'nzbgetURL',
  1276. 'label' => 'URL',
  1277. 'value' => $GLOBALS['nzbgetURL'],
  1278. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1279. 'placeholder' => 'http(s)://hostname:port'
  1280. ),
  1281. array(
  1282. 'type' => 'input',
  1283. 'name' => 'nzbgetUsername',
  1284. 'label' => 'Username',
  1285. 'value' => $GLOBALS['nzbgetUsername']
  1286. ),
  1287. array(
  1288. 'type' => 'password',
  1289. 'name' => 'nzbgetPassword',
  1290. 'label' => 'Password',
  1291. 'value' => $GLOBALS['nzbgetPassword']
  1292. )
  1293. ),
  1294. 'Misc Options' => array(
  1295. array(
  1296. 'type' => 'select',
  1297. 'name' => 'homepageDownloadRefresh',
  1298. 'label' => 'Refresh Seconds',
  1299. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1300. 'options' => optionTime()
  1301. ),
  1302. array(
  1303. 'type' => 'switch',
  1304. 'name' => 'nzbgetCombine',
  1305. 'label' => 'Add to Combined Downloader',
  1306. 'value' => $GLOBALS['nzbgetCombine']
  1307. ),
  1308. ),
  1309. 'Test Connection' => array(
  1310. array(
  1311. 'type' => 'blank',
  1312. 'label' => 'Please Save before Testing'
  1313. ),
  1314. array(
  1315. 'type' => 'button',
  1316. 'label' => '',
  1317. 'icon' => 'fa fa-flask',
  1318. 'class' => 'pull-right',
  1319. 'text' => 'Test Connection',
  1320. 'attr' => 'onclick="testAPIConnection(\'nzbget\')"'
  1321. ),
  1322. )
  1323. )
  1324. ),
  1325. array(
  1326. 'name' => 'Transmission',
  1327. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1328. 'image' => 'plugins/images/tabs/transmission.png',
  1329. 'category' => 'Downloader',
  1330. 'settings' => array(
  1331. 'Enable' => array(
  1332. array(
  1333. 'type' => 'switch',
  1334. 'name' => 'homepageTransmissionEnabled',
  1335. 'label' => 'Enable',
  1336. 'value' => $GLOBALS['homepageTransmissionEnabled']
  1337. ),
  1338. array(
  1339. 'type' => 'select',
  1340. 'name' => 'homepageTransmissionAuth',
  1341. 'label' => 'Minimum Authentication',
  1342. 'value' => $GLOBALS['homepageTransmissionAuth'],
  1343. 'options' => $groups
  1344. )
  1345. ),
  1346. 'Connection' => array(
  1347. array(
  1348. 'type' => 'input',
  1349. 'name' => 'transmissionURL',
  1350. 'label' => 'URL',
  1351. 'value' => $GLOBALS['transmissionURL'],
  1352. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1353. 'placeholder' => 'http(s)://hostname:port'
  1354. ),
  1355. array(
  1356. 'type' => 'input',
  1357. 'name' => 'transmissionUsername',
  1358. 'label' => 'Username',
  1359. 'value' => $GLOBALS['transmissionUsername']
  1360. ),
  1361. array(
  1362. 'type' => 'password',
  1363. 'name' => 'transmissionPassword',
  1364. 'label' => 'Password',
  1365. 'value' => $GLOBALS['transmissionPassword']
  1366. )
  1367. ),
  1368. 'Misc Options' => array(
  1369. array(
  1370. 'type' => 'switch',
  1371. 'name' => 'transmissionHideSeeding',
  1372. 'label' => 'Hide Seeding',
  1373. 'value' => $GLOBALS['transmissionHideSeeding']
  1374. ), array(
  1375. 'type' => 'switch',
  1376. 'name' => 'transmissionHideCompleted',
  1377. 'label' => 'Hide Completed',
  1378. 'value' => $GLOBALS['transmissionHideCompleted']
  1379. ),
  1380. array(
  1381. 'type' => 'select',
  1382. 'name' => 'homepageDownloadRefresh',
  1383. 'label' => 'Refresh Seconds',
  1384. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1385. 'options' => optionTime()
  1386. ),
  1387. array(
  1388. 'type' => 'switch',
  1389. 'name' => 'transmissionCombine',
  1390. 'label' => 'Add to Combined Downloader',
  1391. 'value' => $GLOBALS['transmissionCombine']
  1392. ),
  1393. )
  1394. )
  1395. ),
  1396. array(
  1397. 'name' => 'qBittorrent',
  1398. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1399. 'image' => 'plugins/images/tabs/qBittorrent.png',
  1400. 'category' => 'Downloader',
  1401. 'settings' => array(
  1402. 'Enable' => array(
  1403. array(
  1404. 'type' => 'switch',
  1405. 'name' => 'homepageqBittorrentEnabled',
  1406. 'label' => 'Enable',
  1407. 'value' => $GLOBALS['homepageqBittorrentEnabled']
  1408. ),
  1409. array(
  1410. 'type' => 'select',
  1411. 'name' => 'homepageqBittorrentAuth',
  1412. 'label' => 'Minimum Authentication',
  1413. 'value' => $GLOBALS['homepageqBittorrentAuth'],
  1414. 'options' => $groups
  1415. )
  1416. ),
  1417. 'Connection' => array(
  1418. array(
  1419. 'type' => 'input',
  1420. 'name' => 'qBittorrentURL',
  1421. 'label' => 'URL',
  1422. 'value' => $GLOBALS['qBittorrentURL'],
  1423. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1424. 'placeholder' => 'http(s)://hostname:port'
  1425. ),
  1426. array(
  1427. 'type' => 'select',
  1428. 'name' => 'qBittorrentApiVersion',
  1429. 'label' => 'API Version',
  1430. 'value' => $GLOBALS['qBittorrentApiVersion'],
  1431. 'options' => $qBittorrentApiOptions
  1432. ),
  1433. array(
  1434. 'type' => 'input',
  1435. 'name' => 'qBittorrentUsername',
  1436. 'label' => 'Username',
  1437. 'value' => $GLOBALS['qBittorrentUsername']
  1438. ),
  1439. array(
  1440. 'type' => 'password',
  1441. 'name' => 'qBittorrentPassword',
  1442. 'label' => 'Password',
  1443. 'value' => $GLOBALS['qBittorrentPassword']
  1444. )
  1445. ),
  1446. 'Misc Options' => array(
  1447. array(
  1448. 'type' => 'switch',
  1449. 'name' => 'qBittorrentHideSeeding',
  1450. 'label' => 'Hide Seeding',
  1451. 'value' => $GLOBALS['qBittorrentHideSeeding']
  1452. ),
  1453. array(
  1454. 'type' => 'switch',
  1455. 'name' => 'qBittorrentHideCompleted',
  1456. 'label' => 'Hide Completed',
  1457. 'value' => $GLOBALS['qBittorrentHideCompleted']
  1458. ),
  1459. array(
  1460. 'type' => 'select',
  1461. 'name' => 'qBittorrentSortOrder',
  1462. 'label' => 'Order',
  1463. 'value' => $GLOBALS['qBittorrentSortOrder'],
  1464. 'options' => $qBittorrentSortOptions
  1465. ), array(
  1466. 'type' => 'switch',
  1467. 'name' => 'qBittorrentReverseSorting',
  1468. 'label' => 'Reverse Sorting',
  1469. 'value' => $GLOBALS['qBittorrentReverseSorting']
  1470. ),
  1471. array(
  1472. 'type' => 'select',
  1473. 'name' => 'homepageDownloadRefresh',
  1474. 'label' => 'Refresh Seconds',
  1475. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1476. 'options' => optionTime()
  1477. ),
  1478. array(
  1479. 'type' => 'switch',
  1480. 'name' => 'qBittorrentCombine',
  1481. 'label' => 'Add to Combined Downloader',
  1482. 'value' => $GLOBALS['qBittorrentCombine']
  1483. ),
  1484. )
  1485. )
  1486. ),
  1487. array(
  1488. 'name' => 'rTorrent',
  1489. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1490. 'image' => 'plugins/images/tabs/rTorrent.png',
  1491. 'category' => 'Downloader',
  1492. 'settings' => array(
  1493. 'FYI' => array(
  1494. array(
  1495. 'type' => 'html',
  1496. 'label' => '',
  1497. 'override' => 12,
  1498. 'html' => '
  1499. <div class="row">
  1500. <div class="col-lg-12">
  1501. <div class="panel panel-info">
  1502. <div class="panel-heading">
  1503. <span lang="en">ATTENTION</span>
  1504. </div>
  1505. <div class="panel-wrapper collapse in" aria-expanded="true">
  1506. <div class="panel-body">
  1507. <h4 lang="en">This module requires XMLRPC</h4>
  1508. <span lang="en">Status: [ <b>' . $xmlStatus . '</b> ]</span>
  1509. <br/></br>
  1510. <span lang="en">
  1511. <h4><b>Note about API URL</b></h4>
  1512. Organizr appends the url with <code>/RPC2</code> unless the URL ends in <code>.php</code><br/>
  1513. <h5>Possible URLs:</h5>
  1514. <li>http://localhost:8080</li>
  1515. <li>https://domain.site/xmlrpc.php</li>
  1516. <li>https://seedbox.site/rutorrent/plugins/httprpc/action.php</li>
  1517. </span>
  1518. </div>
  1519. </div>
  1520. </div>
  1521. </div>
  1522. </div>
  1523. '
  1524. )
  1525. ),
  1526. 'Enable' => array(
  1527. array(
  1528. 'type' => 'switch',
  1529. 'name' => 'homepagerTorrentEnabled',
  1530. 'label' => 'Enable',
  1531. 'value' => $GLOBALS['homepagerTorrentEnabled']
  1532. ),
  1533. array(
  1534. 'type' => 'select',
  1535. 'name' => 'homepagerTorrentAuth',
  1536. 'label' => 'Minimum Authentication',
  1537. 'value' => $GLOBALS['homepagerTorrentAuth'],
  1538. 'options' => $groups
  1539. )
  1540. ),
  1541. 'Connection' => array(
  1542. array(
  1543. 'type' => 'input',
  1544. 'name' => 'rTorrentURL',
  1545. 'label' => 'URL',
  1546. 'value' => $GLOBALS['rTorrentURL'],
  1547. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1548. 'placeholder' => 'http(s)://hostname:port'
  1549. ),
  1550. array(
  1551. 'type' => 'input',
  1552. 'name' => 'rTorrentURLOverride',
  1553. 'label' => 'rTorrent API URL Override',
  1554. 'value' => $GLOBALS['rTorrentURLOverride'],
  1555. 'help' => 'Only use if you cannot connect. Please make sure to use local IP address and port - You also may use local dns name too.',
  1556. 'placeholder' => 'http(s)://hostname:port/xmlrpc'
  1557. ),
  1558. array(
  1559. 'type' => 'input',
  1560. 'name' => 'rTorrentUsername',
  1561. 'label' => 'Username',
  1562. 'value' => $GLOBALS['rTorrentUsername']
  1563. ),
  1564. array(
  1565. 'type' => 'password',
  1566. 'name' => 'rTorrentPassword',
  1567. 'label' => 'Password',
  1568. 'value' => $GLOBALS['rTorrentPassword']
  1569. ),
  1570. array(
  1571. 'type' => 'switch',
  1572. 'name' => 'rTorrentDisableCertCheck',
  1573. 'label' => 'Disable Certificate Check',
  1574. 'value' => $GLOBALS['rTorrentDisableCertCheck']
  1575. ),
  1576. ),
  1577. 'Misc Options' => array(
  1578. array(
  1579. 'type' => 'switch',
  1580. 'name' => 'rTorrentHideSeeding',
  1581. 'label' => 'Hide Seeding',
  1582. 'value' => $GLOBALS['rTorrentHideSeeding']
  1583. ), array(
  1584. 'type' => 'switch',
  1585. 'name' => 'rTorrentHideCompleted',
  1586. 'label' => 'Hide Completed',
  1587. 'value' => $GLOBALS['rTorrentHideCompleted']
  1588. ),
  1589. array(
  1590. 'type' => 'select',
  1591. 'name' => 'rTorrentSortOrder',
  1592. 'label' => 'Order',
  1593. 'value' => $GLOBALS['rTorrentSortOrder'],
  1594. 'options' => $rTorrentSortOptions
  1595. ),
  1596. array(
  1597. 'type' => 'select',
  1598. 'name' => 'homepageDownloadRefresh',
  1599. 'label' => 'Refresh Seconds',
  1600. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1601. 'options' => optionTime()
  1602. ),
  1603. array(
  1604. 'type' => 'switch',
  1605. 'name' => 'rTorrentCombine',
  1606. 'label' => 'Add to Combined Downloader',
  1607. 'value' => $GLOBALS['rTorrentCombine']
  1608. ),
  1609. ),
  1610. 'Test Connection' => array(
  1611. array(
  1612. 'type' => 'blank',
  1613. 'label' => 'Please Save before Testing'
  1614. ),
  1615. array(
  1616. 'type' => 'button',
  1617. 'label' => '',
  1618. 'icon' => 'fa fa-flask',
  1619. 'class' => 'pull-right',
  1620. 'text' => 'Test Connection',
  1621. 'attr' => 'onclick="testAPIConnection(\'rtorrent\')"'
  1622. ),
  1623. )
  1624. )
  1625. ),
  1626. array(
  1627. 'name' => 'Deluge',
  1628. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1629. 'image' => 'plugins/images/tabs/deluge.png',
  1630. 'category' => 'Downloader',
  1631. 'settings' => array(
  1632. 'custom' => '
  1633. <div class="row">
  1634. <div class="col-lg-12">
  1635. <div class="panel panel-info">
  1636. <div class="panel-heading">
  1637. <span lang="en">Notice</span>
  1638. </div>
  1639. <div class="panel-wrapper collapse in" aria-expanded="true">
  1640. <div class="panel-body">
  1641. <ul class="list-icons">
  1642. <li><i class="fa fa-chevron-right text-danger"></i> <a href="https://github.com/idlesign/deluge-webapi/tree/master/dist" target="_blank">Download Plugin</a></li>
  1643. <li><i class="fa fa-chevron-right text-danger"></i> Open Deluge Web UI, go to "Preferences -> Plugins -> Install plugin" and choose egg file.</li>
  1644. <li><i class="fa fa-chevron-right text-danger"></i> Activate WebAPI plugin </li>
  1645. </ul>
  1646. </div>
  1647. </div>
  1648. </div>
  1649. </div>
  1650. </div>
  1651. ',
  1652. 'Enable' => array(
  1653. array(
  1654. 'type' => 'switch',
  1655. 'name' => 'homepageDelugeEnabled',
  1656. 'label' => 'Enable',
  1657. 'value' => $GLOBALS['homepageDelugeEnabled']
  1658. ),
  1659. array(
  1660. 'type' => 'select',
  1661. 'name' => 'homepageDelugeAuth',
  1662. 'label' => 'Minimum Authentication',
  1663. 'value' => $GLOBALS['homepageDelugeAuth'],
  1664. 'options' => $groups
  1665. )
  1666. ),
  1667. 'Connection' => array(
  1668. array(
  1669. 'type' => 'input',
  1670. 'name' => 'delugeURL',
  1671. 'label' => 'URL',
  1672. 'value' => $GLOBALS['delugeURL'],
  1673. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1674. 'placeholder' => 'http(s)://hostname:port'
  1675. ),
  1676. array(
  1677. 'type' => 'password',
  1678. 'name' => 'delugePassword',
  1679. 'label' => 'Password',
  1680. 'value' => $GLOBALS['delugePassword']
  1681. )
  1682. ),
  1683. 'Misc Options' => array(
  1684. array(
  1685. 'type' => 'switch',
  1686. 'name' => 'delugeHideSeeding',
  1687. 'label' => 'Hide Seeding',
  1688. 'value' => $GLOBALS['delugeHideSeeding']
  1689. ), array(
  1690. 'type' => 'switch',
  1691. 'name' => 'delugeHideCompleted',
  1692. 'label' => 'Hide Completed',
  1693. 'value' => $GLOBALS['delugeHideCompleted']
  1694. ),
  1695. array(
  1696. 'type' => 'select',
  1697. 'name' => 'homepageDownloadRefresh',
  1698. 'label' => 'Refresh Seconds',
  1699. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1700. 'options' => optionTime()
  1701. ),
  1702. array(
  1703. 'type' => 'switch',
  1704. 'name' => 'delugeCombine',
  1705. 'label' => 'Add to Combined Downloader',
  1706. 'value' => $GLOBALS['delugeCombine']
  1707. ),
  1708. ),
  1709. 'Test Connection' => array(
  1710. array(
  1711. 'type' => 'blank',
  1712. 'label' => 'Please Save before Testing'
  1713. ),
  1714. array(
  1715. 'type' => 'button',
  1716. 'label' => '',
  1717. 'icon' => 'fa fa-flask',
  1718. 'class' => 'pull-right',
  1719. 'text' => 'Test Connection',
  1720. 'attr' => 'onclick="testAPIConnection(\'deluge\')"'
  1721. ),
  1722. )
  1723. )
  1724. ),
  1725. array(
  1726. 'name' => 'Sonarr',
  1727. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1728. 'image' => 'plugins/images/tabs/sonarr.png',
  1729. 'category' => 'PVR',
  1730. 'settings' => array(
  1731. 'Enable' => array(
  1732. array(
  1733. 'type' => 'switch',
  1734. 'name' => 'homepageSonarrEnabled',
  1735. 'label' => 'Enable',
  1736. 'value' => $GLOBALS['homepageSonarrEnabled']
  1737. ),
  1738. array(
  1739. 'type' => 'select',
  1740. 'name' => 'homepageSonarrAuth',
  1741. 'label' => 'Minimum Authentication',
  1742. 'value' => $GLOBALS['homepageSonarrAuth'],
  1743. 'options' => $groups
  1744. )
  1745. ),
  1746. 'Connection' => array(
  1747. array(
  1748. 'type' => 'input',
  1749. 'name' => 'sonarrURL',
  1750. 'label' => 'URL',
  1751. 'value' => $GLOBALS['sonarrURL'],
  1752. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1753. 'placeholder' => 'http(s)://hostname:port'
  1754. ),
  1755. array(
  1756. 'type' => 'password-alt',
  1757. 'name' => 'sonarrToken',
  1758. 'label' => 'Token',
  1759. 'value' => $GLOBALS['sonarrToken']
  1760. )
  1761. ),
  1762. 'Misc Options' => array(
  1763. array(
  1764. 'type' => 'number',
  1765. 'name' => 'calendarStart',
  1766. 'label' => '# of Days Before',
  1767. 'value' => $GLOBALS['calendarStart'],
  1768. 'placeholder' => ''
  1769. ),
  1770. array(
  1771. 'type' => 'number',
  1772. 'name' => 'calendarEnd',
  1773. 'label' => '# of Days After',
  1774. 'value' => $GLOBALS['calendarEnd'],
  1775. 'placeholder' => ''
  1776. ),
  1777. array(
  1778. 'type' => 'select',
  1779. 'name' => 'calendarFirstDay',
  1780. 'label' => 'Start Day',
  1781. 'value' => $GLOBALS['calendarFirstDay'],
  1782. 'options' => $day
  1783. ),
  1784. array(
  1785. 'type' => 'select',
  1786. 'name' => 'calendarDefault',
  1787. 'label' => 'Default View',
  1788. 'value' => $GLOBALS['calendarDefault'],
  1789. 'options' => $calendarDefault
  1790. ),
  1791. array(
  1792. 'type' => 'select',
  1793. 'name' => 'calendarTimeFormat',
  1794. 'label' => 'Time Format',
  1795. 'value' => $GLOBALS['calendarTimeFormat'],
  1796. 'options' => $timeFormat
  1797. ),
  1798. array(
  1799. 'type' => 'select',
  1800. 'name' => 'calendarLimit',
  1801. 'label' => 'Items Per Day',
  1802. 'value' => $GLOBALS['calendarLimit'],
  1803. 'options' => $limit
  1804. ),
  1805. array(
  1806. 'type' => 'select',
  1807. 'name' => 'calendarRefresh',
  1808. 'label' => 'Refresh Seconds',
  1809. 'value' => $GLOBALS['calendarRefresh'],
  1810. 'options' => optionTime()
  1811. ),
  1812. array(
  1813. 'type' => 'switch',
  1814. 'name' => 'sonarrUnmonitored',
  1815. 'label' => 'Show Unmonitored',
  1816. 'value' => $GLOBALS['sonarrUnmonitored']
  1817. )
  1818. ),
  1819. 'Test Connection' => array(
  1820. array(
  1821. 'type' => 'blank',
  1822. 'label' => 'Please Save before Testing'
  1823. ),
  1824. array(
  1825. 'type' => 'button',
  1826. 'label' => '',
  1827. 'icon' => 'fa fa-flask',
  1828. 'class' => 'pull-right',
  1829. 'text' => 'Test Connection',
  1830. 'attr' => 'onclick="testAPIConnection(\'sonarr\')"'
  1831. ),
  1832. )
  1833. )
  1834. ),
  1835. array(
  1836. 'name' => 'Lidarr',
  1837. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1838. 'image' => 'plugins/images/tabs/lidarr.png',
  1839. 'category' => 'PMR',
  1840. 'settings' => array(
  1841. 'Enable' => array(
  1842. array(
  1843. 'type' => 'switch',
  1844. 'name' => 'homepageLidarrEnabled',
  1845. 'label' => 'Enable',
  1846. 'value' => $GLOBALS['homepageLidarrEnabled']
  1847. ),
  1848. array(
  1849. 'type' => 'select',
  1850. 'name' => 'homepageLidarrAuth',
  1851. 'label' => 'Minimum Authentication',
  1852. 'value' => $GLOBALS['homepageLidarrAuth'],
  1853. 'options' => $groups
  1854. )
  1855. ),
  1856. 'Connection' => array(
  1857. array(
  1858. 'type' => 'input',
  1859. 'name' => 'lidarrURL',
  1860. 'label' => 'URL',
  1861. 'value' => $GLOBALS['lidarrURL'],
  1862. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1863. 'placeholder' => 'http(s)://hostname:port'
  1864. ),
  1865. array(
  1866. 'type' => 'password-alt',
  1867. 'name' => 'lidarrToken',
  1868. 'label' => 'Token',
  1869. 'value' => $GLOBALS['lidarrToken']
  1870. )
  1871. ),
  1872. 'Misc Options' => array(
  1873. array(
  1874. 'type' => 'number',
  1875. 'name' => 'calendarStart',
  1876. 'label' => '# of Days Before',
  1877. 'value' => $GLOBALS['calendarStart'],
  1878. 'placeholder' => ''
  1879. ),
  1880. array(
  1881. 'type' => 'number',
  1882. 'name' => 'calendarEnd',
  1883. 'label' => '# of Days After',
  1884. 'value' => $GLOBALS['calendarEnd'],
  1885. 'placeholder' => ''
  1886. ),
  1887. array(
  1888. 'type' => 'select',
  1889. 'name' => 'calendarFirstDay',
  1890. 'label' => 'Start Day',
  1891. 'value' => $GLOBALS['calendarFirstDay'],
  1892. 'options' => $day
  1893. ),
  1894. array(
  1895. 'type' => 'select',
  1896. 'name' => 'calendarDefault',
  1897. 'label' => 'Default View',
  1898. 'value' => $GLOBALS['calendarDefault'],
  1899. 'options' => $calendarDefault
  1900. ),
  1901. array(
  1902. 'type' => 'select',
  1903. 'name' => 'calendarTimeFormat',
  1904. 'label' => 'Time Format',
  1905. 'value' => $GLOBALS['calendarTimeFormat'],
  1906. 'options' => $timeFormat
  1907. ),
  1908. array(
  1909. 'type' => 'select',
  1910. 'name' => 'calendarLimit',
  1911. 'label' => 'Items Per Day',
  1912. 'value' => $GLOBALS['calendarLimit'],
  1913. 'options' => $limit
  1914. ),
  1915. array(
  1916. 'type' => 'select',
  1917. 'name' => 'calendarRefresh',
  1918. 'label' => 'Refresh Seconds',
  1919. 'value' => $GLOBALS['calendarRefresh'],
  1920. 'options' => optionTime()
  1921. ),
  1922. ),
  1923. 'Test Connection' => array(
  1924. array(
  1925. 'type' => 'blank',
  1926. 'label' => 'Please Save before Testing'
  1927. ),
  1928. array(
  1929. 'type' => 'button',
  1930. 'label' => '',
  1931. 'icon' => 'fa fa-flask',
  1932. 'class' => 'pull-right',
  1933. 'text' => 'Test Connection',
  1934. 'attr' => 'onclick="testAPIConnection(\'lidarr\')"'
  1935. ),
  1936. )
  1937. )
  1938. ),
  1939. array(
  1940. 'name' => 'Radarr',
  1941. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1942. 'image' => 'plugins/images/tabs/radarr.png',
  1943. 'category' => 'PVR',
  1944. 'settings' => array(
  1945. 'Enable' => array(
  1946. array(
  1947. 'type' => 'switch',
  1948. 'name' => 'homepageRadarrEnabled',
  1949. 'label' => 'Enable',
  1950. 'value' => $GLOBALS['homepageRadarrEnabled']
  1951. ),
  1952. array(
  1953. 'type' => 'select',
  1954. 'name' => 'homepageRadarrAuth',
  1955. 'label' => 'Minimum Authentication',
  1956. 'value' => $GLOBALS['homepageRadarrAuth'],
  1957. 'options' => $groups
  1958. )
  1959. ),
  1960. 'Connection' => array(
  1961. array(
  1962. 'type' => 'input',
  1963. 'name' => 'radarrURL',
  1964. 'label' => 'URL',
  1965. 'value' => $GLOBALS['radarrURL'],
  1966. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1967. 'placeholder' => 'http(s)://hostname:port'
  1968. ),
  1969. array(
  1970. 'type' => 'password-alt',
  1971. 'name' => 'radarrToken',
  1972. 'label' => 'Token',
  1973. 'value' => $GLOBALS['radarrToken']
  1974. )
  1975. ),
  1976. 'Misc Options' => array(
  1977. array(
  1978. 'type' => 'number',
  1979. 'name' => 'calendarStart',
  1980. 'label' => '# of Days Before',
  1981. 'value' => $GLOBALS['calendarStart'],
  1982. 'placeholder' => ''
  1983. ),
  1984. array(
  1985. 'type' => 'number',
  1986. 'name' => 'calendarEnd',
  1987. 'label' => '# of Days After',
  1988. 'value' => $GLOBALS['calendarEnd'],
  1989. 'placeholder' => ''
  1990. ),
  1991. array(
  1992. 'type' => 'select',
  1993. 'name' => 'calendarFirstDay',
  1994. 'label' => 'Start Day',
  1995. 'value' => $GLOBALS['calendarFirstDay'],
  1996. 'options' => $day
  1997. ),
  1998. array(
  1999. 'type' => 'select',
  2000. 'name' => 'calendarDefault',
  2001. 'label' => 'Default View',
  2002. 'value' => $GLOBALS['calendarDefault'],
  2003. 'options' => $calendarDefault
  2004. ),
  2005. array(
  2006. 'type' => 'select',
  2007. 'name' => 'calendarTimeFormat',
  2008. 'label' => 'Time Format',
  2009. 'value' => $GLOBALS['calendarTimeFormat'],
  2010. 'options' => $timeFormat
  2011. ),
  2012. array(
  2013. 'type' => 'select',
  2014. 'name' => 'calendarLimit',
  2015. 'label' => 'Items Per Day',
  2016. 'value' => $GLOBALS['calendarLimit'],
  2017. 'options' => $limit
  2018. ),
  2019. array(
  2020. 'type' => 'select',
  2021. 'name' => 'calendarRefresh',
  2022. 'label' => 'Refresh Seconds',
  2023. 'value' => $GLOBALS['calendarRefresh'],
  2024. 'options' => optionTime()
  2025. )
  2026. ),
  2027. 'Test Connection' => array(
  2028. array(
  2029. 'type' => 'blank',
  2030. 'label' => 'Please Save before Testing'
  2031. ),
  2032. array(
  2033. 'type' => 'button',
  2034. 'label' => '',
  2035. 'icon' => 'fa fa-flask',
  2036. 'class' => 'pull-right',
  2037. 'text' => 'Test Connection',
  2038. 'attr' => 'onclick="testAPIConnection(\'radarr\')"'
  2039. ),
  2040. )
  2041. )
  2042. ),
  2043. array(
  2044. 'name' => 'CouchPotato',
  2045. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2046. 'image' => 'plugins/images/tabs/couchpotato.png',
  2047. 'category' => 'PVR',
  2048. 'settings' => array(
  2049. 'Enable' => array(
  2050. array(
  2051. 'type' => 'switch',
  2052. 'name' => 'homepageCouchpotatoEnabled',
  2053. 'label' => 'Enable',
  2054. 'value' => $GLOBALS['homepageCouchpotatoEnabled']
  2055. ),
  2056. array(
  2057. 'type' => 'select',
  2058. 'name' => 'homepageCouchpotatoAuth',
  2059. 'label' => 'Minimum Authentication',
  2060. 'value' => $GLOBALS['homepageCouchpotatoAuth'],
  2061. 'options' => $groups
  2062. )
  2063. ),
  2064. 'Connection' => array(
  2065. array(
  2066. 'type' => 'input',
  2067. 'name' => 'couchpotatoURL',
  2068. 'label' => 'URL',
  2069. 'value' => $GLOBALS['couchpotatoURL'],
  2070. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  2071. 'placeholder' => 'http(s)://hostname:port'
  2072. ),
  2073. array(
  2074. 'type' => 'password-alt',
  2075. 'name' => 'couchpotatoToken',
  2076. 'label' => 'Token',
  2077. 'value' => $GLOBALS['couchpotatoToken']
  2078. )
  2079. ),
  2080. 'Misc Options' => array(
  2081. array(
  2082. 'type' => 'select',
  2083. 'name' => 'calendarFirstDay',
  2084. 'label' => 'Start Day',
  2085. 'value' => $GLOBALS['calendarFirstDay'],
  2086. 'options' => $day
  2087. ),
  2088. array(
  2089. 'type' => 'select',
  2090. 'name' => 'calendarDefault',
  2091. 'label' => 'Default View',
  2092. 'value' => $GLOBALS['calendarDefault'],
  2093. 'options' => $calendarDefault
  2094. ),
  2095. array(
  2096. 'type' => 'select',
  2097. 'name' => 'calendarTimeFormat',
  2098. 'label' => 'Time Format',
  2099. 'value' => $GLOBALS['calendarTimeFormat'],
  2100. 'options' => $timeFormat
  2101. ),
  2102. array(
  2103. 'type' => 'select',
  2104. 'name' => 'calendarLimit',
  2105. 'label' => 'Items Per Day',
  2106. 'value' => $GLOBALS['calendarLimit'],
  2107. 'options' => $limit
  2108. ),
  2109. array(
  2110. 'type' => 'select',
  2111. 'name' => 'calendarRefresh',
  2112. 'label' => 'Refresh Seconds',
  2113. 'value' => $GLOBALS['calendarRefresh'],
  2114. 'options' => optionTime()
  2115. )
  2116. )
  2117. )
  2118. ),
  2119. array(
  2120. 'name' => 'SickRage',
  2121. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2122. 'image' => 'plugins/images/tabs/sickrage.png',
  2123. 'category' => 'PVR',
  2124. 'settings' => array(
  2125. 'Enable' => array(
  2126. array(
  2127. 'type' => 'switch',
  2128. 'name' => 'homepageSickrageEnabled',
  2129. 'label' => 'Enable',
  2130. 'value' => $GLOBALS['homepageSickrageEnabled']
  2131. ),
  2132. array(
  2133. 'type' => 'select',
  2134. 'name' => 'homepageSickrageAuth',
  2135. 'label' => 'Minimum Authentication',
  2136. 'value' => $GLOBALS['homepageSickrageAuth'],
  2137. 'options' => $groups
  2138. )
  2139. ),
  2140. 'Connection' => array(
  2141. array(
  2142. 'type' => 'input',
  2143. 'name' => 'sickrageURL',
  2144. 'label' => 'URL',
  2145. 'value' => $GLOBALS['sickrageURL'],
  2146. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  2147. 'placeholder' => 'http(s)://hostname:port'
  2148. ),
  2149. array(
  2150. 'type' => 'password-alt',
  2151. 'name' => 'sickrageToken',
  2152. 'label' => 'Token',
  2153. 'value' => $GLOBALS['sickrageToken']
  2154. )
  2155. ),
  2156. 'Misc Options' => array(
  2157. array(
  2158. 'type' => 'select',
  2159. 'name' => 'calendarFirstDay',
  2160. 'label' => 'Start Day',
  2161. 'value' => $GLOBALS['calendarFirstDay'],
  2162. 'options' => $day
  2163. ),
  2164. array(
  2165. 'type' => 'select',
  2166. 'name' => 'calendarDefault',
  2167. 'label' => 'Default View',
  2168. 'value' => $GLOBALS['calendarDefault'],
  2169. 'options' => $calendarDefault
  2170. ),
  2171. array(
  2172. 'type' => 'select',
  2173. 'name' => 'calendarTimeFormat',
  2174. 'label' => 'Time Format',
  2175. 'value' => $GLOBALS['calendarTimeFormat'],
  2176. 'options' => $timeFormat
  2177. ),
  2178. array(
  2179. 'type' => 'select',
  2180. 'name' => 'calendarLimit',
  2181. 'label' => 'Items Per Day',
  2182. 'value' => $GLOBALS['calendarLimit'],
  2183. 'options' => $limit
  2184. ),
  2185. array(
  2186. 'type' => 'select',
  2187. 'name' => 'calendarRefresh',
  2188. 'label' => 'Refresh Seconds',
  2189. 'value' => $GLOBALS['calendarRefresh'],
  2190. 'options' => optionTime()
  2191. )
  2192. )
  2193. )
  2194. ),
  2195. array(
  2196. 'name' => 'Ombi',
  2197. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2198. 'image' => 'plugins/images/tabs/ombi.png',
  2199. 'category' => 'Requests',
  2200. 'settings' => array(
  2201. 'Enable' => array(
  2202. array(
  2203. 'type' => 'switch',
  2204. 'name' => 'homepageOmbiEnabled',
  2205. 'label' => 'Enable',
  2206. 'value' => $GLOBALS['homepageOmbiEnabled']
  2207. ),
  2208. array(
  2209. 'type' => 'select',
  2210. 'name' => 'homepageOmbiAuth',
  2211. 'label' => 'Minimum Authentication',
  2212. 'value' => $GLOBALS['homepageOmbiAuth'],
  2213. 'options' => $groups
  2214. )
  2215. ),
  2216. 'Connection' => array(
  2217. array(
  2218. 'type' => 'input',
  2219. 'name' => 'ombiURL',
  2220. 'label' => 'URL',
  2221. 'value' => $GLOBALS['ombiURL'],
  2222. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  2223. 'placeholder' => 'http(s)://hostname:port'
  2224. ),
  2225. array(
  2226. 'type' => 'password-alt',
  2227. 'name' => 'ombiToken',
  2228. 'label' => 'Token',
  2229. 'value' => $GLOBALS['ombiToken']
  2230. )
  2231. ),
  2232. 'Misc Options' => array(
  2233. array(
  2234. 'type' => 'select',
  2235. 'name' => 'homepageOmbiRequestAuth',
  2236. 'label' => 'Minimum Group to Request',
  2237. 'value' => $GLOBALS['homepageOmbiRequestAuth'],
  2238. 'options' => $groups
  2239. ),
  2240. array(
  2241. 'type' => 'select',
  2242. 'name' => 'ombiTvDefault',
  2243. 'label' => 'TV Show Default Request',
  2244. 'value' => $GLOBALS['ombiTvDefault'],
  2245. 'options' => $ombiTvOptions
  2246. ),
  2247. array(
  2248. 'type' => 'switch',
  2249. 'name' => 'ombiLimitUser',
  2250. 'label' => 'Limit to User',
  2251. 'value' => $GLOBALS['ombiLimitUser']
  2252. ),
  2253. array(
  2254. 'type' => 'number',
  2255. 'name' => 'ombiLimit',
  2256. 'label' => 'Item Limit',
  2257. 'value' => $GLOBALS['ombiLimit'],
  2258. ),
  2259. array(
  2260. 'type' => 'select',
  2261. 'name' => 'ombiRefresh',
  2262. 'label' => 'Refresh Seconds',
  2263. 'value' => $GLOBALS['ombiRefresh'],
  2264. 'options' => optionTime()
  2265. ),
  2266. array(
  2267. 'type' => 'switch',
  2268. 'name' => 'ombiAlias',
  2269. 'label' => 'Use Ombi Alias Names',
  2270. 'value' => $GLOBALS['ombiAlias'],
  2271. 'help' => 'Use Ombi Alias Names instead of Usernames - If Alias is blank, Alias will fallback to Username'
  2272. )
  2273. ),
  2274. 'Default Filter' => array(
  2275. array(
  2276. 'type' => 'switch',
  2277. 'name' => 'ombiDefaultFilterAvailable',
  2278. 'label' => 'Show Available',
  2279. 'value' => $GLOBALS['ombiDefaultFilterAvailable'],
  2280. 'help' => 'Show All Available Ombi Requests'
  2281. ),
  2282. array(
  2283. 'type' => 'switch',
  2284. 'name' => 'ombiDefaultFilterUnavailable',
  2285. 'label' => 'Show Unavailable',
  2286. 'value' => $GLOBALS['ombiDefaultFilterUnavailable'],
  2287. 'help' => 'Show All Unavailable Ombi Requests'
  2288. ),
  2289. array(
  2290. 'type' => 'switch',
  2291. 'name' => 'ombiDefaultFilterApproved',
  2292. 'label' => 'Show Approved',
  2293. 'value' => $GLOBALS['ombiDefaultFilterApproved'],
  2294. 'help' => 'Show All Approved Ombi Requests'
  2295. ),
  2296. array(
  2297. 'type' => 'switch',
  2298. 'name' => 'ombiDefaultFilterUnapproved',
  2299. 'label' => 'Show Unapproved',
  2300. 'value' => $GLOBALS['ombiDefaultFilterUnapproved'],
  2301. 'help' => 'Show All Unapproved Ombi Requests'
  2302. ),
  2303. array(
  2304. 'type' => 'switch',
  2305. 'name' => 'ombiDefaultFilterDenied',
  2306. 'label' => 'Show Denied',
  2307. 'value' => $GLOBALS['ombiDefaultFilterDenied'],
  2308. 'help' => 'Show All Denied Ombi Requests'
  2309. )
  2310. ),
  2311. 'Test Connection' => array(
  2312. array(
  2313. 'type' => 'blank',
  2314. 'label' => 'Please Save before Testing'
  2315. ),
  2316. array(
  2317. 'type' => 'button',
  2318. 'label' => '',
  2319. 'icon' => 'fa fa-flask',
  2320. 'class' => 'pull-right',
  2321. 'text' => 'Test Connection',
  2322. 'attr' => 'onclick="testAPIConnection(\'ombi\')"'
  2323. ),
  2324. )
  2325. )
  2326. ),
  2327. array(
  2328. 'name' => 'Unifi',
  2329. 'enabled' => true,
  2330. 'image' => 'plugins/images/tabs/ubnt.png',
  2331. 'category' => 'Monitor',
  2332. 'settings' => array(
  2333. 'Enable' => array(
  2334. array(
  2335. 'type' => 'switch',
  2336. 'name' => 'homepageUnifiEnabled',
  2337. 'label' => 'Enable',
  2338. 'value' => $GLOBALS['homepageUnifiEnabled']
  2339. ),
  2340. array(
  2341. 'type' => 'select',
  2342. 'name' => 'homepageUnifiAuth',
  2343. 'label' => 'Minimum Authentication',
  2344. 'value' => $GLOBALS['homepageUnifiAuth'],
  2345. 'options' => $groups
  2346. )
  2347. ),
  2348. 'Connection' => array(
  2349. array(
  2350. 'type' => 'input',
  2351. 'name' => 'unifiURL',
  2352. 'label' => 'URL',
  2353. 'value' => $GLOBALS['unifiURL'],
  2354. 'help' => 'URL for Unifi',
  2355. 'placeholder' => 'Unifi API URL'
  2356. ),
  2357. array(
  2358. 'type' => 'blank',
  2359. 'label' => ''
  2360. ),
  2361. array(
  2362. 'type' => 'input',
  2363. 'name' => 'unifiUsername',
  2364. 'label' => 'Username',
  2365. 'value' => $GLOBALS['unifiUsername']
  2366. ),
  2367. array(
  2368. 'type' => 'password',
  2369. 'name' => 'unifiPassword',
  2370. 'label' => 'Password',
  2371. 'value' => $GLOBALS['unifiPassword']
  2372. ),
  2373. array(
  2374. 'type' => 'input',
  2375. 'name' => 'unifiSiteName',
  2376. 'label' => 'Site Name',
  2377. 'value' => $GLOBALS['unifiSiteName'],
  2378. 'help' => 'Site Name - not Site ID nor Site Description',
  2379. ),
  2380. array(
  2381. 'type' => 'button',
  2382. 'label' => 'Grab Unifi Site',
  2383. 'icon' => 'fa fa-building',
  2384. 'text' => 'Get Unifi Site',
  2385. 'attr' => 'onclick="getUnifiSite(\'unifiSite\')"'
  2386. ),
  2387. ),
  2388. 'Misc Options' => array(
  2389. array(
  2390. 'type' => 'select',
  2391. 'name' => 'homepageUnifiRefresh',
  2392. 'label' => 'Refresh Seconds',
  2393. 'value' => $GLOBALS['homepageUnifiRefresh'],
  2394. 'options' => optionTime()
  2395. ),
  2396. ),
  2397. 'Test Connection' => array(
  2398. array(
  2399. 'type' => 'blank',
  2400. 'label' => 'Please Save before Testing'
  2401. ),
  2402. array(
  2403. 'type' => 'button',
  2404. 'label' => '',
  2405. 'icon' => 'fa fa-flask',
  2406. 'class' => 'pull-right',
  2407. 'text' => 'Test Connection',
  2408. 'attr' => 'onclick="testAPIConnection(\'unifi\')"'
  2409. ),
  2410. )
  2411. )
  2412. ),
  2413. array(
  2414. 'name' => 'HealthChecks',
  2415. 'enabled' => true,
  2416. 'image' => 'plugins/images/tabs/healthchecks.png',
  2417. 'category' => 'Monitor',
  2418. 'settings' => array(
  2419. 'Enable' => array(
  2420. array(
  2421. 'type' => 'switch',
  2422. 'name' => 'homepageHealthChecksEnabled',
  2423. 'label' => 'Enable',
  2424. 'value' => $GLOBALS['homepageHealthChecksEnabled']
  2425. ),
  2426. array(
  2427. 'type' => 'select',
  2428. 'name' => 'homepageHealthChecksAuth',
  2429. 'label' => 'Minimum Authentication',
  2430. 'value' => $GLOBALS['homepageHealthChecksAuth'],
  2431. 'options' => $groups
  2432. )
  2433. ),
  2434. 'Connection' => array(
  2435. array(
  2436. 'type' => 'input',
  2437. 'name' => 'healthChecksURL',
  2438. 'label' => 'URL',
  2439. 'value' => $GLOBALS['healthChecksURL'],
  2440. 'help' => 'URL for HealthChecks API',
  2441. 'placeholder' => 'HealthChecks API URL'
  2442. ),
  2443. array(
  2444. 'type' => 'password-alt',
  2445. 'name' => 'healthChecksToken',
  2446. 'label' => 'Token',
  2447. 'value' => $GLOBALS['healthChecksToken']
  2448. )
  2449. ),
  2450. 'Misc Options' => array(
  2451. array(
  2452. 'type' => 'input',
  2453. 'name' => 'healthChecksTags',
  2454. 'label' => 'Tags',
  2455. 'value' => $GLOBALS['healthChecksTags'],
  2456. 'help' => 'Pull only checks with this tag - Blank for all',
  2457. 'placeholder' => 'Multiple tags using CSV - tag1,tag2'
  2458. ),
  2459. array(
  2460. 'type' => 'select',
  2461. 'name' => 'homepageHealthChecksRefresh',
  2462. 'label' => 'Refresh Seconds',
  2463. 'value' => $GLOBALS['homepageHealthChecksRefresh'],
  2464. 'options' => optionTime()
  2465. ),
  2466. ),
  2467. )
  2468. ),
  2469. array(
  2470. 'name' => 'CustomHTML-1',
  2471. 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
  2472. 'image' => 'plugins/images/tabs/custom1.png',
  2473. 'category' => 'Custom',
  2474. 'settings' => array(
  2475. 'Enable' => array(
  2476. array(
  2477. 'type' => 'switch',
  2478. 'name' => 'homepagCustomHTMLoneEnabled',
  2479. 'label' => 'Enable',
  2480. 'value' => $GLOBALS['homepagCustomHTMLoneEnabled']
  2481. ),
  2482. array(
  2483. 'type' => 'select',
  2484. 'name' => 'homepagCustomHTMLoneAuth',
  2485. 'label' => 'Minimum Authentication',
  2486. 'value' => $GLOBALS['homepagCustomHTMLoneAuth'],
  2487. 'options' => $groups
  2488. )
  2489. ),
  2490. 'Code' => array(
  2491. array(
  2492. 'type' => 'textbox',
  2493. 'name' => 'customHTMLone',
  2494. 'class' => 'hidden customHTMLoneTextarea',
  2495. 'label' => '',
  2496. 'value' => $GLOBALS['customHTMLone'],
  2497. ),
  2498. array(
  2499. 'type' => 'html',
  2500. 'override' => 12,
  2501. 'label' => 'Custom HTML/JavaScript',
  2502. 'html' => '<button type="button" class="hidden savecustomHTMLoneTextarea btn btn-info btn-circle pull-right m-r-5 m-l-10"><i class="fa fa-save"></i> </button><div id="customHTMLoneEditor" style="height:300px">' . htmlentities($GLOBALS['customHTMLone']) . '</div>'
  2503. ),
  2504. )
  2505. )
  2506. ),
  2507. array(
  2508. 'name' => 'CustomHTML-2',
  2509. 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
  2510. 'image' => 'plugins/images/tabs/custom2.png',
  2511. 'category' => 'Custom',
  2512. 'settings' => array(
  2513. 'Enable' => array(
  2514. array(
  2515. 'type' => 'switch',
  2516. 'name' => 'homepagCustomHTMLtwoEnabled',
  2517. 'label' => 'Enable',
  2518. 'value' => $GLOBALS['homepagCustomHTMLtwoEnabled']
  2519. ),
  2520. array(
  2521. 'type' => 'select',
  2522. 'name' => 'homepagCustomHTMLtwoAuth',
  2523. 'label' => 'Minimum Authentication',
  2524. 'value' => $GLOBALS['homepagCustomHTMLtwoAuth'],
  2525. 'options' => $groups
  2526. )
  2527. ),
  2528. 'Code' => array(
  2529. array(
  2530. 'type' => 'textbox',
  2531. 'name' => 'customHTMLtwo',
  2532. 'class' => 'hidden customHTMLtwoTextarea',
  2533. 'label' => '',
  2534. 'value' => $GLOBALS['customHTMLtwo'],
  2535. ),
  2536. array(
  2537. 'type' => 'html',
  2538. 'override' => 12,
  2539. 'label' => 'Custom HTML/JavaScript',
  2540. 'html' => '<button type="button" class="hidden savecustomHTMLtwoTextarea btn btn-info btn-circle pull-right m-r-5 m-l-10"><i class="fa fa-save"></i> </button><div id="customHTMLtwoEditor" style="height:300px">' . htmlentities($GLOBALS['customHTMLtwo']) . '</div>'
  2541. ),
  2542. )
  2543. )
  2544. ),
  2545. array(
  2546. 'name' => 'Misc',
  2547. 'enabled' => true,
  2548. 'image' => 'plugins/images/organizr/logo-no-border.png',
  2549. 'category' => 'Custom',
  2550. 'settings' => array(
  2551. 'YouTube' => array(
  2552. array(
  2553. 'type' => 'input',
  2554. 'name' => 'youtubeAPI',
  2555. 'label' => 'Youtube API Key',
  2556. 'value' => $GLOBALS['youtubeAPI'],
  2557. 'help' => 'Please make sure to input this API key as the organizr one gets limited'
  2558. ),
  2559. array(
  2560. 'type' => 'html',
  2561. 'override' => 6,
  2562. 'label' => 'Instructions',
  2563. 'html' => '<a href="https://www.slickremix.com/docs/get-api-key-for-youtube/" target="_blank">Click here for instructions</a>'
  2564. ),
  2565. )
  2566. )
  2567. ),
  2568. array(
  2569. 'name' => 'Pi-hole',
  2570. 'enabled' => true,
  2571. 'image' => 'plugins/images/tabs/pihole.png',
  2572. 'category' => 'Monitor',
  2573. 'settings' => array(
  2574. 'Enable' => array(
  2575. array(
  2576. 'type' => 'switch',
  2577. 'name' => 'homepagePiholeEnabled',
  2578. 'label' => 'Enable',
  2579. 'value' => $GLOBALS['homepagePiholeEnabled']
  2580. ),
  2581. array(
  2582. 'type' => 'select',
  2583. 'name' => 'homepagePiholeAuth',
  2584. 'label' => 'Minimum Authentication',
  2585. 'value' => $GLOBALS['homepagePiholeAuth'],
  2586. 'options' => $groups
  2587. )
  2588. ),
  2589. 'Connection' => array(
  2590. array(
  2591. 'type' => 'input',
  2592. 'name' => 'piholeURL',
  2593. 'label' => 'URL',
  2594. 'value' => $GLOBALS['piholeURL'],
  2595. 'help' => 'Please make sure to use local IP address and port and to include \'/admin/\' at the end of the URL. You can add multiple Pi-holes by comma separating the URLs.',
  2596. 'placeholder' => 'http(s)://hostname:port/admin/'
  2597. ),
  2598. ),
  2599. 'Misc' => array(
  2600. array(
  2601. 'type' => 'switch',
  2602. 'name' => 'piholeHeaderToggle',
  2603. 'label' => 'Toggle Title',
  2604. 'value' => $GLOBALS['piholeHeaderToggle'],
  2605. 'help' => 'Shows/hides the title of this homepage module'
  2606. ),
  2607. array(
  2608. 'type' => 'switch',
  2609. 'name' => 'homepagePiholeCombine',
  2610. 'label' => 'Combine stat cards',
  2611. 'value' => $GLOBALS['homepagePiholeCombine'],
  2612. 'help' => 'This controls whether to combine the stats for multiple piholes into 1 card.',
  2613. ),
  2614. ),
  2615. )
  2616. ),
  2617. array(
  2618. 'name' => 'Tautulli',
  2619. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2620. 'image' => 'plugins/images/tabs/tautulli.png',
  2621. 'category' => 'Monitor',
  2622. 'settings' => array(
  2623. 'Enable' => array(
  2624. array(
  2625. 'type' => 'switch',
  2626. 'name' => 'homepageTautulliEnabled',
  2627. 'label' => 'Enable',
  2628. 'value' => $GLOBALS['homepageTautulliEnabled']
  2629. ),
  2630. array(
  2631. 'type' => 'select',
  2632. 'name' => 'homepageTautulliAuth',
  2633. 'label' => 'Minimum Authentication',
  2634. 'value' => $GLOBALS['homepageTautulliAuth'],
  2635. 'options' => $groups
  2636. )
  2637. ),
  2638. 'Options' => array(
  2639. array(
  2640. 'type' => 'input',
  2641. 'name' => 'tautulliHeader',
  2642. 'label' => 'Title',
  2643. 'value' => $GLOBALS['tautulliHeader'],
  2644. 'help' => 'Sets the title of this homepage module'
  2645. ),
  2646. array(
  2647. 'type' => 'switch',
  2648. 'name' => 'tautulliHeaderToggle',
  2649. 'label' => 'Toggle Title',
  2650. 'value' => $GLOBALS['tautulliHeaderToggle'],
  2651. 'help' => 'Shows/hides the title of this homepage module'
  2652. )
  2653. ),
  2654. 'Connection' => array(
  2655. array(
  2656. 'type' => 'input',
  2657. 'name' => 'tautulliURL',
  2658. 'label' => 'URL',
  2659. 'value' => $GLOBALS['tautulliURL'],
  2660. 'help' => 'URL for Tautulli API, include the IP, the port and the base URL (e.g. /tautulli/) in the URL',
  2661. 'placeholder' => 'http://<ip>:<port>'
  2662. ),
  2663. array(
  2664. 'type' => 'password-alt',
  2665. 'name' => 'tautulliApikey',
  2666. 'label' => 'API Key',
  2667. 'value' => $GLOBALS['tautulliApikey']
  2668. ),
  2669. array(
  2670. 'type' => 'select',
  2671. 'name' => 'homepageTautulliRefresh',
  2672. 'label' => 'Refresh Seconds',
  2673. 'value' => $GLOBALS['homepageTautulliRefresh'],
  2674. 'options' => optionTime()
  2675. ),
  2676. ),
  2677. 'Library Stats' => array(
  2678. array(
  2679. 'type' => 'switch',
  2680. 'name' => 'tautulliLibraries',
  2681. 'label' => 'Libraries',
  2682. 'value' => $GLOBALS['tautulliLibraries'],
  2683. 'help' => 'Shows/hides the card with library information.',
  2684. ),
  2685. array(
  2686. 'type' => 'select',
  2687. 'name' => 'homepageTautulliLibraryAuth',
  2688. 'label' => 'Minimum Authentication',
  2689. 'value' => $GLOBALS['homepageTautulliLibraryAuth'],
  2690. 'options' => $groups
  2691. ),
  2692. ),
  2693. 'Viewing Stats' => array(
  2694. array(
  2695. 'type' => 'switch',
  2696. 'name' => 'tautulliPopularMovies',
  2697. 'label' => 'Popular Movies',
  2698. 'value' => $GLOBALS['tautulliPopularMovies'],
  2699. 'help' => 'Shows/hides the card with Popular Movies information.',
  2700. ),
  2701. array(
  2702. 'type' => 'switch',
  2703. 'name' => 'tautulliPopularTV',
  2704. 'label' => 'Popular TV',
  2705. 'value' => $GLOBALS['tautulliPopularTV'],
  2706. 'help' => 'Shows/hides the card with Popular TV information.',
  2707. ),
  2708. array(
  2709. 'type' => 'switch',
  2710. 'name' => 'tautulliTopMovies',
  2711. 'label' => 'Top Movies',
  2712. 'value' => $GLOBALS['tautulliTopMovies'],
  2713. 'help' => 'Shows/hides the card with Top Movies information.',
  2714. ),
  2715. array(
  2716. 'type' => 'switch',
  2717. 'name' => 'tautulliTopTV',
  2718. 'label' => 'Top TV',
  2719. 'value' => $GLOBALS['tautulliTopTV'],
  2720. 'help' => 'Shows/hides the card with Top TV information.',
  2721. ),
  2722. array(
  2723. 'type' => 'select',
  2724. 'name' => 'homepageTautulliViewsAuth',
  2725. 'label' => 'Minimum Authentication',
  2726. 'value' => $GLOBALS['homepageTautulliViewsAuth'],
  2727. 'options' => $groups
  2728. ),
  2729. ),
  2730. 'Misc Stats' => array(
  2731. array(
  2732. 'type' => 'switch',
  2733. 'name' => 'tautulliTopUsers',
  2734. 'label' => 'Top Users',
  2735. 'value' => $GLOBALS['tautulliTopUsers'],
  2736. 'help' => 'Shows/hides the card with Top Users information.',
  2737. ),
  2738. array(
  2739. 'type' => 'switch',
  2740. 'name' => 'tautulliTopPlatforms',
  2741. 'label' => 'Top Platforms',
  2742. 'value' => $GLOBALS['tautulliTopPlatforms'],
  2743. 'help' => 'Shows/hides the card with Top Platforms information.',
  2744. ),
  2745. array(
  2746. 'type' => 'select',
  2747. 'name' => 'homepageTautulliMiscAuth',
  2748. 'label' => 'Minimum Authentication',
  2749. 'value' => $GLOBALS['homepageTautulliMiscAuth'],
  2750. 'options' => $groups
  2751. ),
  2752. ),
  2753. )
  2754. ),
  2755. array(
  2756. 'name' => 'Monitorr',
  2757. 'enabled' => true,
  2758. 'image' => 'plugins/images/tabs/monitorr.png',
  2759. 'category' => 'Monitor',
  2760. 'settings' => array(
  2761. 'Enable' => array(
  2762. array(
  2763. 'type' => 'switch',
  2764. 'name' => 'homepageMonitorrEnabled',
  2765. 'label' => 'Enable',
  2766. 'value' => $GLOBALS['homepageMonitorrEnabled']
  2767. ),
  2768. array(
  2769. 'type' => 'select',
  2770. 'name' => 'homepageMonitorrAuth',
  2771. 'label' => 'Minimum Authentication',
  2772. 'value' => $GLOBALS['homepageMonitorrAuth'],
  2773. 'options' => $groups
  2774. )
  2775. ),
  2776. 'Connection' => array(
  2777. array(
  2778. 'type' => 'input',
  2779. 'name' => 'monitorrURL',
  2780. 'label' => 'URL',
  2781. 'value' => $GLOBALS['monitorrURL'],
  2782. 'help' => 'URL for Monitorr. Please use the revers proxy URL i.e. https://domain.com/monitorr/.',
  2783. 'placeholder' => 'http://domain.com/monitorr/'
  2784. ),
  2785. array(
  2786. 'type' => 'select',
  2787. 'name' => 'homepageMonitorrRefresh',
  2788. 'label' => 'Refresh Seconds',
  2789. 'value' => $GLOBALS['homepageMonitorrRefresh'],
  2790. 'options' => optionTime()
  2791. ),
  2792. ),
  2793. 'Options' => array(
  2794. array(
  2795. 'type' => 'input',
  2796. 'name' => 'monitorrHeader',
  2797. 'label' => 'Title',
  2798. 'value' => $GLOBALS['monitorrHeader'],
  2799. 'help' => 'Sets the title of this homepage module',
  2800. ),
  2801. array(
  2802. 'type' => 'switch',
  2803. 'name' => 'monitorrHeaderToggle',
  2804. 'label' => 'Toggle Title',
  2805. 'value' => $GLOBALS['monitorrHeaderToggle'],
  2806. 'help' => 'Shows/hides the title of this homepage module'
  2807. ),
  2808. array(
  2809. 'type' => 'switch',
  2810. 'name' => 'monitorrCompact',
  2811. 'label' => 'Compact view',
  2812. 'value' => $GLOBALS['monitorrCompact'],
  2813. 'help' => 'Toggles the compact view of this homepage module'
  2814. ),
  2815. ),
  2816. )
  2817. ),
  2818. array(
  2819. 'name' => 'Weather-Air',
  2820. 'enabled' => true,
  2821. 'image' => 'plugins/images/tabs/wind.png',
  2822. 'category' => 'Monitor',
  2823. 'settings' => array(
  2824. 'Enable' => array(
  2825. array(
  2826. 'type' => 'switch',
  2827. 'name' => 'homepageWeatherAndAirEnabled',
  2828. 'label' => 'Enable',
  2829. 'value' => $GLOBALS['homepageWeatherAndAirEnabled']
  2830. ),
  2831. array(
  2832. 'type' => 'select',
  2833. 'name' => 'homepageWeatherAndAirAuth',
  2834. 'label' => 'Minimum Authentication',
  2835. 'value' => $GLOBALS['homepageWeatherAndAirAuth'],
  2836. 'options' => $groups
  2837. )
  2838. ),
  2839. 'Connection' => array(
  2840. array(
  2841. 'type' => 'input',
  2842. 'name' => 'homepageWeatherAndAirLatitude',
  2843. 'label' => 'Latitude',
  2844. 'value' => $GLOBALS['homepageWeatherAndAirLatitude'],
  2845. 'help' => 'Please enter full latitude including minus if needed'
  2846. ),
  2847. array(
  2848. 'type' => 'input',
  2849. 'name' => 'homepageWeatherAndAirLongitude',
  2850. 'label' => 'Longitude',
  2851. 'value' => $GLOBALS['homepageWeatherAndAirLongitude'],
  2852. 'help' => 'Please enter full longitude including minus if needed'
  2853. ),
  2854. array(
  2855. 'type' => 'blank',
  2856. 'label' => ''
  2857. ),
  2858. array(
  2859. 'type' => 'button',
  2860. 'label' => '',
  2861. 'icon' => 'fa fa-search',
  2862. 'class' => 'pull-right',
  2863. 'text' => 'Need Help With Coordinates?',
  2864. 'attr' => 'onclick="showLookupCoordinatesModal()"'
  2865. ),
  2866. ),
  2867. 'Options' => array(
  2868. array(
  2869. 'type' => 'input',
  2870. 'name' => 'homepageWeatherAndAirWeatherHeader',
  2871. 'label' => 'Title',
  2872. 'value' => $GLOBALS['homepageWeatherAndAirWeatherHeader'],
  2873. 'help' => 'Sets the title of this homepage module',
  2874. ),
  2875. array(
  2876. 'type' => 'switch',
  2877. 'name' => 'homepageWeatherAndAirWeatherHeaderToggle',
  2878. 'label' => 'Toggle Title',
  2879. 'value' => $GLOBALS['homepageWeatherAndAirWeatherHeaderToggle'],
  2880. 'help' => 'Shows/hides the title of this homepage module'
  2881. ),
  2882. array(
  2883. 'type' => 'switch',
  2884. 'name' => 'homepageWeatherAndAirWeatherEnabled',
  2885. 'label' => 'Enable Weather',
  2886. 'value' => $GLOBALS['homepageWeatherAndAirWeatherEnabled'],
  2887. 'help' => 'Toggles the view module for Weather'
  2888. ),
  2889. array(
  2890. 'type' => 'switch',
  2891. 'name' => 'homepageWeatherAndAirAirQualityEnabled',
  2892. 'label' => 'Enable Air Quality',
  2893. 'value' => $GLOBALS['homepageWeatherAndAirAirQualityEnabled'],
  2894. 'help' => 'Toggles the view module for Air Quality'
  2895. ),
  2896. array(
  2897. 'type' => 'switch',
  2898. 'name' => 'homepageWeatherAndAirPollenEnabled',
  2899. 'label' => 'Enable Pollen',
  2900. 'value' => $GLOBALS['homepageWeatherAndAirPollenEnabled'],
  2901. 'help' => 'Toggles the view module for Pollen'
  2902. ),
  2903. array(
  2904. 'type' => 'select',
  2905. 'name' => 'homepageWeatherAndAirUnits',
  2906. 'label' => 'Unit of Measurement',
  2907. 'value' => $GLOBALS['homepageWeatherAndAirUnits'],
  2908. 'options' => array(
  2909. array(
  2910. 'name' => 'Imperial',
  2911. 'value' => 'imperial'
  2912. ),
  2913. array(
  2914. 'name' => 'Metric',
  2915. 'value' => 'metric'
  2916. )
  2917. )
  2918. ),
  2919. array(
  2920. 'type' => 'select',
  2921. 'name' => 'homepageWeatherAndAirRefresh',
  2922. 'label' => 'Refresh Seconds',
  2923. 'value' => $GLOBALS['homepageWeatherAndAirRefresh'],
  2924. 'options' => optionTime()
  2925. ),
  2926. ),
  2927. )
  2928. ),
  2929. array(
  2930. 'name' => 'Speedtest',
  2931. 'enabled' => true,
  2932. 'image' => 'plugins/images/tabs/speedtest-icon.png',
  2933. 'category' => 'Monitor',
  2934. 'settings' => array(
  2935. 'Enable' => array(
  2936. array(
  2937. 'type' => 'html',
  2938. 'override' => 6,
  2939. 'label' => 'Info',
  2940. 'html' => '<p>This homepage item requires <a href="https://github.com/henrywhitaker3/Speedtest-Tracker" target="_blank" rel="noreferrer noopener">Speedtest-Tracker <i class="fa fa-external-link" aria-hidden="true"></i></a> to be running on your network.</p>'
  2941. ),
  2942. array(
  2943. 'type' => 'switch',
  2944. 'name' => 'homepageSpeedtestEnabled',
  2945. 'label' => 'Enable',
  2946. 'value' => $GLOBALS['homepageSpeedtestEnabled']
  2947. ),
  2948. array(
  2949. 'type' => 'select',
  2950. 'name' => 'homepageSpeedtestAuth',
  2951. 'label' => 'Minimum Authentication',
  2952. 'value' => $GLOBALS['homepageSpeedtestAuth'],
  2953. 'options' => $groups
  2954. )
  2955. ),
  2956. 'Connection' => array(
  2957. array(
  2958. 'type' => 'input',
  2959. 'name' => 'speedtestURL',
  2960. 'label' => 'URL',
  2961. 'value' => $GLOBALS['speedtestURL'],
  2962. 'help' => 'Enter the IP:PORT of your speedtest instance e.g. http(s)://<ip>:<port>'
  2963. ),
  2964. ),
  2965. 'Options' => array(
  2966. array(
  2967. 'type' => 'input',
  2968. 'name' => 'speedtestHeader',
  2969. 'label' => 'Title',
  2970. 'value' => $GLOBALS['speedtestHeader'],
  2971. 'help' => 'Sets the title of this homepage module',
  2972. ),
  2973. array(
  2974. 'type' => 'switch',
  2975. 'name' => 'speedtestHeaderToggle',
  2976. 'label' => 'Toggle Title',
  2977. 'value' => $GLOBALS['speedtestHeaderToggle'],
  2978. 'help' => 'Shows/hides the title of this homepage module'
  2979. ),
  2980. ),
  2981. )
  2982. ),
  2983. netdataSettngsArray()
  2984. );
  2985. }
  2986. function buildHomepageSettings()
  2987. {
  2988. $homepageOrder = homepageOrder();
  2989. $homepageList = '<h4>Drag Homepage Items to Order Them</h4><div id="homepage-items-sort" class="external-events">';
  2990. $inputList = '<form id="homepage-values" class="row">';
  2991. foreach ($homepageOrder as $key => $val) {
  2992. switch ($key) {
  2993. case 'homepageOrdercustomhtml':
  2994. $class = 'bg-info';
  2995. $image = 'plugins/images/tabs/custom1.png';
  2996. if (!$GLOBALS['homepagCustomHTMLoneEnabled']) {
  2997. $class .= ' faded';
  2998. }
  2999. break;
  3000. case 'homepageOrdercustomhtmlTwo':
  3001. $class = 'bg-info';
  3002. $image = 'plugins/images/tabs/custom2.png';
  3003. if (!$GLOBALS['homepagCustomHTMLtwoEnabled']) {
  3004. $class .= ' faded';
  3005. }
  3006. break;
  3007. case 'homepageOrdertransmission':
  3008. $class = 'bg-transmission';
  3009. $image = 'plugins/images/tabs/transmission.png';
  3010. if (!$GLOBALS['homepageTransmissionEnabled']) {
  3011. $class .= ' faded';
  3012. }
  3013. break;
  3014. case 'homepageOrdernzbget':
  3015. $class = 'bg-nzbget';
  3016. $image = 'plugins/images/tabs/nzbget.png';
  3017. if (!$GLOBALS['homepageNzbgetEnabled']) {
  3018. $class .= ' faded';
  3019. }
  3020. break;
  3021. case 'homepageOrderjdownloader':
  3022. $class = 'bg-sab';
  3023. $image = 'plugins/images/tabs/jdownloader.png';
  3024. if (!$GLOBALS['homepageJdownloaderEnabled']) {
  3025. $class .= ' faded';
  3026. }
  3027. break;
  3028. case 'homepageOrdersabnzbd':
  3029. $class = 'bg-sab';
  3030. $image = 'plugins/images/tabs/sabnzbd.png';
  3031. if (!$GLOBALS['homepageSabnzbdEnabled']) {
  3032. $class .= ' faded';
  3033. }
  3034. break;
  3035. case 'homepageOrderdeluge':
  3036. $class = 'bg-deluge';
  3037. $image = 'plugins/images/tabs/deluge.png';
  3038. if (!$GLOBALS['homepageDelugeEnabled']) {
  3039. $class .= ' faded';
  3040. }
  3041. break;
  3042. case 'homepageOrderqBittorrent':
  3043. $class = 'bg-qbit';
  3044. $image = 'plugins/images/tabs/qBittorrent.png';
  3045. if (!$GLOBALS['homepageqBittorrentEnabled']) {
  3046. $class .= ' faded';
  3047. }
  3048. break;
  3049. case 'homepageOrderrTorrent':
  3050. $class = 'bg-qbit';
  3051. $image = 'plugins/images/tabs/rTorrent.png';
  3052. if (!$GLOBALS['homepagerTorrentEnabled']) {
  3053. $class .= ' faded';
  3054. }
  3055. break;
  3056. case 'homepageOrderplexnowplaying':
  3057. case 'homepageOrderplexrecent':
  3058. case 'homepageOrderplexplaylist':
  3059. $class = 'bg-plex';
  3060. $image = 'plugins/images/tabs/plex.png';
  3061. if (!$GLOBALS['homepagePlexEnabled']) {
  3062. $class .= ' faded';
  3063. }
  3064. break;
  3065. case 'homepageOrderembynowplaying':
  3066. case 'homepageOrderembyrecent':
  3067. $class = 'bg-emby';
  3068. $image = 'plugins/images/tabs/emby.png';
  3069. if (!$GLOBALS['homepageEmbyEnabled']) {
  3070. $class .= ' faded';
  3071. }
  3072. break;
  3073. case 'homepageOrderombi':
  3074. $class = 'bg-inverse';
  3075. $image = 'plugins/images/tabs/ombi.png';
  3076. if (!$GLOBALS['homepageOmbiEnabled']) {
  3077. $class .= ' faded';
  3078. }
  3079. break;
  3080. case 'homepageOrdercalendar':
  3081. $class = 'bg-primary';
  3082. $image = 'plugins/images/tabs/calendar.png';
  3083. if (!$GLOBALS['homepageSonarrEnabled'] && !$GLOBALS['homepageRadarrEnabled'] && !$GLOBALS['homepageSickrageEnabled'] && !$GLOBALS['homepageCouchpotatoEnabled']) {
  3084. $class .= ' faded';
  3085. }
  3086. break;
  3087. case 'homepageOrderdownloader':
  3088. $class = 'bg-inverse';
  3089. $image = 'plugins/images/tabs/downloader.png';
  3090. if (!$GLOBALS['jdownloaderCombine'] && !$GLOBALS['sabnzbdCombine'] && !$GLOBALS['nzbgetCombine'] && !$GLOBALS['rTorrentCombine'] && !$GLOBALS['delugeCombine'] && !$GLOBALS['transmissionCombine'] && !$GLOBALS['qBittorrentCombine']) {
  3091. $class .= ' faded';
  3092. }
  3093. break;
  3094. case 'homepageOrderhealthchecks':
  3095. $class = 'bg-healthchecks';
  3096. $image = 'plugins/images/tabs/healthchecks.png';
  3097. if (!$GLOBALS['homepageHealthChecksEnabled']) {
  3098. $class .= ' faded';
  3099. }
  3100. break;
  3101. case 'homepageOrderunifi':
  3102. $class = 'bg-info';
  3103. $image = 'plugins/images/tabs/ubnt.png';
  3104. if (!$GLOBALS['homepageUnifiEnabled']) {
  3105. $class .= ' faded';
  3106. }
  3107. break;
  3108. case 'homepageOrdertautulli':
  3109. $class = 'bg-info';
  3110. $image = 'plugins/images/tabs/tautulli.png';
  3111. if (!$GLOBALS['homepageTautulliEnabled']) {
  3112. $class .= ' faded';
  3113. }
  3114. break;
  3115. case 'homepageOrderPihole':
  3116. $class = 'bg-info';
  3117. $image = 'plugins/images/tabs/pihole.png';
  3118. if (!$GLOBALS['homepagePiholeEnabled']) {
  3119. $class .= ' faded';
  3120. }
  3121. break;
  3122. case 'homepageOrderMonitorr':
  3123. $class = 'bg-info';
  3124. $image = 'plugins/images/tabs/monitorr.png';
  3125. if (!$GLOBALS['homepageMonitorrEnabled']) {
  3126. $class .= ' faded';
  3127. }
  3128. break;
  3129. case 'homepageOrderWeatherAndAir':
  3130. $class = 'bg-success';
  3131. $image = 'plugins/images/tabs/wind.png';
  3132. if (!$GLOBALS['homepageWeatherAndAirEnabled']) {
  3133. $class .= ' faded';
  3134. }
  3135. break;
  3136. case 'homepageOrderSpeedtest':
  3137. $class = 'bg-success';
  3138. $image = 'plugins/images/tabs/speedtest-icon.png';
  3139. if (!$GLOBALS['homepageSpeedtestEnabled']) {
  3140. $class .= ' faded';
  3141. }
  3142. break;
  3143. case 'homepageOrderNetdata':
  3144. $class = 'bg-success';
  3145. $image = 'plugins/images/tabs/netdata.png';
  3146. if (!$GLOBALS['homepageNetdataEnabled']) {
  3147. $class .= ' faded';
  3148. }
  3149. break;
  3150. default:
  3151. $class = 'blue-bg';
  3152. $image = '';
  3153. break;
  3154. }
  3155. $homepageList .= '
  3156. <div class="col-md-3 col-xs-12 sort-homepage m-t-10 hvr-grow">
  3157. <div class="homepage-drag fc-event ' . $class . ' lazyload" data-src="' . $image . '">
  3158. <span class="ordinal-position text-uppercase badge bg-org homepage-number" data-link="' . $key . '" style="float:left;width: 30px;">' . $val . '</span>
  3159. <span class="homepage-text">&nbsp; ' . strtoupper(substr($key, 13)) . '</span>
  3160. </div>
  3161. </div>
  3162. ';
  3163. $inputList .= '<input type="hidden" name="' . $key . '">';
  3164. }
  3165. $homepageList .= '</div>';
  3166. $inputList .= '</form>';
  3167. return $homepageList . $inputList;
  3168. }
  3169. function ombiTVDefault($type)
  3170. {
  3171. switch ($type) {
  3172. case 'all':
  3173. return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
  3174. case 'first':
  3175. return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
  3176. case 'last':
  3177. return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
  3178. default:
  3179. return false;
  3180. }
  3181. return false;
  3182. }