[ echo $lang['index.root'] ?>]
$dir_tree = explode('/', $path['rel']);
for ($i = 1; $i < count($dir_tree) - 1; $i++) {
$browse_path = "/";
for ($j = 1; $j <= $i; $j++) {
$browse_path .= $dir_tree[$j] . "/";
}
if ($i < count($dir_tree) - 2) {
?> / echo cutoff($dir_tree[$i]) ?>
}
else {
echo " / " . cutoff($dir_tree[$i]);
}
}
list($directories, $images) = read_dir($path['abs']);
if ($is_admin && $_GET['timestamp'] > $_SESSION['lastrenew'] && $_GET['action'] == 'renew') {
if (isset($_GET['renewimage'])) {
$relfile = base64_decode($_GET['renewimage']);
$image = url_image($relfile);
if (file_exists($image['thumb'])) {
unlink($image['thumb']);
}
}
else if (isset($_GET['renewfolder'])) {
$relpath = base64_decode($_GET['renewfolder']);
$tmp_path = url_path($relpath);
if (file_exists($tmp_path['thumb'])) {
unlink($tmp_path['thumb']);
}
}
else {
for ($i = 0; $i < count($directories); $i++) {
$relpath = $path['rel'] . $directories[$i] . '/';
$tmp_path = url_path($relpath);
if (file_exists($tmp_path['thumb'])) {
unlink($tmp_path['thumb']);
}
}
for ($i = 0; $i < count($images); $i++) {
$relfile = $path['rel'] . $images[$i];
$image = url_image($relfile);
if (file_exists($image['thumb'])) {
unlink($image['thumb']);
}
}
}
$_SESSION['lastrenew'] = $_GET['timestamp'];
}
$dir_count = count($directories);
$image_count = count($images);
$startindex = ($page - 1) * $perpage;
$endindex = min($page * $perpage, $dir_count + $image_count);
$pages = ceil(($dir_count + $image_count) / $perpage);
?>
|
if ($config['design']['buy']) {
echo " View Cart\t
Empty Cart"; //displays view shopping cart button
}
else
{
}
?> |
if ($pages > 1) {
if ($pages < 10) {
for ($i = 1; $i <= $pages; $i++) {
$navlinks .= ($page == $i) ? " $i " : " $i ";
}
}
else {
for ($i = 1; $i <= min(3, $pages); $i++) {
$navlinks .= ($page == $i) ? " $i " : " $i ";
}
if ($pages > 3) {
if ($page > 1 && $page < $pages) {
if ($page > 5) {
$navlinks .= ' ... ';
}
for ($i = max($page, 5) - 1; $i <= min($page, $pages - 4) + 1; $i++) {
$navlinks .= ($page == $i) ? " $i " : " $i ";
}
if ($page < $pages - 4) {
$navlinks .= ' ... ';
}
}
else {
$navlinks .= ' ... ';
}
}
for ($i = $pages - 2; $i <= $pages; $i++) {
$navlinks .= ($page == $i) ? " $i " : " $i ";
}
}
if ($page > 1) {
$navlinks = " " . $lang['index.previous'] . " | " . $navlinks;
}
if ($page < $pages) {
$navlinks .= " | " . $lang['index.next'] . " ";
}
}
echo $navlinks;
?>
|