<?php
if (!defined('EMLOG_ROOT')) {
$scriptpath = str_replace('\\', '/', $_SERVER['SCRIPT_NAME']);
$sitepath = substr($scriptpath, 0, strrpos($scriptpath, '/'));
$siteurl = ($_SERVER['SERVER_PORT'] == '443' ? 'https://' : 'https://') . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>资源宝www.httple.net</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
//鸿蒙字体,如果没有安装这个字体那么就不会生效
font-family: 'HarmonyOS Sans SC', sans-serif;
background-repeat: repeat;
background-size: cover;
}
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
//自动获取bing每日背景图
background-image: url('https://bing.img.run/1920x1080.php');
z-index: 9999;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}
.message {
background-color: #fff;
padding: 20px;
border-radius: 10px;
text-align: center;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
max-width: 80%;
}
.icon {
width: 196px;
height: 87px;
background: url(LOGO链接) no-repeat center center;
background-size: cover;
margin-bottom: 20px;
margin-left: auto;
margin-right: auto;
}
.wenben {
margin-bottom: 20px;
}
.wenben p {
font-size: 16px;
line-height: 1.5;
}
.url {
margin-bottom: 20px;
text-align: center;
}
.url input {
width: 100%;
padding: 10px;
border: none;
border-radius: 5px;
background-color: #f5f5f5;
text-align: center;
color: #787070;
font-size: 16px;
font-weight: bold;
}
.copy,
.tutorial {
display: inline-block;
padding: 10px 20px;
border: none;
border-radius: 5px;
transition: background-color 0.3s ease;
font-size: 16px;
line-height: 1.5;
text-transform: uppercase;
cursor: pointer;
margin-right: 10px;
color: #fff;
}
.copy:hover,
.tutorial:hover {
opacity: 0.8;
}
.copy {
background-color: #007bff;
}
.tutorial {
background-color: #28a745;
}
.toast {
position: fixed;
top: 20px;
left: 50%;
transform: translateX(-50%);
background-color: rgba(0, 0, 0, 0.7);
color: #fff;
padding: 10px 20px;
border-radius: 5px;
opacity: 0;
transition: opacity 0.3s ease;
font-size: 16px;
line-height: 1.5;
}
.toast.show {
opacity: 1;
}
</style>
</head>
<body>
<div class="overlay">
<div class="message">
<div class="icon"></div>
<div class="wenben">
<p>
由于微信或QQ浏览器的限制
</p>
<p>
你可以选择<strong>复制链接</strong>或右上角点击“<strong>...</strong>”选择<strong>浏览器中打开</strong>
</p>
</div>
<div class="url">
<input type="text" value="<?php echo htmlspecialchars($siteurl, ENT_QUOTES); ?>" size="<?php echo strlen($siteurl); ?>" readonly>
</div>
<button class="copy" onclick="copyUrl()">复制链接</button>
<!--<button class="tutorial" onclick="showTutorial()">操作教程</button>-->
<div class="toast" id="toast">链接已复制到剪贴板</div>
</div>
</div>
<div id="tutorial" style="display: none;">
<div class="overlay">
<div class="message">
<div class="wenben" style="text-align: left;">
<p>如何在微信或QQ中使用系统浏览器打开当前页面:</p>
<p>1. 点击右上角的三个点,打开菜单。</p>
<p>2. 选择“在浏览器中打开”。</p>
<p>3. 系统会自动打开默认的浏览器,并打开当前页面。</p>
</div>
<button class="tutorial" onclick="hideTutorial()">关闭</button>
</div>
</div>
</div>
<script>
function copyUrl() {
var urlInput = document.querySelector('.url input');
urlInput.select();
document.execCommand('copy');
var toast = document.getElementById('toast');
toast.classList.add('show');
setTimeout(function () {
toast.classList.remove('show');
}, 2000);
}
function showTutorial() {
document.getElementById('tutorial').style.display = 'block';
}
function hideTutorial() {
document.getElementById('tutorial').style.display = 'none';
}
</script>
</body>
</html>
2024防红代码分享
最新推荐文章于 2025-03-22 10:26:27 发布