qiuwen-rnrs/template.php

90 行
3.3 KiB
PHP

<?php
require_once __DIR__ . \DIRECTORY_SEPARATOR . 'css.php';
require_once __DIR__ . \DIRECTORY_SEPARATOR . 'js.php';
function refreshPage($url)
{
header('HTTP/1.1 302 Moved Temporarily');
header('Location: ' . $url);
echo <<<EOF
<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
<meta charset="utf-8" />
<meta http-equiv="refresh" content="0; url=$url" />
<title>跳转中……</title>
</head>
<body>
<script type="text/javascript">
window.location.href = '$url';
</script>
</head>
EOF;
}
function alertAndBack($alert = '')
{
echo <<<EOF
<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
<meta charset="utf-8" />
<title>错误</title>
</head>
<body>
<script type="text/javascript">
alert('$alert');
history.back();
</script>
</head>
EOF;
}
function pageTemplate($title, $content)
{
echo <<< EOF
<!DOCTYPE html>
<html lang="zh-Hans-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>$title - 求闻百科实名验证系统</title>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
EOF;
pageCSS();
echo <<< EOF
</head>
<body>
<header>
<a href="https://www.qiuwenbaike.cn" title="求闻百科">
<img src="https://tu.zhongwen.wiki/resources/assets/qiuwen/wordmark/wordmark-favicon-tagline-horizonal.svg?_20240215" width="238" height="35" alt="求闻百科,共笔求闻" />
</a>
</header>
<main>
<h1>$title</h1>
$content
</main>
<footer>
<div class="footer-copyright">
<p>© 2021-2024 求闻百科贡献者;运营者:无锡共笔全书网络有限责任公司</p>
<p>求闻®、求闻百科®、共笔全书®、“绿竹”图标等文字、图形、图文组合,均是本网站运营者或其关联实体的商标或注册商标。</p>
</div>
<div class="footer-links">
<a class="qwlink qwlink-about" href="https://www.qiuwenbaike.cn/wiki/Qiuwen:%E5%85%B3%E4%BA%8E%E6%B1%82%E9%97%BB%E7%99%BE%E7%A7%91" rel="noreferrer noopener" target="_blank">关于“求闻”</a>
<a class="qwlink qwlink-tos" href="https://www.qiuwenbaike.cn/wiki/Qiuwen:%E7%94%A8%E6%88%B7%E5%8D%8F%E8%AE%AE" rel="noreferrer noopener" target="_blank">用户协议</a>
<a class="qwlink qwlink-pipp" href="https://www.qiuwenbaike.cn/wiki/Qiuwen:%E4%B8%AA%E4%BA%BA%E4%BF%A1%E6%81%AF%E4%BF%9D%E6%8A%A4%E6%96%B9%E9%92%88" rel="noreferrer noopener" target="_blank">隐私保护</a>
<a class="govlink govlink-icp" href="https://beian.miit.gov.cn/" rel="noreferrer noopener" target="_blank">苏ICP备2022013164号</a>
<a class="govlink govlink-ga" href="http://beian.mps.gov.cn/" rel="noreferrer noopener" target="_blank">苏公网安备32021302000963号</a>
</div>
<div class="footer-buttons">
<a href="https://www.qiuwenbaike.cn" title="“求闻”计划网站" target="_blank" rel="noopener noreferrer"><img alt="“求闻”计划网站" width="88" height="31" src="https://tu.zhongwen.wiki/resources/assets/qiuwen/button/qiuwen-button.png"></a>
<a href="https://www.gongbiquanshu.cn" title="共笔全书旗下网站" target="_blank" rel="noopener noreferrer"><img alt="共笔全书旗下网站" class="img" width="88" height="31" src="https://tu.zhongwen.wiki/resources/assets/qiuwen/button/gbqs-button.png"></a>
</div>
</footer>
EOF;
matomoJS();
echo <<< EOF
</html>
EOF;
}