So far I like this simple plugin.
I made some minor changes to admin/changed_files.php:
- to the code to make the output more readable, the out put is shown in a table.
- removed the include of the language file, as that is already done by Zen Cart
PHP Code:
<?php
require('includes/application_top.php');
$start_dir = DIR_FS_CATALOG;
$it = new RecursiveDirectoryIterator($start_dir);
$files = array();
foreach(new RecursiveIteratorIterator($it) as $file)
{
if (!is_dir($file)) {
$files[] = array('name' => $file,
'mtime' => filemtime($file));
}
}
usort($files, "file_cmp");
?>
<!doctype html>
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta charset="<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<link rel="stylesheet" href="includes/stylesheet.css">
<link rel="stylesheet" href="includes/cssjsmenuhover.css" media="all" id="hoverJS">
<link rel="stylesheet" href="includes/admin_access.css" />
<script src="includes/menu.js"></script>
<script src="includes/general.js"></script>
<script>
function init()
{
cssjsmenu('navbar');
if (document.getElementById)
{
var kill = document.getElementById('hoverJS');
kill.disabled = true;
}
}
</script>
</head>
<body onload="init()">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->
<!-- body //-->
<div class="container">
<h1><?php echo HEADING_TITLE ?></h1>
<table class="table">
<?php
foreach ($files as $file) {
$name = str_replace(DIR_FS_CATALOG, "", $file['name']);
echo '<tr>';
echo '<td>'.$name . '</td><td>' . date('Y-m-d H:i:s', $file['mtime']) . "</td>";
echo '</tr>';
}
?>
</table>
</div>
<!-- body_eof //-->
<div class="bottom">
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</div>
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
<?php
function file_cmp($a, $b) {
if ($a['mtime'] == $b['mtime'])
return 0;
if ($a['mtime'] < $b['mtime'])
return 1;
return -1;
}
It would be nice to be able to exclude some directories, like editors, or bmz_cache
Bookmarks