homepage-functions.php 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362
  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' => 'CustomHTML-1',
  1282. 'enabled' => false,
  1283. 'image' => 'plugins/images/tabs/custom1.png',
  1284. 'category' => 'Custom',
  1285. 'settings' => array(
  1286. 'Enable' => array(
  1287. array(
  1288. 'type' => 'switch',
  1289. 'name' => 'homepagCustomHTMLoneEnabled',
  1290. 'label' => 'Enable',
  1291. 'value' => $GLOBALS['homepagCustomHTMLoneEnabled']
  1292. ),
  1293. array(
  1294. 'type' => 'select',
  1295. 'name' => 'homepagCustomHTMLoneAuth',
  1296. 'label' => 'Minimum Authentication',
  1297. 'value' => $GLOBALS['homepagCustomHTMLoneAuth'],
  1298. 'options' => $groups
  1299. )
  1300. ),
  1301. 'Code' => array(
  1302. array(
  1303. 'type' => 'textbox',
  1304. 'name' => 'customHTMLone',
  1305. 'class' => 'hidden customHTMLoneTextarea',
  1306. 'label' => '',
  1307. 'value' => $GLOBALS['customHTMLone'],
  1308. ),
  1309. array(
  1310. 'type' => 'html',
  1311. 'override' => 12,
  1312. 'label' => 'Custom HTML/JavaScript',
  1313. '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>'
  1314. ),
  1315. )
  1316. )
  1317. ),
  1318. array(
  1319. 'name' => 'CustomHTML-2',
  1320. 'enabled' => false,
  1321. 'image' => 'plugins/images/tabs/custom2.png',
  1322. 'category' => 'Custom',
  1323. 'settings' => array(
  1324. 'Enable' => array(
  1325. array(
  1326. 'type' => 'switch',
  1327. 'name' => 'homepagCustomHTMLtwoEnabled',
  1328. 'label' => 'Enable',
  1329. 'value' => $GLOBALS['homepagCustomHTMLtwoEnabled']
  1330. ),
  1331. array(
  1332. 'type' => 'select',
  1333. 'name' => 'homepagCustomHTMLtwoAuth',
  1334. 'label' => 'Minimum Authentication',
  1335. 'value' => $GLOBALS['homepagCustomHTMLtwoAuth'],
  1336. 'options' => $groups
  1337. )
  1338. ),
  1339. 'Code' => array(
  1340. array(
  1341. 'type' => 'textbox',
  1342. 'name' => 'customHTMLtwo',
  1343. 'class' => 'hidden customHTMLtwoTextarea',
  1344. 'label' => '',
  1345. 'value' => $GLOBALS['customHTMLtwo'],
  1346. ),
  1347. array(
  1348. 'type' => 'html',
  1349. 'override' => 12,
  1350. 'label' => 'Custom HTML/JavaScript',
  1351. '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>'
  1352. ),
  1353. )
  1354. )
  1355. )
  1356. );
  1357. }