homepage-functions.php 94 KB

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