homepage-functions.php 90 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200
  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['homepageLidarrEnabled'] && qualifyRequest($GLOBALS['homepageLidarrAuth']) || $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.',
  988. 'placeholder' => 'http(s)://hostname:port'
  989. ),
  990. array(
  991. 'type' => 'password-alt',
  992. 'name' => 'embyToken',
  993. 'label' => 'Token',
  994. 'value' => $GLOBALS['embyToken']
  995. ),
  996. array(
  997. 'type' => 'switch',
  998. 'name' => 'homepageJellyfinInstead',
  999. 'label' => 'Jellyfin',
  1000. 'value' => $GLOBALS['homepageJellyfinInstead']
  1001. )
  1002. ),
  1003. 'Active Streams' => array(
  1004. array(
  1005. 'type' => 'switch',
  1006. 'name' => 'homepageEmbyStreams',
  1007. 'label' => 'Enable',
  1008. 'value' => $GLOBALS['homepageEmbyStreams']
  1009. ),
  1010. array(
  1011. 'type' => 'select',
  1012. 'name' => 'homepageEmbyStreamsAuth',
  1013. 'label' => 'Minimum Authorization',
  1014. 'value' => $GLOBALS['homepageEmbyStreamsAuth'],
  1015. 'options' => $groups
  1016. ),
  1017. array(
  1018. 'type' => 'switch',
  1019. 'name' => 'homepageShowStreamNames',
  1020. 'label' => 'User Information',
  1021. 'value' => $GLOBALS['homepageShowStreamNames']
  1022. ),
  1023. array(
  1024. 'type' => 'select',
  1025. 'name' => 'homepageShowStreamNamesAuth',
  1026. 'label' => 'Minimum Authorization',
  1027. 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
  1028. 'options' => $groups
  1029. ),
  1030. array(
  1031. 'type' => 'select',
  1032. 'name' => 'homepageStreamRefresh',
  1033. 'label' => 'Refresh Seconds',
  1034. 'value' => $GLOBALS['homepageStreamRefresh'],
  1035. 'options' => optionTime()
  1036. ),
  1037. ),
  1038. 'Recent Items' => array(
  1039. array(
  1040. 'type' => 'switch',
  1041. 'name' => 'homepageEmbyRecent',
  1042. 'label' => 'Enable',
  1043. 'value' => $GLOBALS['homepageEmbyRecent']
  1044. ),
  1045. array(
  1046. 'type' => 'select',
  1047. 'name' => 'homepageEmbyRecentAuth',
  1048. 'label' => 'Minimum Authorization',
  1049. 'value' => $GLOBALS['homepageEmbyRecentAuth'],
  1050. 'options' => $groups
  1051. ),
  1052. array(
  1053. 'type' => 'number',
  1054. 'name' => 'homepageRecentLimit',
  1055. 'label' => 'Item Limit',
  1056. 'value' => $GLOBALS['homepageRecentLimit'],
  1057. ),
  1058. array(
  1059. 'type' => 'select',
  1060. 'name' => 'homepageRecentRefresh',
  1061. 'label' => 'Refresh Seconds',
  1062. 'value' => $GLOBALS['homepageRecentRefresh'],
  1063. 'options' => optionTime()
  1064. ),
  1065. ),
  1066. 'Misc Options' => array(
  1067. array(
  1068. 'type' => 'input',
  1069. 'name' => 'embyTabName',
  1070. 'label' => 'Emby Tab Name',
  1071. 'value' => $GLOBALS['embyTabName'],
  1072. 'placeholder' => 'Only use if you have Emby in a reverse proxy'
  1073. ),
  1074. array(
  1075. 'type' => 'input',
  1076. 'name' => 'embyTabURL',
  1077. 'label' => 'Emby Tab WAN URL',
  1078. 'value' => $GLOBALS['embyTabURL'],
  1079. 'placeholder' => 'http(s)://hostname:port'
  1080. ),
  1081. array(
  1082. 'type' => 'select',
  1083. 'name' => 'cacheImageSize',
  1084. 'label' => 'Image Cache Size',
  1085. 'value' => $GLOBALS['cacheImageSize'],
  1086. 'options' => array(
  1087. array(
  1088. 'name' => 'Low',
  1089. 'value' => '.5'
  1090. ),
  1091. array(
  1092. 'name' => '1x',
  1093. 'value' => '1'
  1094. ),
  1095. array(
  1096. 'name' => '2x',
  1097. 'value' => '2'
  1098. ),
  1099. array(
  1100. 'name' => '3x',
  1101. 'value' => '3'
  1102. )
  1103. )
  1104. )
  1105. )
  1106. )
  1107. ),
  1108. array(
  1109. 'name' => 'JDownloader',
  1110. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1111. 'image' => 'plugins/images/tabs/jdownloader.png',
  1112. 'category' => 'Downloader',
  1113. 'settings' => array(
  1114. 'custom' => '
  1115. <div class="row">
  1116. <div class="col-lg-12">
  1117. <div class="panel panel-info">
  1118. <div class="panel-heading">
  1119. <span lang="en">Notice</span>
  1120. </div>
  1121. <div class="panel-wrapper collapse in" aria-expanded="true">
  1122. <div class="panel-body">
  1123. <ul class="list-icons">
  1124. <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>
  1125. <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>
  1126. </ul>
  1127. </div>
  1128. </div>
  1129. </div>
  1130. </div>
  1131. </div>
  1132. ',
  1133. 'Enable' => array(
  1134. array(
  1135. 'type' => 'switch',
  1136. 'name' => 'homepageJdownloaderEnabled',
  1137. 'label' => 'Enable',
  1138. 'value' => $GLOBALS['homepageJdownloaderEnabled']
  1139. ),
  1140. array(
  1141. 'type' => 'select',
  1142. 'name' => 'homepageJdownloaderAuth',
  1143. 'label' => 'Minimum Authentication',
  1144. 'value' => $GLOBALS['homepageJdownloaderAuth'],
  1145. 'options' => $groups
  1146. )
  1147. ),
  1148. 'Connection' => array(
  1149. array(
  1150. 'type' => 'input',
  1151. 'name' => 'jdownloaderURL',
  1152. 'label' => 'URL',
  1153. 'value' => $GLOBALS['jdownloaderURL'],
  1154. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1155. 'placeholder' => 'http(s)://hostname:port'
  1156. )
  1157. ),
  1158. 'Misc Options' => array(
  1159. array(
  1160. 'type' => 'select',
  1161. 'name' => 'homepageDownloadRefresh',
  1162. 'label' => 'Refresh Seconds',
  1163. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1164. 'options' => optionTime()
  1165. ),
  1166. array(
  1167. 'type' => 'switch',
  1168. 'name' => 'jdownloaderCombine',
  1169. 'label' => 'Add to Combined Downloader',
  1170. 'value' => $GLOBALS['jdownloaderCombine']
  1171. ),
  1172. ),
  1173. 'Test Connection' => array(
  1174. array(
  1175. 'type' => 'blank',
  1176. 'label' => 'Please Save before Testing'
  1177. ),
  1178. array(
  1179. 'type' => 'button',
  1180. 'label' => '',
  1181. 'icon' => 'fa fa-flask',
  1182. 'class' => 'pull-right',
  1183. 'text' => 'Test Connection',
  1184. 'attr' => 'onclick="testAPIConnection(\'jdownloader\')"'
  1185. ),
  1186. )
  1187. )
  1188. ),
  1189. array(
  1190. 'name' => 'SabNZBD',
  1191. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1192. 'image' => 'plugins/images/tabs/sabnzbd.png',
  1193. 'category' => 'Downloader',
  1194. 'settings' => array(
  1195. 'Enable' => array(
  1196. array(
  1197. 'type' => 'switch',
  1198. 'name' => 'homepageSabnzbdEnabled',
  1199. 'label' => 'Enable',
  1200. 'value' => $GLOBALS['homepageSabnzbdEnabled']
  1201. ),
  1202. array(
  1203. 'type' => 'select',
  1204. 'name' => 'homepageSabnzbdAuth',
  1205. 'label' => 'Minimum Authentication',
  1206. 'value' => $GLOBALS['homepageSabnzbdAuth'],
  1207. 'options' => $groups
  1208. )
  1209. ),
  1210. 'Connection' => array(
  1211. array(
  1212. 'type' => 'input',
  1213. 'name' => 'sabnzbdURL',
  1214. 'label' => 'URL',
  1215. 'value' => $GLOBALS['sabnzbdURL'],
  1216. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1217. 'placeholder' => 'http(s)://hostname:port'
  1218. ),
  1219. array(
  1220. 'type' => 'password-alt',
  1221. 'name' => 'sabnzbdToken',
  1222. 'label' => 'Token',
  1223. 'value' => $GLOBALS['sabnzbdToken']
  1224. )
  1225. ),
  1226. 'Misc Options' => array(
  1227. array(
  1228. 'type' => 'select',
  1229. 'name' => 'homepageDownloadRefresh',
  1230. 'label' => 'Refresh Seconds',
  1231. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1232. 'options' => optionTime()
  1233. ),
  1234. array(
  1235. 'type' => 'switch',
  1236. 'name' => 'sabnzbdCombine',
  1237. 'label' => 'Add to Combined Downloader',
  1238. 'value' => $GLOBALS['sabnzbdCombine']
  1239. ),
  1240. ),
  1241. 'Test Connection' => array(
  1242. array(
  1243. 'type' => 'blank',
  1244. 'label' => 'Please Save before Testing'
  1245. ),
  1246. array(
  1247. 'type' => 'button',
  1248. 'label' => '',
  1249. 'icon' => 'fa fa-flask',
  1250. 'class' => 'pull-right',
  1251. 'text' => 'Test Connection',
  1252. 'attr' => 'onclick="testAPIConnection(\'sabnzbd\')"'
  1253. ),
  1254. )
  1255. )
  1256. ),
  1257. array(
  1258. 'name' => 'NZBGet',
  1259. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1260. 'image' => 'plugins/images/tabs/nzbget.png',
  1261. 'category' => 'Downloader',
  1262. 'settings' => array(
  1263. 'Enable' => array(
  1264. array(
  1265. 'type' => 'switch',
  1266. 'name' => 'homepageNzbgetEnabled',
  1267. 'label' => 'Enable',
  1268. 'value' => $GLOBALS['homepageNzbgetEnabled']
  1269. ),
  1270. array(
  1271. 'type' => 'select',
  1272. 'name' => 'homepageNzbgetAuth',
  1273. 'label' => 'Minimum Authentication',
  1274. 'value' => $GLOBALS['homepageNzbgetAuth'],
  1275. 'options' => $groups
  1276. )
  1277. ),
  1278. 'Connection' => array(
  1279. array(
  1280. 'type' => 'input',
  1281. 'name' => 'nzbgetURL',
  1282. 'label' => 'URL',
  1283. 'value' => $GLOBALS['nzbgetURL'],
  1284. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1285. 'placeholder' => 'http(s)://hostname:port'
  1286. ),
  1287. array(
  1288. 'type' => 'input',
  1289. 'name' => 'nzbgetUsername',
  1290. 'label' => 'Username',
  1291. 'value' => $GLOBALS['nzbgetUsername']
  1292. ),
  1293. array(
  1294. 'type' => 'password',
  1295. 'name' => 'nzbgetPassword',
  1296. 'label' => 'Password',
  1297. 'value' => $GLOBALS['nzbgetPassword']
  1298. )
  1299. ),
  1300. 'Misc Options' => array(
  1301. array(
  1302. 'type' => 'select',
  1303. 'name' => 'homepageDownloadRefresh',
  1304. 'label' => 'Refresh Seconds',
  1305. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1306. 'options' => optionTime()
  1307. ),
  1308. array(
  1309. 'type' => 'switch',
  1310. 'name' => 'nzbgetCombine',
  1311. 'label' => 'Add to Combined Downloader',
  1312. 'value' => $GLOBALS['nzbgetCombine']
  1313. ),
  1314. ),
  1315. 'Test Connection' => array(
  1316. array(
  1317. 'type' => 'blank',
  1318. 'label' => 'Please Save before Testing'
  1319. ),
  1320. array(
  1321. 'type' => 'button',
  1322. 'label' => '',
  1323. 'icon' => 'fa fa-flask',
  1324. 'class' => 'pull-right',
  1325. 'text' => 'Test Connection',
  1326. 'attr' => 'onclick="testAPIConnection(\'nzbget\')"'
  1327. ),
  1328. )
  1329. )
  1330. ),
  1331. array(
  1332. 'name' => 'Transmission',
  1333. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1334. 'image' => 'plugins/images/tabs/transmission.png',
  1335. 'category' => 'Downloader',
  1336. 'settings' => array(
  1337. 'Enable' => array(
  1338. array(
  1339. 'type' => 'switch',
  1340. 'name' => 'homepageTransmissionEnabled',
  1341. 'label' => 'Enable',
  1342. 'value' => $GLOBALS['homepageTransmissionEnabled']
  1343. ),
  1344. array(
  1345. 'type' => 'select',
  1346. 'name' => 'homepageTransmissionAuth',
  1347. 'label' => 'Minimum Authentication',
  1348. 'value' => $GLOBALS['homepageTransmissionAuth'],
  1349. 'options' => $groups
  1350. )
  1351. ),
  1352. 'Connection' => array(
  1353. array(
  1354. 'type' => 'input',
  1355. 'name' => 'transmissionURL',
  1356. 'label' => 'URL',
  1357. 'value' => $GLOBALS['transmissionURL'],
  1358. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1359. 'placeholder' => 'http(s)://hostname:port'
  1360. ),
  1361. array(
  1362. 'type' => 'input',
  1363. 'name' => 'transmissionUsername',
  1364. 'label' => 'Username',
  1365. 'value' => $GLOBALS['transmissionUsername']
  1366. ),
  1367. array(
  1368. 'type' => 'password',
  1369. 'name' => 'transmissionPassword',
  1370. 'label' => 'Password',
  1371. 'value' => $GLOBALS['transmissionPassword']
  1372. )
  1373. ),
  1374. 'Misc Options' => array(
  1375. array(
  1376. 'type' => 'switch',
  1377. 'name' => 'transmissionHideSeeding',
  1378. 'label' => 'Hide Seeding',
  1379. 'value' => $GLOBALS['transmissionHideSeeding']
  1380. ), array(
  1381. 'type' => 'switch',
  1382. 'name' => 'transmissionHideCompleted',
  1383. 'label' => 'Hide Completed',
  1384. 'value' => $GLOBALS['transmissionHideCompleted']
  1385. ),
  1386. array(
  1387. 'type' => 'select',
  1388. 'name' => 'homepageDownloadRefresh',
  1389. 'label' => 'Refresh Seconds',
  1390. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1391. 'options' => optionTime()
  1392. ),
  1393. array(
  1394. 'type' => 'switch',
  1395. 'name' => 'transmissionCombine',
  1396. 'label' => 'Add to Combined Downloader',
  1397. 'value' => $GLOBALS['transmissionCombine']
  1398. ),
  1399. )
  1400. )
  1401. ),
  1402. array(
  1403. 'name' => 'qBittorrent',
  1404. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1405. 'image' => 'plugins/images/tabs/qBittorrent.png',
  1406. 'category' => 'Downloader',
  1407. 'settings' => array(
  1408. 'Enable' => array(
  1409. array(
  1410. 'type' => 'switch',
  1411. 'name' => 'homepageqBittorrentEnabled',
  1412. 'label' => 'Enable',
  1413. 'value' => $GLOBALS['homepageqBittorrentEnabled']
  1414. ),
  1415. array(
  1416. 'type' => 'select',
  1417. 'name' => 'homepageqBittorrentAuth',
  1418. 'label' => 'Minimum Authentication',
  1419. 'value' => $GLOBALS['homepageqBittorrentAuth'],
  1420. 'options' => $groups
  1421. )
  1422. ),
  1423. 'Connection' => array(
  1424. array(
  1425. 'type' => 'input',
  1426. 'name' => 'qBittorrentURL',
  1427. 'label' => 'URL',
  1428. 'value' => $GLOBALS['qBittorrentURL'],
  1429. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1430. 'placeholder' => 'http(s)://hostname:port'
  1431. ),
  1432. array(
  1433. 'type' => 'select',
  1434. 'name' => 'qBittorrentApiVersion',
  1435. 'label' => 'API Version',
  1436. 'value' => $GLOBALS['qBittorrentApiVersion'],
  1437. 'options' => $qBittorrentApiOptions
  1438. ),
  1439. array(
  1440. 'type' => 'input',
  1441. 'name' => 'qBittorrentUsername',
  1442. 'label' => 'Username',
  1443. 'value' => $GLOBALS['qBittorrentUsername']
  1444. ),
  1445. array(
  1446. 'type' => 'password',
  1447. 'name' => 'qBittorrentPassword',
  1448. 'label' => 'Password',
  1449. 'value' => $GLOBALS['qBittorrentPassword']
  1450. )
  1451. ),
  1452. 'Misc Options' => array(
  1453. array(
  1454. 'type' => 'switch',
  1455. 'name' => 'qBittorrentHideSeeding',
  1456. 'label' => 'Hide Seeding',
  1457. 'value' => $GLOBALS['qBittorrentHideSeeding']
  1458. ),
  1459. array(
  1460. 'type' => 'switch',
  1461. 'name' => 'qBittorrentHideCompleted',
  1462. 'label' => 'Hide Completed',
  1463. 'value' => $GLOBALS['qBittorrentHideCompleted']
  1464. ),
  1465. array(
  1466. 'type' => 'select',
  1467. 'name' => 'qBittorrentSortOrder',
  1468. 'label' => 'Order',
  1469. 'value' => $GLOBALS['qBittorrentSortOrder'],
  1470. 'options' => $qBittorrentSortOptions
  1471. ), array(
  1472. 'type' => 'switch',
  1473. 'name' => 'qBittorrentReverseSorting',
  1474. 'label' => 'Reverse Sorting',
  1475. 'value' => $GLOBALS['qBittorrentReverseSorting']
  1476. ),
  1477. array(
  1478. 'type' => 'select',
  1479. 'name' => 'homepageDownloadRefresh',
  1480. 'label' => 'Refresh Seconds',
  1481. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1482. 'options' => optionTime()
  1483. ),
  1484. array(
  1485. 'type' => 'switch',
  1486. 'name' => 'qBittorrentCombine',
  1487. 'label' => 'Add to Combined Downloader',
  1488. 'value' => $GLOBALS['qBittorrentCombine']
  1489. ),
  1490. )
  1491. )
  1492. ),
  1493. array(
  1494. 'name' => 'rTorrent',
  1495. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1496. 'image' => 'plugins/images/tabs/rTorrent.png',
  1497. 'category' => 'Downloader',
  1498. 'settings' => array(
  1499. 'FYI' => array(
  1500. array(
  1501. 'type' => 'html',
  1502. 'label' => '',
  1503. 'override' => 12,
  1504. 'html' => '
  1505. <div class="row">
  1506. <div class="col-lg-12">
  1507. <div class="panel panel-info">
  1508. <div class="panel-heading">
  1509. <span lang="en">ATTENTION</span>
  1510. </div>
  1511. <div class="panel-wrapper collapse in" aria-expanded="true">
  1512. <div class="panel-body">
  1513. <h4 lang="en">This module requires XMLRPC</h4>
  1514. <span lang="en">Status: [ <b>' . $xmlStatus . '</b> ]</span>
  1515. <br/></br>
  1516. <span lang="en">
  1517. <h4><b>Note about API URL</b></h4>
  1518. Organizr appends the url with <code>/RPC2</code> unless the URL ends in <code>.php</code><br/>
  1519. <h5>Possible URLs:</h5>
  1520. <li>http://localhost:8080</li>
  1521. <li>https://domain.site/xmlrpc.php</li>
  1522. <li>https://seedbox.site/rutorrent/plugins/httprpc/action.php</li>
  1523. </span>
  1524. </div>
  1525. </div>
  1526. </div>
  1527. </div>
  1528. </div>
  1529. '
  1530. )
  1531. ),
  1532. 'Enable' => array(
  1533. array(
  1534. 'type' => 'switch',
  1535. 'name' => 'homepagerTorrentEnabled',
  1536. 'label' => 'Enable',
  1537. 'value' => $GLOBALS['homepagerTorrentEnabled']
  1538. ),
  1539. array(
  1540. 'type' => 'select',
  1541. 'name' => 'homepagerTorrentAuth',
  1542. 'label' => 'Minimum Authentication',
  1543. 'value' => $GLOBALS['homepagerTorrentAuth'],
  1544. 'options' => $groups
  1545. )
  1546. ),
  1547. 'Connection' => array(
  1548. array(
  1549. 'type' => 'input',
  1550. 'name' => 'rTorrentURL',
  1551. 'label' => 'URL',
  1552. 'value' => $GLOBALS['rTorrentURL'],
  1553. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1554. 'placeholder' => 'http(s)://hostname:port'
  1555. ),
  1556. array(
  1557. 'type' => 'input',
  1558. 'name' => 'rTorrentURLOverride',
  1559. 'label' => 'rTorrent API URL Override',
  1560. 'value' => $GLOBALS['rTorrentURLOverride'],
  1561. '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.',
  1562. 'placeholder' => 'http(s)://hostname:port/xmlrpc'
  1563. ),
  1564. array(
  1565. 'type' => 'input',
  1566. 'name' => 'rTorrentUsername',
  1567. 'label' => 'Username',
  1568. 'value' => $GLOBALS['rTorrentUsername']
  1569. ),
  1570. array(
  1571. 'type' => 'password',
  1572. 'name' => 'rTorrentPassword',
  1573. 'label' => 'Password',
  1574. 'value' => $GLOBALS['rTorrentPassword']
  1575. ),
  1576. array(
  1577. 'type' => 'switch',
  1578. 'name' => 'rTorrentDisableCertCheck',
  1579. 'label' => 'Disable Certificate Check',
  1580. 'value' => $GLOBALS['rTorrentDisableCertCheck']
  1581. ),
  1582. ),
  1583. 'Misc Options' => array(
  1584. array(
  1585. 'type' => 'switch',
  1586. 'name' => 'rTorrentHideSeeding',
  1587. 'label' => 'Hide Seeding',
  1588. 'value' => $GLOBALS['rTorrentHideSeeding']
  1589. ), array(
  1590. 'type' => 'switch',
  1591. 'name' => 'rTorrentHideCompleted',
  1592. 'label' => 'Hide Completed',
  1593. 'value' => $GLOBALS['rTorrentHideCompleted']
  1594. ),
  1595. array(
  1596. 'type' => 'select',
  1597. 'name' => 'rTorrentSortOrder',
  1598. 'label' => 'Order',
  1599. 'value' => $GLOBALS['rTorrentSortOrder'],
  1600. 'options' => $rTorrentSortOptions
  1601. ),
  1602. array(
  1603. 'type' => 'select',
  1604. 'name' => 'homepageDownloadRefresh',
  1605. 'label' => 'Refresh Seconds',
  1606. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1607. 'options' => optionTime()
  1608. ),
  1609. array(
  1610. 'type' => 'number',
  1611. 'name' => 'rTorrentLimit',
  1612. 'label' => 'Item Limit',
  1613. 'value' => $GLOBALS['rTorrentLimit'],
  1614. ),
  1615. array(
  1616. 'type' => 'switch',
  1617. 'name' => 'rTorrentCombine',
  1618. 'label' => 'Add to Combined Downloader',
  1619. 'value' => $GLOBALS['rTorrentCombine']
  1620. ),
  1621. ),
  1622. 'Test Connection' => array(
  1623. array(
  1624. 'type' => 'blank',
  1625. 'label' => 'Please Save before Testing'
  1626. ),
  1627. array(
  1628. 'type' => 'button',
  1629. 'label' => '',
  1630. 'icon' => 'fa fa-flask',
  1631. 'class' => 'pull-right',
  1632. 'text' => 'Test Connection',
  1633. 'attr' => 'onclick="testAPIConnection(\'rtorrent\')"'
  1634. ),
  1635. )
  1636. )
  1637. ),
  1638. array(
  1639. 'name' => 'Deluge',
  1640. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1641. 'image' => 'plugins/images/tabs/deluge.png',
  1642. 'category' => 'Downloader',
  1643. 'settings' => array(
  1644. 'custom' => '
  1645. <div class="row">
  1646. <div class="col-lg-12">
  1647. <div class="panel panel-info">
  1648. <div class="panel-heading">
  1649. <span lang="en">Notice</span>
  1650. </div>
  1651. <div class="panel-wrapper collapse in" aria-expanded="true">
  1652. <div class="panel-body">
  1653. <ul class="list-icons">
  1654. <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>
  1655. <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>
  1656. <li><i class="fa fa-chevron-right text-danger"></i> Activate WebAPI plugin </li>
  1657. </ul>
  1658. </div>
  1659. </div>
  1660. </div>
  1661. </div>
  1662. </div>
  1663. ',
  1664. 'Enable' => array(
  1665. array(
  1666. 'type' => 'switch',
  1667. 'name' => 'homepageDelugeEnabled',
  1668. 'label' => 'Enable',
  1669. 'value' => $GLOBALS['homepageDelugeEnabled']
  1670. ),
  1671. array(
  1672. 'type' => 'select',
  1673. 'name' => 'homepageDelugeAuth',
  1674. 'label' => 'Minimum Authentication',
  1675. 'value' => $GLOBALS['homepageDelugeAuth'],
  1676. 'options' => $groups
  1677. )
  1678. ),
  1679. 'Connection' => array(
  1680. array(
  1681. 'type' => 'input',
  1682. 'name' => 'delugeURL',
  1683. 'label' => 'URL',
  1684. 'value' => $GLOBALS['delugeURL'],
  1685. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1686. 'placeholder' => 'http(s)://hostname:port'
  1687. ),
  1688. array(
  1689. 'type' => 'password',
  1690. 'name' => 'delugePassword',
  1691. 'label' => 'Password',
  1692. 'value' => $GLOBALS['delugePassword']
  1693. )
  1694. ),
  1695. 'Misc Options' => array(
  1696. array(
  1697. 'type' => 'switch',
  1698. 'name' => 'delugeHideSeeding',
  1699. 'label' => 'Hide Seeding',
  1700. 'value' => $GLOBALS['delugeHideSeeding']
  1701. ), array(
  1702. 'type' => 'switch',
  1703. 'name' => 'delugeHideCompleted',
  1704. 'label' => 'Hide Completed',
  1705. 'value' => $GLOBALS['delugeHideCompleted']
  1706. ),
  1707. array(
  1708. 'type' => 'select',
  1709. 'name' => 'homepageDownloadRefresh',
  1710. 'label' => 'Refresh Seconds',
  1711. 'value' => $GLOBALS['homepageDownloadRefresh'],
  1712. 'options' => optionTime()
  1713. ),
  1714. array(
  1715. 'type' => 'switch',
  1716. 'name' => 'delugeCombine',
  1717. 'label' => 'Add to Combined Downloader',
  1718. 'value' => $GLOBALS['delugeCombine']
  1719. ),
  1720. ),
  1721. 'Test Connection' => array(
  1722. array(
  1723. 'type' => 'blank',
  1724. 'label' => 'Please Save before Testing'
  1725. ),
  1726. array(
  1727. 'type' => 'button',
  1728. 'label' => '',
  1729. 'icon' => 'fa fa-flask',
  1730. 'class' => 'pull-right',
  1731. 'text' => 'Test Connection',
  1732. 'attr' => 'onclick="testAPIConnection(\'deluge\')"'
  1733. ),
  1734. )
  1735. )
  1736. ),
  1737. array(
  1738. 'name' => 'Sonarr',
  1739. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1740. 'image' => 'plugins/images/tabs/sonarr.png',
  1741. 'category' => 'PVR',
  1742. 'settings' => array(
  1743. 'Enable' => array(
  1744. array(
  1745. 'type' => 'switch',
  1746. 'name' => 'homepageSonarrEnabled',
  1747. 'label' => 'Enable',
  1748. 'value' => $GLOBALS['homepageSonarrEnabled']
  1749. ),
  1750. array(
  1751. 'type' => 'select',
  1752. 'name' => 'homepageSonarrAuth',
  1753. 'label' => 'Minimum Authentication',
  1754. 'value' => $GLOBALS['homepageSonarrAuth'],
  1755. 'options' => $groups
  1756. )
  1757. ),
  1758. 'Connection' => array(
  1759. array(
  1760. 'type' => 'input',
  1761. 'name' => 'sonarrURL',
  1762. 'label' => 'URL',
  1763. 'value' => $GLOBALS['sonarrURL'],
  1764. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1765. 'placeholder' => 'http(s)://hostname:port'
  1766. ),
  1767. array(
  1768. 'type' => 'password-alt',
  1769. 'name' => 'sonarrToken',
  1770. 'label' => 'Token',
  1771. 'value' => $GLOBALS['sonarrToken']
  1772. )
  1773. ),
  1774. 'Misc Options' => array(
  1775. array(
  1776. 'type' => 'number',
  1777. 'name' => 'calendarStart',
  1778. 'label' => '# of Days Before',
  1779. 'value' => $GLOBALS['calendarStart'],
  1780. 'placeholder' => ''
  1781. ),
  1782. array(
  1783. 'type' => 'number',
  1784. 'name' => 'calendarEnd',
  1785. 'label' => '# of Days After',
  1786. 'value' => $GLOBALS['calendarEnd'],
  1787. 'placeholder' => ''
  1788. ),
  1789. array(
  1790. 'type' => 'select',
  1791. 'name' => 'calendarFirstDay',
  1792. 'label' => 'Start Day',
  1793. 'value' => $GLOBALS['calendarFirstDay'],
  1794. 'options' => $day
  1795. ),
  1796. array(
  1797. 'type' => 'select',
  1798. 'name' => 'calendarDefault',
  1799. 'label' => 'Default View',
  1800. 'value' => $GLOBALS['calendarDefault'],
  1801. 'options' => $calendarDefault
  1802. ),
  1803. array(
  1804. 'type' => 'select',
  1805. 'name' => 'calendarTimeFormat',
  1806. 'label' => 'Time Format',
  1807. 'value' => $GLOBALS['calendarTimeFormat'],
  1808. 'options' => $timeFormat
  1809. ),
  1810. array(
  1811. 'type' => 'select',
  1812. 'name' => 'calendarLimit',
  1813. 'label' => 'Items Per Day',
  1814. 'value' => $GLOBALS['calendarLimit'],
  1815. 'options' => $limit
  1816. ),
  1817. array(
  1818. 'type' => 'select',
  1819. 'name' => 'calendarRefresh',
  1820. 'label' => 'Refresh Seconds',
  1821. 'value' => $GLOBALS['calendarRefresh'],
  1822. 'options' => optionTime()
  1823. ),
  1824. array(
  1825. 'type' => 'switch',
  1826. 'name' => 'sonarrUnmonitored',
  1827. 'label' => 'Show Unmonitored',
  1828. 'value' => $GLOBALS['sonarrUnmonitored']
  1829. )
  1830. ),
  1831. 'Test Connection' => array(
  1832. array(
  1833. 'type' => 'blank',
  1834. 'label' => 'Please Save before Testing'
  1835. ),
  1836. array(
  1837. 'type' => 'button',
  1838. 'label' => '',
  1839. 'icon' => 'fa fa-flask',
  1840. 'class' => 'pull-right',
  1841. 'text' => 'Test Connection',
  1842. 'attr' => 'onclick="testAPIConnection(\'sonarr\')"'
  1843. ),
  1844. )
  1845. )
  1846. ),
  1847. array(
  1848. 'name' => 'Lidarr',
  1849. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1850. 'image' => 'plugins/images/tabs/lidarr.png',
  1851. 'category' => 'PMR',
  1852. 'settings' => array(
  1853. 'Enable' => array(
  1854. array(
  1855. 'type' => 'switch',
  1856. 'name' => 'homepageLidarrEnabled',
  1857. 'label' => 'Enable',
  1858. 'value' => $GLOBALS['homepageLidarrEnabled']
  1859. ),
  1860. array(
  1861. 'type' => 'select',
  1862. 'name' => 'homepageLidarrAuth',
  1863. 'label' => 'Minimum Authentication',
  1864. 'value' => $GLOBALS['homepageLidarrAuth'],
  1865. 'options' => $groups
  1866. )
  1867. ),
  1868. 'Connection' => array(
  1869. array(
  1870. 'type' => 'input',
  1871. 'name' => 'lidarrURL',
  1872. 'label' => 'URL',
  1873. 'value' => $GLOBALS['lidarrURL'],
  1874. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1875. 'placeholder' => 'http(s)://hostname:port'
  1876. ),
  1877. array(
  1878. 'type' => 'password-alt',
  1879. 'name' => 'lidarrToken',
  1880. 'label' => 'Token',
  1881. 'value' => $GLOBALS['lidarrToken']
  1882. )
  1883. ),
  1884. 'Misc Options' => array(
  1885. array(
  1886. 'type' => 'number',
  1887. 'name' => 'calendarStart',
  1888. 'label' => '# of Days Before',
  1889. 'value' => $GLOBALS['calendarStart'],
  1890. 'placeholder' => ''
  1891. ),
  1892. array(
  1893. 'type' => 'number',
  1894. 'name' => 'calendarEnd',
  1895. 'label' => '# of Days After',
  1896. 'value' => $GLOBALS['calendarEnd'],
  1897. 'placeholder' => ''
  1898. ),
  1899. array(
  1900. 'type' => 'select',
  1901. 'name' => 'calendarFirstDay',
  1902. 'label' => 'Start Day',
  1903. 'value' => $GLOBALS['calendarFirstDay'],
  1904. 'options' => $day
  1905. ),
  1906. array(
  1907. 'type' => 'select',
  1908. 'name' => 'calendarDefault',
  1909. 'label' => 'Default View',
  1910. 'value' => $GLOBALS['calendarDefault'],
  1911. 'options' => $calendarDefault
  1912. ),
  1913. array(
  1914. 'type' => 'select',
  1915. 'name' => 'calendarTimeFormat',
  1916. 'label' => 'Time Format',
  1917. 'value' => $GLOBALS['calendarTimeFormat'],
  1918. 'options' => $timeFormat
  1919. ),
  1920. array(
  1921. 'type' => 'select',
  1922. 'name' => 'calendarLimit',
  1923. 'label' => 'Items Per Day',
  1924. 'value' => $GLOBALS['calendarLimit'],
  1925. 'options' => $limit
  1926. ),
  1927. array(
  1928. 'type' => 'select',
  1929. 'name' => 'calendarRefresh',
  1930. 'label' => 'Refresh Seconds',
  1931. 'value' => $GLOBALS['calendarRefresh'],
  1932. 'options' => optionTime()
  1933. ),
  1934. ),
  1935. 'Test Connection' => array(
  1936. array(
  1937. 'type' => 'blank',
  1938. 'label' => 'Please Save before Testing'
  1939. ),
  1940. array(
  1941. 'type' => 'button',
  1942. 'label' => '',
  1943. 'icon' => 'fa fa-flask',
  1944. 'class' => 'pull-right',
  1945. 'text' => 'Test Connection',
  1946. 'attr' => 'onclick="testAPIConnection(\'lidarr\')"'
  1947. ),
  1948. )
  1949. )
  1950. ),
  1951. array(
  1952. 'name' => 'Radarr',
  1953. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  1954. 'image' => 'plugins/images/tabs/radarr.png',
  1955. 'category' => 'PVR',
  1956. 'settings' => array(
  1957. 'Enable' => array(
  1958. array(
  1959. 'type' => 'switch',
  1960. 'name' => 'homepageRadarrEnabled',
  1961. 'label' => 'Enable',
  1962. 'value' => $GLOBALS['homepageRadarrEnabled']
  1963. ),
  1964. array(
  1965. 'type' => 'select',
  1966. 'name' => 'homepageRadarrAuth',
  1967. 'label' => 'Minimum Authentication',
  1968. 'value' => $GLOBALS['homepageRadarrAuth'],
  1969. 'options' => $groups
  1970. )
  1971. ),
  1972. 'Connection' => array(
  1973. array(
  1974. 'type' => 'input',
  1975. 'name' => 'radarrURL',
  1976. 'label' => 'URL',
  1977. 'value' => $GLOBALS['radarrURL'],
  1978. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  1979. 'placeholder' => 'http(s)://hostname:port'
  1980. ),
  1981. array(
  1982. 'type' => 'password-alt',
  1983. 'name' => 'radarrToken',
  1984. 'label' => 'Token',
  1985. 'value' => $GLOBALS['radarrToken']
  1986. )
  1987. ),
  1988. 'Misc Options' => array(
  1989. array(
  1990. 'type' => 'number',
  1991. 'name' => 'calendarStart',
  1992. 'label' => '# of Days Before',
  1993. 'value' => $GLOBALS['calendarStart'],
  1994. 'placeholder' => ''
  1995. ),
  1996. array(
  1997. 'type' => 'number',
  1998. 'name' => 'calendarEnd',
  1999. 'label' => '# of Days After',
  2000. 'value' => $GLOBALS['calendarEnd'],
  2001. 'placeholder' => ''
  2002. ),
  2003. array(
  2004. 'type' => 'select',
  2005. 'name' => 'calendarFirstDay',
  2006. 'label' => 'Start Day',
  2007. 'value' => $GLOBALS['calendarFirstDay'],
  2008. 'options' => $day
  2009. ),
  2010. array(
  2011. 'type' => 'select',
  2012. 'name' => 'calendarDefault',
  2013. 'label' => 'Default View',
  2014. 'value' => $GLOBALS['calendarDefault'],
  2015. 'options' => $calendarDefault
  2016. ),
  2017. array(
  2018. 'type' => 'select',
  2019. 'name' => 'calendarTimeFormat',
  2020. 'label' => 'Time Format',
  2021. 'value' => $GLOBALS['calendarTimeFormat'],
  2022. 'options' => $timeFormat
  2023. ),
  2024. array(
  2025. 'type' => 'select',
  2026. 'name' => 'calendarLimit',
  2027. 'label' => 'Items Per Day',
  2028. 'value' => $GLOBALS['calendarLimit'],
  2029. 'options' => $limit
  2030. ),
  2031. array(
  2032. 'type' => 'select',
  2033. 'name' => 'calendarRefresh',
  2034. 'label' => 'Refresh Seconds',
  2035. 'value' => $GLOBALS['calendarRefresh'],
  2036. 'options' => optionTime()
  2037. )
  2038. ),
  2039. 'Test Connection' => array(
  2040. array(
  2041. 'type' => 'blank',
  2042. 'label' => 'Please Save before Testing'
  2043. ),
  2044. array(
  2045. 'type' => 'button',
  2046. 'label' => '',
  2047. 'icon' => 'fa fa-flask',
  2048. 'class' => 'pull-right',
  2049. 'text' => 'Test Connection',
  2050. 'attr' => 'onclick="testAPIConnection(\'radarr\')"'
  2051. ),
  2052. )
  2053. )
  2054. ),
  2055. array(
  2056. 'name' => 'CouchPotato',
  2057. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2058. 'image' => 'plugins/images/tabs/couchpotato.png',
  2059. 'category' => 'PVR',
  2060. 'settings' => array(
  2061. 'Enable' => array(
  2062. array(
  2063. 'type' => 'switch',
  2064. 'name' => 'homepageCouchpotatoEnabled',
  2065. 'label' => 'Enable',
  2066. 'value' => $GLOBALS['homepageCouchpotatoEnabled']
  2067. ),
  2068. array(
  2069. 'type' => 'select',
  2070. 'name' => 'homepageCouchpotatoAuth',
  2071. 'label' => 'Minimum Authentication',
  2072. 'value' => $GLOBALS['homepageCouchpotatoAuth'],
  2073. 'options' => $groups
  2074. )
  2075. ),
  2076. 'Connection' => array(
  2077. array(
  2078. 'type' => 'input',
  2079. 'name' => 'couchpotatoURL',
  2080. 'label' => 'URL',
  2081. 'value' => $GLOBALS['couchpotatoURL'],
  2082. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  2083. 'placeholder' => 'http(s)://hostname:port'
  2084. ),
  2085. array(
  2086. 'type' => 'password-alt',
  2087. 'name' => 'couchpotatoToken',
  2088. 'label' => 'Token',
  2089. 'value' => $GLOBALS['couchpotatoToken']
  2090. )
  2091. ),
  2092. 'Misc Options' => array(
  2093. array(
  2094. 'type' => 'select',
  2095. 'name' => 'calendarFirstDay',
  2096. 'label' => 'Start Day',
  2097. 'value' => $GLOBALS['calendarFirstDay'],
  2098. 'options' => $day
  2099. ),
  2100. array(
  2101. 'type' => 'select',
  2102. 'name' => 'calendarDefault',
  2103. 'label' => 'Default View',
  2104. 'value' => $GLOBALS['calendarDefault'],
  2105. 'options' => $calendarDefault
  2106. ),
  2107. array(
  2108. 'type' => 'select',
  2109. 'name' => 'calendarTimeFormat',
  2110. 'label' => 'Time Format',
  2111. 'value' => $GLOBALS['calendarTimeFormat'],
  2112. 'options' => $timeFormat
  2113. ),
  2114. array(
  2115. 'type' => 'select',
  2116. 'name' => 'calendarLimit',
  2117. 'label' => 'Items Per Day',
  2118. 'value' => $GLOBALS['calendarLimit'],
  2119. 'options' => $limit
  2120. ),
  2121. array(
  2122. 'type' => 'select',
  2123. 'name' => 'calendarRefresh',
  2124. 'label' => 'Refresh Seconds',
  2125. 'value' => $GLOBALS['calendarRefresh'],
  2126. 'options' => optionTime()
  2127. )
  2128. )
  2129. )
  2130. ),
  2131. array(
  2132. 'name' => 'SickRage',
  2133. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2134. 'image' => 'plugins/images/tabs/sickrage.png',
  2135. 'category' => 'PVR',
  2136. 'settings' => array(
  2137. 'Enable' => array(
  2138. array(
  2139. 'type' => 'switch',
  2140. 'name' => 'homepageSickrageEnabled',
  2141. 'label' => 'Enable',
  2142. 'value' => $GLOBALS['homepageSickrageEnabled']
  2143. ),
  2144. array(
  2145. 'type' => 'select',
  2146. 'name' => 'homepageSickrageAuth',
  2147. 'label' => 'Minimum Authentication',
  2148. 'value' => $GLOBALS['homepageSickrageAuth'],
  2149. 'options' => $groups
  2150. )
  2151. ),
  2152. 'Connection' => array(
  2153. array(
  2154. 'type' => 'input',
  2155. 'name' => 'sickrageURL',
  2156. 'label' => 'URL',
  2157. 'value' => $GLOBALS['sickrageURL'],
  2158. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  2159. 'placeholder' => 'http(s)://hostname:port'
  2160. ),
  2161. array(
  2162. 'type' => 'password-alt',
  2163. 'name' => 'sickrageToken',
  2164. 'label' => 'Token',
  2165. 'value' => $GLOBALS['sickrageToken']
  2166. )
  2167. ),
  2168. 'Misc Options' => array(
  2169. array(
  2170. 'type' => 'select',
  2171. 'name' => 'calendarFirstDay',
  2172. 'label' => 'Start Day',
  2173. 'value' => $GLOBALS['calendarFirstDay'],
  2174. 'options' => $day
  2175. ),
  2176. array(
  2177. 'type' => 'select',
  2178. 'name' => 'calendarDefault',
  2179. 'label' => 'Default View',
  2180. 'value' => $GLOBALS['calendarDefault'],
  2181. 'options' => $calendarDefault
  2182. ),
  2183. array(
  2184. 'type' => 'select',
  2185. 'name' => 'calendarTimeFormat',
  2186. 'label' => 'Time Format',
  2187. 'value' => $GLOBALS['calendarTimeFormat'],
  2188. 'options' => $timeFormat
  2189. ),
  2190. array(
  2191. 'type' => 'select',
  2192. 'name' => 'calendarLimit',
  2193. 'label' => 'Items Per Day',
  2194. 'value' => $GLOBALS['calendarLimit'],
  2195. 'options' => $limit
  2196. ),
  2197. array(
  2198. 'type' => 'select',
  2199. 'name' => 'calendarRefresh',
  2200. 'label' => 'Refresh Seconds',
  2201. 'value' => $GLOBALS['calendarRefresh'],
  2202. 'options' => optionTime()
  2203. )
  2204. )
  2205. )
  2206. ),
  2207. array(
  2208. 'name' => 'Ombi',
  2209. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2210. 'image' => 'plugins/images/tabs/ombi.png',
  2211. 'category' => 'Requests',
  2212. 'settings' => array(
  2213. 'Enable' => array(
  2214. array(
  2215. 'type' => 'switch',
  2216. 'name' => 'homepageOmbiEnabled',
  2217. 'label' => 'Enable',
  2218. 'value' => $GLOBALS['homepageOmbiEnabled']
  2219. ),
  2220. array(
  2221. 'type' => 'select',
  2222. 'name' => 'homepageOmbiAuth',
  2223. 'label' => 'Minimum Authentication',
  2224. 'value' => $GLOBALS['homepageOmbiAuth'],
  2225. 'options' => $groups
  2226. )
  2227. ),
  2228. 'Connection' => array(
  2229. array(
  2230. 'type' => 'input',
  2231. 'name' => 'ombiURL',
  2232. 'label' => 'URL',
  2233. 'value' => $GLOBALS['ombiURL'],
  2234. 'help' => 'Please make sure to use local IP address and port - You also may use local dns name too.',
  2235. 'placeholder' => 'http(s)://hostname:port'
  2236. ),
  2237. array(
  2238. 'type' => 'password-alt',
  2239. 'name' => 'ombiToken',
  2240. 'label' => 'Token',
  2241. 'value' => $GLOBALS['ombiToken']
  2242. )
  2243. ),
  2244. 'Misc Options' => array(
  2245. array(
  2246. 'type' => 'select',
  2247. 'name' => 'homepageOmbiRequestAuth',
  2248. 'label' => 'Minimum Group to Request',
  2249. 'value' => $GLOBALS['homepageOmbiRequestAuth'],
  2250. 'options' => $groups
  2251. ),
  2252. array(
  2253. 'type' => 'select',
  2254. 'name' => 'ombiTvDefault',
  2255. 'label' => 'TV Show Default Request',
  2256. 'value' => $GLOBALS['ombiTvDefault'],
  2257. 'options' => $ombiTvOptions
  2258. ),
  2259. array(
  2260. 'type' => 'switch',
  2261. 'name' => 'ombiLimitUser',
  2262. 'label' => 'Limit to User',
  2263. 'value' => $GLOBALS['ombiLimitUser']
  2264. ),
  2265. array(
  2266. 'type' => 'number',
  2267. 'name' => 'ombiLimit',
  2268. 'label' => 'Item Limit',
  2269. 'value' => $GLOBALS['ombiLimit'],
  2270. ),
  2271. array(
  2272. 'type' => 'select',
  2273. 'name' => 'ombiRefresh',
  2274. 'label' => 'Refresh Seconds',
  2275. 'value' => $GLOBALS['ombiRefresh'],
  2276. 'options' => optionTime()
  2277. ),
  2278. array(
  2279. 'type' => 'switch',
  2280. 'name' => 'ombiAlias',
  2281. 'label' => 'Use Ombi Alias Names',
  2282. 'value' => $GLOBALS['ombiAlias'],
  2283. 'help' => 'Use Ombi Alias Names instead of Usernames - If Alias is blank, Alias will fallback to Username'
  2284. )
  2285. ),
  2286. 'Default Filter' => array(
  2287. array(
  2288. 'type' => 'switch',
  2289. 'name' => 'ombiDefaultFilterAvailable',
  2290. 'label' => 'Show Available',
  2291. 'value' => $GLOBALS['ombiDefaultFilterAvailable'],
  2292. 'help' => 'Show All Available Ombi Requests'
  2293. ),
  2294. array(
  2295. 'type' => 'switch',
  2296. 'name' => 'ombiDefaultFilterUnavailable',
  2297. 'label' => 'Show Unavailable',
  2298. 'value' => $GLOBALS['ombiDefaultFilterUnavailable'],
  2299. 'help' => 'Show All Unavailable Ombi Requests'
  2300. ),
  2301. array(
  2302. 'type' => 'switch',
  2303. 'name' => 'ombiDefaultFilterApproved',
  2304. 'label' => 'Show Approved',
  2305. 'value' => $GLOBALS['ombiDefaultFilterApproved'],
  2306. 'help' => 'Show All Approved Ombi Requests'
  2307. ),
  2308. array(
  2309. 'type' => 'switch',
  2310. 'name' => 'ombiDefaultFilterUnapproved',
  2311. 'label' => 'Show Unapproved',
  2312. 'value' => $GLOBALS['ombiDefaultFilterUnapproved'],
  2313. 'help' => 'Show All Unapproved Ombi Requests'
  2314. ),
  2315. array(
  2316. 'type' => 'switch',
  2317. 'name' => 'ombiDefaultFilterDenied',
  2318. 'label' => 'Show Denied',
  2319. 'value' => $GLOBALS['ombiDefaultFilterDenied'],
  2320. 'help' => 'Show All Denied Ombi Requests'
  2321. )
  2322. ),
  2323. 'Test Connection' => array(
  2324. array(
  2325. 'type' => 'blank',
  2326. 'label' => 'Please Save before Testing'
  2327. ),
  2328. array(
  2329. 'type' => 'button',
  2330. 'label' => '',
  2331. 'icon' => 'fa fa-flask',
  2332. 'class' => 'pull-right',
  2333. 'text' => 'Test Connection',
  2334. 'attr' => 'onclick="testAPIConnection(\'ombi\')"'
  2335. ),
  2336. )
  2337. )
  2338. ),
  2339. array(
  2340. 'name' => 'Unifi',
  2341. 'enabled' => true,
  2342. 'image' => 'plugins/images/tabs/ubnt.png',
  2343. 'category' => 'Monitor',
  2344. 'settings' => array(
  2345. 'Enable' => array(
  2346. array(
  2347. 'type' => 'switch',
  2348. 'name' => 'homepageUnifiEnabled',
  2349. 'label' => 'Enable',
  2350. 'value' => $GLOBALS['homepageUnifiEnabled']
  2351. ),
  2352. array(
  2353. 'type' => 'select',
  2354. 'name' => 'homepageUnifiAuth',
  2355. 'label' => 'Minimum Authentication',
  2356. 'value' => $GLOBALS['homepageUnifiAuth'],
  2357. 'options' => $groups
  2358. )
  2359. ),
  2360. 'Connection' => array(
  2361. array(
  2362. 'type' => 'input',
  2363. 'name' => 'unifiURL',
  2364. 'label' => 'URL',
  2365. 'value' => $GLOBALS['unifiURL'],
  2366. 'help' => 'URL for Unifi',
  2367. 'placeholder' => 'Unifi API URL'
  2368. ),
  2369. array(
  2370. 'type' => 'blank',
  2371. 'label' => ''
  2372. ),
  2373. array(
  2374. 'type' => 'input',
  2375. 'name' => 'unifiUsername',
  2376. 'label' => 'Username',
  2377. 'value' => $GLOBALS['unifiUsername']
  2378. ),
  2379. array(
  2380. 'type' => 'password',
  2381. 'name' => 'unifiPassword',
  2382. 'label' => 'Password',
  2383. 'value' => $GLOBALS['unifiPassword']
  2384. ),
  2385. array(
  2386. 'type' => 'input',
  2387. 'name' => 'unifiSiteName',
  2388. 'label' => 'Site Name',
  2389. 'value' => $GLOBALS['unifiSiteName'],
  2390. 'help' => 'Site Name - not Site ID nor Site Description',
  2391. ),
  2392. array(
  2393. 'type' => 'button',
  2394. 'label' => 'Grab Unifi Site',
  2395. 'icon' => 'fa fa-building',
  2396. 'text' => 'Get Unifi Site',
  2397. 'attr' => 'onclick="getUnifiSite(\'unifiSite\')"'
  2398. ),
  2399. ),
  2400. 'Misc Options' => array(
  2401. array(
  2402. 'type' => 'select',
  2403. 'name' => 'homepageUnifiRefresh',
  2404. 'label' => 'Refresh Seconds',
  2405. 'value' => $GLOBALS['homepageUnifiRefresh'],
  2406. 'options' => optionTime()
  2407. ),
  2408. ),
  2409. 'Test Connection' => array(
  2410. array(
  2411. 'type' => 'blank',
  2412. 'label' => 'Please Save before Testing'
  2413. ),
  2414. array(
  2415. 'type' => 'button',
  2416. 'label' => '',
  2417. 'icon' => 'fa fa-flask',
  2418. 'class' => 'pull-right',
  2419. 'text' => 'Test Connection',
  2420. 'attr' => 'onclick="testAPIConnection(\'unifi\')"'
  2421. ),
  2422. )
  2423. )
  2424. ),
  2425. array(
  2426. 'name' => 'HealthChecks',
  2427. 'enabled' => true,
  2428. 'image' => 'plugins/images/tabs/healthchecks.png',
  2429. 'category' => 'Monitor',
  2430. 'settings' => array(
  2431. 'Enable' => array(
  2432. array(
  2433. 'type' => 'switch',
  2434. 'name' => 'homepageHealthChecksEnabled',
  2435. 'label' => 'Enable',
  2436. 'value' => $GLOBALS['homepageHealthChecksEnabled']
  2437. ),
  2438. array(
  2439. 'type' => 'select',
  2440. 'name' => 'homepageHealthChecksAuth',
  2441. 'label' => 'Minimum Authentication',
  2442. 'value' => $GLOBALS['homepageHealthChecksAuth'],
  2443. 'options' => $groups
  2444. )
  2445. ),
  2446. 'Connection' => array(
  2447. array(
  2448. 'type' => 'input',
  2449. 'name' => 'healthChecksURL',
  2450. 'label' => 'URL',
  2451. 'value' => $GLOBALS['healthChecksURL'],
  2452. 'help' => 'URL for HealthChecks API',
  2453. 'placeholder' => 'HealthChecks API URL'
  2454. ),
  2455. array(
  2456. 'type' => 'password-alt',
  2457. 'name' => 'healthChecksToken',
  2458. 'label' => 'Token',
  2459. 'value' => $GLOBALS['healthChecksToken']
  2460. )
  2461. ),
  2462. 'Misc Options' => array(
  2463. array(
  2464. 'type' => 'input',
  2465. 'name' => 'healthChecksTags',
  2466. 'label' => 'Tags',
  2467. 'value' => $GLOBALS['healthChecksTags'],
  2468. 'help' => 'Pull only checks with this tag - Blank for all',
  2469. 'placeholder' => 'Multiple tags using CSV - tag1,tag2'
  2470. ),
  2471. array(
  2472. 'type' => 'select',
  2473. 'name' => 'homepageHealthChecksRefresh',
  2474. 'label' => 'Refresh Seconds',
  2475. 'value' => $GLOBALS['homepageHealthChecksRefresh'],
  2476. 'options' => optionTime()
  2477. ),
  2478. ),
  2479. )
  2480. ),
  2481. array(
  2482. 'name' => 'CustomHTML-1',
  2483. 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
  2484. 'image' => 'plugins/images/tabs/custom1.png',
  2485. 'category' => 'Custom',
  2486. 'settings' => array(
  2487. 'Enable' => array(
  2488. array(
  2489. 'type' => 'switch',
  2490. 'name' => 'homepagCustomHTMLoneEnabled',
  2491. 'label' => 'Enable',
  2492. 'value' => $GLOBALS['homepagCustomHTMLoneEnabled']
  2493. ),
  2494. array(
  2495. 'type' => 'select',
  2496. 'name' => 'homepagCustomHTMLoneAuth',
  2497. 'label' => 'Minimum Authentication',
  2498. 'value' => $GLOBALS['homepagCustomHTMLoneAuth'],
  2499. 'options' => $groups
  2500. )
  2501. ),
  2502. 'Code' => array(
  2503. array(
  2504. 'type' => 'textbox',
  2505. 'name' => 'customHTMLone',
  2506. 'class' => 'hidden customHTMLoneTextarea',
  2507. 'label' => '',
  2508. 'value' => $GLOBALS['customHTMLone'],
  2509. ),
  2510. array(
  2511. 'type' => 'html',
  2512. 'override' => 12,
  2513. 'label' => 'Custom HTML/JavaScript',
  2514. '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>'
  2515. ),
  2516. )
  2517. )
  2518. ),
  2519. array(
  2520. 'name' => 'CustomHTML-2',
  2521. 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
  2522. 'image' => 'plugins/images/tabs/custom2.png',
  2523. 'category' => 'Custom',
  2524. 'settings' => array(
  2525. 'Enable' => array(
  2526. array(
  2527. 'type' => 'switch',
  2528. 'name' => 'homepagCustomHTMLtwoEnabled',
  2529. 'label' => 'Enable',
  2530. 'value' => $GLOBALS['homepagCustomHTMLtwoEnabled']
  2531. ),
  2532. array(
  2533. 'type' => 'select',
  2534. 'name' => 'homepagCustomHTMLtwoAuth',
  2535. 'label' => 'Minimum Authentication',
  2536. 'value' => $GLOBALS['homepagCustomHTMLtwoAuth'],
  2537. 'options' => $groups
  2538. )
  2539. ),
  2540. 'Code' => array(
  2541. array(
  2542. 'type' => 'textbox',
  2543. 'name' => 'customHTMLtwo',
  2544. 'class' => 'hidden customHTMLtwoTextarea',
  2545. 'label' => '',
  2546. 'value' => $GLOBALS['customHTMLtwo'],
  2547. ),
  2548. array(
  2549. 'type' => 'html',
  2550. 'override' => 12,
  2551. 'label' => 'Custom HTML/JavaScript',
  2552. '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>'
  2553. ),
  2554. )
  2555. )
  2556. ),
  2557. array(
  2558. 'name' => 'Misc',
  2559. 'enabled' => true,
  2560. 'image' => 'plugins/images/organizr/logo-no-border.png',
  2561. 'category' => 'Custom',
  2562. 'settings' => array(
  2563. 'YouTube' => array(
  2564. array(
  2565. 'type' => 'input',
  2566. 'name' => 'youtubeAPI',
  2567. 'label' => 'Youtube API Key',
  2568. 'value' => $GLOBALS['youtubeAPI'],
  2569. 'help' => 'Please make sure to input this API key as the organizr one gets limited'
  2570. ),
  2571. array(
  2572. 'type' => 'html',
  2573. 'override' => 6,
  2574. 'label' => 'Instructions',
  2575. 'html' => '<a href="https://www.slickremix.com/docs/get-api-key-for-youtube/" target="_blank">Click here for instructions</a>'
  2576. ),
  2577. )
  2578. )
  2579. ),
  2580. array(
  2581. 'name' => 'Pi-hole',
  2582. 'enabled' => true,
  2583. 'image' => 'plugins/images/tabs/pihole.png',
  2584. 'category' => 'Monitor',
  2585. 'settings' => array(
  2586. 'Enable' => array(
  2587. array(
  2588. 'type' => 'switch',
  2589. 'name' => 'homepagePiholeEnabled',
  2590. 'label' => 'Enable',
  2591. 'value' => $GLOBALS['homepagePiholeEnabled']
  2592. ),
  2593. array(
  2594. 'type' => 'select',
  2595. 'name' => 'homepagePiholeAuth',
  2596. 'label' => 'Minimum Authentication',
  2597. 'value' => $GLOBALS['homepagePiholeAuth'],
  2598. 'options' => $groups
  2599. )
  2600. ),
  2601. 'Connection' => array(
  2602. array(
  2603. 'type' => 'input',
  2604. 'name' => 'piholeURL',
  2605. 'label' => 'URL',
  2606. 'value' => $GLOBALS['piholeURL'],
  2607. '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.',
  2608. 'placeholder' => 'http(s)://hostname:port/admin/'
  2609. ),
  2610. ),
  2611. 'Misc' => array(
  2612. array(
  2613. 'type' => 'switch',
  2614. 'name' => 'piholeHeaderToggle',
  2615. 'label' => 'Toggle Title',
  2616. 'value' => $GLOBALS['piholeHeaderToggle'],
  2617. 'help' => 'Shows/hides the title of this homepage module'
  2618. ),
  2619. array(
  2620. 'type' => 'switch',
  2621. 'name' => 'homepagePiholeCombine',
  2622. 'label' => 'Combine stat cards',
  2623. 'value' => $GLOBALS['homepagePiholeCombine'],
  2624. 'help' => 'This controls whether to combine the stats for multiple piholes into 1 card.',
  2625. ),
  2626. ),
  2627. )
  2628. ),
  2629. array(
  2630. 'name' => 'Tautulli',
  2631. 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
  2632. 'image' => 'plugins/images/tabs/tautulli.png',
  2633. 'category' => 'Monitor',
  2634. 'settings' => array(
  2635. 'Enable' => array(
  2636. array(
  2637. 'type' => 'switch',
  2638. 'name' => 'homepageTautulliEnabled',
  2639. 'label' => 'Enable',
  2640. 'value' => $GLOBALS['homepageTautulliEnabled']
  2641. ),
  2642. array(
  2643. 'type' => 'select',
  2644. 'name' => 'homepageTautulliAuth',
  2645. 'label' => 'Minimum Authentication',
  2646. 'value' => $GLOBALS['homepageTautulliAuth'],
  2647. 'options' => $groups
  2648. )
  2649. ),
  2650. 'Options' => array(
  2651. array(
  2652. 'type' => 'input',
  2653. 'name' => 'tautulliHeader',
  2654. 'label' => 'Title',
  2655. 'value' => $GLOBALS['tautulliHeader'],
  2656. 'help' => 'Sets the title of this homepage module'
  2657. ),
  2658. array(
  2659. 'type' => 'switch',
  2660. 'name' => 'tautulliHeaderToggle',
  2661. 'label' => 'Toggle Title',
  2662. 'value' => $GLOBALS['tautulliHeaderToggle'],
  2663. 'help' => 'Shows/hides the title of this homepage module'
  2664. )
  2665. ),
  2666. 'Connection' => array(
  2667. array(
  2668. 'type' => 'input',
  2669. 'name' => 'tautulliURL',
  2670. 'label' => 'URL',
  2671. 'value' => $GLOBALS['tautulliURL'],
  2672. 'help' => 'URL for Tautulli API, include the IP, the port and the base URL (e.g. /tautulli/) in the URL',
  2673. 'placeholder' => 'http://<ip>:<port>'
  2674. ),
  2675. array(
  2676. 'type' => 'password-alt',
  2677. 'name' => 'tautulliApikey',
  2678. 'label' => 'API Key',
  2679. 'value' => $GLOBALS['tautulliApikey']
  2680. ),
  2681. array(
  2682. 'type' => 'select',
  2683. 'name' => 'homepageTautulliRefresh',
  2684. 'label' => 'Refresh Seconds',
  2685. 'value' => $GLOBALS['homepageTautulliRefresh'],
  2686. 'options' => optionTime()
  2687. ),
  2688. ),
  2689. 'Library Stats' => array(
  2690. array(
  2691. 'type' => 'switch',
  2692. 'name' => 'tautulliLibraries',
  2693. 'label' => 'Libraries',
  2694. 'value' => $GLOBALS['tautulliLibraries'],
  2695. 'help' => 'Shows/hides the card with library information.',
  2696. ),
  2697. array(
  2698. 'type' => 'select',
  2699. 'name' => 'homepageTautulliLibraryAuth',
  2700. 'label' => 'Minimum Authentication',
  2701. 'value' => $GLOBALS['homepageTautulliLibraryAuth'],
  2702. 'options' => $groups
  2703. ),
  2704. ),
  2705. 'Viewing Stats' => array(
  2706. array(
  2707. 'type' => 'switch',
  2708. 'name' => 'tautulliPopularMovies',
  2709. 'label' => 'Popular Movies',
  2710. 'value' => $GLOBALS['tautulliPopularMovies'],
  2711. 'help' => 'Shows/hides the card with Popular Movies information.',
  2712. ),
  2713. array(
  2714. 'type' => 'switch',
  2715. 'name' => 'tautulliPopularTV',
  2716. 'label' => 'Popular TV',
  2717. 'value' => $GLOBALS['tautulliPopularTV'],
  2718. 'help' => 'Shows/hides the card with Popular TV information.',
  2719. ),
  2720. array(
  2721. 'type' => 'switch',
  2722. 'name' => 'tautulliTopMovies',
  2723. 'label' => 'Top Movies',
  2724. 'value' => $GLOBALS['tautulliTopMovies'],
  2725. 'help' => 'Shows/hides the card with Top Movies information.',
  2726. ),
  2727. array(
  2728. 'type' => 'switch',
  2729. 'name' => 'tautulliTopTV',
  2730. 'label' => 'Top TV',
  2731. 'value' => $GLOBALS['tautulliTopTV'],
  2732. 'help' => 'Shows/hides the card with Top TV information.',
  2733. ),
  2734. array(
  2735. 'type' => 'select',
  2736. 'name' => 'homepageTautulliViewsAuth',
  2737. 'label' => 'Minimum Authentication',
  2738. 'value' => $GLOBALS['homepageTautulliViewsAuth'],
  2739. 'options' => $groups
  2740. ),
  2741. ),
  2742. 'Misc Stats' => array(
  2743. array(
  2744. 'type' => 'switch',
  2745. 'name' => 'tautulliTopUsers',
  2746. 'label' => 'Top Users',
  2747. 'value' => $GLOBALS['tautulliTopUsers'],
  2748. 'help' => 'Shows/hides the card with Top Users information.',
  2749. ),
  2750. array(
  2751. 'type' => 'switch',
  2752. 'name' => 'tautulliTopPlatforms',
  2753. 'label' => 'Top Platforms',
  2754. 'value' => $GLOBALS['tautulliTopPlatforms'],
  2755. 'help' => 'Shows/hides the card with Top Platforms information.',
  2756. ),
  2757. array(
  2758. 'type' => 'select',
  2759. 'name' => 'homepageTautulliMiscAuth',
  2760. 'label' => 'Minimum Authentication',
  2761. 'value' => $GLOBALS['homepageTautulliMiscAuth'],
  2762. 'options' => $groups
  2763. ),
  2764. ),
  2765. )
  2766. ),
  2767. array(
  2768. 'name' => 'Monitorr',
  2769. 'enabled' => true,
  2770. 'image' => 'plugins/images/tabs/monitorr.png',
  2771. 'category' => 'Monitor',
  2772. 'settings' => array(
  2773. 'Enable' => array(
  2774. array(
  2775. 'type' => 'switch',
  2776. 'name' => 'homepageMonitorrEnabled',
  2777. 'label' => 'Enable',
  2778. 'value' => $GLOBALS['homepageMonitorrEnabled']
  2779. ),
  2780. array(
  2781. 'type' => 'select',
  2782. 'name' => 'homepageMonitorrAuth',
  2783. 'label' => 'Minimum Authentication',
  2784. 'value' => $GLOBALS['homepageMonitorrAuth'],
  2785. 'options' => $groups
  2786. )
  2787. ),
  2788. 'Connection' => array(
  2789. array(
  2790. 'type' => 'input',
  2791. 'name' => 'monitorrURL',
  2792. 'label' => 'URL',
  2793. 'value' => $GLOBALS['monitorrURL'],
  2794. 'help' => 'URL for Monitorr. Please use the revers proxy URL i.e. https://domain.com/monitorr/.',
  2795. 'placeholder' => 'http://domain.com/monitorr/'
  2796. ),
  2797. array(
  2798. 'type' => 'select',
  2799. 'name' => 'homepageMonitorrRefresh',
  2800. 'label' => 'Refresh Seconds',
  2801. 'value' => $GLOBALS['homepageMonitorrRefresh'],
  2802. 'options' => optionTime()
  2803. ),
  2804. ),
  2805. 'Options' => array(
  2806. array(
  2807. 'type' => 'input',
  2808. 'name' => 'monitorrHeader',
  2809. 'label' => 'Title',
  2810. 'value' => $GLOBALS['monitorrHeader'],
  2811. 'help' => 'Sets the title of this homepage module',
  2812. ),
  2813. array(
  2814. 'type' => 'switch',
  2815. 'name' => 'monitorrHeaderToggle',
  2816. 'label' => 'Toggle Title',
  2817. 'value' => $GLOBALS['monitorrHeaderToggle'],
  2818. 'help' => 'Shows/hides the title of this homepage module'
  2819. ),
  2820. array(
  2821. 'type' => 'switch',
  2822. 'name' => 'monitorrCompact',
  2823. 'label' => 'Compact view',
  2824. 'value' => $GLOBALS['monitorrCompact'],
  2825. 'help' => 'Toggles the compact view of this homepage module'
  2826. ),
  2827. ),
  2828. )
  2829. ),
  2830. array(
  2831. 'name' => 'Weather-Air',
  2832. 'enabled' => true,
  2833. 'image' => 'plugins/images/tabs/wind.png',
  2834. 'category' => 'Monitor',
  2835. 'settings' => array(
  2836. 'Enable' => array(
  2837. array(
  2838. 'type' => 'switch',
  2839. 'name' => 'homepageWeatherAndAirEnabled',
  2840. 'label' => 'Enable',
  2841. 'value' => $GLOBALS['homepageWeatherAndAirEnabled']
  2842. ),
  2843. array(
  2844. 'type' => 'select',
  2845. 'name' => 'homepageWeatherAndAirAuth',
  2846. 'label' => 'Minimum Authentication',
  2847. 'value' => $GLOBALS['homepageWeatherAndAirAuth'],
  2848. 'options' => $groups
  2849. )
  2850. ),
  2851. 'Connection' => array(
  2852. array(
  2853. 'type' => 'input',
  2854. 'name' => 'homepageWeatherAndAirLatitude',
  2855. 'label' => 'Latitude',
  2856. 'value' => $GLOBALS['homepageWeatherAndAirLatitude'],
  2857. 'help' => 'Please enter full latitude including minus if needed'
  2858. ),
  2859. array(
  2860. 'type' => 'input',
  2861. 'name' => 'homepageWeatherAndAirLongitude',
  2862. 'label' => 'Longitude',
  2863. 'value' => $GLOBALS['homepageWeatherAndAirLongitude'],
  2864. 'help' => 'Please enter full longitude including minus if needed'
  2865. ),
  2866. array(
  2867. 'type' => 'blank',
  2868. 'label' => ''
  2869. ),
  2870. array(
  2871. 'type' => 'button',
  2872. 'label' => '',
  2873. 'icon' => 'fa fa-search',
  2874. 'class' => 'pull-right',
  2875. 'text' => 'Need Help With Coordinates?',
  2876. 'attr' => 'onclick="showLookupCoordinatesModal()"'
  2877. ),
  2878. ),
  2879. 'Options' => array(
  2880. array(
  2881. 'type' => 'input',
  2882. 'name' => 'homepageWeatherAndAirWeatherHeader',
  2883. 'label' => 'Title',
  2884. 'value' => $GLOBALS['homepageWeatherAndAirWeatherHeader'],
  2885. 'help' => 'Sets the title of this homepage module',
  2886. ),
  2887. array(
  2888. 'type' => 'switch',
  2889. 'name' => 'homepageWeatherAndAirWeatherHeaderToggle',
  2890. 'label' => 'Toggle Title',
  2891. 'value' => $GLOBALS['homepageWeatherAndAirWeatherHeaderToggle'],
  2892. 'help' => 'Shows/hides the title of this homepage module'
  2893. ),
  2894. array(
  2895. 'type' => 'switch',
  2896. 'name' => 'homepageWeatherAndAirWeatherEnabled',
  2897. 'label' => 'Enable Weather',
  2898. 'value' => $GLOBALS['homepageWeatherAndAirWeatherEnabled'],
  2899. 'help' => 'Toggles the view module for Weather'
  2900. ),
  2901. array(
  2902. 'type' => 'switch',
  2903. 'name' => 'homepageWeatherAndAirAirQualityEnabled',
  2904. 'label' => 'Enable Air Quality',
  2905. 'value' => $GLOBALS['homepageWeatherAndAirAirQualityEnabled'],
  2906. 'help' => 'Toggles the view module for Air Quality'
  2907. ),
  2908. array(
  2909. 'type' => 'switch',
  2910. 'name' => 'homepageWeatherAndAirPollenEnabled',
  2911. 'label' => 'Enable Pollen',
  2912. 'value' => $GLOBALS['homepageWeatherAndAirPollenEnabled'],
  2913. 'help' => 'Toggles the view module for Pollen'
  2914. ),
  2915. array(
  2916. 'type' => 'select',
  2917. 'name' => 'homepageWeatherAndAirUnits',
  2918. 'label' => 'Unit of Measurement',
  2919. 'value' => $GLOBALS['homepageWeatherAndAirUnits'],
  2920. 'options' => array(
  2921. array(
  2922. 'name' => 'Imperial',
  2923. 'value' => 'imperial'
  2924. ),
  2925. array(
  2926. 'name' => 'Metric',
  2927. 'value' => 'metric'
  2928. )
  2929. )
  2930. ),
  2931. array(
  2932. 'type' => 'select',
  2933. 'name' => 'homepageWeatherAndAirRefresh',
  2934. 'label' => 'Refresh Seconds',
  2935. 'value' => $GLOBALS['homepageWeatherAndAirRefresh'],
  2936. 'options' => optionTime()
  2937. ),
  2938. ),
  2939. )
  2940. ),
  2941. array(
  2942. 'name' => 'Speedtest',
  2943. 'enabled' => true,
  2944. 'image' => 'plugins/images/tabs/speedtest-icon.png',
  2945. 'category' => 'Monitor',
  2946. 'settings' => array(
  2947. 'Enable' => array(
  2948. array(
  2949. 'type' => 'html',
  2950. 'override' => 6,
  2951. 'label' => 'Info',
  2952. '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>'
  2953. ),
  2954. array(
  2955. 'type' => 'switch',
  2956. 'name' => 'homepageSpeedtestEnabled',
  2957. 'label' => 'Enable',
  2958. 'value' => $GLOBALS['homepageSpeedtestEnabled']
  2959. ),
  2960. array(
  2961. 'type' => 'select',
  2962. 'name' => 'homepageSpeedtestAuth',
  2963. 'label' => 'Minimum Authentication',
  2964. 'value' => $GLOBALS['homepageSpeedtestAuth'],
  2965. 'options' => $groups
  2966. )
  2967. ),
  2968. 'Connection' => array(
  2969. array(
  2970. 'type' => 'input',
  2971. 'name' => 'speedtestURL',
  2972. 'label' => 'URL',
  2973. 'value' => $GLOBALS['speedtestURL'],
  2974. 'help' => 'Enter the IP:PORT of your speedtest instance e.g. http(s)://<ip>:<port>'
  2975. ),
  2976. ),
  2977. 'Options' => array(
  2978. array(
  2979. 'type' => 'input',
  2980. 'name' => 'speedtestHeader',
  2981. 'label' => 'Title',
  2982. 'value' => $GLOBALS['speedtestHeader'],
  2983. 'help' => 'Sets the title of this homepage module',
  2984. ),
  2985. array(
  2986. 'type' => 'switch',
  2987. 'name' => 'speedtestHeaderToggle',
  2988. 'label' => 'Toggle Title',
  2989. 'value' => $GLOBALS['speedtestHeaderToggle'],
  2990. 'help' => 'Shows/hides the title of this homepage module'
  2991. ),
  2992. ),
  2993. )
  2994. ),
  2995. netdataSettngsArray()
  2996. );
  2997. }
  2998. function buildHomepageSettings()
  2999. {
  3000. $homepageOrder = homepageOrder();
  3001. $homepageList = '<h4>Drag Homepage Items to Order Them</h4><div id="homepage-items-sort" class="external-events">';
  3002. $inputList = '<form id="homepage-values" class="row">';
  3003. foreach ($homepageOrder as $key => $val) {
  3004. switch ($key) {
  3005. case 'homepageOrdercustomhtml':
  3006. $class = 'bg-info';
  3007. $image = 'plugins/images/tabs/custom1.png';
  3008. if (!$GLOBALS['homepagCustomHTMLoneEnabled']) {
  3009. $class .= ' faded';
  3010. }
  3011. break;
  3012. case 'homepageOrdercustomhtmlTwo':
  3013. $class = 'bg-info';
  3014. $image = 'plugins/images/tabs/custom2.png';
  3015. if (!$GLOBALS['homepagCustomHTMLtwoEnabled']) {
  3016. $class .= ' faded';
  3017. }
  3018. break;
  3019. case 'homepageOrdertransmission':
  3020. $class = 'bg-transmission';
  3021. $image = 'plugins/images/tabs/transmission.png';
  3022. if (!$GLOBALS['homepageTransmissionEnabled']) {
  3023. $class .= ' faded';
  3024. }
  3025. break;
  3026. case 'homepageOrdernzbget':
  3027. $class = 'bg-nzbget';
  3028. $image = 'plugins/images/tabs/nzbget.png';
  3029. if (!$GLOBALS['homepageNzbgetEnabled']) {
  3030. $class .= ' faded';
  3031. }
  3032. break;
  3033. case 'homepageOrderjdownloader':
  3034. $class = 'bg-sab';
  3035. $image = 'plugins/images/tabs/jdownloader.png';
  3036. if (!$GLOBALS['homepageJdownloaderEnabled']) {
  3037. $class .= ' faded';
  3038. }
  3039. break;
  3040. case 'homepageOrdersabnzbd':
  3041. $class = 'bg-sab';
  3042. $image = 'plugins/images/tabs/sabnzbd.png';
  3043. if (!$GLOBALS['homepageSabnzbdEnabled']) {
  3044. $class .= ' faded';
  3045. }
  3046. break;
  3047. case 'homepageOrderdeluge':
  3048. $class = 'bg-deluge';
  3049. $image = 'plugins/images/tabs/deluge.png';
  3050. if (!$GLOBALS['homepageDelugeEnabled']) {
  3051. $class .= ' faded';
  3052. }
  3053. break;
  3054. case 'homepageOrderqBittorrent':
  3055. $class = 'bg-qbit';
  3056. $image = 'plugins/images/tabs/qBittorrent.png';
  3057. if (!$GLOBALS['homepageqBittorrentEnabled']) {
  3058. $class .= ' faded';
  3059. }
  3060. break;
  3061. case 'homepageOrderrTorrent':
  3062. $class = 'bg-qbit';
  3063. $image = 'plugins/images/tabs/rTorrent.png';
  3064. if (!$GLOBALS['homepagerTorrentEnabled']) {
  3065. $class .= ' faded';
  3066. }
  3067. break;
  3068. case 'homepageOrderplexnowplaying':
  3069. case 'homepageOrderplexrecent':
  3070. case 'homepageOrderplexplaylist':
  3071. $class = 'bg-plex';
  3072. $image = 'plugins/images/tabs/plex.png';
  3073. if (!$GLOBALS['homepagePlexEnabled']) {
  3074. $class .= ' faded';
  3075. }
  3076. break;
  3077. case 'homepageOrderembynowplaying':
  3078. case 'homepageOrderembyrecent':
  3079. $class = 'bg-emby';
  3080. $image = 'plugins/images/tabs/emby.png';
  3081. if (!$GLOBALS['homepageEmbyEnabled']) {
  3082. $class .= ' faded';
  3083. }
  3084. break;
  3085. case 'homepageOrderombi':
  3086. $class = 'bg-inverse';
  3087. $image = 'plugins/images/tabs/ombi.png';
  3088. if (!$GLOBALS['homepageOmbiEnabled']) {
  3089. $class .= ' faded';
  3090. }
  3091. break;
  3092. case 'homepageOrdercalendar':
  3093. $class = 'bg-primary';
  3094. $image = 'plugins/images/tabs/calendar.png';
  3095. if (!$GLOBALS['homepageSonarrEnabled'] && !$GLOBALS['homepageRadarrEnabled'] && !$GLOBALS['homepageSickrageEnabled'] && !$GLOBALS['homepageCouchpotatoEnabled']) {
  3096. $class .= ' faded';
  3097. }
  3098. break;
  3099. case 'homepageOrderdownloader':
  3100. $class = 'bg-inverse';
  3101. $image = 'plugins/images/tabs/downloader.png';
  3102. if (!$GLOBALS['jdownloaderCombine'] && !$GLOBALS['sabnzbdCombine'] && !$GLOBALS['nzbgetCombine'] && !$GLOBALS['rTorrentCombine'] && !$GLOBALS['delugeCombine'] && !$GLOBALS['transmissionCombine'] && !$GLOBALS['qBittorrentCombine']) {
  3103. $class .= ' faded';
  3104. }
  3105. break;
  3106. case 'homepageOrderhealthchecks':
  3107. $class = 'bg-healthchecks';
  3108. $image = 'plugins/images/tabs/healthchecks.png';
  3109. if (!$GLOBALS['homepageHealthChecksEnabled']) {
  3110. $class .= ' faded';
  3111. }
  3112. break;
  3113. case 'homepageOrderunifi':
  3114. $class = 'bg-info';
  3115. $image = 'plugins/images/tabs/ubnt.png';
  3116. if (!$GLOBALS['homepageUnifiEnabled']) {
  3117. $class .= ' faded';
  3118. }
  3119. break;
  3120. case 'homepageOrdertautulli':
  3121. $class = 'bg-info';
  3122. $image = 'plugins/images/tabs/tautulli.png';
  3123. if (!$GLOBALS['homepageTautulliEnabled']) {
  3124. $class .= ' faded';
  3125. }
  3126. break;
  3127. case 'homepageOrderPihole':
  3128. $class = 'bg-info';
  3129. $image = 'plugins/images/tabs/pihole.png';
  3130. if (!$GLOBALS['homepagePiholeEnabled']) {
  3131. $class .= ' faded';
  3132. }
  3133. break;
  3134. case 'homepageOrderMonitorr':
  3135. $class = 'bg-info';
  3136. $image = 'plugins/images/tabs/monitorr.png';
  3137. if (!$GLOBALS['homepageMonitorrEnabled']) {
  3138. $class .= ' faded';
  3139. }
  3140. break;
  3141. case 'homepageOrderWeatherAndAir':
  3142. $class = 'bg-success';
  3143. $image = 'plugins/images/tabs/wind.png';
  3144. if (!$GLOBALS['homepageWeatherAndAirEnabled']) {
  3145. $class .= ' faded';
  3146. }
  3147. break;
  3148. case 'homepageOrderSpeedtest':
  3149. $class = 'bg-success';
  3150. $image = 'plugins/images/tabs/speedtest-icon.png';
  3151. if (!$GLOBALS['homepageSpeedtestEnabled']) {
  3152. $class .= ' faded';
  3153. }
  3154. break;
  3155. case 'homepageOrderNetdata':
  3156. $class = 'bg-success';
  3157. $image = 'plugins/images/tabs/netdata.png';
  3158. if (!$GLOBALS['homepageNetdataEnabled']) {
  3159. $class .= ' faded';
  3160. }
  3161. break;
  3162. default:
  3163. $class = 'blue-bg';
  3164. $image = '';
  3165. break;
  3166. }
  3167. $homepageList .= '
  3168. <div class="col-md-3 col-xs-12 sort-homepage m-t-10 hvr-grow clearfix">
  3169. <div class="homepage-drag fc-event ' . $class . ' lazyload" data-src="' . $image . '">
  3170. <span class="ordinal-position text-uppercase badge bg-org homepage-number" data-link="' . $key . '" style="float:left;width: 30px;">' . $val . '</span>
  3171. <span class="homepage-text">&nbsp; ' . strtoupper(substr($key, 13)) . '</span>
  3172. </div>
  3173. </div>
  3174. ';
  3175. $inputList .= '<input type="hidden" name="' . $key . '">';
  3176. }
  3177. $homepageList .= '</div>';
  3178. $inputList .= '</form>';
  3179. return $homepageList . $inputList;
  3180. }
  3181. function ombiTVDefault($type)
  3182. {
  3183. switch ($type) {
  3184. case 'all':
  3185. return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
  3186. case 'first':
  3187. return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
  3188. case 'last':
  3189. return ($type == $GLOBALS['ombiTvDefault']) ? true : false;
  3190. default:
  3191. return false;
  3192. }
  3193. return false;
  3194. }