| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578 |
- <?php
- //homepage order
- function homepageOrder()
- {
- $homepageOrder = array(
- "homepageOrdercustomhtml" => $GLOBALS['homepageOrdercustomhtml'],
- "homepageOrdercustomhtmlTwo" => $GLOBALS['homepageOrdercustomhtmlTwo'],
- "homepageOrdernzbget" => $GLOBALS['homepageOrdernzbget'],
- "homepageOrdersabnzbd" => $GLOBALS['homepageOrdersabnzbd'],
- "homepageOrderplexnowplaying" => $GLOBALS['homepageOrderplexnowplaying'],
- "homepageOrderplexrecent" => $GLOBALS['homepageOrderplexrecent'],
- "homepageOrderplexplaylist" => $GLOBALS['homepageOrderplexplaylist'],
- "homepageOrderembynowplaying" => $GLOBALS['homepageOrderembynowplaying'],
- "homepageOrderembyrecent" => $GLOBALS['homepageOrderembyrecent'],
- "homepageOrderombi" => $GLOBALS['homepageOrderombi'],
- "homepageOrdercalendar" => $GLOBALS['homepageOrdercalendar'],
- "homepageOrdertransmission" => $GLOBALS['homepageOrdertransmission'],
- "homepageOrderqBittorrent" => $GLOBALS['homepageOrderqBittorrent'],
- "homepageOrderdeluge" => $GLOBALS['homepageOrderdeluge'],
- );
- asort($homepageOrder);
- return $homepageOrder;
- }
- function buildHomepage()
- {
- $homepageOrder = homepageOrder();
- $homepageBuilt = '';
- foreach ($homepageOrder as $key => $value) {
- $homepageBuilt .= buildHomepageItem($key);
- }
- return $homepageBuilt;
- }
- function buildHomepageItem($homepageItem)
- {
- $item = '<div id="'.$homepageItem.'">';
- switch ($homepageItem) {
- case 'homepageOrdercustomhtml':
- if ($GLOBALS['homepagCustomHTMLoneEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLoneAuth'])) {
- $item .= ($GLOBALS['customHTMLone'] !== '') ? $GLOBALS['customHTMLone'] : '';
- }
- break;
- case 'homepageOrdercustomhtmlTwo':
- if ($GLOBALS['homepagCustomHTMLtwoEnabled'] && qualifyRequest($GLOBALS['homepagCustomHTMLtwoAuth'])) {
- $item .= ($GLOBALS['customHTMLtwo'] !== '') ? $GLOBALS['customHTMLtwo'] : '';
- }
- break;
- case 'homepageOrdernotice':
- break;
- case 'homepageOrdernoticeguest':
- break;
- case 'homepageOrderqBittorrent':
- if ($GLOBALS['homepageqBittorrentEnabled']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // homepageOrderqBittorrent
- homepageDownloader("qBittorrent", "'.$GLOBALS['homepageDownloadRefresh'].'");
- // End homepageOrderqBittorrent
- </script>
- ';
- }
- break;
- case 'homepageOrderdeluge':
- if ($GLOBALS['homepageDelugeEnabled']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // Deluge
- homepageDownloader("deluge", "'.$GLOBALS['homepageDownloadRefresh'].'");
- // End Deluge
- </script>
- ';
- }
- break;
- case 'homepageOrdertransmission':
- if ($GLOBALS['homepageTransmissionEnabled']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // Transmission
- homepageDownloader("transmission", "'.$GLOBALS['homepageDownloadRefresh'].'");
- // End Transmission
- </script>
- ';
- }
- break;
- case 'homepageOrdernzbget':
- if ($GLOBALS['homepageNzbgetEnabled']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // NZBGet
- homepageDownloader("nzbget", "'.$GLOBALS['homepageDownloadRefresh'].'");
- // End NZBGet
- </script>
- ';
- }
- break;
- case 'homepageOrdersabnzbd':
- if ($GLOBALS['homepageSabnzbdEnabled']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Download Queue...</h2></div>';
- $item .= '
- <script>
- // SabNZBd
- homepageDownloader("sabnzbd", "'.$GLOBALS['homepageDownloadRefresh'].'");
- // End SabNZBd
- </script>
- ';
- }
- break;
- case 'homepageOrderplexnowplaying':
- if ($GLOBALS['homepagePlexStreams']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
- $item .= '
- <script>
- // Plex Stream
- homepageStream("plex", "'.$GLOBALS['homepageStreamRefresh'].'");
- // End Plex Stream
- </script>
- ';
- }
- break;
- case 'homepageOrderplexrecent':
- if ($GLOBALS['homepagePlexRecent']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
- $item .= '
- <script>
- // Plex Recent
- homepageRecent("plex", "'.$GLOBALS['homepageRecentRefresh'].'");
- // End Plex Recent
- </script>
- ';
- }
- break;
- case 'homepageOrderplexplaylist':
- if ($GLOBALS['homepagePlexPlaylist']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Playlists...</h2></div>';
- $item .= '
- <script>
- // Plex Playlist
- homepagePlaylist("plex");
- // End Plex Playlist
- </script>
- ';
- }
- break;
- case 'homepageOrderembynowplaying':
- if ($GLOBALS['homepageEmbyStreams']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Now Playing...</h2></div>';
- $item .= '
- <script>
- // Emby Stream
- homepageStream("emby", "'.$GLOBALS['homepageStreamRefresh'].'");
- // End Emby Stream
- </script>
- ';
- }
- break;
- case 'homepageOrderembyrecent':
- if ($GLOBALS['homepageEmbyRecent']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Recent...</h2></div>';
- $item .= '
- <script>
- // Emby Recent
- homepageRecent("emby", "'.$GLOBALS['homepageRecentRefresh'].'");
- // End Emby Recent
- </script>
- ';
- }
- break;
- case 'homepageOrderombi':
- if ($GLOBALS['homepageOmbiEnabled']) {
- $item .= '<div class="white-box animated zoomIn"><h2 class="text-center" lang="en">Loading Requests...</h2></div>';
- $item .= '
- <script>
- // Ombi Requests
- homepageRequests("'.$GLOBALS['ombiRefresh'].'");
- // End Ombi Requests
- </script>
- ';
- }
- break;
- case 'homepageOrdercalendar':
- if ($GLOBALS['homepageSonarrEnabled'] && qualifyRequest($GLOBALS['homepageSonarrAuth']) || ($GLOBALS['homepageRadarrEnabled'] && qualifyRequest($GLOBALS['homepageRadarrAuth'])) || ($GLOBALS['homepageSickrageEnabled'] && qualifyRequest($GLOBALS['homepageSickrageAuth'])) || ($GLOBALS['homepageCouchpotatoEnabled'] && qualifyRequest($GLOBALS['homepageCouchpotatoAuth']))) {
- $item .= '
- <div id="calendar" class="fc fc-ltr animated zoomIn m-b-30"></div>
- <script>
- // Calendar
- homepageCalendar("'.$GLOBALS['calendarRefresh'].'");
- // End Calendar
- </script>
- ';
- }
- break;
- default:
- # code...
- break;
- }
- return $item.'</div>';
- }
- function getHomepageList()
- {
- $groups = groupSelect();
- $mediaServers = array(
- array(
- 'name' => 'N/A',
- 'value' => ''
- ),
- array(
- 'name' => 'Plex',
- 'value' => 'plex'
- ),
- array(
- 'name' => 'Emby [Not Available]',
- 'value' => 'emby'
- )
- );
- $time = array(
- array(
- 'name' => '5',
- 'value' => '5000'
- ),
- array(
- 'name' => '10',
- 'value' => '10000'
- ),
- array(
- 'name' => '15',
- 'value' => '15000'
- ),
- array(
- 'name' => '30',
- 'value' => '30000'
- ),
- array(
- 'name' => '60 [1 Minute]',
- 'value' => '60000'
- ),
- array(
- 'name' => '300 [5 Minutes]',
- 'value' => '300000'
- ),
- array(
- 'name' => '900 [15 Minutes]',
- 'value' => '900000'
- ),
- array(
- 'name' => '1800 [30 Minutes]',
- 'value' => '1800000'
- ),
- array(
- 'name' => '3600 [1 Hour]',
- 'value' => '3600000'
- ),
- );
- $limit = array(
- array(
- 'name' => '1 Item',
- 'value' => '1'
- ),
- array(
- 'name' => '2 Items',
- 'value' => '2'
- ),
- array(
- 'name' => '3 Items',
- 'value' => '3'
- ),
- array(
- 'name' => '4 Items',
- 'value' => '4'
- ),
- array(
- 'name' => '5 Items',
- 'value' => '5'
- ),
- array(
- 'name' => '6 Items',
- 'value' => '6'
- ),
- array(
- 'name' => '7 Items',
- 'value' => '7'
- ),
- array(
- 'name' => '8 Items',
- 'value' => '8'
- ),
- array(
- 'name' => 'Unlimited',
- 'value' => '1000'
- ),
- );
- $day = array(
- array(
- 'name' => 'Sunday',
- 'value' => '0'
- ),
- array(
- 'name' => 'Monday',
- 'value' => '1'
- ),
- array(
- 'name' => 'Tueday',
- 'value' => '2'
- ),
- array(
- 'name' => 'Wednesday',
- 'value' => '3'
- ),
- array(
- 'name' => 'Thursday',
- 'value' => '4'
- ),
- array(
- 'name' => 'Friday',
- 'value' => '5'
- ),
- array(
- 'name' => 'Saturday',
- 'value' => '6'
- )
- );
- $calendarDefault = array(
- array(
- 'name' => 'Month',
- 'value' => 'month'
- ),
- array(
- 'name' => 'Day',
- 'value' => 'basicDay'
- ),
- array(
- 'name' => 'Week',
- 'value' => 'basicWeek'
- ),
- array(
- 'name' => 'List',
- 'value' => 'list'
- )
- );
- $timeFormat = array(
- array(
- 'name' => '6p',
- 'value' => 'h(:mm)t'
- ),
- array(
- 'name' => '6:00p',
- 'value' => 'h:mmt'
- ),
- array(
- 'name' => '6:00',
- 'value' => 'h:mm'
- ),
- array(
- 'name' => '18',
- 'value' => 'H(:mm)'
- ),
- array(
- 'name' => '18:00',
- 'value' => 'H:mm'
- )
- );
- $qBittorrentSortOptions = array(
- array(
- 'name' => 'Hash',
- 'value' => 'hash'
- ),
- array(
- 'name' => 'Name',
- 'value' => 'name'
- ),
- array(
- 'name' => 'Size',
- 'value' => 'size'
- ),
- array(
- 'name' => 'Progress',
- 'value' => 'progress'
- ),
- array(
- 'name' => 'Download Speed',
- 'value' => 'dlspeed'
- ),
- array(
- 'name' => 'Upload Speed',
- 'value' => 'upspeed'
- ),
- array(
- 'name' => 'Priority',
- 'value' => 'priority'
- ),
- array(
- 'name' => 'Number of Seeds',
- 'value' => 'num_seeds'
- ),
- array(
- 'name' => 'Number of Seeds in Swarm',
- 'value' => 'num_complete'
- ),
- array(
- 'name' => 'Number of Leechers',
- 'value' => 'num_leechs'
- ),
- array(
- 'name' => 'Number of Leechers in Swarm',
- 'value' => 'num_incomplete'
- ),
- array(
- 'name' => 'Ratio',
- 'value' => 'ratio'
- ),
- array(
- 'name' => 'ETA',
- 'value' => 'eta'
- ),
- array(
- 'name' => 'State',
- 'value' => 'state'
- ),
- array(
- 'name' => 'Category',
- 'value' => 'category'
- )
- );
- return array(
- array(
- 'name' => 'Plex',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/plex.png',
- 'category' => 'Media Server',
- //'license' => $GLOBALS['license'],
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepagePlexAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'plexURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['plexURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'plexToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['plexToken']
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'plexID',
- 'label' => 'Plex Machine',
- 'value' => $GLOBALS['plexID']
- )
- ),
- 'Active Streams' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexStreams',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexStreams']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexStreamsAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepagePlexStreamsAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'switch',
- 'name' => 'homepageShowStreamNames',
- 'label' => 'User Information',
- 'value' => $GLOBALS['homepageShowStreamNames']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageShowStreamNamesAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageStreamRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageStreamRefresh'],
- 'options' => $time
- ),
- ),
- 'Recent Items' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexRecent',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexRecent']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexRecentAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepagePlexRecentAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageRecentRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageRecentRefresh'],
- 'options' => $time
- ),
- ),
- 'Media Search' => array(
- array(
- 'type' => 'switch',
- 'name' => 'mediaSearch',
- 'label' => 'Enable',
- 'value' => $GLOBALS['mediaSearch']
- ),
- array(
- 'type' => 'select',
- 'name' => 'mediaSearchAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['mediaSearchAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'mediaSearchType',
- 'label' => 'Media Server',
- 'value' => $GLOBALS['mediaSearchType'],
- 'options' => $mediaServers
- ),
- ),
- 'Playlists' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagePlexPlaylist',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagePlexPlaylist']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagePlexPlaylistAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepagePlexPlaylistAuth'],
- 'options' => $groups
- ),
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'input',
- 'name' => 'plexTabName',
- 'label' => 'Plex Tab Name',
- 'value' => $GLOBALS['plexTabName'],
- 'placeholder' => 'Only use if you have Plex in a reverse proxy'
- ),
- array(
- 'type' => 'input',
- 'name' => 'plexTabURL',
- 'label' => 'Plex Tab WAN URL',
- 'value' => $GLOBALS['plexTabURL'],
- 'placeholder' => 'http(s)://hostname:port'
- )
- )
- )
- ),
- array(
- 'name' => 'Emby',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/emby.png',
- 'category' => 'Media Server',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageEmbyEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageEmbyEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageEmbyAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageEmbyAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'embyURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['embyURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'embyToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['embyToken']
- )
- ),
- 'Active Streams' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageEmbyStreams',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageEmbyStreams']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageEmbyStreamsAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageEmbyStreamsAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'switch',
- 'name' => 'homepageShowStreamNames',
- 'label' => 'User Information',
- 'value' => $GLOBALS['homepageShowStreamNames']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageShowStreamNamesAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageShowStreamNamesAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageStreamRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageStreamRefresh'],
- 'options' => $time
- ),
- ),
- 'Recent Items' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageEmbyRecent',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageEmbyRecent']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageEmbyRecentAuth',
- 'label' => 'Minimum Authorization',
- 'value' => $GLOBALS['homepageEmbyRecentAuth'],
- 'options' => $groups
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageRecentRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageRecentRefresh'],
- 'options' => $time
- ),
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'input',
- 'name' => 'embyTabName',
- 'label' => 'Emby Tab Name',
- 'value' => $GLOBALS['embyTabName'],
- 'placeholder' => 'Only use if you have Emby in a reverse proxy'
- ),
- array(
- 'type' => 'input',
- 'name' => 'embyTabURL',
- 'label' => 'Emby Tab WAN URL',
- 'value' => $GLOBALS['embyTabURL'],
- 'placeholder' => 'http(s)://hostname:port'
- )
- )
- )
- ),
- array(
- 'name' => 'SabNZBD',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/sabnzbd.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageSabnzbdEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageSabnzbdEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageSabnzbdAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageSabnzbdAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'sabnzbdURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['sabnzbdURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'sabnzbdToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['sabnzbdToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'NZBGet',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/nzbget.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageNzbgetEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageNzbgetEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageNzbgetAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageNzbgetAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'nzbgetURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['nzbgetURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'input',
- 'name' => 'nzbgetUsername',
- 'label' => 'Username',
- 'value' => $GLOBALS['nzbgetUsername']
- ),
- array(
- 'type' => 'password',
- 'name' => 'nzbgetPassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['nzbgetPassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'Transmission',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/transmission.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageTransmissionEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageTransmissionEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageTransmissionAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageTransmissionAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'transmissionURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['transmissionURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'input',
- 'name' => 'transmissionUsername',
- 'label' => 'Username',
- 'value' => $GLOBALS['transmissionUsername']
- ),
- array(
- 'type' => 'password',
- 'name' => 'transmissionPassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['transmissionPassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'transmissionHideSeeding',
- 'label' => 'Hide Seeding',
- 'value' => $GLOBALS['transmissionHideSeeding']
- ),array(
- 'type' => 'switch',
- 'name' => 'transmissionHideCompleted',
- 'label' => 'Hide Completed',
- 'value' => $GLOBALS['transmissionHideCompleted']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'qBittorrent',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/qBittorrent.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageqBittorrentEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageqBittorrentEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageqBittorrentAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageqBittorrentAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'qBittorrentURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['qBittorrentURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'input',
- 'name' => 'qBittorrentUsername',
- 'label' => 'Username',
- 'value' => $GLOBALS['qBittorrentUsername']
- ),
- array(
- 'type' => 'password',
- 'name' => 'qBittorrentPassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['qBittorrentPassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'qBittorrentHideSeeding',
- 'label' => 'Hide Seeding',
- 'value' => $GLOBALS['qBittorrentHideSeeding']
- ),array(
- 'type' => 'switch',
- 'name' => 'qBittorrentnHideCompleted',
- 'label' => 'Hide Completed',
- 'value' => $GLOBALS['qBittorrentHideCompleted']
- ),
- array(
- 'type' => 'select',
- 'name' => 'qBittorrentSortOrder',
- 'label' => 'Order',
- 'value' => $GLOBALS['qBittorrentSortOrder'],
- 'options' => $qBittorrentSortOptions
- ),array(
- 'type' => 'switch',
- 'name' => 'qBittorrentReverseSorting',
- 'label' => 'Reverse Sorting',
- 'value' => $GLOBALS['qBittorrentReverseSorting']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'Deluge',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/deluge.png',
- 'category' => 'Downloader',
- 'settings' => array(
- 'custom' => '
- <div class="row">
- <div class="col-lg-12">
- <div class="panel panel-info">
- <div class="panel-heading">
- <span lang="en">Notice</span>
- </div>
- <div class="panel-wrapper collapse in" aria-expanded="true">
- <div class="panel-body">
- <ul class="list-icons">
- <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>
- <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>
- <li><i class="fa fa-chevron-right text-danger"></i> Activate WebAPI plugin </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- ',
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageDelugeEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageDelugeEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDelugeAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageDelugeAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'delugeURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['delugeURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password',
- 'name' => 'delugePassword',
- 'label' => 'Password',
- 'value' => $GLOBALS['delugePassword']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'delugeHideSeeding',
- 'label' => 'Hide Seeding',
- 'value' => $GLOBALS['delugeHideSeeding']
- ),array(
- 'type' => 'switch',
- 'name' => 'delugeHideCompleted',
- 'label' => 'Hide Completed',
- 'value' => $GLOBALS['delugeHideCompleted']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageDownloadRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['homepageDownloadRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'Sonarr',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/sonarr.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageSonarrEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageSonarrEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageSonarrAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageSonarrAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'sonarrURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['sonarrURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'sonarrToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['sonarrToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'input',
- 'name' => 'calendarStart',
- 'label' => '# of Days Before',
- 'value' => $GLOBALS['calendarStart'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'input',
- 'name' => 'calendarEnd',
- 'label' => '# of Days After',
- 'value' => $GLOBALS['calendarEnd'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'Radarr',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/radarr.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageRadarrEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageRadarrEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageRadarrAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageRadarrAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'radarrURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['radarrURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'radarrToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['radarrToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'input',
- 'name' => 'calendarStart',
- 'label' => '# of Days Before',
- 'value' => $GLOBALS['calendarStart'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'input',
- 'name' => 'calendarEnd',
- 'label' => '# of Days After',
- 'value' => $GLOBALS['calendarEnd'],
- 'placeholder' => ''
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'CouchPotato',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/couchpotato.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageCouchpotatoEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageCouchpotatoEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageCouchpotatoAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageCouchpotatoAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'couchpotatoURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['couchpotatoURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'couchpotatoToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['couchpotatoToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'SickRage',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/sickrage.png',
- 'category' => 'PVR',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageSickrageEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageSickrageEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageSickrageAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageSickrageAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'sickrageURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['sickrageURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'sickrageToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['sickrageToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'select',
- 'name' => 'calendarFirstDay',
- 'label' => 'Start Day',
- 'value' => $GLOBALS['calendarFirstDay'],
- 'options' => $day
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarDefault',
- 'label' => 'Default View',
- 'value' => $GLOBALS['calendarDefault'],
- 'options' => $calendarDefault
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarTimeFormat',
- 'label' => 'Time Format',
- 'value' => $GLOBALS['calendarTimeFormat'],
- 'options' => $timeFormat
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarLimit',
- 'label' => 'Items Per Day',
- 'value' => $GLOBALS['calendarLimit'],
- 'options' => $limit
- ),
- array(
- 'type' => 'select',
- 'name' => 'calendarRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['calendarRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'Ombi',
- 'enabled' => (strpos('personal', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/ombi.png',
- 'category' => 'Requests',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepageOmbiEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepageOmbiEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepageOmbiAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepageOmbiAuth'],
- 'options' => $groups
- )
- ),
- 'Connection' => array(
- array(
- 'type' => 'input',
- 'name' => 'ombiURL',
- 'label' => 'URL',
- 'value' => $GLOBALS['ombiURL'],
- 'placeholder' => 'http(s)://hostname:port'
- ),
- array(
- 'type' => 'password-alt',
- 'name' => 'ombiToken',
- 'label' => 'Token',
- 'value' => $GLOBALS['ombiToken']
- )
- ),
- 'Misc Options' => array(
- array(
- 'type' => 'switch',
- 'name' => 'ombiLimitUser',
- 'label' => 'Limit to User',
- 'value' => $GLOBALS['ombiLimitUser']
- ),
- array(
- 'type' => 'select',
- 'name' => 'ombiRefresh',
- 'label' => 'Refresh Seconds',
- 'value' => $GLOBALS['ombiRefresh'],
- 'options' => $time
- )
- )
- )
- ),
- array(
- 'name' => 'CustomHTML-1',
- 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/custom1.png',
- 'category' => 'Custom',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagCustomHTMLoneEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagCustomHTMLoneEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagCustomHTMLoneAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepagCustomHTMLoneAuth'],
- 'options' => $groups
- )
- ),
- 'Code' => array(
- array(
- 'type' => 'textbox',
- 'name' => 'customHTMLone',
- 'class' => 'hidden customHTMLoneTextarea',
- 'label' => '',
- 'value' => $GLOBALS['customHTMLone'],
- ),
- array(
- 'type' => 'html',
- 'override' => 12,
- 'label' => 'Custom HTML/JavaScript',
- '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>'
- ),
- )
- )
- ),
- array(
- 'name' => 'CustomHTML-2',
- 'enabled' => (strpos('personal,business', $GLOBALS['license']) !== false) ? true : false,
- 'image' => 'plugins/images/tabs/custom2.png',
- 'category' => 'Custom',
- 'settings' => array(
- 'Enable' => array(
- array(
- 'type' => 'switch',
- 'name' => 'homepagCustomHTMLtwoEnabled',
- 'label' => 'Enable',
- 'value' => $GLOBALS['homepagCustomHTMLtwoEnabled']
- ),
- array(
- 'type' => 'select',
- 'name' => 'homepagCustomHTMLtwoAuth',
- 'label' => 'Minimum Authentication',
- 'value' => $GLOBALS['homepagCustomHTMLtwoAuth'],
- 'options' => $groups
- )
- ),
- 'Code' => array(
- array(
- 'type' => 'textbox',
- 'name' => 'customHTMLtwo',
- 'class' => 'hidden customHTMLtwoTextarea',
- 'label' => '',
- 'value' => $GLOBALS['customHTMLtwo'],
- ),
- array(
- 'type' => 'html',
- 'override' => 12,
- 'label' => 'Custom HTML/JavaScript',
- '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>'
- ),
- )
- )
- )
- );
- }
- function buildHomepageSettings()
- {
- $homepageOrder = homepageOrder();
- $homepageList = '<h4>Drag Homepage Items to Order Them</h4><div id="homepage-items-sort" class="external-events">';
- $inputList = '<form id="homepage-values" class="row">';
- foreach ($homepageOrder as $key => $val) {
- switch ($key) {
- case 'homepageOrdercustomhtml':
- $class = 'bg-info';
- $image = 'plugins/images/tabs/custom1.png';
- if (!$GLOBALS['homepagCustomHTMLoneEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdercustomhtmlTwo':
- $class = 'bg-info';
- $image = 'plugins/images/tabs/custom2.png';
- if (!$GLOBALS['homepagCustomHTMLtwoEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdertransmission':
- $class = 'bg-transmission';
- $image = 'plugins/images/tabs/transmission.png';
- if (!$GLOBALS['homepageTransmissionEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdernzbget':
- $class = 'bg-nzbget';
- $image = 'plugins/images/tabs/nzbget.png';
- if (!$GLOBALS['homepageNzbgetEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdersabnzbd':
- $class = 'bg-sab';
- $image = 'plugins/images/tabs/sabnzbd.png';
- if (!$GLOBALS['homepageSabnzbdEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderdeluge':
- $class = 'bg-deluge';
- $image = 'plugins/images/tabs/deluge.png';
- if (!$GLOBALS['homepageDelugeEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderqBittorrent':
- $class = 'bg-qbit';
- $image = 'plugins/images/tabs/qBittorrent.png';
- if (!$GLOBALS['homepageqBittorrentEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderplexnowplaying':
- case 'homepageOrderplexrecent':
- case 'homepageOrderplexplaylist':
- $class = 'bg-plex';
- $image = 'plugins/images/tabs/plex.png';
- if (!$GLOBALS['homepagePlexEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderembynowplaying':
- case 'homepageOrderembyrecent':
- $class = 'bg-emby';
- $image = 'plugins/images/tabs/emby.png';
- if (!$GLOBALS['homepageEmbyEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrderombi':
- $class = 'bg-inverse';
- $image = 'plugins/images/tabs/ombi.png';
- if (!$GLOBALS['homepageOmbiEnabled']) {
- $class .= ' faded';
- }
- break;
- case 'homepageOrdercalendar':
- $class = 'bg-primary';
- $image = 'plugins/images/tabs/calendar.png';
- if (!$GLOBALS['homepageSonarrEnabled'] && !$GLOBALS['homepageRadarrEnabled'] && !$GLOBALS['homepageSickrageEnabled'] && !$GLOBALS['homepageCouchpotatoEnabled']) {
- $class .= ' faded';
- }
- break;
- default:
- $class = 'blue-bg';
- $image = '';
- break;
- }
- $homepageList .= '
- <div class="col-md-3 col-xs-12 sort-homepage m-t-10 hvr-grow">
- <div class="homepage-drag fc-event '.$class.' lazyload" data-src="'.$image.'">
- <span class="ordinal-position text-uppercase badge bg-org homepage-number" data-link="'.$key.'" style="float:left;width: 30px;">'.$val.'</span>
- <span class="homepage-text"> '.strtoupper(substr($key, 13)).'</span>
- </div>
- </div>
- ';
- $inputList .= '<input type="hidden" name="'.$key.'">';
- }
- $homepageList .= '</div>';
- $inputList .= '</form>';
- return $homepageList.$inputList;
- }
|