<?php
/************************************************************************/
/* Maximus CMS: Web Portal System                                       */
/* ==============================                                       */
/*                                                                      */
/* Copyright (c) 2002 - 2006                                            */
/* http://www.php-maximus.fr                                            */
/* dev@php-maximus.org                                                  */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
/* Based on PHP-NUKE: Web Portal System                                 */
/************************************************************************/
defined('MAXIMUS') OR die ('Access denied cron table1 directly...');

// database
if ( @ ! file_exists ( $GLOBALS['cache'].'/Backups/Database/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/Backups/Database/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/Backups/Database/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/Backups/Database/index.html' );
}

// backups
if ( @ ! file_exists ( $GLOBALS['cache'].'/Backups/Files/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/Backups/Files/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/Backups/Files/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/Backups/Files/index.html' );
}

// blocks
if ( @ ! file_exists ( $GLOBALS['cache'].'/Blocks/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/Blocks/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/Blocks/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/Blocks/index.html' );
}

// configuration
if ( @ ! file_exists ( $GLOBALS['cache'].'/Configuration/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/Configuration/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/Configuration/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/Configuration/index.html' );
}

// cron
if ( @ ! file_exists ( $GLOBALS['cache'].'/cron/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/cron/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/cron/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/cron/index.html' );
}

// logs
if ( @ ! file_exists ( $GLOBALS['cache'].'/logs/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/logs/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/logs/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/logs/index.html' );
}

// modules
if ( @ ! file_exists ( $GLOBALS['cache'].'/Modules/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/Modules/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/Modules/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/Modules/index.html' );
}

// modules
if ( @ ! file_exists ( $GLOBALS['cache'].'/Modules/admin/.htaccess') ) {
	@ copy ( 'kernel/securefiles/.htaccess', $GLOBALS['cache'].'/Modules/admin/.htaccess' );
}

if ( @ ! file_exists ( $GLOBALS['cache'].'/Modules/admin/index.html') ) {
	@ copy ( 'kernel/securefiles/index.html', $GLOBALS['cache'].'/Modules/admin/index.html' );
}