homepage-functions.php 94 KB

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