homepage-functions.php 94 KB

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