<?php

/*
* @name        JMY CORE
* @link        https://jmy.su/
* @copyright   Copyright (C) 2012-2022 JMY LTD
* @license     LICENSE.txt (see attached file)
* @version     VERSION.txt (see attached file)
* @author      Komarov Ivan
*/

require dirname(__FILE__) . '/define.php';
function removeDirectory($dir)
{
    if (file_exists($dir . '/.htaccess')) unlink($dir . '/.htaccess');
    if ($objs = glob($dir . "/*")) {
        foreach ($objs as $obj) {
            is_dir($obj) ? removeDirectory($obj) : unlink($obj);
        }
    }
    rmdir($dir);
}

file_put_contents(ROOT . 'etc/global.config.php', '$config[\'redicret\'] = "0";', FILE_APPEND | LOCK_EX);