diff --git a/images/edit.svg b/images/edit.svg new file mode 100644 index 0000000..0de37b1 --- /dev/null +++ b/images/edit.svg @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + Shadow opacity : 30, 15, 10, (8) + + Bevel opacity : 30 / 10 + Bevel opacity : 75 / 15 + + + + + diff --git a/inc/content.php b/inc/content.php index 639d5be..a044a2d 100644 --- a/inc/content.php +++ b/inc/content.php @@ -95,6 +95,35 @@ if (!empty($ci['ac']) && $ci['ac'] === 'addVideo' && isLog()) { '; } +if (!empty($ci['ac']) && $ci['ac'] === 'viewEditForm' && isLog()) { + $videoInfo = getVideoInfo($ci['file'], $ci['bc'], $fullListFile); + echo '
+
+ Video information +

+ + +

+

+ + +

+

+ + +

+

+ + + + + + +

+
+
'; +$ci['ac'] = 'view'; +} if (!empty($ci['ac']) && $ci['ac'] === 'addThumbnail' && isLog()) { echo '
@@ -257,11 +286,12 @@ if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) { } if ($_SESSION['log'] === true) { echo '
+ Edit video information Cut this video Use this thumbnail for folder thumbnail - Delete this video Re-download Get info + Delete this video
'; } if ($GLOBALS['config']['DOWNLOAD_METHOD'] === 'xsendfile' || $GLOBALS['config']['DOWNLOAD_METHOD'] === 'php') { diff --git a/index.php b/index.php index 8e2b55f..5d39589 100644 --- a/index.php +++ b/index.php @@ -283,9 +283,9 @@ function n_print($data, $name = '') {
'; echo ' - ', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], ' + ', basename($aBackTrace[0]['file']), ' ligne => ', $aBackTrace[0]['line'], ' '; - echo '
',          htmlentities(print_r($data, 1)), '
'; + echo '
',           htmlentities(print_r($data, 1)), '
'; echo '

'; @@ -417,6 +417,16 @@ function updateFileInfo($hash, $title, $uploadDate) { file_put_contents($GLOBALS['config']['LISTFILE'], ""); } +function updateFileDesc($hash, $info) { + global $fullListFile; + $fullListFile[$hash]['title'] = $info['title']; + $fullListFile[$hash]['desc'] = $info['desc']; + $fullListFile[$hash]['via'] = $info['via']; + chdir($_SERVER['DOCUMENT_ROOT']); + file_put_contents($GLOBALS['config']['LISTFILE'], ""); + return true; +} + function listCurrentDir($breadcrumb) { chdir($breadcrumb); return glob("*", GLOB_ONLYDIR); @@ -757,7 +767,7 @@ function clearCache() { function humanFilesize($bytes, $decimals = 2) { $sz = 'BKMGTP'; $factor = floor((strlen($bytes) - 1) / 3); - return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor]; + return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)).@$sz[$factor]; } if (isset($ci['ac']) && !empty($ci['ac']) && $ci['ac'] === 'm3u') { @@ -839,6 +849,17 @@ if (isset($ci['ac']) && !empty($ci['ac'])) { echo '
', $updateInfo, '
'; } } + if ($ci['ac'] === 'view' && !empty($ci['op']) && $ci['op'] === 'updateFileDesc') { + verifToken($ci['token']); + if (!isLog()) { + die('Tinker say : Blinded you, with Science! '); + } + $info = array('title' => $ci['name'], 'desc' => $ci['desc'], 'via' => $ci['via']); + $updateInfo = updateFileDesc($ci['file'], $info); + if ($updateInfo !== true) { + echo '
', $updateInfo, '
'; + } + } if ($ci['ac'] === 'viewQueue' || $ci['ac'] === 'clearCache') { verifToken($ci['token']); if (!isLog()) { diff --git a/style.css b/style.css index d986051..a7b364b 100644 --- a/style.css +++ b/style.css @@ -261,7 +261,7 @@ input[type="checkbox"] { width: auto; } -input, select, options { +input, select, options, textarea { color: #262626; }