4
0

homepage-functions.php 92 KB

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