homepage-functions.php 47 KB

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