mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 21:41:03 +08:00
nexus clients
This commit is contained in:
@@ -10,7 +10,6 @@ $showversion = " - Powered by ".PROJECTNAME;
|
||||
$rootpath= dirname(__DIR__);
|
||||
set_include_path(get_include_path() . PATH_SEPARATOR . $rootpath);
|
||||
$rootpath .= "/";
|
||||
require $rootpath . 'include/functions.php';
|
||||
require $rootpath . 'classes/class_advertisement.php';
|
||||
require $rootpath . 'classes/class_attendance.php';
|
||||
require $rootpath . 'include/core.php';
|
||||
|
||||
@@ -11,7 +11,7 @@ if (!file_exists($rootpath . '.env')) {
|
||||
$installScriptRelativePath = 'install/install.php';
|
||||
$installScriptFile = $rootpath . "public/$installScriptRelativePath";
|
||||
if (file_exists($installScriptFile)) {
|
||||
redirect($installScriptRelativePath);
|
||||
nexus_redirect($installScriptRelativePath);
|
||||
}
|
||||
}
|
||||
require $rootpath . 'vendor/autoload.php';
|
||||
|
||||
@@ -1251,7 +1251,7 @@ function allowedemails()
|
||||
return $list['value'];
|
||||
}
|
||||
|
||||
function redirect($url)
|
||||
function nexus_redirect($url)
|
||||
{
|
||||
if (substr($url, 0, 4) != 'http') {
|
||||
$url = getSchemeAndHttpHost() . '/' . trim($url, '/');
|
||||
|
||||
@@ -428,6 +428,12 @@ function getBaseUrl()
|
||||
return trim($url, '/');
|
||||
}
|
||||
|
||||
|
||||
function nexus_json_encode($data)
|
||||
{
|
||||
return json_encode($data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
|
||||
}
|
||||
|
||||
function api(...$args)
|
||||
{
|
||||
if (!isset($args[2])) {
|
||||
@@ -459,7 +465,7 @@ function api(...$args)
|
||||
'ret' => (int)$ret,
|
||||
'msg' => (string)$msg,
|
||||
'data' => $data,
|
||||
'timeuse' => (float)number_format(microtime(true) - $start, 3),
|
||||
'time' => (float)number_format(microtime(true) - $start, 3),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user