? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.net/public_html/test/modules/mod_btslideshow/helpers/
File Upload :
Current File : /home/admin/domains/happytokorea.net/public_html/test/modules/mod_btslideshow/helpers/files.php

<?php
/**
 * @version		$Id: file.php 1 Aug 22, 2011 10:47:09 PM Thomas $
 * @package		BTShowcase
 * @copyright	Copyright (C) 2011 Bow Themes. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// No direct access
defined('_JEXEC') or die;

class BTFilesHelper extends JObject {
	static function cleanFiles($items, $moduleId) {
		$files = array();
		if (is_array($items)) {
			foreach ($items as $item) {
				$files[$item->file] = true;
			}
		}
		
		$dir = JPATH_ROOT . '/modules/mod_btslideshow/images/' . $moduleId;
		self::_cleanFiles($files, $dir . '/manager');
		self::_cleanFiles($files, $dir . '/original');
		self::_cleanFiles($files, $dir . '/slideshow');
		self::_cleanFiles($files, $dir . '/thumbnail');
	}
	static function _cleanFiles($files, $dir) {
		if (!JFolder::exists($dir)) return;
		foreach (JFolder::files($dir) as $file) {
			if (!array_key_exists($file, $files)) {
				JFile::delete($dir . '/' . $file);
			}
		}
	}
}
?>

T1KUS90T
  root-grov@210.1.60.28:~$