diff --git a/images/delete.svg b/images/delete.svg
new file mode 100644
index 0000000..e8497bd
--- /dev/null
+++ b/images/delete.svg
@@ -0,0 +1,555 @@
+
+
+
+
diff --git a/folder.svg b/images/folder.svg
similarity index 100%
rename from folder.svg
rename to images/folder.svg
diff --git a/images/useThumbnail.svg b/images/useThumbnail.svg
new file mode 100644
index 0000000..5289307
--- /dev/null
+++ b/images/useThumbnail.svg
@@ -0,0 +1,555 @@
+
+
+
+
diff --git a/video.svg b/images/video.svg
similarity index 100%
rename from video.svg
rename to images/video.svg
diff --git a/inc/content.php b/inc/content.php
index 253aa3e..c1785f9 100644
--- a/inc/content.php
+++ b/inc/content.php
@@ -165,7 +165,8 @@ if ($ci['ac'] === 'view' && !empty($listCurrentFile)) {
if ($_SESSION['log'] === true) {
$token = genToken();
echo '
';
}
echo '
diff --git a/index.php b/index.php
index b2c17be..b363e11 100644
--- a/index.php
+++ b/index.php
@@ -161,9 +161,9 @@ function n_print($data, $name = '') {
';
@@ -226,6 +226,19 @@ function addVideo($ci, $fullListFile) {
file_put_contents($GLOBALS['config']['LISTFILE'], "");
}
+function deleteVideo($bc, $file) {
+ $path = $GLOBALS['config']['VIDEODIR'].'/'.chunk_split($bc, 8, '/');
+ $pathAndFile = $path.$file;
+ if (file_exists($pathAndFile) && !is_dir($pathAndFile) && $file === $_SESSION['video'].'.jpg') {
+ $listFile = (glob($path.$_SESSION['video']."*"));
+ foreach ($listFile as $value) {
+ unlink($value);
+ }
+ } else {
+ return 'Error, cannot delete this file.';
+ }
+}
+
function updateFileTitle($hash, $title) {
global $fullListFile;
$fullListFile[$hash]['title'] = $title;
@@ -399,6 +412,13 @@ if (isset($ci['ac']) && !empty($ci['ac'])) {
verifToken($ci['token']);
$addThumbnail = addThumbnail($ci['bc']);
}
+ if ($ci['ac'] === 'view' && !empty($ci['op']) && (int)$ci['op'] === 4) {
+ verifToken($ci['token']);
+ if ($_SESSION['log'] !== true) {
+ die('Tinker say : You can keep your magic, I have laser beams! ');
+ }
+ $deleteVideo = deleteVideo($ci['bc'], $ci['file']);
+ }
if ($ci['ac'] === 'view' && !empty($ci['op']) && (int)$ci['op'] === 3) {
verifToken($ci['token']);
if ($_SESSION['log'] !== true) {
diff --git a/style.css b/style.css
index 47aa69b..62e8591 100644
--- a/style.css
+++ b/style.css
@@ -42,7 +42,7 @@ body {
margin: 0;
padding: 0.4em;
border-radius: 0.2em;
- background-color: #000;
+ background-color: #141414;
}
#breadcrumb {
@@ -78,7 +78,7 @@ body {
}
.dir, .video {
- background-image: url("folder.svg");
+ background-image: url("images/folder.svg");
background-repeat: no-repeat;
background-size: 48px;
position: absolute;
@@ -89,11 +89,11 @@ body {
}
.video {
- background-image: url("video.svg");
+ background-image: url("images/video.svg");
}
.fulldir {
- background-image: url("folder.svg");
+ background-image: url("images/folder.svg");
background-position: center center;
background-repeat: no-repeat;
background-size: auto 170px;
@@ -112,17 +112,24 @@ body {
#viewFile table {
width: 60%;
margin: 0 auto;
+ border : 0.4em solid #2c2c2c;
+ padding:0;
+ border-radius:0.2em;
+ border-collapse: collapse;
}
#viewFile table tr:nth-child(even) {
- background-color: #332A23;
+ background-color: #2c2c2c;
}
#viewFile th {
+ padding: 0.3em 0.4em 0.3em 0.3em;
text-align: right;
+ min-width: 30%;
}
#viewFile td {
+ padding: 0.3em 0.3em 0.3em 0.4em;
text-align: left;
}
@@ -146,4 +153,17 @@ input[type="file"] {
video {
width: 55%;
+}
+
+#toolbar {
+ border-radius: 0.2em;
+ background-color: #141414;
+ width: auto;
+ margin: 0 auto 1.1em auto;
+ height : 2.3em;
+}
+
+#toolbar img {
+ height:2em;
+ width : 2em;
}
\ No newline at end of file