homepage-functions.php 45 KB

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