homepage-functions.php 92 KB

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