
首页加密跳转主页
<?php
// 开启会话
session_start();
// 设置页面编码
header('Content-Type: text/html; charset=utf-8');
// 假设正确的密码哈希值,实际使用中应从数据库或配置文件获取
$hashedPassword = password_hash("密码", PASSWORD_DEFAULT);
// 检查是否通过会话记录了已验证状态
if (isset($_SESSION['isVerified']) && $_SESSION['isVerified'] === true) {
// 如果已验证,跳转到首页
header("Location: index.html");
exit;
} else {
// 处理密码验证逻辑
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$enteredPassword = $_POST['password'];
if (password_verify($enteredPassword, $hashedPassword)) {
// 设置会话变量表示已验证
$_SESSION['isVerified'] = true;
// 跳转到首页
header("Location: index.html");
exit;
} else {
$errorMessage = "密码错误,请重新输入。";
}
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>查看加密链接</title>
<style>
body {
background: linear-gradient(to bottom right, #0099ff, #ff0099); /* 渐变背景颜色 */
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 更换字体 */
}
.container {
background-color: white;
padding: 40px; /* 增加内边距 */
border-radius: 15px; /* 增加圆角 */
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); /* 增加阴影 */
width: 90%; /* 自适应宽度 */
max-width: 400px; /* 最大宽度 */
}
h2 {
text-align: center;
font-size: 28px; /* 增大标题字体大小 */
margin-bottom: 20px; /* 增加底部间距 */
}
form {
display: flex;
flex-direction: column;
}
label {
margin-top: 10px;
font-size: 18px; /* 增大标签字体大小 */
}
input[type="password"] {
padding: 15px; /* 增加输入框内边距 */
margin-top: 5px;
margin-bottom: 20px; /* 增加底部间距 */
border: 1px solid #ccc;
border-radius: 5px; /* 增加输入框圆角 */
font-size: 16px; /* 增大输入框字体大小 */
}
input[type="submit"] {
background: linear-gradient(to right, #00ccff, #ff66cc); /* 渐变按钮颜色 */
color: white;
padding: 15px; /* 增加按钮内边距 */
border: none;
border-radius: 5px; /* 增加按钮圆角 */
cursor: pointer;
font-size: 18px; /* 增大按钮字体大小 */
transition: background 0.3s ease; /* 增加过渡效果 */
}
input[type="submit"]:hover {
background: linear-gradient(to right, #00b3ff, #ff3399); /* 鼠标悬停时的渐变颜色 */
}
.error {
color: red;
text-align: center;
margin-top: 10px;
font-size: 16px; /* 增大错误信息字体大小 */
}
.return-link {
text-align: center;
margin-top: 20px; /* 增加顶部间距 */
font-size: 16px; /* 增大返回链接字体大小 */
}
.return-link a {
color: #0099ff;
text-decoration: none;
transition: color 0.3s ease; /* 增加过渡效果 */
}
.return-link a:hover {
color: #ff0099;
}
</style>
</head>
<body>
<div class="container">
<h2>查看加密链接</h2>
<?php if (isset($errorMessage)):?>
<p class="error"><?php echo $errorMessage;?></p>
<?php endif;?>
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
<label for="password">请输入密码</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="验证">
</form>
<div class="return-link">
<a href="https://58qq.cn/">返回首页</a>
</div>
</div>
</body>
</html>
<?php }?>
------本页内容已结束,喜欢请分享------
感谢您的来访,获取更多精彩文章请收藏本站。


欢迎观看小姐姐视频
无法播放的视频,就一直点击下一位
天天看美女,强身又健体。
美女伴左右,健康又长寿。