| 1 |
<?php |
| 2 |
|
| 3 |
use JetBackup\JetBackup; |
| 4 |
|
| 5 |
if (!defined( '__JETBACKUP__')) die('Direct access is not allowed'); |
| 6 |
|
| 7 |
spl_autoload_register(function ($className) { |
| 8 |
|
| 9 |
$parts = explode('\\', $className); |
| 10 |
if (!isset($parts[0]) || !in_array($parts[0], ['JetBackup','OLD'])) return false; |
| 11 |
|
| 12 |
$path = JB_ROOT . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $parts) . '.php'; |
| 13 |
if (!file_exists($path)) return false; |
| 14 |
|
| 15 |
require_once($path); |
| 16 |
return true; |
| 17 |
}); |
| 18 |
|
| 19 |
require_once(JetBackup::TRDPARTY_PATH . JetBackup::SEP . 'autoload.php'); |
| 20 |
require_once(JetBackup::SRC_PATH . JetBackup::SEP . 'functions.php'); |