File Manager
Pro
/data/web/virtuals/8819/virtual/www/mp3/public
PHP 7.4.33
Linux
/data/web/virtuals/8819/virtual/www/mp3/public/filemanager.php
9.5 KB
0640
Back
<?php include'includes/session.php'; require "includes/filemanager/navigation.php"; require "includes/filemanager/header.php"; require 'config/fm.config.php'; require 'includes/filemanager/translations.php'; require 'includes/filemanager/message.php'; require 'includes/filemanager/functions-advanced.php'; require "includes/filemanager/pathset.php"; require "includes/filemanager/actions.php"; require "includes/filemanager/functions.php"; ?> <?php // SHOW HEADER fm_show_header(); // SHOW NAVIGATION fm_show_nav_path(FM_PATH); // SHOW MESSAGE fm_show_message(); $num_files = count($files); $num_folders = count($folders); $all_files_size = 0; ?> <!-- START FORM --> <form action="" method="post"> <input type="hidden" name="p" value="<?php echo fm_enc(FM_PATH) ?>"> <input type="hidden" name="group" value="1"> <table class="table highlight table-responsive"> <tr> <th class="pad-15 blue-grey bor-rad-tbr" ><label><input type="checkbox" title="<?php echo fm_t('Toggle selection') ?>" onclick="checkbox_toggle()"></label></th> <th class="pad-15 blue-grey bor-rad-tbl bor-rad-tbr" ><?php echo fm_t('Name') ?></th><th class="pad-15 blue-grey bor-rad-tbr bor-rad-tbl" style="text-align:center;"><?php echo fm_t('File Size') ?></th> <th class="pad-15 blue-grey bor-rad-tbr bor-rad-tbl" style="text-align:center;"><?php echo fm_t('Date modified') ?></th> <?php if (!FM_IS_WIN): ?><th class="blue-grey bor-rad-tbr bor-rad-tbl" style="text-align:center;"><?php echo fm_t('Permissions') ?></th><th style="display:none;"><?php echo fm_t('Owner') ?></th><?php endif; ?> <th class="pad-15 blue-grey bor-rad-tbr bor-rad-tbl" style="text-align:center;"><?php echo fm_t('Actions') ?></th> <th class="pad-15 blue-grey bor-rad-tbl" style="text-align:center;">Download</th> </tr> <?php // link to parent folder if ($parent !== false) { ?> <tr> <td colspan="8"><a type="button" class="btn-floating waves-effect waves-dark red" title="Go Back" href="?p=<?php echo urlencode($parent) ?>"><i class="fa fa-mail-reply" aria-hidden="true"></i></a></td> </tr> <?php } foreach ($folders as $f) { $is_link = is_link($path . '/' . $f); $img = $is_link ? 'icon-link_folder' : 'icon-folder'; $modif = date("d.m.y H:i", filemtime($path . '/' . $f)); $perms = substr(decoct(fileperms($path . '/' . $f)), -4); if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { $owner = posix_getpwuid(fileowner($path . '/' . $f)); $group = posix_getgrgid(filegroup($path . '/' . $f)); } else { $owner = array('name' => '?'); $group = array('name' => '?'); } ?> <tr> <td ><label><input type="checkbox" name="file[]" value="<?php echo fm_enc($f) ?>"></label></td> <td><div class="filename"><a href="?p=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="<?php echo $img ?>"></i> <?php echo fm_convert_win($f) ?></a><?php echo ($is_link ? ' → <i>' . readlink($path . '/' . $f) . '</i>' : '') ?></div></td> <td style="text-align:center;"><?php echo fm_t('Folder') ?></td><td style="text-align:center;"><?php echo $modif ?></td> <?php if (!FM_IS_WIN): ?> <td style="text-align:center;"><?php if (!FM_READONLY): ?><a title="<?php echo fm_t('Change Permissions') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&chmod=<?php echo urlencode($f) ?>"><?php echo $perms ?></a><?php else: ?><?php echo $perms ?><?php endif; ?></td> <td style="display:none;"><?php echo $owner['name'] . ':' . $group['name'] ?></td> <?php endif; ?> <td style="text-align:center;"> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo fm_t('Delete this folder?') ?>');"><i class="fa fa-trash" aria-hidden="true"></i></a> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('Rename') ?>" href="#" onclick="rename('<?php echo fm_enc(FM_PATH) ?>', '<?php echo fm_enc($f) ?>');return false;"><i style="position:relative;left:2px;" class="fa fa-pencil" aria-hidden="true"></i></a> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('Copy/Move') ?>" href="?p=&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i style="position:relative;top:1px;"class="fa fa-clone" aria-hidden="true"></i></a> </td> <td style="text-align:center;"> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('View') ?>" href="<?php echo FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f . '/' ?>" target="_blank"><i style="position:relative;left:2px;top:2px;" class="fa fa-external-link" aria-hidden="true"></i></a> </td></tr> <?php flush(); } foreach ($files as $f) { $is_link = is_link($path . '/' . $f); $img = $is_link ? 'icon-link_file' : fm_get_file_icon_class($path . '/' . $f); $modif = date("d.m.y H:i", filemtime($path . '/' . $f)); $filesize_raw = filesize($path . '/' . $f); $filesize = fm_get_filesize($filesize_raw); $filelink = '?p=' . urlencode(FM_PATH) . '&view=' . urlencode($f); $all_files_size += $filesize_raw; $perms = substr(decoct(fileperms($path . '/' . $f)), -4); if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { $owner = posix_getpwuid(fileowner($path . '/' . $f)); $group = posix_getgrgid(filegroup($path . '/' . $f)); } else { $owner = array('name' => '?'); $group = array('name' => '?'); } ?> <tr> <td ><label><input type="checkbox" name="file[]" value="<?php echo fm_enc($f) ?>"></label></td> <td ><div class="filename"><a href="<?php echo $filelink ?>" title="<?php echo fm_t('File info') ?>"><i class="<?php echo $img ?>"></i> <?php echo fm_convert_win($f) ?></a><?php echo ($is_link ? ' → <i>' . readlink($path . '/' . $f) . '</i>' : '') ?></div></td> <td style="text-align:center;"><span title="<?php printf(fm_t('%s byte'), $filesize_raw) ?>"><?php echo $filesize ?></span></td> <td style="text-align:center;"><?php echo $modif ?></td> <?php if (!FM_IS_WIN): ?> <td style="text-align:center;"><?php if (!FM_READONLY): ?> <a title="<?php echo fm_t('Change Permissions') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&chmod=<?php echo urlencode($f) ?>"><?php echo $perms ?></a><?php else: ?><?php echo $perms ?> <?php endif; ?> </td> <td style="display:none;"><?php echo $owner['name'] . ':' . $group['name'] ?></td> <?php endif; ?> <td style="text-align:center;"> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo fm_t('Delete this file?') ?>');"><i class="fa fa-trash" aria-hidden="true"></i></a> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('Rename') ?>" href="#" onclick="rename('<?php echo fm_enc(FM_PATH) ?>', '<?php echo fm_enc($f) ?>');return false;"><i style="position:relative;left:2px;" class="fa fa-pencil" aria-hidden="true"></i></a> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('Copy/Move') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-clone" aria-hidden="true"></i></a> </td> <td style="text-align:center;"> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('View') ?>" href="<?php echo FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f ?>" target="_blank"><i style="position:relative;left:2px;top:2px;" class="fa fa-external-link" aria-hidden="true"></i></a> <a class="btn-floating waves-effect waves-dark red" title="<?php echo fm_t('Download') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&dl=<?php echo urlencode($f) ?>"><i class="fa fa-download" aria-hidden="true"></i></a> </td> </tr> <?php flush(); } if (empty($folders) && empty($files)) { ?> <tr> <td style="text-align:center;" colspan="<?php echo !FM_IS_WIN ? '8' : '7' ?>"><em><?php echo fm_t('Folder is empty') ?></em></td> </tr> <?php } else { ?> <?php } ?> </table> <div class=""> <button type="submit" class="btn waves-effect waves-dark blue-grey" name="delete" title="delete selected" onclick="return confirm('<?php echo fm_t('Delete selected files and folders?') ?>')"><i class='fa fa-trash-o' aria-hidden='true'></i></button> <button type="submit" class="btn waves-effect waves-dark blue-grey" name="zip" title="create archive of selected" onclick="return confirm('<?php echo fm_t('Create Zip archive?') ?>')"><i class='fa fa-file-zip-o' aria-hidden='true'></i></button> <button type="submit" class="btn waves-effect waves-dark blue-grey" name="copy" title="copy/move selected" ><i class='fa fa-copy' aria-hidden='true'></i> </button> </div> <center><div class="col-xm-12 col-sm-12 col-md-12 " style="padding:15px;"> <?php echo fm_t('Size of all Files:') ?> <span style="vertical-align:baseline;color:inherit;" title="<?php printf(fm_t('%s byte'), $all_files_size) ?>"><?php echo fm_get_filesize($all_files_size) ?></span><span style="margin-left:2%;margin-right:2%;border-left: 1px solid white;padding-top: 5px;padding-bottom: 3px;vertical-align:middle;"></span> <?php echo fm_t('Number of files present:') ?> <?php echo $num_files ?><span style="margin-left:2%;margin-right:2%;border-left: 1px solid white;padding-top: 5px;padding-bottom: 3px;vertical-align:middle;"></span> <?php echo fm_t('Number of folders present:') ?> <?php echo $num_folders ?> </div></center> </form> <!-- END FORM -->
Cancel
Download
Save changes
File Manager Pro · single-file PHP 7.4.33 on Linux · paths encrypted in URL (AES-256-CTR)