2020-12-26 01:42:23 +08:00
|
|
|
<?php
|
2022-04-22 13:31:58 +08:00
|
|
|
ini_set('error_reporting', E_ALL);
|
|
|
|
|
ini_set('display_errors', 0);
|
2022-03-18 19:59:27 +08:00
|
|
|
require_once __DIR__ . '/constants.php';
|
2022-03-19 19:51:23 +08:00
|
|
|
require_once $rootpath . 'vendor/autoload.php';
|
2025-09-21 17:00:32 +07:00
|
|
|
$USERUPDATESET = array();
|
|
|
|
|
$query_name=array();
|
2022-03-20 22:14:00 +08:00
|
|
|
\Nexus\Nexus::boot();
|
2025-11-02 23:08:03 +07:00
|
|
|
if (is_fpm_mode()) {
|
2025-10-23 16:19:14 +07:00
|
|
|
if (!file_exists($rootpath . '.env')
|
|
|
|
|
|| (getenv('RUNNING_IN_DOCKER') && !file_exists($rootpath . \Nexus\Install\Install::INSTALL_LOCK_FILE))
|
|
|
|
|
) {
|
|
|
|
|
$installScriptRelativePath = 'install/install.php';
|
|
|
|
|
$installScriptFile = $rootpath . "public/$installScriptRelativePath";
|
|
|
|
|
if (file_exists($installScriptFile)) {
|
|
|
|
|
nexus_redirect($installScriptRelativePath);
|
|
|
|
|
}
|
2021-01-29 01:47:26 +08:00
|
|
|
}
|
2021-01-27 16:26:37 +08:00
|
|
|
}
|
|
|
|
|
require $rootpath . 'nexus/Database/helpers.php';
|
2021-01-12 01:54:46 +08:00
|
|
|
require $rootpath . 'classes/class_cache_redis.php';
|
2021-04-25 21:28:58 +08:00
|
|
|
require $rootpath . 'include/eloquent.php';
|
2022-04-29 17:47:28 +08:00
|
|
|
ini_set('date.timezone', nexus_config('nexus.timezone'));
|
2022-03-30 15:37:11 +08:00
|
|
|
$Cache = new class_cache_redis(); //Load the caching class
|
|
|
|
|
$Cache->setLanguageFolderArray(get_langfolder_list());
|
2022-06-10 01:25:13 +08:00
|
|
|
require $rootpath . 'include/config.php';
|
2022-06-09 17:37:03 +08:00
|
|
|
$script = nexus()->getScript();
|
2022-06-10 01:25:13 +08:00
|
|
|
if (!in_array($script, ['announce', 'scrape'])) {
|
2022-06-09 17:37:03 +08:00
|
|
|
require $rootpath . get_langfile_path("functions.php");
|
|
|
|
|
}
|
|
|
|
|
if (!isRunningInConsole() && !in_array($script, ['announce', 'scrape', 'torrentrss', 'download'])) {
|
2021-02-03 18:41:53 +08:00
|
|
|
checkGuestVisit();
|
2021-01-19 21:50:21 +08:00
|
|
|
}
|
2022-03-28 15:58:12 +08:00
|
|
|
|
2020-12-26 01:42:23 +08:00
|
|
|
define('TIMENOW', time());
|
|
|
|
|
|
|
|
|
|
define ("UC_PEASANT", 0);
|
|
|
|
|
define ("UC_USER", 1);
|
|
|
|
|
define ("UC_POWER_USER", 2);
|
|
|
|
|
define ("UC_ELITE_USER", 3);
|
|
|
|
|
define ("UC_CRAZY_USER", 4);
|
|
|
|
|
define ("UC_INSANE_USER", 5);
|
|
|
|
|
define ("UC_VETERAN_USER", 6);
|
|
|
|
|
define ("UC_EXTREME_USER", 7);
|
|
|
|
|
define ("UC_ULTIMATE_USER", 8);
|
|
|
|
|
define ("UC_NEXUS_MASTER", 9);
|
|
|
|
|
define ("UC_VIP", 10);
|
|
|
|
|
define ("UC_RETIREE",11);
|
|
|
|
|
define ("UC_UPLOADER",12);
|
|
|
|
|
define ("UC_MODERATOR",13);
|
|
|
|
|
define ("UC_ADMINISTRATOR",14);
|
|
|
|
|
define ("UC_SYSOP",15);
|
|
|
|
|
define ("UC_STAFFLEADER",16);
|
|
|
|
|
ignore_user_abort(1);
|
|
|
|
|
@set_time_limit(60);
|
2022-06-03 03:42:53 +08:00
|
|
|
|
|
|
|
|
$hook = new \Nexus\Plugin\Hook();
|
|
|
|
|
$plugin = new \Nexus\Plugin\Plugin();
|
2024-08-24 06:49:55 +08:00
|
|
|
$plugin->start();
|