homepage-functions.php 49 KB

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