homepage-functions.php 87 KB

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