homepage-functions.php 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434
  1. <?php
  2. //homepage order
  3. function homepageOrder(){
  4. $homepageOrder = array(
  5. "homepageOrdercustomhtml" => $GLOBALS['homepageOrdercustomhtml'],
  6. "homepageOrdercustomhtmlTwo" => $GLOBALS['homepageOrdercustomhtmlTwo'],
  7. "homepageOrdernotice" => $GLOBALS['homepageOrdernotice'],
  8. "homepageOrderplexsearch" => $GLOBALS['homepageOrderplexsearch'],
  9. "homepageOrderspeedtest" => $GLOBALS['homepageOrderspeedtest'],
  10. "homepageOrdernzbget" => $GLOBALS['homepageOrdernzbget'],
  11. "homepageOrdersabnzbd" => $GLOBALS['homepageOrdersabnzbd'],
  12. "homepageOrderplexnowplaying" => $GLOBALS['homepageOrderplexnowplaying'],
  13. "homepageOrderplexrecent" => $GLOBALS['homepageOrderplexrecent'],
  14. "homepageOrderplexplaylist" => $GLOBALS['homepageOrderplexplaylist'],
  15. "homepageOrderembynowplaying" => $GLOBALS['homepageOrderembynowplaying'],
  16. "homepageOrderembyrecent" => $GLOBALS['homepageOrderembyrecent'],
  17. "homepageOrderombi" => $GLOBALS['homepageOrderombi'],
  18. "homepageOrdercalendar" => $GLOBALS['homepageOrdercalendar'],
  19. "homepageOrdernoticeguest" => $GLOBALS['homepageOrdernoticeguest'],
  20. "homepageOrdertransmission" => $GLOBALS['homepageOrdertransmission'],
  21. "homepageOrderqBittorrent" => $GLOBALS['homepageOrderqBittorrent'],
  22. "homepageOrderdeluge" => $GLOBALS['homepageOrderdeluge'],
  23. );
  24. asort($homepageOrder);
  25. return $homepageOrder;
  26. }
  27. function buildHomepage(){
  28. $homepageOrder = homepageOrder();
  29. $homepageBuilt = '';
  30. foreach ($homepageOrder as $key => $value) {
  31. $homepageBuilt .= buildHomepageItem($key);
  32. }
  33. return $homepageBuilt;
  34. }
  35. function buildHomepageItem($homepageItem){
  36. $item = '<div id="'.$homepageItem.'">';
  37. switch ($homepageItem) {
  38. case 'homepageOrderplexsearch':
  39. break;
  40. case 'homepageOrdercustomhtml':
  41. if($GLOBALS['homepagCustomHTMLoneEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLoneAuth']) ){
  42. $item .= ($GLOBALS['customHTMLone'] !== '') ? $GLOBALS['customHTMLone'] : '';
  43. }
  44. break;
  45. case 'homepageOrdercustomhtmlTwo':
  46. if($GLOBALS['homepagCustomHTMLtwoEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLtwoAuth']) ){
  47. $item .= ($GLOBALS['customHTMLtwo'] !== '') ? $GLOBALS['customHTMLtwo'] : '';
  48. }
  49. break;
  50. case 'homepageOrdernotice':
  51. break;
  52. case 'homepageOrdernoticeguest':
  53. break;
  54. case 'homepageOrderspeedtest':
  55. break;
  56. case 'homepageOrderqBittorrent':
  57. if($GLOBALS['homepageqBittorrentEnabled']){
  58. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  59. $item .= '
  60. <script>
  61. // homepageOrderqBittorrent
  62. homepageDownloader("qBittorrent", "'.$GLOBALS['homepageDownloadRefresh'].'");
  63. // End homepageOrderqBittorrent
  64. </script>
  65. ';
  66. }
  67. break;
  68. case 'homepageOrderdeluge':
  69. if($GLOBALS['homepageDelugeEnabled']){
  70. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  71. $item .= '
  72. <script>
  73. // Deluge
  74. homepageDownloader("deluge", "'.$GLOBALS['homepageDownloadRefresh'].'");
  75. // End Deluge
  76. </script>
  77. ';
  78. }
  79. break;
  80. case 'homepageOrdertransmission':
  81. if($GLOBALS['homepageTransmissionEnabled']){
  82. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  83. $item .= '
  84. <script>
  85. // Transmission
  86. homepageDownloader("transmission", "'.$GLOBALS['homepageDownloadRefresh'].'");
  87. // End Transmission
  88. </script>
  89. ';
  90. }
  91. break;
  92. case 'homepageOrdernzbget':
  93. if($GLOBALS['homepageNzbgetEnabled']){
  94. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  95. $item .= '
  96. <script>
  97. // NZBGet
  98. homepageDownloader("nzbget", "'.$GLOBALS['homepageDownloadRefresh'].'");
  99. // End NZBGet
  100. </script>
  101. ';
  102. }
  103. break;
  104. case 'homepageOrdersabnzbd':
  105. if($GLOBALS['homepageSabnzbdEnabled']){
  106. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
  107. $item .= '
  108. <script>
  109. // SabNZBd
  110. homepageDownloader("sabnzbd", "'.$GLOBALS['homepageDownloadRefresh'].'");
  111. // End SabNZBd
  112. </script>
  113. ';
  114. }
  115. break;
  116. case 'homepageOrderplexnowplaying':
  117. if($GLOBALS['homepagePlexStreams']){
  118. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
  119. $item .= '
  120. <script>
  121. // Plex Stream
  122. homepageStream("plex", "'.$GLOBALS['homepageStreamRefresh'].'");
  123. // End Plex Stream
  124. </script>
  125. ';
  126. }
  127. break;
  128. case 'homepageOrderplexrecent':
  129. if($GLOBALS['homepagePlexRecent']){
  130. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
  131. $item .= '
  132. <script>
  133. // Plex Recent
  134. homepageRecent("plex", "'.$GLOBALS['homepageRecentRefresh'].'");
  135. // End Plex Recent
  136. </script>
  137. ';
  138. }
  139. break;
  140. case 'homepageOrderplexplaylist':
  141. if($GLOBALS['homepagePlexPlaylist']){
  142. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Playlists...</h2></div>';
  143. $item .= '
  144. <script>
  145. // Plex Playlist
  146. homepagePlaylist("plex");
  147. // End Plex Playlist
  148. </script>
  149. ';
  150. }
  151. break;
  152. case 'homepageOrderembynowplaying':
  153. if($GLOBALS['homepageEmbyStreams']){
  154. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
  155. $item .= '
  156. <script>
  157. // Emby Stream
  158. homepageStream("emby", "'.$GLOBALS['homepageStreamRefresh'].'");
  159. // End Emby Stream
  160. </script>
  161. ';
  162. }
  163. break;
  164. case 'homepageOrderembyrecent':
  165. if($GLOBALS['homepageEmbyRecent']){
  166. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
  167. $item .= '
  168. <script>
  169. // Emby Recent
  170. homepageRecent("emby", "'.$GLOBALS['homepageRecentRefresh'].'");
  171. // End Emby Recent
  172. </script>
  173. ';
  174. }
  175. break;
  176. case 'homepageOrderombi':
  177. if($GLOBALS['homepageOmbiEnabled']){
  178. $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Requests...</h2></div>';
  179. $item .= '
  180. <script>
  181. // Ombi Requests
  182. homepageRequests("'.$GLOBALS['ombiRefresh'].'");
  183. // End Ombi Requests
  184. </script>
  185. ';
  186. }
  187. break;
  188. case 'homepageOrdercalendar':
  189. $item .= '
  190. <div id="calendar" class="fc fc-ltr animated zoomIn"></div>
  191. <script>
  192. // Calendar
  193. homepageCalendar("'.$GLOBALS['calendarRefresh'].'");
  194. // End Calendar
  195. </script>
  196. ';
  197. break;
  198. default:
  199. # code...
  200. break;
  201. }
  202. return $item.'</div>';
  203. }
  204. function getHomepageList(){
  205. $groups = groupSelect();
  206. $time = array(
  207. array(
  208. 'name' => '5',
  209. 'value' => '5000'
  210. ),
  211. array(
  212. 'name' => '10',
  213. 'value' => '10000'
  214. ),
  215. array(
  216. 'name' => '15',
  217. 'value' => '15000'
  218. ),
  219. array(
  220. 'name' => '30',
  221. 'value' => '30000'
  222. ),
  223. array(
  224. 'name' => '60 [1 Minute]',
  225. 'value' => '60000'
  226. ),
  227. array(
  228. 'name' => '300 [5 Minutes]',
  229. 'value' => '300000'
  230. ),
  231. array(
  232. 'name' => '900 [15 Minutes]',
  233. 'value' => '900000'
  234. ),
  235. array(
  236. 'name' => '1800 [30 Minutes]',
  237. 'value' => '1800000'
  238. ),
  239. array(
  240. 'name' => '3600 [1 Hour]',
  241. 'value' => '3600000'
  242. ),
  243. );
  244. $limit = array(
  245. array(
  246. 'name' => '1 Item',
  247. 'value' => '1'
  248. ),
  249. array(
  250. 'name' => '2 Items',
  251. 'value' => '2'
  252. ),
  253. array(
  254. 'name' => '3 Items',
  255. 'value' => '3'
  256. ),
  257. array(
  258. 'name' => '4 Items',
  259. 'value' => '4'
  260. ),
  261. array(
  262. 'name' => '5 Items',
  263. 'value' => '5'
  264. ),
  265. array(
  266. 'name' => '6 Items',
  267. 'value' => '6'
  268. ),
  269. array(
  270. 'name' => '7 Items',
  271. 'value' => '7'
  272. ),
  273. array(
  274. 'name' => '8 Items',
  275. 'value' => '8'
  276. ),
  277. array(
  278. 'name' => 'Unlimited',
  279. 'value' => '1000'
  280. ),
  281. );
  282. $day = array(
  283. array(
  284. 'name' => 'Sunday',
  285. 'value' => '0'
  286. ),
  287. array(
  288. 'name' => 'Monday',
  289. 'value' => '1'
  290. ),
  291. array(
  292. 'name' => 'Tueday',
  293. 'value' => '2'
  294. ),
  295. array(
  296. 'name' => 'Wednesday',
  297. 'value' => '3'
  298. ),
  299. array(
  300. 'name' => 'Thursday',
  301. 'value' => '4'
  302. ),
  303. array(
  304. 'name' => 'Friday',
  305. 'value' => '5'
  306. ),
  307. array(
  308. 'name' => 'Saturday',
  309. 'value' => '6'
  310. )
  311. );
  312. $calendarDefault = array(
  313. array(
  314. 'name' => 'Month',
  315. 'value' => 'month'
  316. ),
  317. array(
  318. 'name' => 'Day',
  319. 'value' => 'basicDay'
  320. ),
  321. array(
  322. 'name' => 'Week',
  323. 'value' => 'basicWeek'
  324. )
  325. );
  326. $timeFormat = array(
  327. array(
  328. 'name' => '6p',
  329. 'value' => 'h(:mm)t'
  330. ),
  331. array(
  332. 'name' => '6:00p',
  333. 'value' => 'h:mmt'
  334. ),
  335. array(
  336. 'name' => '6:00',
  337. 'value' => 'h:mm'
  338. ),
  339. array(
  340. 'name' => '18',
  341. 'value' => 'H(:mm)'
  342. ),
  343. array(
  344. 'name' => '18:00',
  345. 'value' => 'H:mm'
  346. )
  347. );
  348. $qBittorrentSortOptions = array(
  349. array(
  350. 'name' => 'Hash',
  351. 'value' => 'hash'
  352. ),
  353. array(
  354. 'name' => 'Name',
  355. 'value' => 'name'
  356. ),
  357. array(
  358. 'name' => 'Size',
  359. 'value' => 'size'
  360. ),
  361. array(
  362. 'name' => 'Progress',
  363. 'value' => 'progress'
  364. ),
  365. array(
  366. 'name' => 'Download Speed',
  367. 'value' => 'dlspeed'
  368. ),
  369. array(
  370. 'name' => 'Upload Speed',
  371. 'value' => 'upspeed'
  372. ),
  373. array(
  374. 'name' => 'Priority',
  375. 'value' => 'priority'
  376. ),
  377. array(
  378. 'name' => 'Number of Seeds',
  379. 'value' => 'num_seeds'
  380. ),
  381. array(
  382. 'name' => 'Number of Seeds in Swarm',
  383. 'value' => 'num_complete'
  384. ),
  385. array(
  386. 'name' => 'Number of Leechers',
  387. 'value' => 'num_leechs'
  388. ),
  389. array(
  390. 'name' => 'Number of Leechers in Swarm',
  391. 'value' => 'num_incomplete'
  392. ),
  393. array(
  394. 'name' => 'Ratio',
  395. 'value' => 'ratio'
  396. ),
  397. array(
  398. 'name' => 'ETA',
  399. 'value' => 'eta'
  400. ),
  401. array(
  402. 'name' => 'State',
  403. 'value' => 'state'
  404. ),
  405. array(
  406. 'name' => 'Category',
  407. 'value' => 'category'
  408. )
  409. );
  410. return array(
  411. array(
  412. 'name' => 'Plex',
  413. 'enabled' => true,
  414. 'image' => 'plugins/images/tabs/plex.png',
  415. 'category' => 'Media Server',
  416. 'settings' => array(
  417. 'Enable' => array(
  418. array(
  419. 'type' => 'switch',
  420. 'name' => 'homepagePlexEnabled',
  421. 'label' => 'Enable',
  422. 'value' => $GLOBALS['homepagePlexEnabled']
  423. ),
  424. array(
  425. 'type' => 'select',
  426. 'name' => 'homepagePlexAuth',
  427. 'label' => 'Minimum Authentication',
  428. 'value' => $GLOBALS['homepagePlexAuth'],
  429. 'options' => $groups
  430. )
  431. ),
  432. 'Connection' => array(
  433. array(
  434. 'type' => 'input',
  435. 'name' => 'plexURL',
  436. 'label' => 'URL',
  437. 'value' => $GLOBALS['plexURL'],
  438. 'placeholder' => 'http(s)://hostname:port'
  439. ),
  440. array(
  441. 'type' => 'password-alt',
  442. 'name' => 'plexToken',
  443. 'label' => 'Token',
  444. 'value' => $GLOBALS['plexToken']
  445. ),
  446. array(
  447. 'type' => 'password-alt',
  448. 'name' => 'plexID',
  449. 'label' => 'Plex Machine',
  450. 'value' => $GLOBALS['plexID']
  451. )
  452. ),
  453. 'Active Streams' => array(
  454. array(
  455. 'type' => 'switch',
  456. 'name' => 'homepagePlexStreams',
  457. 'label' => 'Enable',
  458. 'value' => $GLOBALS['homepagePlexStreams']
  459. ),
  460. array(
  461. 'type' => 'select',
  462. 'name' => 'homepagePlexStreamsAuth',
  463. 'label' => 'Minimum Authorization',
  464. 'value' => $GLOBALS['homepagePlexStreamsAuth'],
  465. 'options' => $groups
  466. ),
  467. array(
  468. 'type' => 'switch',
  469. 'name' => 'homepageShowStreamNames',
  470. 'label' => 'User Information',
  471. 'value' => $GLOBALS['homepageShowStreamNames']
  472. ),
  473. array(
  474. 'type' => 'select',
  475. 'name' => 'homepageShowStreamNamesAuth',
  476. 'label' => 'Minimum Authorization',
  477. 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
  478. 'options' => $groups
  479. ),
  480. array(
  481. 'type' => 'select',
  482. 'name' => 'homepageStreamRefresh',
  483. 'label' => 'Refresh Seconds',
  484. 'value' => $GLOBALS['homepageStreamRefresh'],
  485. 'options' => $time
  486. ),
  487. ),
  488. 'Recent Items' => array(
  489. array(
  490. 'type' => 'switch',
  491. 'name' => 'homepagePlexRecent',
  492. 'label' => 'Enable',
  493. 'value' => $GLOBALS['homepagePlexRecent']
  494. ),
  495. array(
  496. 'type' => 'select',
  497. 'name' => 'homepagePlexRecentAuth',
  498. 'label' => 'Minimum Authorization',
  499. 'value' => $GLOBALS['homepagePlexRecentAuth'],
  500. 'options' => $groups
  501. ),
  502. array(
  503. 'type' => 'select',
  504. 'name' => 'homepageRecentRefresh',
  505. 'label' => 'Refresh Seconds',
  506. 'value' => $GLOBALS['homepageRecentRefresh'],
  507. 'options' => $time
  508. ),
  509. ),
  510. 'Playlists' => array(
  511. array(
  512. 'type' => 'switch',
  513. 'name' => 'homepagePlexPlaylist',
  514. 'label' => 'Enable',
  515. 'value' => $GLOBALS['homepagePlexPlaylist']
  516. ),
  517. array(
  518. 'type' => 'select',
  519. 'name' => 'homepagePlexPlaylistAuth',
  520. 'label' => 'Minimum Authorization',
  521. 'value' => $GLOBALS['homepagePlexPlaylistAuth'],
  522. 'options' => $groups
  523. ),
  524. ),
  525. 'Misc Options' => array(
  526. array(
  527. 'type' => 'input',
  528. 'name' => 'plexTabName',
  529. 'label' => 'Plex Tab Name',
  530. 'value' => $GLOBALS['plexTabName'],
  531. 'placeholder' => 'Only use if you have Plex in a reverse proxy'
  532. ),
  533. array(
  534. 'type' => 'input',
  535. 'name' => 'plexTabURL',
  536. 'label' => 'Plex Tab WAN URL',
  537. 'value' => $GLOBALS['plexTabURL'],
  538. 'placeholder' => 'http(s)://hostname:port'
  539. )
  540. )
  541. )
  542. ),
  543. array(
  544. 'name' => 'Emby',
  545. 'enabled' => true,
  546. 'image' => 'plugins/images/tabs/emby.png',
  547. 'category' => 'Media Server',
  548. 'settings' => array(
  549. 'Enable' => array(
  550. array(
  551. 'type' => 'switch',
  552. 'name' => 'homepageEmbyEnabled',
  553. 'label' => 'Enable',
  554. 'value' => $GLOBALS['homepageEmbyEnabled']
  555. ),
  556. array(
  557. 'type' => 'select',
  558. 'name' => 'homepageEmbyAuth',
  559. 'label' => 'Minimum Authentication',
  560. 'value' => $GLOBALS['homepageEmbyAuth'],
  561. 'options' => $groups
  562. )
  563. ),
  564. 'Connection' => array(
  565. array(
  566. 'type' => 'input',
  567. 'name' => 'embyURL',
  568. 'label' => 'URL',
  569. 'value' => $GLOBALS['embyURL'],
  570. 'placeholder' => 'http(s)://hostname:port'
  571. ),
  572. array(
  573. 'type' => 'password-alt',
  574. 'name' => 'embyToken',
  575. 'label' => 'Token',
  576. 'value' => $GLOBALS['embyToken']
  577. )
  578. ),
  579. 'Active Streams' => array(
  580. array(
  581. 'type' => 'switch',
  582. 'name' => 'homepageEmbyStreams',
  583. 'label' => 'Enable',
  584. 'value' => $GLOBALS['homepageEmbyStreams']
  585. ),
  586. array(
  587. 'type' => 'select',
  588. 'name' => 'homepageEmbyStreamsAuth',
  589. 'label' => 'Minimum Authorization',
  590. 'value' => $GLOBALS['homepageEmbyStreamsAuth'],
  591. 'options' => $groups
  592. ),
  593. array(
  594. 'type' => 'switch',
  595. 'name' => 'homepageShowStreamNames',
  596. 'label' => 'User Information',
  597. 'value' => $GLOBALS['homepageShowStreamNames']
  598. ),
  599. array(
  600. 'type' => 'select',
  601. 'name' => 'homepageShowStreamNamesAuth',
  602. 'label' => 'Minimum Authorization',
  603. 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
  604. 'options' => $groups
  605. ),
  606. array(
  607. 'type' => 'select',
  608. 'name' => 'homepageStreamRefresh',
  609. 'label' => 'Refresh Seconds',
  610. 'value' => $GLOBALS['homepageStreamRefresh'],
  611. 'options' => $time
  612. ),
  613. ),
  614. 'Recent Items' => array(
  615. array(
  616. 'type' => 'switch',
  617. 'name' => 'homepageEmbyRecent',
  618. 'label' => 'Enable',
  619. 'value' => $GLOBALS['homepageEmbyRecent']
  620. ),
  621. array(
  622. 'type' => 'select',
  623. 'name' => 'homepageEmbyRecentAuth',
  624. 'label' => 'Minimum Authorization',
  625. 'value' => $GLOBALS['homepageEmbyRecentAuth'],
  626. 'options' => $groups
  627. ),
  628. array(
  629. 'type' => 'select',
  630. 'name' => 'homepageRecentRefresh',
  631. 'label' => 'Refresh Seconds',
  632. 'value' => $GLOBALS['homepageRecentRefresh'],
  633. 'options' => $time
  634. ),
  635. ),
  636. 'Misc Options' => array(
  637. array(
  638. 'type' => 'input',
  639. 'name' => 'embyTabName',
  640. 'label' => 'Emby Tab Name',
  641. 'value' => $GLOBALS['embyTabName'],
  642. 'placeholder' => 'Only use if you have Plex in a reverse proxy'
  643. ),
  644. array(
  645. 'type' => 'input',
  646. 'name' => 'embyTabURL',
  647. 'label' => 'Emby Tab WAN URL',
  648. 'value' => $GLOBALS['embyTabURL'],
  649. 'placeholder' => 'http(s)://hostname:port'
  650. )
  651. )
  652. )
  653. ),
  654. array(
  655. 'name' => 'SabNZBD',
  656. 'enabled' => false,
  657. 'image' => 'plugins/images/tabs/sabnzbd.png',
  658. 'category' => 'Downloader',
  659. 'settings' => array(
  660. 'Enable' => array(
  661. array(
  662. 'type' => 'switch',
  663. 'name' => 'homepageSabnzbdEnabled',
  664. 'label' => 'Enable',
  665. 'value' => $GLOBALS['homepageSabnzbdEnabled']
  666. ),
  667. array(
  668. 'type' => 'select',
  669. 'name' => 'homepageSabnzbdAuth',
  670. 'label' => 'Minimum Authentication',
  671. 'value' => $GLOBALS['homepageSabnzbdAuth'],
  672. 'options' => $groups
  673. )
  674. ),
  675. 'Connection' => array(
  676. array(
  677. 'type' => 'input',
  678. 'name' => 'sabnzbdURL',
  679. 'label' => 'URL',
  680. 'value' => $GLOBALS['sabnzbdURL'],
  681. 'placeholder' => 'http(s)://hostname:port'
  682. ),
  683. array(
  684. 'type' => 'password-alt',
  685. 'name' => 'sabnzbdToken',
  686. 'label' => 'Token',
  687. 'value' => $GLOBALS['sabnzbdToken']
  688. )
  689. ),
  690. 'Misc Options' => array(
  691. array(
  692. 'type' => 'select',
  693. 'name' => 'homepageDownloadRefresh',
  694. 'label' => 'Refresh Seconds',
  695. 'value' => $GLOBALS['homepageDownloadRefresh'],
  696. 'options' => $time
  697. )
  698. )
  699. )
  700. ),
  701. array(
  702. 'name' => 'NZBGet',
  703. 'enabled' => false,
  704. 'image' => 'plugins/images/tabs/nzbget.png',
  705. 'category' => 'Downloader',
  706. 'settings' => array(
  707. 'Enable' => array(
  708. array(
  709. 'type' => 'switch',
  710. 'name' => 'homepageNzbgetEnabled',
  711. 'label' => 'Enable',
  712. 'value' => $GLOBALS['homepageNzbgetEnabled']
  713. ),
  714. array(
  715. 'type' => 'select',
  716. 'name' => 'homepageNzbgetAuth',
  717. 'label' => 'Minimum Authentication',
  718. 'value' => $GLOBALS['homepageNzbgetAuth'],
  719. 'options' => $groups
  720. )
  721. ),
  722. 'Connection' => array(
  723. array(
  724. 'type' => 'input',
  725. 'name' => 'nzbgetURL',
  726. 'label' => 'URL',
  727. 'value' => $GLOBALS['nzbgetURL'],
  728. 'placeholder' => 'http(s)://hostname:port'
  729. ),
  730. array(
  731. 'type' => 'input',
  732. 'name' => 'nzbgetUsername',
  733. 'label' => 'Username',
  734. 'value' => $GLOBALS['nzbgetUsername']
  735. ),
  736. array(
  737. 'type' => 'password',
  738. 'name' => 'nzbgetPassword',
  739. 'label' => 'Password',
  740. 'value' => $GLOBALS['nzbgetPassword']
  741. )
  742. ),
  743. 'Misc Options' => array(
  744. array(
  745. 'type' => 'select',
  746. 'name' => 'homepageDownloadRefresh',
  747. 'label' => 'Refresh Seconds',
  748. 'value' => $GLOBALS['homepageDownloadRefresh'],
  749. 'options' => $time
  750. )
  751. )
  752. )
  753. ),
  754. array(
  755. 'name' => 'Transmission',
  756. 'enabled' => false,
  757. 'image' => 'plugins/images/tabs/transmission.png',
  758. 'category' => 'Downloader',
  759. 'settings' => array(
  760. 'Enable' => array(
  761. array(
  762. 'type' => 'switch',
  763. 'name' => 'homepageTransmissionEnabled',
  764. 'label' => 'Enable',
  765. 'value' => $GLOBALS['homepageTransmissionEnabled']
  766. ),
  767. array(
  768. 'type' => 'select',
  769. 'name' => 'homepageTransmissionAuth',
  770. 'label' => 'Minimum Authentication',
  771. 'value' => $GLOBALS['homepageTransmissionAuth'],
  772. 'options' => $groups
  773. )
  774. ),
  775. 'Connection' => array(
  776. array(
  777. 'type' => 'input',
  778. 'name' => 'transmissionURL',
  779. 'label' => 'URL',
  780. 'value' => $GLOBALS['transmissionURL'],
  781. 'placeholder' => 'http(s)://hostname:port'
  782. ),
  783. array(
  784. 'type' => 'input',
  785. 'name' => 'transmissionUsername',
  786. 'label' => 'Username',
  787. 'value' => $GLOBALS['transmissionUsername']
  788. ),
  789. array(
  790. 'type' => 'password',
  791. 'name' => 'transmissionPassword',
  792. 'label' => 'Password',
  793. 'value' => $GLOBALS['transmissionPassword']
  794. )
  795. ),
  796. 'Misc Options' => array(
  797. array(
  798. 'type' => 'switch',
  799. 'name' => 'transmissionHideSeeding',
  800. 'label' => 'Hide Seeding',
  801. 'value' => $GLOBALS['transmissionHideSeeding']
  802. ),array(
  803. 'type' => 'switch',
  804. 'name' => 'transmissionHideCompleted',
  805. 'label' => 'Hide Completed',
  806. 'value' => $GLOBALS['transmissionHideCompleted']
  807. ),
  808. array(
  809. 'type' => 'select',
  810. 'name' => 'homepageDownloadRefresh',
  811. 'label' => 'Refresh Seconds',
  812. 'value' => $GLOBALS['homepageDownloadRefresh'],
  813. 'options' => $time
  814. )
  815. )
  816. )
  817. ),
  818. array(
  819. 'name' => 'qBittorrent',
  820. 'enabled' => false,
  821. 'image' => 'plugins/images/tabs/qBittorrent.png',
  822. 'category' => 'Downloader',
  823. 'settings' => array(
  824. 'Enable' => array(
  825. array(
  826. 'type' => 'switch',
  827. 'name' => 'homepageqBittorrentEnabled',
  828. 'label' => 'Enable',
  829. 'value' => $GLOBALS['homepageqBittorrentEnabled']
  830. ),
  831. array(
  832. 'type' => 'select',
  833. 'name' => 'homepageqBittorrentAuth',
  834. 'label' => 'Minimum Authentication',
  835. 'value' => $GLOBALS['homepageqBittorrentAuth'],
  836. 'options' => $groups
  837. )
  838. ),
  839. 'Connection' => array(
  840. array(
  841. 'type' => 'input',
  842. 'name' => 'qBittorrentURL',
  843. 'label' => 'URL',
  844. 'value' => $GLOBALS['qBittorrentURL'],
  845. 'placeholder' => 'http(s)://hostname:port'
  846. ),
  847. array(
  848. 'type' => 'input',
  849. 'name' => 'qBittorrentUsername',
  850. 'label' => 'Username',
  851. 'value' => $GLOBALS['qBittorrentUsername']
  852. ),
  853. array(
  854. 'type' => 'password',
  855. 'name' => 'qBittorrentPassword',
  856. 'label' => 'Password',
  857. 'value' => $GLOBALS['qBittorrentPassword']
  858. )
  859. ),
  860. 'Misc Options' => array(
  861. array(
  862. 'type' => 'switch',
  863. 'name' => 'qBittorrentHideSeeding',
  864. 'label' => 'Hide Seeding',
  865. 'value' => $GLOBALS['qBittorrentHideSeeding']
  866. ),array(
  867. 'type' => 'switch',
  868. 'name' => 'qBittorrentnHideCompleted',
  869. 'label' => 'Hide Completed',
  870. 'value' => $GLOBALS['qBittorrentHideCompleted']
  871. ),
  872. array(
  873. 'type' => 'select',
  874. 'name' => 'qBittorrentSortOrder',
  875. 'label' => 'Order',
  876. 'value' => $GLOBALS['qBittorrentSortOrder'],
  877. 'options' => $qBittorrentSortOptions
  878. ),array(
  879. 'type' => 'switch',
  880. 'name' => 'qBittorrentReverseSorting',
  881. 'label' => 'Reverse Sorting',
  882. 'value' => $GLOBALS['qBittorrentReverseSorting']
  883. ),
  884. array(
  885. 'type' => 'select',
  886. 'name' => 'homepageDownloadRefresh',
  887. 'label' => 'Refresh Seconds',
  888. 'value' => $GLOBALS['homepageDownloadRefresh'],
  889. 'options' => $time
  890. )
  891. )
  892. )
  893. ),
  894. array(
  895. 'name' => 'Deluge',
  896. 'enabled' => false,
  897. 'image' => 'plugins/images/tabs/deluge.png',
  898. 'category' => 'Downloader',
  899. 'settings' => array(
  900. 'custom' => '
  901. <div class="row">
  902. <div class="col-lg-12">
  903. <div class="panel panel-info">
  904. <div class="panel-heading">
  905. <span lang="en">Notice</span>
  906. </div>
  907. <div class="panel-wrapper collapse in" aria-expanded="true">
  908. <div class="panel-body">
  909. <ul class="list-icons">
  910. <li><i class="fa fa-chevron-right text-danger"></i> <a href="https://github.com/idlesign/deluge-webapi/raw/master/dist/WebAPI-0.2.0-py2.7.egg" target="_blank">Download Plugin</a></li>
  911. <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>
  912. <li><i class="fa fa-chevron-right text-danger"></i> Activate WebAPI plugin </li>
  913. </ul>
  914. </div>
  915. </div>
  916. </div>
  917. </div>
  918. </div>
  919. ',
  920. 'Enable' => array(
  921. array(
  922. 'type' => 'switch',
  923. 'name' => 'homepageDelugeEnabled',
  924. 'label' => 'Enable',
  925. 'value' => $GLOBALS['homepageDelugeEnabled']
  926. ),
  927. array(
  928. 'type' => 'select',
  929. 'name' => 'homepageDelugeAuth',
  930. 'label' => 'Minimum Authentication',
  931. 'value' => $GLOBALS['homepageDelugeAuth'],
  932. 'options' => $groups
  933. )
  934. ),
  935. 'Connection' => array(
  936. array(
  937. 'type' => 'input',
  938. 'name' => 'delugeURL',
  939. 'label' => 'URL',
  940. 'value' => $GLOBALS['delugeURL'],
  941. 'placeholder' => 'http(s)://hostname:port'
  942. ),
  943. array(
  944. 'type' => 'password',
  945. 'name' => 'delugePassword',
  946. 'label' => 'Password',
  947. 'value' => $GLOBALS['delugePassword']
  948. )
  949. ),
  950. 'Misc Options' => array(
  951. array(
  952. 'type' => 'switch',
  953. 'name' => 'delugeHideSeeding',
  954. 'label' => 'Hide Seeding',
  955. 'value' => $GLOBALS['delugeHideSeeding']
  956. ),array(
  957. 'type' => 'switch',
  958. 'name' => 'delugeHideCompleted',
  959. 'label' => 'Hide Completed',
  960. 'value' => $GLOBALS['delugeHideCompleted']
  961. ),
  962. array(
  963. 'type' => 'select',
  964. 'name' => 'homepageDownloadRefresh',
  965. 'label' => 'Refresh Seconds',
  966. 'value' => $GLOBALS['homepageDownloadRefresh'],
  967. 'options' => $time
  968. )
  969. )
  970. )
  971. ),
  972. array(
  973. 'name' => 'Sonarr',
  974. 'enabled' => false,
  975. 'image' => 'plugins/images/tabs/sonarr.png',
  976. 'category' => 'PVR',
  977. 'settings' => array(
  978. 'Enable' => array(
  979. array(
  980. 'type' => 'switch',
  981. 'name' => 'homepageSonarrEnabled',
  982. 'label' => 'Enable',
  983. 'value' => $GLOBALS['homepageSonarrEnabled']
  984. ),
  985. array(
  986. 'type' => 'select',
  987. 'name' => 'homepageSonarrAuth',
  988. 'label' => 'Minimum Authentication',
  989. 'value' => $GLOBALS['homepageSonarrAuth'],
  990. 'options' => $groups
  991. )
  992. ),
  993. 'Connection' => array(
  994. array(
  995. 'type' => 'input',
  996. 'name' => 'sonarrURL',
  997. 'label' => 'URL',
  998. 'value' => $GLOBALS['sonarrURL'],
  999. 'placeholder' => 'http(s)://hostname:port'
  1000. ),
  1001. array(
  1002. 'type' => 'password-alt',
  1003. 'name' => 'sonarrToken',
  1004. 'label' => 'Token',
  1005. 'value' => $GLOBALS['sonarrToken']
  1006. )
  1007. ),
  1008. 'Misc Options' => array(
  1009. array(
  1010. 'type' => 'input',
  1011. 'name' => 'calendarStart',
  1012. 'label' => '# of Days Before',
  1013. 'value' => $GLOBALS['calendarStart'],
  1014. 'placeholder' => ''
  1015. ),
  1016. array(
  1017. 'type' => 'input',
  1018. 'name' => 'calendarEnd',
  1019. 'label' => '# of Days After',
  1020. 'value' => $GLOBALS['calendarEnd'],
  1021. 'placeholder' => ''
  1022. ),
  1023. array(
  1024. 'type' => 'select',
  1025. 'name' => 'calendarFirstDay',
  1026. 'label' => 'Start Day',
  1027. 'value' => $GLOBALS['calendarFirstDay'],
  1028. 'options' => $day
  1029. ),
  1030. array(
  1031. 'type' => 'select',
  1032. 'name' => 'calendarDefault',
  1033. 'label' => 'Default View',
  1034. 'value' => $GLOBALS['calendarDefault'],
  1035. 'options' => $calendarDefault
  1036. ),
  1037. array(
  1038. 'type' => 'select',
  1039. 'name' => 'calendarTimeFormat',
  1040. 'label' => 'Time Format',
  1041. 'value' => $GLOBALS['calendarTimeFormat'],
  1042. 'options' => $timeFormat
  1043. ),
  1044. array(
  1045. 'type' => 'select',
  1046. 'name' => 'calendarLimit',
  1047. 'label' => 'Items Per Day',
  1048. 'value' => $GLOBALS['calendarLimit'],
  1049. 'options' => $limit
  1050. ),
  1051. array(
  1052. 'type' => 'select',
  1053. 'name' => 'calendarRefresh',
  1054. 'label' => 'Refresh Seconds',
  1055. 'value' => $GLOBALS['calendarRefresh'],
  1056. 'options' => $time
  1057. )
  1058. )
  1059. )
  1060. ),
  1061. array(
  1062. 'name' => 'Radarr',
  1063. 'enabled' => false,
  1064. 'image' => 'plugins/images/tabs/radarr.png',
  1065. 'category' => 'PVR',
  1066. 'settings' => array(
  1067. 'Enable' => array(
  1068. array(
  1069. 'type' => 'switch',
  1070. 'name' => 'homepageRadarrEnabled',
  1071. 'label' => 'Enable',
  1072. 'value' => $GLOBALS['homepageRadarrEnabled']
  1073. ),
  1074. array(
  1075. 'type' => 'select',
  1076. 'name' => 'homepageRadarrAuth',
  1077. 'label' => 'Minimum Authentication',
  1078. 'value' => $GLOBALS['homepageRadarrAuth'],
  1079. 'options' => $groups
  1080. )
  1081. ),
  1082. 'Connection' => array(
  1083. array(
  1084. 'type' => 'input',
  1085. 'name' => 'radarrURL',
  1086. 'label' => 'URL',
  1087. 'value' => $GLOBALS['radarrURL'],
  1088. 'placeholder' => 'http(s)://hostname:port'
  1089. ),
  1090. array(
  1091. 'type' => 'password-alt',
  1092. 'name' => 'radarrToken',
  1093. 'label' => 'Token',
  1094. 'value' => $GLOBALS['radarrToken']
  1095. )
  1096. ),
  1097. 'Misc Options' => array(
  1098. array(
  1099. 'type' => 'input',
  1100. 'name' => 'calendarStart',
  1101. 'label' => '# of Days Before',
  1102. 'value' => $GLOBALS['calendarStart'],
  1103. 'placeholder' => ''
  1104. ),
  1105. array(
  1106. 'type' => 'input',
  1107. 'name' => 'calendarEnd',
  1108. 'label' => '# of Days After',
  1109. 'value' => $GLOBALS['calendarEnd'],
  1110. 'placeholder' => ''
  1111. ),
  1112. array(
  1113. 'type' => 'select',
  1114. 'name' => 'calendarFirstDay',
  1115. 'label' => 'Start Day',
  1116. 'value' => $GLOBALS['calendarFirstDay'],
  1117. 'options' => $day
  1118. ),
  1119. array(
  1120. 'type' => 'select',
  1121. 'name' => 'calendarDefault',
  1122. 'label' => 'Default View',
  1123. 'value' => $GLOBALS['calendarDefault'],
  1124. 'options' => $calendarDefault
  1125. ),
  1126. array(
  1127. 'type' => 'select',
  1128. 'name' => 'calendarTimeFormat',
  1129. 'label' => 'Time Format',
  1130. 'value' => $GLOBALS['calendarTimeFormat'],
  1131. 'options' => $timeFormat
  1132. ),
  1133. array(
  1134. 'type' => 'select',
  1135. 'name' => 'calendarLimit',
  1136. 'label' => 'Items Per Day',
  1137. 'value' => $GLOBALS['calendarLimit'],
  1138. 'options' => $limit
  1139. ),
  1140. array(
  1141. 'type' => 'select',
  1142. 'name' => 'calendarRefresh',
  1143. 'label' => 'Refresh Seconds',
  1144. 'value' => $GLOBALS['calendarRefresh'],
  1145. 'options' => $time
  1146. )
  1147. )
  1148. )
  1149. ),
  1150. array(
  1151. 'name' => 'CouchPotato',
  1152. 'enabled' => false,
  1153. 'image' => 'plugins/images/tabs/couchpotato.png',
  1154. 'category' => 'PVR',
  1155. 'settings' => array(
  1156. 'Enable' => array(
  1157. array(
  1158. 'type' => 'switch',
  1159. 'name' => 'homepageCouchpotatoEnabled',
  1160. 'label' => 'Enable',
  1161. 'value' => $GLOBALS['homepageCouchpotatoEnabled']
  1162. ),
  1163. array(
  1164. 'type' => 'select',
  1165. 'name' => 'homepageCouchpotatoAuth',
  1166. 'label' => 'Minimum Authentication',
  1167. 'value' => $GLOBALS['homepageCouchpotatoAuth'],
  1168. 'options' => $groups
  1169. )
  1170. ),
  1171. 'Connection' => array(
  1172. array(
  1173. 'type' => 'input',
  1174. 'name' => 'couchpotatoURL',
  1175. 'label' => 'URL',
  1176. 'value' => $GLOBALS['couchpotatoURL'],
  1177. 'placeholder' => 'http(s)://hostname:port'
  1178. ),
  1179. array(
  1180. 'type' => 'password-alt',
  1181. 'name' => 'couchpotatoToken',
  1182. 'label' => 'Token',
  1183. 'value' => $GLOBALS['couchpotatoToken']
  1184. )
  1185. ),
  1186. 'Misc Options' => array(
  1187. array(
  1188. 'type' => 'select',
  1189. 'name' => 'calendarFirstDay',
  1190. 'label' => 'Start Day',
  1191. 'value' => $GLOBALS['calendarFirstDay'],
  1192. 'options' => $day
  1193. ),
  1194. array(
  1195. 'type' => 'select',
  1196. 'name' => 'calendarDefault',
  1197. 'label' => 'Default View',
  1198. 'value' => $GLOBALS['calendarDefault'],
  1199. 'options' => $calendarDefault
  1200. ),
  1201. array(
  1202. 'type' => 'select',
  1203. 'name' => 'calendarTimeFormat',
  1204. 'label' => 'Time Format',
  1205. 'value' => $GLOBALS['calendarTimeFormat'],
  1206. 'options' => $timeFormat
  1207. ),
  1208. array(
  1209. 'type' => 'select',
  1210. 'name' => 'calendarLimit',
  1211. 'label' => 'Items Per Day',
  1212. 'value' => $GLOBALS['calendarLimit'],
  1213. 'options' => $limit
  1214. ),
  1215. array(
  1216. 'type' => 'select',
  1217. 'name' => 'calendarRefresh',
  1218. 'label' => 'Refresh Seconds',
  1219. 'value' => $GLOBALS['calendarRefresh'],
  1220. 'options' => $time
  1221. )
  1222. )
  1223. )
  1224. ),
  1225. array(
  1226. 'name' => 'SickRage',
  1227. 'enabled' => false,
  1228. 'image' => 'plugins/images/tabs/sickrage.png',
  1229. 'category' => 'PVR',
  1230. 'settings' => array(
  1231. 'Enable' => array(
  1232. array(
  1233. 'type' => 'switch',
  1234. 'name' => 'homepageSickrageEnabled',
  1235. 'label' => 'Enable',
  1236. 'value' => $GLOBALS['homepageSickrageEnabled']
  1237. ),
  1238. array(
  1239. 'type' => 'select',
  1240. 'name' => 'homepageSickrageAuth',
  1241. 'label' => 'Minimum Authentication',
  1242. 'value' => $GLOBALS['homepageSickrageAuth'],
  1243. 'options' => $groups
  1244. )
  1245. ),
  1246. 'Connection' => array(
  1247. array(
  1248. 'type' => 'input',
  1249. 'name' => 'sickrageURL',
  1250. 'label' => 'URL',
  1251. 'value' => $GLOBALS['sickrageURL'],
  1252. 'placeholder' => 'http(s)://hostname:port'
  1253. ),
  1254. array(
  1255. 'type' => 'password-alt',
  1256. 'name' => 'sickrageToken',
  1257. 'label' => 'Token',
  1258. 'value' => $GLOBALS['sickrageToken']
  1259. )
  1260. ),
  1261. 'Misc Options' => array(
  1262. array(
  1263. 'type' => 'select',
  1264. 'name' => 'calendarFirstDay',
  1265. 'label' => 'Start Day',
  1266. 'value' => $GLOBALS['calendarFirstDay'],
  1267. 'options' => $day
  1268. ),
  1269. array(
  1270. 'type' => 'select',
  1271. 'name' => 'calendarDefault',
  1272. 'label' => 'Default View',
  1273. 'value' => $GLOBALS['calendarDefault'],
  1274. 'options' => $calendarDefault
  1275. ),
  1276. array(
  1277. 'type' => 'select',
  1278. 'name' => 'calendarTimeFormat',
  1279. 'label' => 'Time Format',
  1280. 'value' => $GLOBALS['calendarTimeFormat'],
  1281. 'options' => $timeFormat
  1282. ),
  1283. array(
  1284. 'type' => 'select',
  1285. 'name' => 'calendarLimit',
  1286. 'label' => 'Items Per Day',
  1287. 'value' => $GLOBALS['calendarLimit'],
  1288. 'options' => $limit
  1289. ),
  1290. array(
  1291. 'type' => 'select',
  1292. 'name' => 'calendarRefresh',
  1293. 'label' => 'Refresh Seconds',
  1294. 'value' => $GLOBALS['calendarRefresh'],
  1295. 'options' => $time
  1296. )
  1297. )
  1298. )
  1299. ),
  1300. array(
  1301. 'name' => 'Ombi',
  1302. 'enabled' => false,
  1303. 'image' => 'plugins/images/tabs/ombi.png',
  1304. 'category' => 'Requests',
  1305. 'settings' => array(
  1306. 'Enable' => array(
  1307. array(
  1308. 'type' => 'switch',
  1309. 'name' => 'homepageOmbiEnabled',
  1310. 'label' => 'Enable',
  1311. 'value' => $GLOBALS['homepageOmbiEnabled']
  1312. ),
  1313. array(
  1314. 'type' => 'select',
  1315. 'name' => 'homepageOmbiAuth',
  1316. 'label' => 'Minimum Authentication',
  1317. 'value' => $GLOBALS['homepageOmbiAuth'],
  1318. 'options' => $groups
  1319. )
  1320. ),
  1321. 'Connection' => array(
  1322. array(
  1323. 'type' => 'input',
  1324. 'name' => 'ombiURL',
  1325. 'label' => 'URL',
  1326. 'value' => $GLOBALS['ombiURL'],
  1327. 'placeholder' => 'http(s)://hostname:port'
  1328. ),
  1329. array(
  1330. 'type' => 'password-alt',
  1331. 'name' => 'ombiToken',
  1332. 'label' => 'Token',
  1333. 'value' => $GLOBALS['ombiToken']
  1334. )
  1335. ),
  1336. 'Misc Options' => array(
  1337. array(
  1338. 'type' => 'switch',
  1339. 'name' => 'ombiLimitUser',
  1340. 'label' => 'Enable',
  1341. 'value' => $GLOBALS['ombiLimitUser']
  1342. ),
  1343. array(
  1344. 'type' => 'select',
  1345. 'name' => 'ombiRefresh',
  1346. 'label' => 'Refresh Seconds',
  1347. 'value' => $GLOBALS['ombiRefresh'],
  1348. 'options' => $time
  1349. )
  1350. )
  1351. )
  1352. ),
  1353. array(
  1354. 'name' => 'CustomHTML-1',
  1355. 'enabled' => false,
  1356. 'image' => 'plugins/images/tabs/custom1.png',
  1357. 'category' => 'Custom',
  1358. 'settings' => array(
  1359. 'Enable' => array(
  1360. array(
  1361. 'type' => 'switch',
  1362. 'name' => 'homepagCustomHTMLoneEnabled',
  1363. 'label' => 'Enable',
  1364. 'value' => $GLOBALS['homepagCustomHTMLoneEnabled']
  1365. ),
  1366. array(
  1367. 'type' => 'select',
  1368. 'name' => 'homepagCustomHTMLoneAuth',
  1369. 'label' => 'Minimum Authentication',
  1370. 'value' => $GLOBALS['homepagCustomHTMLoneAuth'],
  1371. 'options' => $groups
  1372. )
  1373. ),
  1374. 'Code' => array(
  1375. array(
  1376. 'type' => 'textbox',
  1377. 'name' => 'customHTMLone',
  1378. 'class' => 'hidden customHTMLoneTextarea',
  1379. 'label' => '',
  1380. 'value' => $GLOBALS['customHTMLone'],
  1381. ),
  1382. array(
  1383. 'type' => 'html',
  1384. 'override' => 12,
  1385. 'label' => 'Custom HTML/JavaScript',
  1386. '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>'
  1387. ),
  1388. )
  1389. )
  1390. ),
  1391. array(
  1392. 'name' => 'CustomHTML-2',
  1393. 'enabled' => false,
  1394. 'image' => 'plugins/images/tabs/custom2.png',
  1395. 'category' => 'Custom',
  1396. 'settings' => array(
  1397. 'Enable' => array(
  1398. array(
  1399. 'type' => 'switch',
  1400. 'name' => 'homepagCustomHTMLtwoEnabled',
  1401. 'label' => 'Enable',
  1402. 'value' => $GLOBALS['homepagCustomHTMLtwoEnabled']
  1403. ),
  1404. array(
  1405. 'type' => 'select',
  1406. 'name' => 'homepagCustomHTMLtwoAuth',
  1407. 'label' => 'Minimum Authentication',
  1408. 'value' => $GLOBALS['homepagCustomHTMLtwoAuth'],
  1409. 'options' => $groups
  1410. )
  1411. ),
  1412. 'Code' => array(
  1413. array(
  1414. 'type' => 'textbox',
  1415. 'name' => 'customHTMLtwo',
  1416. 'class' => 'hidden customHTMLtwoTextarea',
  1417. 'label' => '',
  1418. 'value' => $GLOBALS['customHTMLtwo'],
  1419. ),
  1420. array(
  1421. 'type' => 'html',
  1422. 'override' => 12,
  1423. 'label' => 'Custom HTML/JavaScript',
  1424. '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>'
  1425. ),
  1426. )
  1427. )
  1428. )
  1429. );
  1430. }