homepage-functions.php 96 KB

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