homepage.php 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087
  1. <?php
  2. $data = false;
  3. ini_set("display_errors", 1);
  4. ini_set("error_reporting", E_ALL | E_STRICT);
  5. require_once("user.php");
  6. require_once("functions.php");
  7. use Kryptonit3\Sonarr\Sonarr;
  8. use Kryptonit3\SickRage\SickRage;
  9. $sonarr = new Sonarr(SONARRURL, SONARRKEY);
  10. $radarr = new Sonarr(RADARRURL, RADARRKEY);
  11. $sickrage = new SickRage(SICKRAGEURL, SICKRAGEKEY);
  12. $USER = new User("registration_callback");
  13. // Check if connection to homepage is allowed
  14. qualifyUser(HOMEPAGEAUTHNEEDED, true);
  15. // Load Colours/Appearance
  16. foreach(loadAppearance() as $key => $value) {
  17. ${$key} = $value;
  18. }
  19. $startDate = date('Y-m-d',strtotime("-".CALENDARSTARTDAY." days"));
  20. $endDate = date('Y-m-d',strtotime("+".CALENDARENDDAY." days"));
  21. ?>
  22. <!DOCTYPE html>
  23. <html lang="en" class="no-js">
  24. <head>
  25. <meta charset="UTF-8">
  26. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  27. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  28. <meta name="msapplication-tap-highlight" content="no" />
  29. <title><?=$title;?> Homepage</title>
  30. <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  31. <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
  32. <link rel="stylesheet" href="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css">
  33. <script src="js/menu/modernizr.custom.js"></script>
  34. <link rel="stylesheet" href="bower_components/animate.css/animate.min.css">
  35. <link rel="stylesheet" href="bower_components/fullcalendar/dist/fullcalendar.css">
  36. <link rel="stylesheet" href="css/style.css?v=<?php echo INSTALLEDVERSION; ?>">
  37. <link rel="stylesheet" href="bower_components/mdi/css/materialdesignicons.min.css?v=<?php echo INSTALLEDVERSION; ?>">
  38. <link rel="stylesheet" href="bower_components/google-material-color/dist/palette.css?v=<?php echo INSTALLEDVERSION; ?>">
  39. <link rel="stylesheet" type="text/css" href="bower_components/slick/slick.css?v=<?php echo INSTALLEDVERSION; ?>">
  40. <!-- Add the slick-theme.css if you want default styling -->
  41. <!--Scripts-->
  42. <script src="bower_components/jquery/dist/jquery.min.js"></script>
  43. <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  44. <script src="bower_components/moment/min/moment.min.js"></script>
  45. <script src="bower_components/jquery.nicescroll/jquery.nicescroll.min.js"></script>
  46. <script src="bower_components/slimScroll/jquery.slimscroll.min.js"></script>
  47. <script src="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js"></script>
  48. <script src="bower_components/jquery.nicescroll/jquery.nicescroll.min.js"></script>
  49. <script src="bower_components/cta/dist/cta.min.js"></script>
  50. <script src="bower_components/fullcalendar/dist/fullcalendar.js?v=<?php echo INSTALLEDVERSION; ?>"></script>
  51. <script src="bower_components/slick/slick.js?v=<?php echo INSTALLEDVERSION; ?>"></script>
  52. <script src="js/jqueri_ui_custom/jquery-ui.min.js"></script>
  53. <script src="js/jquery.mousewheel.min.js" type="text/javascript"></script>
  54. <!--Other-->
  55. <script src="js/ajax.js?v=<?php echo INSTALLEDVERSION; ?>"></script>
  56. <!--[if lt IE 9]>
  57. <script src="bower_components/html5shiv/dist/html5shiv.min.js"></script>
  58. <script src="bower_components/respondJs/dest/respond.min.js"></script>
  59. <![endif]-->
  60. <style>
  61. .fc-day-grid-event{
  62. cursor: pointer;
  63. }
  64. .recentItems {
  65. padding-top: 10px;
  66. margin: 5px 0;
  67. }
  68. .slick-image-tall{
  69. width: 125px;
  70. height: 180px;
  71. }
  72. .slick-image-short{
  73. width: 125px;
  74. height: 130px;
  75. margin-top: 50px;
  76. }
  77. .overlay{
  78. position: absolute;
  79. top: 0;
  80. left: 0;
  81. width: 100%;
  82. height: 100%;
  83. display: none;
  84. z-index: 0;
  85. opacity: .98;
  86. }
  87. sort {
  88. display: none;
  89. }
  90. table.fc-list-table {
  91. table-layout: auto;
  92. }.tabbable{
  93. margin-bottom: 0;
  94. }.fc-day-grid-event .fc-content {
  95. white-space: normal;
  96. }.fc-list-item {
  97. table-layout: auto;
  98. position: inherit;
  99. margin: 10px;
  100. border-radius: 4px;
  101. padding: 0 5px 0 5px;
  102. color: #fff !important;
  103. }.fc-calendar .fc-toolbar {
  104. background: <?=$topbar;?>;
  105. color: <?=$topbartext;?>;
  106. border-radius: 5px 5px 0 0;
  107. padding: 15px;
  108. }.fc-calendar .fc-toolbar .fc-right {
  109. bottom: 0px;
  110. right: 20px;
  111. }.fc-calendar .fc-toolbar .fc-right button {
  112. color: <?=$topbartext;?>;
  113. }.fc-calendar .fc-toolbar .fc-prev-button, .fc-calendar .fc-toolbar .fc-next-button {
  114. color: <?=$topbartext;?>;
  115. }.carousel-image{
  116. width: 100px !important;
  117. height: 150px !important;
  118. border-radius: 3px 0 0 3px;
  119. }.carousel-image.album{
  120. width: 150px !important;
  121. height: 150px !important;
  122. border-radius: 3px 0 0 3px;
  123. }.carousel-control.album {
  124. top: 5px !important;
  125. width: 4% !important;
  126. }.carousel-control {
  127. top: 5px !important;
  128. width: 4% !important;
  129. }.carousel-caption.album {
  130. position: absolute;
  131. right: 4%;
  132. top: 0px;
  133. left: 160px;
  134. z-index: 10;
  135. bottom: 0px;
  136. padding-top: 0px;
  137. color: #fff;
  138. text-align: left;
  139. }.carousel-caption {
  140. position: absolute;
  141. right: 4%;
  142. top: 0px;
  143. left: 110px;
  144. z-index: 10;
  145. bottom: 0px;
  146. padding-top: 0px;
  147. color: #fff;
  148. text-align: left;
  149. padding-bottom: 2px !important;
  150. overflow: hidden !important;
  151. } @media screen and (max-width: 576px) {
  152. .nzbtable {
  153. padding-left: 5px !important;
  154. padding-right: 2px !important;
  155. font-size: 10px !important;
  156. word-break: break-word !important;
  157. }
  158. .nzbtable-file-row {
  159. padding-left: 5px !important;
  160. padding-right: 2px !important;
  161. font-size: 10px !important;
  162. white-space: normal !important;
  163. word-break: break-all !important;
  164. width: 0% !important;
  165. }
  166. } .nzbtable-file-row {
  167. white-space: normal !important;
  168. word-break: break-all !important;
  169. width: 0% !important;
  170. }.nzbtable-row {
  171. white-space: normal !important;
  172. width: 0% !important;
  173. font-size: 12px; !important;
  174. }<?php customCSS(); ?>
  175. </style>
  176. </head>
  177. <body class="scroller-body" style="padding: 0px;">
  178. <div class="main-wrapper" style="position: initial;">
  179. <div id="content" class="container-fluid">
  180. <br/>
  181. <?php if (qualifyUser(HOMEPAGENOTICEAUTH) && HOMEPAGENOTICETITLE && HOMEPAGENOTICETYPE && HOMEPAGENOTICEMESSAGE && HOMEPAGENOTICELAYOUT) { echo buildHomepageNotice(HOMEPAGENOTICELAYOUT, HOMEPAGENOTICETYPE, HOMEPAGENOTICETITLE, HOMEPAGENOTICEMESSAGE); } ?>
  182. <?php if (qualifyUser(HOMEPAGECUSTOMHTML1AUTH) && HOMEPAGECUSTOMHTML1) { echo "<div>" . HOMEPAGECUSTOMHTML1 . "</div>"; } ?>
  183. <?php if(SPEEDTEST == "true"){ ?>
  184. <style type="text/css">
  185. .flash {
  186. animation: flash 0.6s linear infinite;
  187. }
  188. @keyframes flash {
  189. 0% { opacity: 0.6; }
  190. 50% { opacity: 1; }
  191. }
  192. </style>
  193. <script type="text/javascript">
  194. var w = null
  195. function runTest() {
  196. document.getElementById('startBtn').style.display = 'none'
  197. document.getElementById('testArea').style.display = ''
  198. document.getElementById('abortBtn').style.display = ''
  199. w = new Worker('bower_components/speed/speedtest_worker.min.js')
  200. var interval = setInterval(function () { w.postMessage('status') }, 100)
  201. w.onmessage = function (event) {
  202. var data = event.data.split(';')
  203. var status = Number(data[0])
  204. var dl = document.getElementById('download')
  205. var ul = document.getElementById('upload')
  206. var ping = document.getElementById('ping')
  207. var jitter = document.getElementById('jitter')
  208. dl.className = status === 1 ? 'w-name flash' : 'w-name'
  209. ping.className = status === 2 ? 'w-name flash' : 'w-name'
  210. jitter.className = ul.className = status === 3 ? 'w-name flash' : 'w-name'
  211. if (status >= 4) {
  212. clearInterval(interval)
  213. document.getElementById('abortBtn').style.display = 'none'
  214. document.getElementById('startBtn').style.display = ''
  215. w = null
  216. }
  217. if (status === 5) {
  218. document.getElementById('testArea').style.display = 'none'
  219. }
  220. dl.textContent = data[1] + " Mbit/s";
  221. $("#downloadpercent").attr("style", "width: " + data[1] + "%;");
  222. $("#uploadpercent").attr("style", "width: " + data[2] + "%;");
  223. $("#pingpercent").attr("style", "width: " + data[3] + "%;");
  224. $("#jitterpercent").attr("style", "width: " + data[5] + "%;");
  225. ul.textContent = data[2] + " Mbit/s";
  226. ping.textContent = data[3] + " ms";
  227. jitter.textContent = data[5] + " ms";
  228. }
  229. w.postMessage('start')
  230. }
  231. function abortTest() {
  232. if (w) w.postMessage('abort')
  233. }
  234. </script>
  235. <div class="row" id="testArea" style="display:none">
  236. <div class="test col-sm-3 col-lg-3">
  237. <div class="content-box ultra-widget green-bg" data-counter="">
  238. <div id="downloadpercent" class="progress-bar progress-bar-striped active w-used" style=""></div>
  239. <div class="w-content">
  240. <div class="w-icon right pull-right"><i class="mdi mdi-cloud-download"></i></div>
  241. <div class="w-descr left pull-left text-center">
  242. <span class="testName text-uppercase w-name">Download</span>
  243. <br>
  244. <span class="w-name counter" id="download" ></span>
  245. </div>
  246. </div>
  247. </div>
  248. </div>
  249. <div class="test col-sm-3 col-lg-3">
  250. <div class="content-box ultra-widget red-bg" data-counter="">
  251. <div id="uploadpercent" class="progress-bar progress-bar-striped active w-used" style=""></div>
  252. <div class="w-content">
  253. <div class="w-icon right pull-right"><i class="mdi mdi-cloud-upload"></i></div>
  254. <div class="w-descr left pull-left text-center">
  255. <span class="testName text-uppercase w-name">Upload</span>
  256. <br>
  257. <span class="w-name counter" id="upload" ></span>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <div class="test col-sm-3 col-lg-3">
  263. <div class="content-box ultra-widget yellow-bg" data-counter="">
  264. <div id="pingpercent" class="progress-bar progress-bar-striped active w-used" style=""></div>
  265. <div class="w-content">
  266. <div class="w-icon right pull-right"><i class="mdi mdi-timer"></i></div>
  267. <div class="w-descr left pull-left text-center">
  268. <span class="testName text-uppercase w-name">Latency</span>
  269. <br>
  270. <span class="w-name counter" id="ping" ></span>
  271. </div>
  272. </div>
  273. </div>
  274. </div>
  275. <div class="test col-sm-3 col-lg-3">
  276. <div class="content-box ultra-widget blue-bg" data-counter="">
  277. <div id="jitterpercent" class="progress-bar progress-bar-striped active w-used" style=""></div>
  278. <div class="w-content">
  279. <div class="w-icon right pull-right"><i class="mdi mdi-pulse"></i></div>
  280. <div class="w-descr left pull-left text-center">
  281. <span class="testName text-uppercase w-name">Jitter</span>
  282. <br>
  283. <span class="w-name counter" id="jitter" ></span>
  284. </div>
  285. </div>
  286. </div>
  287. </div>
  288. <br/>
  289. </div>
  290. <div id="abortBtn" class="row" style="display: none" onclick="javascript:abortTest()">
  291. <div class="col-lg-12">
  292. <div class="content-box red-bg" style="cursor: pointer;">
  293. <h1 style="margin: 10px" class="text-uppercase text-center">Abort Speed Test</h1>
  294. <div class="clearfix"></div>
  295. </div>
  296. </div>
  297. </div>
  298. <div id="startBtn" class="row" onclick="javascript:runTest()">
  299. <div class="col-lg-12">
  300. <div class="content-box green-bg" style="cursor: pointer;">
  301. <h1 style="margin: 10px" class="text-uppercase text-center">Run Speed Test</h1>
  302. <div class="clearfix"></div>
  303. </div>
  304. </div>
  305. </div>
  306. <?php } ?>
  307. <?php if((PLEXSEARCH == "true" && qualifyUser(PLEXHOMEAUTH))) { ?>
  308. <div id="searchPlexRow" class="row">
  309. <div class="col-lg-12">
  310. <div class="content-box box-shadow big-box todo-list">
  311. <form id="plexSearchForm" onsubmit="return false;" autocomplete="off">
  312. <div class="">
  313. <div class="input-group">
  314. <div style="border-radius: 25px 0 0 25px; border:0" class="input-group-addon gray-bg"><i class="fa fa-search white"></i></div>
  315. <input id="searchInput" type="text" style="border-radius: 0;" autocomplete="off" name="search-title" class="form-control input-group-addon gray-bg" placeholder="Media Search">
  316. <div id="clearSearch" style="border-radius: 0 25px 25px 0;border:0; cursor: pointer;" class="input-group-addon gray-bg"><i class="fa fa-close white"></i></div>
  317. <button style="display:none" id="plexSearchForm_submit" class="btn btn-primary waves"></button>
  318. </div>
  319. </div>
  320. </form>
  321. <div id="resultshere" class="table-responsive"></div>
  322. </div>
  323. </div>
  324. </div>
  325. <?php } ?>
  326. <?php if((NZBGETURL != "" && qualifyUser(NZBGETHOMEAUTH)) || (SABNZBDURL != "" && qualifyUser(SABNZBDHOMEAUTH))) { ?>
  327. <div id="downloadClientRow" class="row">
  328. <div class="col-xs-12 col-md-12">
  329. <div class="content-box">
  330. <div class="tabbable panel with-nav-tabs panel-default">
  331. <div class="panel-heading">
  332. <div class="content-tools i-block pull-right">
  333. <a id="getDownloader" class="repeat-btn">
  334. <i class="fa fa-repeat"></i>
  335. </a>
  336. <a class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
  337. <i class="fa fa-chevron-down"></i>
  338. </a>
  339. <!-- Lets Move This To Homepage Settings
  340. <ul id="downloaderSeconds" class="dropdown-menu" style="top: 32px !important">
  341. <li data-value="5000"><a>Refresh every 5 seconds</a></li>
  342. <li data-value="10000"><a>Refresh every 10 seconds</a></li>
  343. <li data-value="30000"><a>Refresh every 30 seconds</a></li>
  344. <li data-value="60000"><a>Refresh every 60 seconds</a></li>
  345. </ul>
  346. -->
  347. </div>
  348. <h3 class="pull-left"><?php if(NZBGETURL != ""){ echo "NZBGet "; } if(SABNZBDURL != ""){ echo "SABnzbd "; } ?></h3>
  349. <ul class="nav nav-tabs pull-right">
  350. <li class="active"><a href="#downloadQueue" data-toggle="tab" aria-expanded="true"><?php echo $language->translate("QUEUE");?></a></li>
  351. <li class=""><a href="#downloadHistory" data-toggle="tab" aria-expanded="false"><?php echo $language->translate("HISTORY");?></a></li>
  352. </ul>
  353. <div class="clearfix"></div>
  354. </div>
  355. <div class="panel-body">
  356. <div class="tab-content">
  357. <div class="tab-pane fade active in" id="downloadQueue">
  358. <div class="table-responsive" style="max-height: 300px">
  359. <table class="table table-striped progress-widget zero-m" style="max-height: 300px">
  360. <thead>
  361. <tr>
  362. <th class="col-xs-7 nzbtable-file-row"><?php echo $language->translate("FILE");?></th>
  363. <th class="col-xs-2 nzbtable"><?php echo $language->translate("STATUS");?></th>
  364. <th class="col-xs-1 nzbtable"><?php echo $language->translate("CATEGORY");?></th>
  365. <th class="col-xs-2 nzbtable"><?php echo $language->translate("PROGRESS");?></th>
  366. </tr>
  367. </thead>
  368. <tbody class="dl-queue sabnzbd"></tbody>
  369. <tbody class="dl-queue nzbget"></tbody>
  370. </table>
  371. </div>
  372. </div>
  373. <div class="tab-pane fade" id="downloadHistory">
  374. <div class="table-responsive" style="max-height: 300px">
  375. <table class="table table-striped progress-widget zero-m" style="max-height: 300px">
  376. <thead>
  377. <tr>
  378. <th class="col-xs-7 nzbtable-file-row"><?php echo $language->translate("FILE");?></th>
  379. <th class="col-xs-2 nzbtable"><?php echo $language->translate("STATUS");?></th>
  380. <th class="col-xs-1 nzbtable"><?php echo $language->translate("CATEGORY");?></th>
  381. <th class="col-xs-2 nzbtable"><?php echo $language->translate("PROGRESS");?></th>
  382. </tr>
  383. </thead>
  384. <tbody class="dl-history sabnzbd"></tbody>
  385. <tbody class="dl-history nzbget"></tbody>
  386. </table>
  387. </div>
  388. </div>
  389. </div>
  390. </div>
  391. </div>
  392. </div>
  393. </div>
  394. </div>
  395. <?php } ?>
  396. <?php if (qualifyUser(PLEXHOMEAUTH) && PLEXTOKEN) { ?>
  397. <div id="plexRowNowPlaying" class="row">
  398. <?php if(PLEXPLAYINGNOW == "true"){ echo getPlexStreams(12, PLEXSHOWNAMES, $USER->role); } ?>
  399. </div>
  400. <div id="plexRow" class="row">
  401. <div class="col-lg-12">
  402. <?php
  403. if(PLEXRECENTMOVIE == "true" || PLEXRECENTTV == "true" || PLEXRECENTMUSIC == "true"){
  404. $plexArray = array("movie" => PLEXRECENTMOVIE, "season" => PLEXRECENTTV, "album" => PLEXRECENTMUSIC);
  405. echo getPlexRecent($plexArray);
  406. }
  407. ?>
  408. </div>
  409. </div>
  410. <div id="plexPlaylists" class="row">
  411. <div class="col-lg-12">
  412. <?php
  413. if(PLEXPLAYLISTS == "true"){
  414. echo getPlexPlaylists($plexArray);
  415. }
  416. ?>
  417. </div>
  418. </div>
  419. <?php } ?>
  420. <?php if (qualifyUser(EMBYHOMEAUTH) && EMBYTOKEN) { ?>
  421. <div id="embyRowNowPlaying" class="row">
  422. <?php if(EMBYPLAYINGNOW == "true"){ echo getEmbyStreams(12, EMBYSHOWNAMES, $USER->role); } ?>
  423. </div>
  424. <div id="embyRow" class="row">
  425. <div class="col-lg-12">
  426. <?php
  427. if(EMBYRECENTMOVIE == "true" || EMBYRECENTTV == "true" || EMBYRECENTMUSIC == "true"){
  428. $embyArray = array("Movie" => EMBYRECENTMOVIE, "Episode" => EMBYRECENTTV, "MusicAlbum" => EMBYRECENTMUSIC, "Series" => EMBYRECENTTV);
  429. echo getEmbyRecent($embyArray);
  430. }
  431. ?>
  432. </div>
  433. </div>
  434. <?php } ?>
  435. <?php if ((SONARRURL != "" && qualifyUser(SONARRHOMEAUTH)) || (RADARRURL != "" && qualifyUser(RADARRHOMEAUTH)) || (HEADPHONESURL != "" && qualifyUser(HEADPHONESHOMEAUTH)) || (SICKRAGEURL != "" && qualifyUser(SICKRAGEHOMEAUTH))) { ?>
  436. <div id="calendarLegendRow" class="row" style="padding: 0 0 10px 0;">
  437. <div class="col-lg-12 content-form form-inline">
  438. <div class="form-group">
  439. <select class="form-control" id="imagetype_selector" style="width: auto !important; display: inline-block">
  440. <option value="all">View All</option>
  441. <?php if(RADARRURL != ""){ echo '<option value="film">Movies</option>'; }?>
  442. <?php if(SONARRURL != "" || SICKRAGEURL != ""){ echo '<option value="tv">TV Shows</option>'; }?>
  443. <?php if(HEADPHONESURL != ""){ echo '<option value="music">Music</option>'; }?>
  444. </select>
  445. <span class="label label-primary well-sm">Available</span>
  446. <span class="label label-danger well-sm">Unavailable</span>
  447. <span class="label indigo-bg well-sm">Unreleased</span>
  448. <span class="label light-blue-bg well-sm">Premier</span>
  449. </div>
  450. <!--
  451. <div class="pull-right">
  452. <div class="btn-group" role="group">
  453. <button type="button" class="btn waves btn-default btn-sm dropdown-toggle waves-effect waves-float" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">View All<span class="caret"></span></button>
  454. <ul style="right:0; left: auto" class="dropdown-menu">
  455. <li><a class="" href="javascript:void(0)">Movies</a></li>
  456. <li><a class="" href="javascript:void(0)">TV Shows</a></li>
  457. <li><a class="" href="javascript:void(0)">Music</a></li>
  458. </ul>
  459. </div>
  460. </div>-->
  461. </div>
  462. </div>
  463. <div id="calendarRow" class="row">
  464. <div class="col-lg-12">
  465. <div id="calendar" class="fc-calendar box-shadow fc fc-ltr fc-unthemed"></div>
  466. </div>
  467. </div>
  468. <?php } ?>
  469. </div>
  470. </div>
  471. <script>
  472. $('.close-btn').click(function(e){
  473. var closedBox = $(this).closest('div.content-box').remove();
  474. e.preventDefault();
  475. });
  476. $('#clearSearch').click(function(e){
  477. $('#searchInput').val("");
  478. $('#resultshere').html("");
  479. $('#searchInput').focus();
  480. e.preventDefault();
  481. });
  482. $(document).on("click", ".openTab", function(e) {
  483. if($(this).attr("openTab") === "true") {
  484. var isActive = parent.$("div[data-content-name^='<?php echo strtolower(PLEXTABNAME);?>']");
  485. var activeFrame = isActive.children('iframe');
  486. if(isActive.length === 1){
  487. activeFrame.attr("src", $(this).attr("href"));
  488. parent.$("li[name='<?php echo strtolower(PLEXTABNAME);?>']").trigger("click");
  489. }else{
  490. parent.$("li[name='<?php echo strtolower(PLEXTABNAME);?>']").trigger("click");
  491. parent.$("div[data-content-name^='<?php echo strtolower(PLEXTABNAME);?>']").children('iframe').attr("src", $(this).attr("href"));
  492. }
  493. e.preventDefault();
  494. }else{
  495. console.log("nope");
  496. }
  497. });
  498. function localStorageSupport() {
  499. return (('localStorage' in window) && window['localStorage'] !== null)
  500. }
  501. $( document ).ready(function() {
  502. $('#plexSearchForm').on('submit', function () {
  503. var refreshBox = $(this).closest('div.content-box');
  504. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(refreshBox).fadeIn(300);
  505. setTimeout(function(){
  506. var refreshPreloader = refreshBox.find('.refresh-preloader'),
  507. deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
  508. refreshPreloader.remove();
  509. });
  510. },1000);
  511. ajax_request('POST', 'search-plex', {
  512. searchtitle: $('#plexSearchForm [name=search-title]').val(),
  513. }).done(function(data){ $('#resultshere').html(data);});
  514. });
  515. $('.repeat-btn').click(function(){
  516. var refreshBox = $(this).closest('div.content-box');
  517. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(refreshBox).fadeIn(300);
  518. setTimeout(function(){
  519. var refreshPreloader = refreshBox.find('.refresh-preloader'),
  520. deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
  521. refreshPreloader.remove();
  522. });
  523. },1500);
  524. });
  525. $(document).on('click', '.w-refresh', function(){
  526. var id = $(this).attr("link");
  527. $("div[np^='"+id+"']").toggle();
  528. });
  529. $('.recentItems').each(function() {
  530. var name = $(this).attr("data-name");
  531. console.log(name);
  532. $(this).slick({
  533. slidesToShow: 13,
  534. slidesToScroll: 13,
  535. infinite: true,
  536. lazyLoad: 'ondemand',
  537. prevArrow: '<a class="zero-m pull-left prev-mail btn btn-default waves waves-button btn-sm waves-effect waves-float"><i class="fa fa-angle-left"></i></a>',
  538. nextArrow: '<a class="pull-left next-mail btn btn-default waves waves-button btn-sm waves-effect waves-float"><i class="fa fa-angle-right"></i></a>',
  539. appendArrows: $('.'+name),
  540. arrows: true,
  541. responsive: [
  542. {
  543. breakpoint: 1750,
  544. settings: {
  545. slidesToShow: 12,
  546. slidesToScroll: 12,
  547. }
  548. },
  549. {
  550. breakpoint: 1600,
  551. settings: {
  552. slidesToShow: 11,
  553. slidesToScroll: 11,
  554. }
  555. },
  556. {
  557. breakpoint: 1450,
  558. settings: {
  559. slidesToShow: 10,
  560. slidesToScroll: 10,
  561. }
  562. },
  563. {
  564. breakpoint: 1300,
  565. settings: {
  566. slidesToShow: 9,
  567. slidesToScroll: 9,
  568. }
  569. },
  570. {
  571. breakpoint: 1150,
  572. settings: {
  573. slidesToShow: 8,
  574. slidesToScroll: 8,
  575. }
  576. },
  577. {
  578. breakpoint: 1000,
  579. settings: {
  580. slidesToShow: 7,
  581. slidesToScroll: 7,
  582. }
  583. },
  584. {
  585. breakpoint: 850,
  586. settings: {
  587. slidesToShow: 6,
  588. slidesToScroll: 6,
  589. }
  590. },
  591. {
  592. breakpoint: 700,
  593. settings: {
  594. slidesToShow: 5,
  595. slidesToScroll: 5,
  596. }
  597. },
  598. {
  599. breakpoint: 675,
  600. settings: {
  601. slidesToShow: 4,
  602. slidesToScroll: 4
  603. }
  604. },
  605. {
  606. breakpoint: 480,
  607. settings: {
  608. slidesToShow: 3,
  609. slidesToScroll: 3
  610. }
  611. }
  612. // You can unslick at a given breakpoint now by adding:
  613. // settings: "unslick"
  614. // instead of a settings object
  615. ]
  616. });
  617. });
  618. // each filter we click on
  619. $(".filter-recent-event > li").on("click", function() {
  620. // toggle the filter on/off
  621. $(this).data( "filter-on" , !$(this).data("filter-on") );
  622. // set all the filter strings to empty
  623. var filtersOn = "";
  624. var filtersOff = "";
  625. var allFilters = "";
  626. // loop through each filter
  627. $(".filter-recent-event > li").each(function() {
  628. // set a variable to hold the value of the filter class
  629. // and also if the filter is on/off
  630. var filter = $(this).data("filter");
  631. var isOn = $(this).data("filter-on");
  632. // add the filter to the filtersOn / filtersOff collection
  633. if( isOn ) {
  634. filtersOn += "." + filter + ", ";
  635. } else {
  636. filtersOff += "." + filter + ", ";
  637. }
  638. });
  639. // remove the last ", " from each filter collection.
  640. filtersOn = filtersOn.replace(/, $/, "");
  641. filtersOff = filtersOff.replace(/, $/, "");
  642. // remove all filters if none are on.
  643. if( filtersOn === "" ) {
  644. filtersOn = "*";
  645. filtersOff = "";
  646. }
  647. // combine the filters together ( on + off )
  648. allFilters = filtersOn + ":not(" + filtersOff + ")";
  649. console.log( allFilters );
  650. // now filter the slides.
  651. $('.recentItems ')
  652. .slick('slickUnfilter')
  653. .slick('slickFilter' , allFilters );
  654. });
  655. /*
  656. var movieFiltered = false;
  657. var seasonFiltered = false;
  658. var albumFiltered = false;
  659. $('.js-filter-movie').on('click', function(){
  660. if (movieFiltered === false) {
  661. $('.recentItems').slick('slickFilter','.item-season, .item-album, .item-Series, .item-Episode, .item-MusicAlbum');
  662. $(this).text('Show Movies');
  663. movieFiltered = true;
  664. } else {
  665. $('.recentItems').slick('slickUnfilter');
  666. $(this).text('Hide Movies');
  667. movieFiltered = false;
  668. }
  669. });
  670. $('.js-filter-season').on('click', function(){
  671. if (seasonFiltered === false) {
  672. $('.recentItems').slick('slickFilter','.item-movie, .item-album, .item-Movie, .item-MusicAlbum');
  673. $(this).text('Show TV');
  674. seasonFiltered = true;
  675. } else {
  676. $('.recentItems').slick('slickUnfilter');
  677. $(this).text('Hide TV');
  678. seasonFiltered = false;
  679. }
  680. });
  681. $('.js-filter-album').on('click', function(){
  682. if (albumFiltered === false) {
  683. $('.recentItems').slick('slickFilter','.item-season, .item-movie, .item-Series, .item-Episode, .item-Movie');
  684. $(this).text('Show Music');
  685. albumFiltered = true;
  686. } else {
  687. $('.recentItems').slick('slickUnfilter');
  688. $(this).text('Hide Music');
  689. albumFiltered = false;
  690. }
  691. });*/
  692. /*$('.w-refresh').click(function(e){
  693. var moreInfo = $(this).closest('div.overlay').addClass("show");
  694. console.log(moreInfo);
  695. moreInfo.show();
  696. e.preventDefault();
  697. });*/
  698. $("body").niceScroll({
  699. railpadding: {top:0,right:0,left:0,bottom:0},
  700. scrollspeed: 30,
  701. mousescrollstep: 60
  702. });
  703. $(".table-responsive").niceScroll({
  704. railpadding: {top:0,right:0,left:0,bottom:0},
  705. scrollspeed: 30,
  706. mousescrollstep: 60
  707. });
  708. /*$(".carousel-caption").niceScroll({
  709. railpadding: {top:0,right:0,left:0,bottom:0},
  710. scrollspeed: 30,
  711. mousescrollstep: 60
  712. });*/
  713. // check if browser support HTML5 local storage
  714. <?php if((NZBGETURL != "" && qualifyUser(NZBGETHOMEAUTH)) || (SABNZBDURL != "" && qualifyUser(SABNZBDHOMEAUTH))){ ?>
  715. var queueRefresh = <?php echo DOWNLOADREFRESH; ?>;
  716. var historyRefresh = <?php echo HISTORYREFRESH; ?>; // This really doesn't need to happen that often
  717. var queueLoad = function() {
  718. <?php if(SABNZBDURL != "") { echo '$("tbody.dl-queue.sabnzbd").load("ajax.php?a=sabnzbd-update&list=queue");'; } ?>
  719. <?php if(NZBGETURL != "") { echo '$("tbody.dl-queue.nzbget").load("ajax.php?a=nzbget-update&list=listgroups");'; } ?>
  720. };
  721. var historyLoad = function() {
  722. <?php if(SABNZBDURL != "") { echo '$("tbody.dl-history.sabnzbd").load("ajax.php?a=sabnzbd-update&list=history");'; } ?>
  723. <?php if(NZBGETURL != "") { echo '$("tbody.dl-history.nzbget").load("ajax.php?a=nzbget-update&list=history");'; } ?>
  724. };
  725. // Initial Loads
  726. queueLoad();
  727. historyLoad();
  728. // Interval Loads
  729. var queueInterval = setInterval(queueLoad, queueRefresh);
  730. var historyInterval = setInterval(historyLoad, historyRefresh);
  731. // Manual Load
  732. $("#getDownloader").click(function() {
  733. queueLoad();
  734. historyLoad();
  735. });
  736. <?php } ?>
  737. });
  738. </script>
  739. <?php if ((SONARRURL != "" && qualifyUser(SONARRHOMEAUTH)) || (RADARRURL != "" && qualifyUser(RADARRHOMEAUTH)) || (HEADPHONESURL != "" && qualifyUser(HEADPHONESHOMEAUTH)) || (SICKRAGEURL != "" && qualifyUser(SICKRAGEHOMEAUTH))) { ?>
  740. <script>
  741. $(function () {
  742. var date = new Date();
  743. var d = date.getDate();
  744. var m = date.getMonth();
  745. var y = date.getFullYear();
  746. $('#calendar').fullCalendar({
  747. eventLimit: false,
  748. firstDay: <?php echo CALENDARSTART;?>,
  749. height: "auto",
  750. defaultView: '<?php echo CALENDARVIEW;?>',
  751. header: {
  752. left: 'prev,next,',
  753. center: 'title',
  754. right: 'today, month, basicDay,basicWeek,'
  755. },
  756. views: {
  757. basicDay: { buttonText: '<?php echo $language->translate("DAY");?>', eventLimit: false },
  758. basicWeek: { buttonText: '<?php echo $language->translate("WEEK");?>', eventLimit: false },
  759. month: { buttonText: '<?php echo $language->translate("MONTH");?>', eventLimit: false },
  760. today: { buttonText: '<?php echo $language->translate("TODAY");?>' },
  761. },
  762. events: [
  763. <?php
  764. if (SICKRAGEURL != "" && qualifyUser(SICKRAGEHOMEAUTH)){
  765. try {
  766. echo getSickrageCalendarWanted($sickrage->future());
  767. } catch (Exception $e) {
  768. writeLog("error", "SICKRAGE/BEARD ERROR: ".strip($e->getMessage()));
  769. } try {
  770. echo getSickrageCalendarHistory($sickrage->history("100","downloaded"));
  771. } catch (Exception $e) {
  772. writeLog("error", "SICKRAGE/BEARD ERROR: ".strip($e->getMessage()));
  773. }
  774. }
  775. if (SONARRURL != "" && qualifyUser(SONARRHOMEAUTH)){
  776. try {
  777. echo getSonarrCalendar($sonarr->getCalendar($startDate, $endDate));
  778. } catch (Exception $e) {
  779. writeLog("error", "SONARR ERROR: ".strip($e->getMessage()));
  780. }
  781. }
  782. if (RADARRURL != "" && qualifyUser(RADARRHOMEAUTH)){
  783. try {
  784. echo getRadarrCalendar($radarr->getCalendar($startDate, $endDate));
  785. } catch (Exception $e) {
  786. writeLog("error", "RADARR ERROR: ".strip($e->getMessage()));
  787. }
  788. }
  789. if (HEADPHONESURL != "" && qualifyUser(HEADPHONESHOMEAUTH)){
  790. echo getHeadphonesCalendar(HEADPHONESURL, HEADPHONESKEY, "getHistory");
  791. echo getHeadphonesCalendar(HEADPHONESURL, HEADPHONESKEY, "getWanted");
  792. }?>
  793. ],
  794. eventRender: function eventRender( event, element, view ) {
  795. return ['all', event.imagetype].indexOf($('#imagetype_selector').val()) >= 0
  796. },
  797. editable: false,
  798. droppable: false,
  799. timeFormat: '<?php echo CALTIMEFORMAT; ?>',
  800. });
  801. });
  802. $('#imagetype_selector').on('change',function(){
  803. $('#calendar').fullCalendar('rerenderEvents');
  804. })
  805. </script>
  806. <?php } ?>
  807. <script>
  808. function convertTime(a){
  809. if(a){
  810. var hours = Math.trunc(a/60);
  811. var minutes = a % 60;
  812. return hours+"h "+minutes+"m";
  813. }else{
  814. return "N/A";
  815. }
  816. }
  817. function convertArray(a, type){
  818. var result = "";
  819. var count = 1;
  820. var color = "";
  821. $.each( a, function( key, value ) {
  822. if (count == 1){ color = "gray"; }else{ color = "gray"; }
  823. if(type == "MOVIE"){
  824. result += '<span class="label label-'+color+'">'+value['name']+'</span>&nbsp;';
  825. }else if(type == "TV"){
  826. result += '<span class="label label-'+color+'">'+value+'</span>&nbsp;';
  827. }
  828. count++;
  829. });
  830. return result;
  831. }
  832. function convertTrailer(a){
  833. var result = "";
  834. var count = 1;
  835. $.each( a.results, function( key, value ) {
  836. if (count == 1){
  837. result += '<span id="openTrailer" style="cursor:pointer;width: 100%;display: block;" data-key="'+value['key']+'" data-name="'+value['name']+'" data-site="'+value['site']+'" class="label label-danger"><i class="fa fa-youtube-play" aria-hidden="true"></i> &nbsp;Watch Trailer</span>&nbsp;';
  838. }
  839. count++;
  840. });
  841. return result;
  842. }
  843. function convertCast(a){
  844. var result = "";
  845. var count = 1;
  846. $.each( a.cast, function( key, value ) {
  847. if( value['profile_path'] ){
  848. if (count <= 6){
  849. result += '<div class="col-lg-2 col-xs-2"><div class="zero-m"><img style="border-radius:10%;margin-left: auto;margin-right: auto;display: block;" height="50px" src="https://image.tmdb.org/t/p/w150'+value['profile_path']+'" alt="profile"><h5 class="text-center"><strong>'+value['name']+'</strong></h5><h6 class="text-center">'+value['character']+'</h6></div></div>';
  850. count++;
  851. }
  852. }
  853. });
  854. return result;
  855. }
  856. function whatIsIt(a){
  857. var what = Object.prototype.toString;
  858. if(what.call(a) == "[object Array]"){
  859. return a[0].fileName;
  860. }else if(what.call(a) == "[object Object]"){
  861. return a.fileName;
  862. }
  863. }
  864. function whatWasIt(a){
  865. var what = Object.prototype.toString;
  866. if(what.call(a) == "[object Array]"){
  867. return a[0];
  868. }else if(what.call(a) == "[object Object]"){
  869. return a;
  870. }
  871. }
  872. $(document).on('click', "#openTrailer", function(){
  873. var key = $(this).attr("data-key");
  874. $('#iFrameYT').html('<iframe id="calendarYoutube" class="embed-responsive-item" src="https://www.youtube.com/embed/'+key+'" allowfullscreen=""></iframe>');
  875. $('#calendarVideo').modal('show');
  876. });
  877. $(document).on('click', "a[class*=ID-]", function(){
  878. $('#calendarExtra').modal('show');
  879. var refreshBox = $('#calendarMainID');
  880. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(refreshBox).fadeIn(300);
  881. setTimeout(function(){
  882. var refreshPreloader = refreshBox.find('.refresh-preloader'),
  883. deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
  884. refreshPreloader.remove();
  885. });
  886. },300);
  887. var check = $(this).attr("class");
  888. var ID = check.split("--")[1];
  889. if (~check.indexOf("tvID")){
  890. var type = "TV";
  891. ajax_request('POST', 'tvdb-get', {
  892. id: ID,
  893. }).done(function(data){
  894. if( data.trakt ) {
  895. $.ajax({
  896. type: 'GET',
  897. url: 'https://api.themoviedb.org/3/tv/'+data.trakt.tmdb+'?api_key=83cf4ee97bb728eeaf9d4a54e64356a1&append_to_response=videos,credits',
  898. cache: true,
  899. async: true,
  900. complete: function(xhr, status) {
  901. var result = $.parseJSON(xhr.responseText);
  902. if (xhr.statusText === "OK") {
  903. console.log(result);
  904. $('#calendarTitle').text(result.name);
  905. $('#calendarRating').html('<span class="label label-gray"><i class="fa fa-thumbs-up white"></i> '+result.vote_average+'</span>&nbsp;');
  906. $('#calendarRuntime').html('<span class="label label-gray"><i class="fa fa-clock-o white"></i> '+convertTime(whatWasIt(result.episode_run_time))+'</span>&nbsp;');
  907. $('#calendarSummary').text(result.overview);
  908. $('#calendarTagline').text("");
  909. $('#calendarTrailer').html(convertTrailer(result.videos));
  910. $('#calendarCast').html(convertCast(result.credits));
  911. $('#calendarGenres').html(convertArray(result.genres, "MOVIE"));
  912. $('#calendarLang').html(convertArray(result.languages, "TV"));
  913. $('#calendarPoster').attr("src","https://image.tmdb.org/t/p/w300"+result.poster_path);
  914. $('#calendarMain').attr("style","background-image: url(https://image.tmdb.org/t/p/w1000"+result.backdrop_path+");background-position: center;-webkit-filter: brightness(50%) contrast(100%);filter: brightness(50%) contrast(100%);top: 0;left: 0;width: 100%;height: 100%;position: fixed;");
  915. $('#calendarExtra').modal('show');
  916. }
  917. }
  918. });
  919. }else{
  920. $('#calendarTitle').text(data.series.seriesName);
  921. $('#calendarRating').html('<span class="label label-gray"><i class="fa fa-thumbs-up white"></i> '+data.series.siteRating+'</span>&nbsp');
  922. $('#calendarRuntime').html('<span class="label label-gray"><i class="fa fa-clock-o white"></i> '+convertTime(data.series.runtime)+'</span>&nbsp;');
  923. $('#calendarSummary').text(data.series.overview);
  924. $('#calendarTagline').text("");
  925. $('#calendarTrailer').html("");
  926. $('#calendarCast').html("");
  927. $('#calendarGenres').html(convertArray(data.series.genre, "TV"));
  928. $('#calendarLang').html("");
  929. $('#calendarPoster').attr("src","https://thetvdb.com/banners/_cache/"+whatIsIt(data.poster));
  930. $('#calendarMain').attr("style","background-size: 1000px 563px; background-image: url(ajax.php?a=show-image&image=http://thetvdb.com/banners/"+whatIsIt(data.backdrop)+");background-position: center;-webkit-filter: brightness(50%) contrast(100%);filter: brightness(50%) contrast(100%);top: 0;left: 0;width: 100%;height: 100%;position: fixed;");
  931. $('#calendarExtra').modal('show');
  932. }
  933. });
  934. }else if (~check.indexOf("movieID")){
  935. var type = "MOVIE";
  936. $.ajax({
  937. type: 'GET',
  938. url: 'https://api.themoviedb.org/3/movie/'+ID+'?api_key=83cf4ee97bb728eeaf9d4a54e64356a1&append_to_response=videos,credits',
  939. cache: true,
  940. async: true,
  941. complete: function(xhr, status) {
  942. var result = $.parseJSON(xhr.responseText);
  943. console.log(result);
  944. console.log(convertCast(result.credits));
  945. if (xhr.statusText === "OK") {
  946. $('#calendarTitle').text(result.title);
  947. $('#calendarRating').html('<span class="label label-gray"><i class="fa fa-thumbs-up white"></i> '+result.vote_average+'</span>&nbsp;');
  948. $('#calendarRuntime').html('<span class="label label-gray"><i class="fa fa-clock-o white"></i> '+convertTime(result.runtime)+'</span>&nbsp;');
  949. $('#calendarSummary').text(result.overview);
  950. $('#calendarTagline').text(result.tagline);
  951. $('#calendarTrailer').html(convertTrailer(result.videos));
  952. $('#calendarCast').html(convertCast(result.credits));
  953. $('#calendarGenres').html(convertArray(result.genres, "MOVIE"));
  954. $('#calendarLang').html(convertArray(result.spoken_languages, "MOVIE"));
  955. $('#calendarPoster').attr("src","https://image.tmdb.org/t/p/w300"+result.poster_path);
  956. $('#calendarMain').attr("style","background-image: url(https://image.tmdb.org/t/p/w1000"+result.backdrop_path+");background-position: center;-webkit-filter: brightness(50%) contrast(100%);filter: brightness(50%) contrast(100%);top: 0;left: 0;width: 100%;height: 100%;position: fixed;");
  957. $('#calendarExtra').modal('show');
  958. }
  959. }
  960. });
  961. }
  962. });
  963. </script>
  964. <div id="calendarExtra" class="modal fade in" tabindex="-1" role="dialog">
  965. <div class="modal-dialog modal-lg gray-bg" role="document">
  966. <div id="calendarMainID" class="modal-content">
  967. <div class="modal-content" id="calendarMain"></div>
  968. <div style="position: inherit; padding: 15px">
  969. <span id="calendarRuntime" class="pull-left"></span>
  970. <span id="calendarRating" class="pull-left"></span>
  971. <span id="calendarGenres" class="pull-right"></span>
  972. </div>
  973. <div class="modal-body">
  974. <div class="row">
  975. <div class="col-lg-2 col-xs-4">
  976. <img style="width:100%;border-radius: 10px;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);" id="calendarPoster" src="">
  977. </div>
  978. <div class="col-lg-10 col-sm-8">
  979. <h2 id="calendarTitle" class="modal-title text-center">Modal title</h2>
  980. <h6 id="calendarTagline" class="modal-title text-center"><em>Modal title</em></h6>
  981. <p id="calendarSummary">Modal Summary</p>
  982. <div class="" id="calendarCast">Modal Summary</div>
  983. </div>
  984. </div>
  985. </div>
  986. <div style="position: inherit; padding: 15px 0px 30px 0px; margin-top: -20px;">
  987. <div class="col-lg-2 col-xs-4">
  988. <span id="calendarTrailer" class="pull-left" style="width:100%"></span>
  989. </div>
  990. <div class="col-lg-10 col-sm-8">
  991. <span id="calendarLang" class="pull-right"></span>
  992. </div>
  993. </div>
  994. </div>
  995. </div>
  996. </div>
  997. <div id="calendarVideo" class="modal fade in palette-Grey-900 bg" tabindex="-1" role="dialog">
  998. <div class="modal-dialog modal-lg gray-bg" role="document">
  999. <div id="calendarMainVideo" class="modal-content gray-bg">
  1000. <div class="">
  1001. <!-- 16:9 aspect ratio -->
  1002. <div id="iFrameYT" class="embed-responsive embed-responsive-16by9 gray-bg"></div>
  1003. </div>
  1004. </div>
  1005. </div>
  1006. </div>
  1007. </body>
  1008. </html>