... if ($selected_dir) { $selected_dir = ltrim($selected_dir, '/'); $abs_path = dav_resolve_path($selected_dir); if (!is_dir($abs_path)) { echo "

Directory not found: $abs_path

"; } else { dav_render_folder_tree($abs_path); } } echo ''; } function dav_render_folder_tree($base_dir) { $recursive = get_option('dav_recursive', 0); $link_files = get_option('dav_link_files', 0); $attributes = (array)get_option('dav_show_attributes', ['name', 'size', 'modified']); $filter_types = $_POST['file_types'] ?? []; echo '
'; echo ''; echo '

Filter by File Type:
'; $all_exts = dav_detect_extensions($base_dir, $recursive); foreach ($all_exts as $ext) { $checked = in_array($ext, $filter_types) ? 'checked' : ''; echo " "; } echo '

'; $files = dav_list_files($base_dir, $recursive, $filter_types); if (!$files) { echo '

No matching files found.

'; return; } echo '
'; echo '
'; foreach ($attributes as $attr) { echo '
' . ucfirst($attr) . '
'; } echo '
'; foreach ($files as $file) { echo '
'; foreach ($attributes as $attr) { switch ($attr) { case 'name': $name = basename($file); $url = dav_relative_url($file); if ($link_files) { echo ''; } else { echo '
' . esc_html($name) . '
'; } break; case 'size': echo '
' . size_format(filesize($file)) . '
'; break; case 'modified': echo '
' . date("Y-m-d H:i:s", filemtime($file)) . '
'; break; case 'type': echo '
' . strtoupper(pathinfo($file, PATHINFO_EXTENSION)) . '
'; break; } } echo '
'; } echo '
'; } function dav_detect_extensions($dir, $recursive = false) { $exts = []; $files = dav_list_files($dir, $recursive); foreach ($files as $file) { $ext = strtolower(pathinfo($file, PATHINFO_EXTENSION)); if ($ext && !in_array($ext, $exts)) { $exts[] = $ext; } } return $exts; }
Warning: Cannot modify header information - headers already sent by (output started at /usr/home/stepitup/public_html/marybethmantiply.com/wp-content/plugins/directory-admin-viewer/directory-admin-viewer.php:1) in /usr/home/stepitup/public_html/marybethmantiply.com/wp-includes/sitemaps/class-wp-sitemaps-renderer.php on line 126
https://www.marybethmantiply.com/wp-sitemap-posts-post-1.xmlhttps://www.marybethmantiply.com/wp-sitemap-posts-page-1.xmlhttps://www.marybethmantiply.com/wp-sitemap-taxonomies-category-1.xmlhttps://www.marybethmantiply.com/wp-sitemap-users-1.xml