mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-03 14:10:57 +08:00
Added: guest login and secret login
This commit is contained in:
@@ -2324,4 +2324,4 @@ UNLOCK TABLES;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2021-02-01 20:09:25
|
||||
-- Dump completed on 2021-02-03 18:34:39
|
||||
|
||||
@@ -13,5 +13,3 @@ $rootpath .= "/";
|
||||
require $rootpath . 'include/functions.php';
|
||||
require $rootpath . 'include/globalfunctions.php';
|
||||
require $rootpath . 'include/core.php';
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ if(!defined('IN_TRACKER')) {
|
||||
}
|
||||
define('ROOT_PATH', $rootpath);
|
||||
define('VERSION_NUMBER', '1.6.0');
|
||||
define('IS_ANNOUNCE', (basename($_SERVER['SCRIPT_FILENAME']) == 'announce.php'));
|
||||
define('CURRENT_SCRIPT', strstr(basename($_SERVER['SCRIPT_FILENAME']), '.', true));
|
||||
define('IS_ANNOUNCE', CURRENT_SCRIPT == 'announce');
|
||||
if (!empty($_SERVER['HTTP_X_REQUEST_ID'])) {
|
||||
define('REQUEST_ID', $_SERVER['HTTP_X_REQUEST_ID']);
|
||||
} else {
|
||||
@@ -29,6 +30,7 @@ require $rootpath . 'classes/class_cache_redis.php';
|
||||
require $rootpath . 'include/config.php';
|
||||
if (!IS_ANNOUNCE) {
|
||||
require $rootpath . get_langfile_path("functions.php");
|
||||
checkGuestVisit();
|
||||
}
|
||||
$Cache = new class_cache_redis(); //Load the caching class
|
||||
$Cache->setLanguageFolderArray(get_langfolder_list());
|
||||
|
||||
@@ -1610,7 +1610,7 @@ function show_image_code () {
|
||||
unset($imagehash);
|
||||
$imagehash = image_code () ;
|
||||
print ("<tr><td class=\"rowhead\">".$lang_functions['row_security_image']."</td>");
|
||||
print ("<td align=\"left\"><img src=\"".htmlspecialchars("image.php?action=regimage&imagehash=".$imagehash)."\" border=\"0\" alt=\"CAPTCHA\" /></td></tr>");
|
||||
print ("<td align=\"left\"><img src=\"".htmlspecialchars("image.php?action=regimage&imagehash=".$imagehash."&secret=".($_GET['secret'] ?? ''))."\" border=\"0\" alt=\"CAPTCHA\" /></td></tr>");
|
||||
print ("<tr><td class=\"rowhead\">".$lang_functions['row_security_code']."</td><td align=\"left\">");
|
||||
print("<input type=\"text\" autocomplete=\"off\" style=\"width: 180px; border: 1px solid gray\" name=\"imagestring\" value=\"\" />");
|
||||
print("<input type=\"hidden\" name=\"imagehash\" value=\"$imagehash\" /></td></tr>");
|
||||
@@ -1787,6 +1787,10 @@ function get_user_row($id)
|
||||
}
|
||||
|
||||
function userlogin() {
|
||||
static $loginResult;
|
||||
if (!is_null($loginResult)) {
|
||||
return $loginResult;
|
||||
}
|
||||
global $lang_functions;
|
||||
global $Cache;
|
||||
global $SITE_ONLINE, $oldip;
|
||||
@@ -1806,8 +1810,9 @@ function userlogin() {
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($_COOKIE["c_secure_pass"]) || empty($_COOKIE["c_secure_uid"]) || empty($_COOKIE["c_secure_login"]))
|
||||
return;
|
||||
if (empty($_COOKIE["c_secure_pass"]) || empty($_COOKIE["c_secure_uid"]) || empty($_COOKIE["c_secure_login"])) {
|
||||
return $loginResult = false;
|
||||
}
|
||||
if ($_COOKIE["c_secure_login"] == base64("yeah"))
|
||||
{
|
||||
//if (empty($_SESSION["s_secure_uid"]) || empty($_SESSION["s_secure_pass"]))
|
||||
@@ -1815,8 +1820,9 @@ function userlogin() {
|
||||
}
|
||||
$b_id = base64($_COOKIE["c_secure_uid"],false);
|
||||
$id = intval($b_id ?? 0);
|
||||
if (!$id || !is_valid_id($id) || strlen($_COOKIE["c_secure_pass"]) != 32)
|
||||
return;
|
||||
if (!$id || !is_valid_id($id) || strlen($_COOKIE["c_secure_pass"]) != 32) {
|
||||
return $loginResult = false;
|
||||
}
|
||||
|
||||
if ($_COOKIE["c_secure_login"] == base64("yeah"))
|
||||
{
|
||||
@@ -1826,8 +1832,9 @@ function userlogin() {
|
||||
|
||||
$res = sql_query("SELECT * FROM users WHERE users.id = ".sqlesc($id)." AND users.enabled='yes' AND users.status = 'confirmed' LIMIT 1");
|
||||
$row = mysql_fetch_array($res);
|
||||
if (!$row)
|
||||
return;
|
||||
if (!$row) {
|
||||
return $loginResult = false;
|
||||
}
|
||||
|
||||
$sec = hash_pad($row["secret"]);
|
||||
|
||||
@@ -1836,13 +1843,15 @@ function userlogin() {
|
||||
if ($_COOKIE["c_secure_login"] == base64("yeah"))
|
||||
{
|
||||
|
||||
if ($_COOKIE["c_secure_pass"] != md5($row["passhash"].$_SERVER["REMOTE_ADDR"]))
|
||||
return;
|
||||
if ($_COOKIE["c_secure_pass"] != md5($row["passhash"].$_SERVER["REMOTE_ADDR"])) {
|
||||
return $loginResult = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($_COOKIE["c_secure_pass"] !== md5($row["passhash"]))
|
||||
return;
|
||||
if ($_COOKIE["c_secure_pass"] !== md5($row["passhash"])) {
|
||||
return $loginResult = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_COOKIE["c_secure_login"] == base64("yeah"))
|
||||
@@ -1861,10 +1870,16 @@ function userlogin() {
|
||||
if (isset($_GET['clearcache']) && $_GET['clearcache'] && get_user_class() >= UC_MODERATOR) {
|
||||
$Cache->setClearCache(1);
|
||||
}
|
||||
if ($enablesqldebug_tweak == 'yes' && get_user_class() >= $sqldebug_tweak) {
|
||||
/**
|
||||
* no need any more, already set in core.php
|
||||
* @since v1.6
|
||||
*/
|
||||
// if ($enablesqldebug_tweak == 'yes' && get_user_class() >= $sqldebug_tweak) {
|
||||
// error_reporting(E_ALL & ~E_NOTICE);
|
||||
error_reporting(-1);
|
||||
}
|
||||
// error_reporting(-1);
|
||||
// }
|
||||
|
||||
return $loginResult = true;
|
||||
}
|
||||
|
||||
function autoclean() {
|
||||
@@ -4404,6 +4419,8 @@ function return_category_image($categoryid, $link="")
|
||||
return $catimg;
|
||||
}
|
||||
|
||||
/******************************************** bellow functioons avaliable since v1.6 ***********************************************************/
|
||||
|
||||
function saveSetting($prefix, $nameAndValue)
|
||||
{
|
||||
$prefix = strtolower($prefix);
|
||||
@@ -4428,4 +4445,89 @@ function getFullDirectory($dir)
|
||||
return realpath($dir);
|
||||
}
|
||||
|
||||
function checkGuestVisit()
|
||||
{
|
||||
if (userlogin()) {
|
||||
//already login
|
||||
return;
|
||||
}
|
||||
$setting = get_setting('security');
|
||||
//all type: normal, static_page, custom_content, redirect
|
||||
$guestVisitType = $setting['guest_visit_type'] ?? '';
|
||||
if (empty($guestVisitType) || $guestVisitType == 'normal') {
|
||||
return;
|
||||
}
|
||||
if (in_array(CURRENT_SCRIPT, ['login', 'takelogin', 'image']) && canDoLogin()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$valueKey = "guest_visit_value_$guestVisitType";
|
||||
if (empty($setting[$valueKey])) {
|
||||
do_log("setting: security.$valueKey empty");
|
||||
die(0);
|
||||
}
|
||||
$guestVisitValue = $setting[$valueKey];
|
||||
if ($guestVisitType == 'static_page') {
|
||||
$pageFile = ROOT_PATH . 'resources/static-pages/' . $guestVisitValue;
|
||||
if (!file_exists($pageFile) || !is_readable($pageFile)) {
|
||||
do_log("pageFile: $pageFile is not exists or readable");
|
||||
die(0);
|
||||
}
|
||||
$content = file_get_contents($pageFile);
|
||||
die($content);
|
||||
}
|
||||
if ($guestVisitType == 'custom_content') {
|
||||
$content = format_comment($guestVisitValue);
|
||||
render('resources/templates/guest-visit-custom-content', ['content' => $content]);
|
||||
}
|
||||
if ($guestVisitType == 'redirect') {
|
||||
header('Location: ' . $guestVisitValue);
|
||||
die(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function render($view, $data, $return = false)
|
||||
{
|
||||
extract($data);
|
||||
if (!file_exists($view)) {
|
||||
$view = ROOT_PATH . $view;
|
||||
}
|
||||
if (substr($view, -4) !== '.php') {
|
||||
$view .= ".php";
|
||||
}
|
||||
ob_start();
|
||||
ob_implicit_flush(0);
|
||||
require $view;
|
||||
$result = ob_get_clean();
|
||||
if ($return) {
|
||||
return $result;
|
||||
}
|
||||
die($result);
|
||||
}
|
||||
|
||||
function canDoLogin()
|
||||
{
|
||||
$setting = get_setting('security');
|
||||
if (empty($setting['login_type']) || $setting['login_type'] == 'normal') {
|
||||
return true;
|
||||
}
|
||||
$loginType = $setting['login_type'];
|
||||
if ($loginType == 'secret') {
|
||||
if (empty($_REQUEST['secret'])) {
|
||||
do_log("no secret");
|
||||
return false;
|
||||
}
|
||||
if ($_REQUEST['secret'] != $setting['login_secret']) {
|
||||
do_log("invlaid secret: " . $_REQUEST['secret']);
|
||||
return false;
|
||||
}
|
||||
if ($setting['login_secret_deadline'] < date('Y-m-d H:i:s')) {
|
||||
do_log("secret: {$_REQUEST['secret']} expires(deadline: {$setting['login_secret_deadline']})");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -388,7 +388,7 @@ function arr_set(&$array, $key, $value)
|
||||
}
|
||||
|
||||
|
||||
function getSchemaAndHttpHost()
|
||||
function getSchemeAndHttpHost()
|
||||
{
|
||||
$isHttps = !empty($_SERVER['HTTPS']) && (strtolower($_SERVER['HTTPS']) !== 'off');
|
||||
$protocol = $isHttps ? 'https' : 'http';
|
||||
@@ -403,7 +403,7 @@ function getSchemaAndHttpHost()
|
||||
|
||||
function getBaseUrl()
|
||||
{
|
||||
$url = getSchemaAndHttpHost();
|
||||
$url = getSchemeAndHttpHost();
|
||||
$requestUri = $_SERVER['REQUEST_URI'];
|
||||
$pos = strpos($requestUri, '?');
|
||||
if ($pos !== false) {
|
||||
|
||||
@@ -689,6 +689,18 @@ $lang_settings = array
|
||||
'row_guest_visit_value_custom_content' => '自定义内容',
|
||||
'row_guest_visit_value_redirect' => '指定 URL',
|
||||
'text_guest_visit_value_static_page' => '位于:resources/static-pages/ 目录下的文件',
|
||||
'row_login_type' => '登录方式',
|
||||
'text_login_type_normal' => '正常',
|
||||
'text_login_type_secret' => '秘密',
|
||||
'row_login_secret' => '登录密钥',
|
||||
'text_login_secret_current' => '当前密钥',
|
||||
'text_login_url_with_secret' => '登录链接',
|
||||
'text_login_secret_regenerate_yes' => '重新生成(保存后会更新并延长有效期)',
|
||||
'text_login_secret_regenerate_no' => '保持当前(保存后不变)',
|
||||
'text_login_secret_lifetime' => '有效期',
|
||||
'text_login_secret_lifetime_unit' => '分钟',
|
||||
'row_login_secret_lifetime' => '登录密钥有效期',
|
||||
'text_login_secret_lifetime_deadline' => '当前密钥有效期至',
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -689,6 +689,18 @@ $lang_settings = array
|
||||
'row_guest_visit_value_custom_content' => '自定義內容',
|
||||
'row_guest_visit_value_redirect' => '指定 URL',
|
||||
'text_guest_visit_value_static_page' => '位於:resources/static-pages/ 目錄下的文件',
|
||||
'row_login_type' => '登錄方式',
|
||||
'text_login_type_normal' => '正常',
|
||||
'text_login_type_secret' => '秘密',
|
||||
'row_login_secret' => '登錄密鑰',
|
||||
'text_login_secret_current' => '當前密鑰',
|
||||
'text_login_url_with_secret' => '登錄鏈接',
|
||||
'text_login_secret_regenerate_yes' => '重新生成(保存後會更新並延長有效期)',
|
||||
'text_login_secret_regenerate_no' => '保持當前(保存後不變)',
|
||||
'text_login_secret_lifetime' => '有效期',
|
||||
'text_login_secret_lifetime_unit' => '分鐘',
|
||||
'row_login_secret_lifetime' => '登錄密鑰有效期',
|
||||
'text_login_secret_lifetime_deadline' => '當前密鑰有效期至',
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -680,15 +680,27 @@ $lang_settings = array
|
||||
'text_email_notification_note' => "Allow users to receive email notification when he gets new pm, comment, etc.",
|
||||
'text_users_get' => "Users would get ",
|
||||
'text_invitations_default' => " invitations the first time he is promoted to this class. Default ",
|
||||
'row_guest_visit_type' => "游客访问",
|
||||
'text_guest_visit_type_normal' => '正常',
|
||||
'text_guest_visit_type_static_page' => '展示指定静态页',
|
||||
'text_guest_visit_type_custom_content' => '展示自定义内容',
|
||||
'text_guest_visit_type_redirect' => '跳转指定 URL',
|
||||
'row_guest_visit_value_static_page' => '指定静态页',
|
||||
'row_guest_visit_value_custom_content' => '自定义内容',
|
||||
'row_guest_visit_value_redirect' => '指定 URL',
|
||||
'text_guest_visit_value_static_page' => '位于:resources/static-pages/ 目录下的文件',
|
||||
'row_guest_visit_type' => "Guest visit",
|
||||
'text_guest_visit_type_normal' => 'Normal',
|
||||
'text_guest_visit_type_static_page' => 'Display a static page',
|
||||
'text_guest_visit_type_custom_content' => 'Display custom content',
|
||||
'text_guest_visit_type_redirect' => 'Redirect to a URL',
|
||||
'row_guest_visit_value_static_page' => 'Specific static page',
|
||||
'row_guest_visit_value_custom_content' => 'Custom content',
|
||||
'row_guest_visit_value_redirect' => 'Specific URL',
|
||||
'text_guest_visit_value_static_page' => 'File locate:resources/static-pages/',
|
||||
'row_login_type' => 'Login type',
|
||||
'text_login_type_normal' => 'Normal',
|
||||
'text_login_type_secret' => 'Secret',
|
||||
'row_login_secret' => 'Login secret',
|
||||
'text_login_secret_current' => 'Current secret',
|
||||
'text_login_url_with_secret' => 'Login URL',
|
||||
'text_login_secret_regenerate_yes' => "Re-generate(will update secret and extend it's lifetime after save)",
|
||||
'text_login_secret_regenerate_no' => "Remain(won't change secret and it's lifetime after save)",
|
||||
'text_login_secret_lifetime' => 'Deadline',
|
||||
'text_login_secret_lifetime_unit' => 'minute',
|
||||
'row_login_secret_lifetime' => 'Login secret lifetime',
|
||||
'text_login_secret_lifetime_deadline' => 'Current login secret deadline',
|
||||
);
|
||||
|
||||
?>
|
||||
|
||||
@@ -201,7 +201,7 @@ if ($currentStep == 5) {
|
||||
<?php if ($currentStep <= $maxStep) {?>
|
||||
<button class="bg-blue-<?php echo $pass ? 500 : 200;?> p-2 m-4 text-white rounded" type="submit" <?php echo $pass ? '' : 'disabled';?>>下一步</button>
|
||||
<?php } else {?>
|
||||
<a class="bg-blue-500 p-2 m-4 text-white rounded" href="<?php echo getSchemaAndHttpHost()?>">回首页</a>
|
||||
<a class="bg-blue-500 p-2 m-4 text-white rounded" href="<?php echo getSchemeAndHttpHost()?>">回首页</a>
|
||||
<?php }?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -235,7 +235,7 @@ if ($currentStep == 4) {
|
||||
<?php if ($currentStep <= $maxStep) {?>
|
||||
<button class="bg-blue-<?php echo $pass ? 500 : 200;?> p-2 m-4 text-white rounded" type="submit" <?php echo $pass ? '' : 'disabled';?>>下一步</button>
|
||||
<?php } else {?>
|
||||
<a class="bg-blue-500 p-2 m-4 text-white rounded" href="<?php echo getSchemaAndHttpHost()?>">回首页</a>
|
||||
<a class="bg-blue-500 p-2 m-4 text-white rounded" href="<?php echo getSchemeAndHttpHost()?>">回首页</a>
|
||||
<?php }?>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -46,6 +46,7 @@ if (!empty($_GET["returnto"])) {
|
||||
}
|
||||
?>
|
||||
<form method="post" action="takelogin.php">
|
||||
<input type="hidden" name="secret" value="<?php echo $_GET['secret'] ?? ''?>">
|
||||
<p><?php echo $lang_login['p_need_cookies_enables']?><br /> [<b><?php echo $maxloginattempts;?></b>] <?php echo $lang_login['p_fail_ban']?></p>
|
||||
<p><?php echo $lang_login['p_you_have']?> <b><?php echo remaining ();?></b> <?php echo $lang_login['p_remaining_tries']?></p>
|
||||
<table border="0" cellpadding="5">
|
||||
|
||||
@@ -159,12 +159,18 @@ elseif ($action == 'savesettings_security') // save security
|
||||
$validConfig = array(
|
||||
'securelogin', 'securetracker', 'https_announce_url','iv','maxip','maxloginattempts','changeemail','cheaterdet','nodetect',
|
||||
'guest_visit_type', 'guest_visit_value_static_page', 'guest_visit_value_custom_content', 'guest_visit_value_redirect',
|
||||
'login_type', 'login_secret_lifetime',
|
||||
);
|
||||
GetVar($validConfig);
|
||||
$SECURITY = [];
|
||||
foreach($validConfig as $config) {
|
||||
$SECURITY[$config] = $$config ?? null;
|
||||
}
|
||||
if ($_POST['login_secret_regenerate'] == 'yes') {
|
||||
$minute = intval($_POST['login_secret_lifetime']);
|
||||
$SECURITY['login_secret_deadline'] = date('Y-m-d H:i:s', strtotime("+ $minute minutes"));
|
||||
$SECURITY['login_secret'] = md5(microtime(true));
|
||||
}
|
||||
saveSetting('security', $SECURITY);
|
||||
$actiontime = date("F j, Y, g:i a");
|
||||
write_log("Tracker SECURITY settings updated by $CURUSER[username]. $actiontime",'mod');
|
||||
@@ -298,7 +304,7 @@ elseif ($action == 'securitysettings') //security settings
|
||||
tr($lang_settings['row_max_ips'],"<input type='text' style=\"width: 300px\" name=maxip value='" . ($SECURITY["maxip"] ? $SECURITY["maxip"] : "1")."'> ".$lang_settings['text_max_ips_note'], 1);
|
||||
tr($lang_settings['row_max_login_attemps'],"<input type='text' style=\"width: 300px\" name=maxloginattempts value='" . ($SECURITY["maxloginattempts"] ? $SECURITY["maxloginattempts"] : "7")."'> ".$lang_settings['text_max_login_attemps_note'], 1);
|
||||
|
||||
$guestVisitTypeRadio = '<label><input type="radio" name="guest_visit_type" value="normal"' . ($SECURITY['guest_visit_type'] == 'normal' ? ' checked' : '') . ' onclick="document.getElementById(\'tbody_static_page\').style.display=\'none\';document.getElementById(\'tbody_custom_content\').style.display=\'none\';document.getElementById(\'tbody_redirect\').style.display=\'none\';">' . $lang_settings['text_guest_visit_type_normal'] . '</label>';
|
||||
$guestVisitTypeRadio = '<label><input type="radio" name="guest_visit_type" value="normal"' . (empty($SECURITY['guest_visit_type']) || $SECURITY['guest_visit_type'] == 'normal' ? ' checked' : '') . ' onclick="document.getElementById(\'tbody_static_page\').style.display=\'none\';document.getElementById(\'tbody_custom_content\').style.display=\'none\';document.getElementById(\'tbody_redirect\').style.display=\'none\';">' . $lang_settings['text_guest_visit_type_normal'] . '</label>';
|
||||
$guestVisitTypeRadio .= '<br/><label><input type="radio" name="guest_visit_type" value="static_page"' . ($SECURITY['guest_visit_type'] == 'static_page' ? ' checked' : '') . ' onclick="document.getElementById(\'tbody_static_page\').style.display=\'table-row-group\';document.getElementById(\'tbody_custom_content\').style.display=\'none\';document.getElementById(\'tbody_redirect\').style.display=\'none\';">' . $lang_settings['text_guest_visit_type_static_page'] . '</label>';
|
||||
$guestVisitTypeRadio .= '<br/><label><input type="radio" name="guest_visit_type" value="custom_content"' . ($SECURITY['guest_visit_type'] == 'custom_content' ? ' checked' : '') . ' onclick="document.getElementById(\'tbody_static_page\').style.display=\'none\';document.getElementById(\'tbody_custom_content\').style.display=\'table-row-group\';document.getElementById(\'tbody_redirect\').style.display=\'none\';">' . $lang_settings['text_guest_visit_type_custom_content'] . '</label>';
|
||||
$guestVisitTypeRadio .= '<br/><label><input type="radio" name="guest_visit_type" value="redirect"' . ($SECURITY['guest_visit_type'] == 'redirect' ? ' checked' : '') . ' onclick="document.getElementById(\'tbody_static_page\').style.display=\'none\';document.getElementById(\'tbody_custom_content\').style.display=\'none\';document.getElementById(\'tbody_redirect\').style.display=\'table-row-group\';">' . $lang_settings['text_guest_visit_type_redirect'] . '</label>';
|
||||
@@ -320,8 +326,27 @@ elseif ($action == 'securitysettings') //security settings
|
||||
print '</tbody><tbody id="tbody_redirect" style="display: ' . ($SECURITY['guest_visit_type'] == 'redirect' ? 'table-row-group' : 'none') . '">';
|
||||
$input = sprintf('<input type="text" name="guest_visit_value_redirect" value="%s" style="width: 300px;" />', $SECURITY['guest_visit_value_redirect'] ?? '');
|
||||
tr($lang_settings['row_guest_visit_value_redirect'], $input, 1);
|
||||
print '</tbody>';
|
||||
print '</tbody><tbody>';
|
||||
|
||||
$loginTypeRadio = '<label><input type="radio" name="login_type" value="normal"' . (empty($SECURITY['login_type']) || $SECURITY['login_type'] == 'normal' ? ' checked' : '') . ' onclick="document.getElementById(\'tbody_login_secret\').style.display=\'none\';">' . $lang_settings['text_login_type_normal'] . '</label>';
|
||||
$loginTypeRadio .= '<label><input type="radio" name="login_type" value="secret"' . ($SECURITY['login_type'] == 'secret' ? ' checked' : '') . ' onclick="document.getElementById(\'tbody_login_secret\').style.display=\'table-row-group\';">' . $lang_settings['text_login_type_secret'] . '</label>';
|
||||
tr($lang_settings['row_login_type'], $loginTypeRadio, 1);
|
||||
|
||||
print '</tbody><tbody id="tbody_login_secret" style="display: ' . ($SECURITY['login_type'] == 'secret' ? 'table-row-group' : 'none') . '">';
|
||||
$loginSecret = sprintf('%s:%s', $lang_settings['text_login_secret_current'], $SECURITY['login_secret'] ?? '');
|
||||
if (!empty($SECURITY['login_secret'])) {
|
||||
$loginSecret .= sprintf('<br/>%s: %s/login.php?secret=%s', $lang_settings['text_login_url_with_secret'], getSchemeAndHttpHost(), $SECURITY['login_secret']);
|
||||
}
|
||||
$loginSecret .= sprintf('<br/><label><input type="radio" name="login_secret_regenerate" value="no"%s />%s</label>', !empty($SECURITY['login_secret']) ? ' checked' : '', $lang_settings['text_login_secret_regenerate_no']);
|
||||
$loginSecret .= sprintf('<br/><label><input type="radio" name="login_secret_regenerate" value="yes"%s />%s</label>', empty($SECURITY['login_secret']) ? ' checked' : '', $lang_settings['text_login_secret_regenerate_yes']);
|
||||
tr($lang_settings['row_login_secret'], $loginSecret, 1);
|
||||
|
||||
$loginSecretLifetime = sprintf('<input type="text" name="login_secret_lifetime" value="%s" />%s', $SECURITY['login_secret_lifetime'], $lang_settings['text_login_secret_lifetime_unit']);
|
||||
if (!empty($SECURITY['login_secret_lifetime'])) {
|
||||
$loginSecretLifetime .= sprintf('<span style="margin-left: 20px">%s: %s</span>', $lang_settings['text_login_secret_lifetime_deadline'], $SECURITY['login_secret_deadline']);
|
||||
}
|
||||
tr($lang_settings['row_login_secret_lifetime'], $loginSecretLifetime, 1);
|
||||
print '</tbody>';
|
||||
|
||||
tr($lang_settings['row_save_settings'],"<input type='submit' name='save' value='".$lang_settings['submit_save_settings']."'>", 1);
|
||||
print ("</form>");
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="ahot-aplus" content="1">
|
||||
<meta name="aplus-rate-ahot" content="0.5">
|
||||
<title>阿里云备案阻断页</title>
|
||||
<link rel="icon" href="https://img.alicdn.com/tfs/TB1_ZXuNcfpK1RjSZFOXXa6nFXa-32-32.ico" type="image/x-icon">
|
||||
<meta name="data-spm" content="5176" />
|
||||
<meta name="keywords" content="">
|
||||
<meta name="description" content="">
|
||||
<meta property="og:title" content="阿里云备案阻断页" />
|
||||
<meta property="og:description" content="" />
|
||||
<meta property="og:image" content="https://img.alicdn.com/tfs/TB1qNVdXlGw3KVjSZFDXXXWEpXa-620-620.png" />
|
||||
<style>
|
||||
body {
|
||||
min-height:100vh;
|
||||
margin:0;
|
||||
padding:0;
|
||||
|
||||
background:#fff;
|
||||
;
|
||||
}
|
||||
.seo-html-content{
|
||||
display:none!important;
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
div.small-icon .cart-name{
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script>
|
||||
window.$PAGE_CONFIG = {
|
||||
id:'142776',
|
||||
env: 'production',
|
||||
previewEnv: '',
|
||||
|
||||
PLUGINS: {},
|
||||
renderEngine:1,
|
||||
SOLUTION_HEADER_FOOTER_CONFG:{"headerSection":"完整头部","footerSection":"展示"}
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
if (window.innerWidth <= 768) {
|
||||
var meta = document.querySelector('meta[name="viewport"]');
|
||||
meta.content = 'width=375px,user-scalable=no,viewport-fit=cover';
|
||||
meta.setAttribute('homon','true');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body data-spm="14418478"><script type="text/javascript">
|
||||
(function (d) {
|
||||
var t=d.createElement("script");t.type="text/javascript";t.async=true;t.id="tb-beacon-aplus";
|
||||
t.setAttribute("exparams","category=&userid=&aplus&yunid=35385%2a%2a%2a%2a%40qq%2ecom&yunpk=1700198864854652&channel=&cps=");
|
||||
t.src="//g.alicdn.com/alilog/mlog/aplus_v2.js";
|
||||
d.getElementsByTagName("head")[0].appendChild(t);
|
||||
})(document);
|
||||
</script>
|
||||
<script src="https://www.aliyun.com/assets/publish/ace-base-assets"></script>
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/homon/page-render/3.0.17/v1/index-pc.css" />
|
||||
<link rel="stylesheet" href="https://g.alicdn.com/??hmod/ace-beian-interdict/0.0.8/index.css" />
|
||||
<div id="J_fetch">
|
||||
<textarea style="display: none">
|
||||
{}
|
||||
</textarea>
|
||||
</div>
|
||||
<textarea id="J_data" style="display: none;">
|
||||
[{"settings":{},"componentId":45592,"hidden":"false","fullName":"@ali/hmod-ace-beian-interdict","uuid":"1164210480","limitConfig":{},"version":"0.0.8","componentVersionId":328597,"name":"hmod-ace-beian-interdict"}]
|
||||
</textarea>
|
||||
<div id="J_1164210480" style="top:-60px; position: relative;"></div>
|
||||
<div data-homon-module class="aliyun-module" data-section-id="" data-id="1164210480" data-spm="J_1164210480" data-module-id="1164210480" data-module-name="@ali/hmod-ace-beian-interdict" data-version="0.0.8" data-hidden="false" data-block-render="">
|
||||
</div>
|
||||
<div class="aliyun-module-config">
|
||||
<textarea class="aliyun-module-data" data-target="1164210480" style="display:none;">
|
||||
{"cnConfig":{"title":"网站暂时无法访问","list":[{"cont":[{"text":"请等待网站备案后尝试访问。"}],"title":"如果您是网站普通访客:"},{"title":"如果您是网站所有者,网站无法访问常见原因如下:","cont":[{"text":"1. 网站未完成备案、未在接入商完成备案接入。"},{"text":"2. 网站内容与备案信息不符、备案信息不准确、网站存在不适宜传播的内容等。"}]}],"subtitle":"该网站未根据工信部相关法律进行备案","gist":"法律依据:《非经营性互联网信息服务备案管理办法》","action":"点击进入备案管理平台","url":"https://beian.aliyun.com/"},"intlConfig":{"title":"The website is currently inaccessible...","list":[{"cont":[{"text":"Visit the website again after the website obtains an ICP filing."}],"title":"If you fail to access the website as a visitor:"},{"title":"If you fail to access the website as the website owner, the possible causes are as follows:","cont":[{"text":"1. You have not applied for an ICP filing for your website, or you have not added Alibaba Cloud to the ICP filing information as a service provider."},{"text":"2. The content that the website provides does not comply with the ICP filing information, the ICP filing information is inaccurate, or the website contains content that is not suitable for dissemination."}]}],"subtitle":"The website has not obtained an ICP filing according to the law of the Ministry of Industry and Information Technology of the People's Republic of China","gist":"Relevant law: Measures for the Archival Administration of Non-commercial Internet Information Services","action":"Click to go to the ICP filing management platform","url":"https://beian.aliyun.com/"},"styleConfig":{"width":""},"icon":"https://img.alicdn.com/tfs/TB1AqalCpY7gK0jSZKzXXaikpXa-370-254.png"}
|
||||
</textarea>
|
||||
<textarea class="aliyun-module-settings" data-target="1164210480" style="display:none;">
|
||||
{"recommend":{"visibleMode":"default"},"anchor":{"visibleMode":"all"},"pc":{"background":"","horizontal":"默认","verticalNumber":0,"marginTop":"","marginBottom":"0","contentBackground":"","paddingHoz":"0","paddingTop":"0","paddingBottom":"0","backgroundImage":"","autoHeight":false},"h5":{"background":"","horizontal":"默认","verticalNumber":0,"marginTop":"0","marginBottom":"0","contentBackground":"","paddingHoz":"0","paddingTop":"0","paddingBottom":"0","backgroundImage":"","autoHeight":false}}
|
||||
</textarea>
|
||||
</div>
|
||||
<script src="https://g.alicdn.com/??hmod/ace-beian-interdict/0.0.8/index.js,hmod/ace-beian-interdict/0.0.8/services.js"></script>
|
||||
<script src="https://g.alicdn.com/homon/page-render/3.0.17/v1/index-pc.js">
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
14
resources/templates/guest-visit-custom-content.php
Normal file
14
resources/templates/guest-visit-custom-content.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Hello World!</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding: 15px;display: flex;justify-content: center">
|
||||
<div style="max-width: 1120px;">
|
||||
<?php echo $content?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user