';
-
-
if (!empty($listCurrentDir) && $ci['ac'] !== 'view') {
- $listCurrentDir = sortDir($listCurrentDir,$fullListDir);
+ $listCurrentDir = sortDir($listCurrentDir, $fullListDir);
foreach ($listCurrentDir as $key => $value) {
$thumbnail = getThumbnail($path, $key);
if (empty($thumbnail)) {
@@ -140,7 +151,7 @@ if (!empty($listCurrentDir) && $ci['ac'] !== 'view') {
}
}
if (!empty($listCurrentFile) && $ci['ac'] !== 'view') {
- $listCurrentFile = sortFile($listCurrentFile, $fullListFile,$ci['sort']);
+ $listCurrentFile = sortFile($listCurrentFile, $fullListFile, $ci['sort']);
foreach ($listCurrentFile as $key => $value) {
if ($key == 'thumb') {
continue;
@@ -205,7 +216,7 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) {
Duration |
@@ -218,7 +229,7 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) {
Via |
';
if (!empty($videoInfo['via'])) {
- echo '', $videoInfo['via'], '';
+ echo '', $videoInfo['via'], '';
} else {
echo '';
}
diff --git a/index.php b/index.php
index ad7ac41..62b3db6 100644
--- a/index.php
+++ b/index.php
@@ -152,7 +152,7 @@ function genToken() {
function verifToken($token) {
if ($token !== $_SESSION['token'] || $_SESSION['tokenTime'] <= time() - 24000) {
ban();
- die('So Long, and Thanks for All the Fish.');
+ die('Tinker say : I have several theories I would like to put into practice.');
}
}
@@ -196,9 +196,9 @@ function n_print($data, $name = '') {
';
@@ -245,6 +245,20 @@ function renDir($dir, $breadcrumb, $fullListDir) {
}
}
+function removeDir($dir, $fullListDir) {
+ $path = chunk_split($dir, 8, '/');
+ if (empty($dir) || !file_exists($GLOBALS['config']['VIDEODIR'].'/'.$path) || !is_dir($GLOBALS['config']['VIDEODIR'].'/'.$path)) {
+ die('Victory is 10% inspiration, 90% decapitation! ');
+ } else {
+ $parent = substr($dir, 0, -8);
+ $currentDir = getCurrentDir($dir);
+ rmdir($GLOBALS['config']['VIDEODIR'].'/'.$path);
+ unset($fullListDir[$currentDir]);
+ file_put_contents($GLOBALS['config']['LISTDIR'], "");
+ return $parent;
+ }
+}
+
function addVideo($ci, $fullListFile) {
$nameHash = substr(sha1($ci['name'].$ci['url']), 0, 10);
$url = escapeshellcmd($ci['url']);
@@ -527,17 +541,24 @@ if (isset($ci['ac']) && !empty($ci['ac'])) {
if ($ci['ac'] === 'view' && !empty($ci['op']) && (int)$ci['op'] === 3) {
verifToken($ci['token']);
if ($_SESSION['log'] !== true) {
- die('Tinker say : Pew Pew Pew Pew Pew Pew Pew Pew Pew Pew Pew Pew');
+ die('Tinker say : Blinded you, with Science! ');
}
$defineThumb = defineThumb($ci['bc'], $ci['file']);
}
if ($ci['ac'] === 'viewQueue') {
verifToken($ci['token']);
if ($_SESSION['log'] !== true) {
- die('Tinker say : Pew Pew Pew Pew Pew Pew Pew Pew Pew Pew Pew Pew');
+ die('Tinker say : Seek the heat! ');
}
$page = 'admin';
}
+ if ($ci['ac'] === 'del') {
+ verifToken($ci['token']);
+ if ($_SESSION['log'] !== true) {
+ die('Tinker say : wonder what.. This does? ');
+ }
+ $ci['bc'] = removeDir($ci['bc'], $fullListDir);
+ }
}
if (isset($ci['dl']) && !empty($ci['dl'])) {
sendVideo($ci['bc'], $ci['dl']);
diff --git a/style.css b/style.css
index 12e260b..4c5eee0 100644
--- a/style.css
+++ b/style.css
@@ -207,4 +207,41 @@ video {
#toolbar img {
height: 2em;
width: 2em;
+}
+
+.delete {
+ background-image: url("images/delete.svg");
+ background-position: left center;
+ background-repeat: no-repeat;
+ background-size: 32px;
+ padding-left: 32px;
+ text-decoration: none;
+}
+
+.confirm {
+ width: 14em;
+ margin: 0 auto;
+ text-align: center;
+ border: 2px solid #dfdfdf;
+ background-color: #dfdfdf;
+ border-radius: 0.2em;
+ padding: 1.2em;
+}
+
+.confirm a {
+ padding: 0.5em 1em;
+ display: inline-block;
+ border-radius: 0.2em;
+ margin: 0 0.4em;
+ color:#262626;
+ font-weight: bold;
+ text-decoration : none;
+}
+
+.confirm .valid {
+ background-color : #9bd840;
+}
+
+.confirm .cancel {
+ background-color : #e74638;
}
\ No newline at end of file
|