コード例 #1
0
/**
 * @package 	mod_bt_backgroundslideshow - BT Slideshow Pro Module
 * @version		2.1.1
 * @created		Apr 2012
 * @author		BowThemes
 * @email		support@bowthems.com
 * @website		http://bowthemes.com
 * @support		Forum - http://bowthemes.com/forum/
 * @copyright	Copyright (C) 2012 Bowthemes. All rights reserved.
 * @license		http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
 *
 */
// No direct access
defined('_JEXEC') or die;
require_once 'helpers/helper.php';
$photos = BTBgSlideShowHelper::getPhotos($params);
$dir = JPATH_ROOT . '/modules/mod_bt_backgroundslideshow/images/';
foreach ($photos as $key => $photo) {
    if (isset($photo->remote) && $photo->remote) {
        if (!JFile::exists($dir . '/manager/' . $photo->file)) {
            if (JFile::exists($dir . '/tmp/manager/' . $photo->file)) {
                JFile::move($dir . '/tmp/manager/' . $photo->file, $dir . '/manager/' . $photo->file);
                continue;
            } else {
                unset($photos[$key]);
            }
        }
        continue;
    }
    if (!JFile::exists($dir . '/original/' . $photo->file)) {
        if (JFile::exists($dir . '/tmp/original/' . $photo->file)) {