110 lines
3.9 KiB
PHP
110 lines
3.9 KiB
PHP
|
<?php
|
||
|
require(__DIR__.'/login.php');
|
||
|
define('PROJECT_ROOT', getcwd());
|
||
|
?>
|
||
|
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head lang="en">
|
||
|
<title>MIT Learning Manager 2.5</title>
|
||
|
<meta charset="UTF-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
|
|
||
|
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
|
||
|
<!-- Include our stylesheets -->
|
||
|
<link href="assets/css/styles.css?random=<?php echo uniqid(); ?>" rel="stylesheet"/>
|
||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" />
|
||
|
|
||
|
<!-- Font Awesome -->
|
||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" />
|
||
|
|
||
|
<!-- Matomo -->
|
||
|
<script type="text/javascript">
|
||
|
var _paq = window._paq = window._paq || [];
|
||
|
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
|
||
|
_paq.push(['trackPageView']);
|
||
|
_paq.push(['enableLinkTracking']);
|
||
|
(function() {
|
||
|
var u="https://analytics.michu-it.com/";
|
||
|
_paq.push(['setTrackerUrl', u+'matomo.php']);
|
||
|
_paq.push(['setSiteId', '3']);
|
||
|
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
|
||
|
g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
|
||
|
})();
|
||
|
</script>
|
||
|
<noscript><p><img src="https://analytics.michu-it.com/matomo.php?idsite=3&rec=1" style="border:0;" alt="" /></p></noscript>
|
||
|
<!-- End Matomo Code -->
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="filemanager">
|
||
|
<div class="header">
|
||
|
MIT Learning Manager
|
||
|
</div>
|
||
|
<div class="search">
|
||
|
<input type="search" placeholder="Find a file.." />
|
||
|
</div>
|
||
|
<div class="breadcrumbs"></div>
|
||
|
<a class="button folderName" id="backButton" href=""><i class="fa fa-arrow-left" aria-hidden="true"></i> Go Back</a>
|
||
|
<a class="button" href="./"><i class="fa fa-home" aria-hidden="true"></i> Home</a>
|
||
|
|
||
|
<ul class="data"></ul>
|
||
|
<div class="nothingfound">
|
||
|
<div class="nofiles"></div>
|
||
|
<span>Error! - No files here.</span>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<!-- Include our script files -->
|
||
|
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
|
||
|
<script src="assets/js/script.js?random=<?php echo uniqid(); ?>"></script>
|
||
|
<!-- FancyBox -->
|
||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
function getCookie(cname) {
|
||
|
var name = cname + "=";
|
||
|
var decodedCookie = decodeURIComponent(document.cookie);
|
||
|
var ca = decodedCookie.split(';');
|
||
|
for(var i = 0; i < ca.length; i++) {
|
||
|
var c = ca[i];
|
||
|
while (c.charAt(0) == ' ') {
|
||
|
c = c.substring(1);
|
||
|
}
|
||
|
if (c.indexOf(name) == 0) {
|
||
|
return c.substring(name.length, c.length);
|
||
|
}
|
||
|
}
|
||
|
return "";
|
||
|
}
|
||
|
function setCookie(cname,cvalue) {
|
||
|
document.cookie = cname + "=" + cvalue + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/";
|
||
|
}
|
||
|
|
||
|
// initialize array only if emty
|
||
|
var json_str=getCookie("watchedVideoArray");
|
||
|
if (json_str == "") {
|
||
|
// If never used this page create an initial array
|
||
|
var arr_watchstatus = [
|
||
|
"netcloud-init"
|
||
|
];
|
||
|
} else {
|
||
|
// Decode allready watched elements from cookie
|
||
|
var arr_watchstatus = JSON.parse(json_str);
|
||
|
}
|
||
|
|
||
|
$(document).on('afterClose.fb', function( e, instance, slide ) {
|
||
|
console.info( slide.opts.$orig );
|
||
|
//console.info( slide.opts.$orig[0].dataset.src ); //Gets Video Path from clicked link
|
||
|
|
||
|
// append new value to the array
|
||
|
arr_watchstatus.push(slide.opts.$orig[0].dataset.src); // adds new video path to array!
|
||
|
var json_str = JSON.stringify(arr_watchstatus); // JSON encodes the array
|
||
|
setCookie('watchedVideoArray', json_str); // Set new JSON Value to cookie
|
||
|
//parent.location.reload(true);
|
||
|
|
||
|
slide.opts.$orig[0].childNodes[5].style.display = "inline"; // After closing set green thick!
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|