} echo '<a href="' . tep_href_link(FILENAME_FILE_MANAGER, isset($HTTP_GET_VARS['info']) ? 'info=' . urlencode($HTTP_GET_VARS['info']) : '') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?> </td> </tr> </table></td> </form></tr> <?php } else { $showuser = function_exists('posix_getpwuid') ? true : false; $contents = array(); $dir = dir($real_path); while ($file = $dir->read()) { if ($file != '.' && $file != 'CVS' && $file != '.htaccess' && ($file != '..' || $real_path != DIR_FS_CATALOG)) { $file_size = number_format(filesize($real_path . '/' . $file)) . ' bytes'; $permissions = tep_get_file_permissions(fileperms($real_path . '/' . $file)); if ($showuser) { $user = @posix_getpwuid(fileowner($real_path . '/' . $file)); $group = @posix_getgrgid(filegroup($real_path . '/' . $file)); } else { $user = $group = array(); } $contents[] = array('name' => $file, 'is_dir' => is_dir($real_path . '/' . $file), 'last_modified' => strftime(DATE_TIME_FORMAT, filemtime($real_path . '/' . $file)), 'size' => $file_size, 'permissions' => $permissions, 'user' => $user['name'], 'group' => $group['name']); } } function tep_cmp($a, $b) { return strcmp(($a['is_dir'] ? 'D' : 'F') . $a['name'], ($b['is_dir'] ? 'D' : 'F') . $b['name']); } usort($contents, 'tep_cmp'); ?>
} echo '<a href="' . tep_href_link(FILENAME_FILE_MANAGER, isset($HTTP_GET_VARS['info']) ? 'info=' . urlencode($HTTP_GET_VARS['info']) : '') . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'; ?> </td> </tr> </table></td> </form></tr> <?php } else { $showuser = function_exists('posix_getpwuid') ? true : false; $contents = array(); $dir = dir($current_path); while ($file = $dir->read()) { if ($file != '.' && $file != 'CVS' && ($file != '..' || $current_path != DIR_FS_DOCUMENT_ROOT)) { $file_size = number_format(filesize($current_path . '/' . $file)) . ' bytes'; $permissions = tep_get_file_permissions(fileperms($current_path . '/' . $file)); if ($showuser) { $user = @posix_getpwuid(fileowner($current_path . '/' . $file)); $group = @posix_getgrgid(filegroup($current_path . '/' . $file)); } else { $user = $group = array(); } $contents[] = array('name' => $file, 'is_dir' => is_dir($current_path . '/' . $file), 'last_modified' => strftime(DATE_TIME_FORMAT, filemtime($current_path . '/' . $file)), 'size' => $file_size, 'permissions' => $permissions, 'user' => $user['name'], 'group' => $group['name']); } } function tep_cmp($a, $b) { return strcmp(($a['is_dir'] ? 'D' : 'F') . $a['name'], ($b['is_dir'] ? 'D' : 'F') . $b['name']); } usort($contents, 'tep_cmp'); ?>
if (isset($fmInfo) && $files[$i]['name'] == $fmInfo->name) { echo ' <tr class="selected">' . "\n"; } else { echo ' <tr onMouseOver="rowOverEffect(this);" onMouseOut="rowOutEffect(this);" onClick="document.location.href=\'' . tep_href_link(FILENAME_FILE_MANAGER, 'entry=' . $files[$i]['name']) . '\';">' . "\n"; } ?> <td><?php echo '<a href="' . $entry_url . '">' . $entry_icon . ' ' . $files[$i]['name'] . '</a>'; ?> </td> <td align="right"><?php echo number_format($files[$i]['size']); ?> </td> <td align="center"><tt><?php echo tep_get_file_permissions($files[$i]['permissions']); ?> </tt></td> <td><?php echo $file_owner['name']; ?> </td> <td><?php echo $group_owner['name']; ?> </td> <td align="center"><?php echo tep_image('templates/' . $template . '/images/icons/' . (is_writable($osC_DirectoryListing->getDirectory() . '/' . $files[$i]['name']) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif')); ?> </td> <td align="right"><?php