homepage-functions.php 97 KB

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