Login

'; } if (!empty($ci['ac']) && $ci['ac'] === 'newDir' && isLog()) { echo '

New directory

'; } if (!empty($ci['ac']) && $ci['ac'] === 'renDir' && isLog()) { if (empty($ci['op'])) { $currentDir = getCurrentDir($ci['bc']); echo '
', $fullListDir[$currentDir], '

'; } } if (!empty($ci['ac']) && $ci['ac'] === 'addVideo' && isLog()) { echo '
New video

'; } 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 '
Add thumbnail

'; } if (!empty($ci['ac']) && $ci['ac'] === 'importDirForm' && isLog()) { echo '
Add dir

'; } if (!empty($ci['ac']) && $ci['ac'] === 'view') { if (!empty($ci['op']) && (int)$ci['op'] === 1) { verifToken($ci['token']); } else { $videoInfo = getVideoInfo($ci['file'], $ci['bc'], $fullListFile); } } if (empty($ci['bc'])) { $path = $GLOBALS['config']['VIDEODIR'].'/'; } else { $splitBc = chunk_split($ci['bc'], 8, '/'); $path = $GLOBALS['config']['VIDEODIR'].'/'.$splitBc; $breadcrumb = makeBreadcrumb($ci['bc'], $fullListDir); $nbBread = count($breadcrumb); } $listCurrentDir = listCurrentDir($path); $listCurrentFile = listVideo($path); if (!empty($listCurrentFile) && count($listCurrentFile) > 1 && $ci['ac'] !== 'view') { echo '
'; } echo ''; if (isset($_SESSION['cutFile']) && !empty($_SESSION['cutFile'])) { echo '
Paste here', substr($fullListFile[$_SESSION['cutFile']]['title'], 0, 22), '...
'; } if (empty($listCurrentDir) && empty($listCurrentFile)) { if ($ci['ac'] === 'confDelDir' && isLog()) { echo '

Delete this directory

Yes No
'; } else { echo 'Delete this directory'; } } if ($ci['op'] === 'confDelVideo' && isLog()) { echo '

Delete this file

Yes No
'; } echo '
'; if (!empty($listCurrentDir) && $ci['ac'] !== 'view') { $listCurrentDir = sortDir($listCurrentDir, $fullListDir); foreach ($listCurrentDir as $key => $value) { $thumbnail = getThumbnail($path, $key); if (empty($thumbnail)) { echo '', $value, ' '; } else { echo 'Thumbnail of video', $value, ' '; } } } if (!empty($listCurrentFile) && $ci['ac'] !== 'view') { echo '
'; $listCurrentFile = sortFile($listCurrentFile, $fullListFile, $ci['sort']); foreach ($listCurrentFile as $key => $value) { $thumb = ''; if ($key == 'thumb') { continue; } if (file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$path.$key.'.thumb.jpg')) { $thumb = $path.$key.'.thumb.jpg'; } if (empty($thumb) && file_exists($_SERVER['DOCUMENT_ROOT'].'/'.$path.$key.'.jpg')) { $thumb = makeThumb($path, $key); } if (empty($thumb)) { $thumb = 'images/noThumb.gif'; } echo '', $path.$key, '', $value['title'], ''; } } echo '
'; if (!empty($ci['ac']) && $ci['ac'] === 'view' && !empty($listCurrentFile)) { $_SESSION['video'] = $videoInfo['hash']; if (!empty($videoInfo)) { if (empty($videoInfo['title']) || empty($videoInfo['uploadDateSort'])) { if (empty($videoInfo['title'])) { $fullTitle = $videoInfo['originalTitle']; } else { $fullTitle = $videoInfo['title']; } $uploadDate = $videoInfo['uploadDate']; updateFileInfo($videoInfo['hash'], $fullTitle, $uploadDate); $videoInfo['title'] = $fullTitle = $videoInfo['originalTitle'].' ('.$videoInfo['originalTitle'].')'; $videoInfo['uploadDateSort'] = $videoInfo['uploadDate']; deleteCache($ci['bc'], $ci['file'], $ci['sort'], true); } else { $fullTitle = $videoInfo['title'].' ('.$videoInfo['originalTitle'].')'; } echo '
'; echo '

', $fullTitle, '

'; echo ''; } if ($_SESSION['log'] === true) { echo '
Edit video information Cut this video Use this thumbnail for folder thumbnail Re-download Get info Delete this video
'; } if ($GLOBALS['config']['DOWNLOAD_METHOD'] === 'xsendfile' || $GLOBALS['config']['DOWNLOAD_METHOD'] === 'php') { $downloadLink = '?bc='.$ci['bc'].'&dl='.$videoInfo['hash']; } else { $downloadLink = $path.$videoInfo['hash'].'.webm'; } echo '
Title ', $videoInfo['title'], '
Original title ', $videoInfo['originalTitle'], '
Description ', nl2br($videoInfo['desc']), '
Original description ', nl2br(text2clickable($videoInfo['originalDesc'])), '
Url ', $videoInfo['url'], '
Duration ', $videoInfo['duration'], '
Dimension ', $videoInfo['size'], '
Size ', humanFilesize(filesize($_SERVER["DOCUMENT_ROOT"].$path.$videoInfo['hash'].'.webm')), '
Publish date ', date("d m Y", strtotime($videoInfo['uploadDate'])), '
Via '; if (!empty($videoInfo['via'])) { echo '', $videoInfo['via'], ''; } else { echo ''; } echo '
Download Download
View image preview Image preview
'; } ?>