?> </strong><br> <?php if ($item['path']) { ?> <?php if (in_array($item['type'], array('upload'))) { ?> <?php $path = $item['path']; $path_parts = pathinfo($item['path']); if (!empty($path_parts['dirname'])) { $path_all_parts = explode('/', $path_parts['dirname']); $dirname = array_pop($path_all_parts); if (pmxi_isValidMd5($dirname)) { $path = str_replace($dirname, preg_replace('%^(.{3}).*(.{3})$%', '$1***$2', $dirname), str_replace('temp/', '', $item['path'])); } } ?> <em><?php echo $path; ?> </em> <?php } else { ?> <em><?php echo str_replace("\\", '/', preg_replace('%^(\\w+://[^:]+:)[^@]+@%', '$1*****@', $item['path'])); ?> </em>
function pmxi_remove_source($file, $remove_dir = true) { @unlink($file); $path_parts = pathinfo($file); if (!empty($path_parts['dirname'])) { $path_all_parts = explode('/', $path_parts['dirname']); $dirname = array_pop($path_all_parts); if (pmxi_isValidMd5($dirname)) { if ($remove_dir) { @unlink($path_parts['dirname'] . DIRECTORY_SEPARATOR . 'index.php'); } if ($remove_dir or count(@scandir($path_parts['dirname'])) == 2) { pmxi_rmdir($path_parts['dirname']); } } } }