This commit is contained in:
2023-01-02 19:56:44 +08:00
commit e187878b7a
3244 changed files with 260239 additions and 0 deletions
+164
View File
@@ -0,0 +1,164 @@
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<base href="/" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='zlibproxy/normalize.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.laysense.com/css/5000/zh-cn/douyufont/douyufont.css" rel="preload" as="style" onload="this.rel='stylesheet'">
<link href="https://fonts.laysense.com/css/5000/zh-cn/harmonyossans/harmonyossans.css" rel="preload" as="style" onload="this.rel='stylesheet'">
<link id="theme_css" rel="stylesheet" href="zlibproxy/sakura.css">
<style>
.pmnet { font-family: DOUYUFont;}
html {font-family: HarmonyOSSans;}
.animbox {
margin: 50px auto;
width: 200px;
text-align: center;
}
/*设置各竖条的共有样式*/
.animbox > div {
background-color: #279fcf;
width: 4px;
height: 35px;
border-radius: 2px;
margin: 2px;
animation-fill-mode: both;
display: inline-block;
animation: anim 0.9s 0s infinite cubic-bezier(.11, .49, .38, .78);
}
/*设置动画延迟*/
.animbox > :nth-child(2), .animbox > :nth-child(4) {
animation-delay: 0.25s !important;
}
.animbox > :nth-child(1), .animbox > :nth-child(5) {
animation-delay: 0.5s !important;
}
/*定义动画*/
@keyframes anim {
0% { transform: scaley(1); }
80% { transform: scaley(0.3); }
90% { transform: scaley(1); }
}
</style>
<title>(ProxyDownload)Z-Library</title>
</head>
<body>
<script>
//切换深色模式
if(window.matchMedia('(prefers-color-scheme: dark)').matches){
document.getElementById('theme_css').href = 'zlibproxy/sakura-dark.css';
}
</script>
<main>
<center>
<div style="background-color: bisque;color: black;">
Zlibrary Proxy(v<?php echo(getenv('version'));?>) UserID:<?php echo($id);?> <a style="color: coral;" href="/login/logout">[退出账号]</a>
</div>
</center>
<div id="container">
<a href="/" target="_blank_home">[返回ZlibraryProxy]</a>
<h1>下载图书</h1>
<div id="load" class="animbox" style="display: none;">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<br />
</div>
<p id="notice"></p>
<hr />
<div id="down" style="display: none;">
<a id="downloadurl" target="_blank_downbook">
<h3 style="margin-top:15%;margin-bottom:15%">📥点此下载图书</h3><br /><p id="bookname"></p><br /><p id="booksize"></p>
</a>
<hr />
<button onclick="download()">下载内容打不开?点此重新生成文件</button>(重新生成将消耗Zlib每日次数)
</div>
<div id="start" style="display: none;">
<button onclick="download()">点此开始下载图书</button>
</div>
</div>
</main>
<script src="zlibproxy/jquery-3.6.3.min.js"></script>
<script>
var path='<?php echo($path) ?>';
$.ajax({
type: "POST",
url: '/zlibproxy/check',
data: {'path':path},
async: true,
dataType: 'json',
cache: false,
beforeSend: function () {
$('#notice').html('正在查询缓存,请稍等……');
$('#load').show();
},
success: function (data) {
if (data.code == 200) {
$('#notice').html('图书已被缓存,本次下载无需消耗Zlib每日次数');
$("#downloadurl").attr("href","/zlibproxy/get?path="+path);
$('#bookname').html(data.name);
$('#booksize').html(data.size+'MB');
$('#down').show();
}
if (data.code == 202) {
$('#notice').html('图书仍在下载中,请稍等 (5秒后刷新)');
setTimeout(function(){location.reload();},5000);
}
if (data.code == 201) {
$('#notice').html('图书暂未被缓存,本次下载需要消耗Zlib次数(请确保小于30Mb否则会浪费一次次数)');
$('#start').show();
}
if (data.code == 509) {
$('#notice').html('缺少参数或未登录');
setTimeout(function(){$(location).attr('href','/login')},1500);
}
$('#load').hide();
},
});
function download(){
$.ajax({
type: "POST",
url: '/zlibproxy/download',
data: {'path':path},
async: true,
dataType: 'json',
cache: false,
beforeSend: function () {
$('#notice').html('服务器正在通过Tor从Zlib下载图书……请耐心等待');
$('#load').show();
$('#start').hide();
},
success: function (data) {
if (data.code == 200) {
$('#notice').html('图书已获取成功,请点击下方链接下载图书');
$("#downloadurl").attr("href","/zlibproxy/get?path="+path);
$('#bookname').html(data.name);
$('#booksize').html(data.size+'MB');
$('#down').show();
$('#start').hide();
}
if (data.code == 500) {
$('#notice').html('文件过大(大于30Mb),暂时无法通过ZlibProxy下载');
$('#start').hide();
}
if (data.code == 400) {
$('#notice').html('图书不存在……请尝试别的图书');
$('#start').hide();
}
if (data.code == 509) {
$('#notice').html('缺少参数或未登录');
setTimeout(function(){$(location).attr('href','/login')},1500);
}
$('#load').hide();
},
});
}
</script>
</body>
</html>
+161
View File
@@ -0,0 +1,161 @@
<!--
Copyright (C) 2023 admin@pmnet.gq
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='zlibproxy/normalize.css' rel='stylesheet' type='text/css'>
<link href="https://fonts.laysense.com/css/5000/zh-cn/douyufont/douyufont.css" rel="preload" as="style" onload="this.rel='stylesheet'">
<link href="https://fonts.laysense.com/css/5000/zh-cn/harmonyossans/harmonyossans.css" rel="preload" as="style" onload="this.rel='stylesheet'">
<link id="theme_css" rel="stylesheet" href="zlibproxy/sakura.css">
<style>
.pmnet { font-family: DOUYUFont;}
html {font-family: HarmonyOSSans;}
.animbox {
margin: 50px auto;
width: 200px;
text-align: center;
}
/*设置各竖条的共有样式*/
.animbox > div {
background-color: #279fcf;
width: 4px;
height: 35px;
border-radius: 2px;
margin: 2px;
animation-fill-mode: both;
display: inline-block;
animation: anim 0.9s 0s infinite cubic-bezier(.11, .49, .38, .78);
}
/*设置动画延迟*/
.animbox > :nth-child(2), .animbox > :nth-child(4) {
animation-delay: 0.25s !important;
}
.animbox > :nth-child(1), .animbox > :nth-child(5) {
animation-delay: 0.5s !important;
}
/*定义动画*/
@keyframes anim {
0% { transform: scaley(1); }
80% { transform: scaley(0.3); }
90% { transform: scaley(1); }
}
</style>
<title>镜像站增加申请-Mirrors.pw</title>
</head>
<body>
<script>
//切换深色模式
if(window.matchMedia('(prefers-color-scheme: dark)').matches){
document.getElementById('theme_css').href = 'zlibproxy/sakura-dark.css';
}
</script>
<main>
<h1>Z-library Proxy</h1><hr />
<p>这是一个Zlibrary的代理镜像</p>
<a href="https://www.pmnet.gq/" target="_blank_pmnet">由[<span class="pmnet">PublicMirrorsNetwork</span>]维护</a>
<blockquote>
本代理利用广大的Tor代理和中继节点,基于<a href="" target="_blank_tor">TOR</a>技术提供服务
<br />
本代理使用Laysense提供的强大内部SD-WAN技术
<br />
使用前请确保您的行为符合当地法律
<br />
由于Zlibrary的邮件服务器已经宕机,任何新注册和更改密码请求均无效,均无法使用,如果您的账号还未通过邮箱激活将无法使用本服务
<br />
<span style="color: coral;">本代理不会保存您的密码(仅在浏览器cookies保存您的ID)</span>
</blockquote>
<section>
<h4>登录到Z-Library</h4>
<hr />
<form action="new_apply.php" method="POST">
<p>
<label for="name">*Zlibrary账号(email)</label>
<input required="required" name="name" id="name" placeholder="Your Zlib Username" type="email" style="width:50%">
</p>
<p>
<label for="password">*Zlibrary密码</label>
<input required="required" name="password" id="password" placeholder="Your Zilb Password" type="password" style="width:50%">
</p>
<p>
<label for="password">*验证码 <img style="margin-bottom:0px" src="login/code" /></label>
<input required="required" name="code" id="code" placeholder="CaptchaCode" type="text" style="width:35%">
</p>
<div id="load" class="animbox" style="display: none;">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<p style="color: blueviolet;" id="notice"></p>
</form>
<p>
<button onclick="login()" value="登录" style="width:30%">登录</button>
</p>
</section>
</main>
<footer>
<hr/>
©PMNET.GQ 2023 Made with <a href="https://oxal.org/projects/sakura">sakura.css</a>
</footer>
<script src="zlibproxy/jquery-3.6.3.min.js"></script>
<script>
function login(){
var name = $("#name").val();
var password = $("#password").val();
var ccode = $("#code").val();
$.ajax({
type: "POST",
url: '/login/check',
data: {'name':name,'password':password,'code':ccode},
async: true,
dataType: 'json',
cache: false,
beforeSend: function () {
$('#notice').html('正在登录……(最多可能需要30秒以上,请耐心等待)');
$('#load').show();
},
success: function (data) {
if (data.code == 200) {
$('#notice').html('欢迎您'+data.userid+',正在前往Zlibrary镜像站,享受阅读的乐趣吧~');
setTimeout(function(){$(location).attr('href','/')},1500);
} else {
$('#notice').html(data.msg);
}
$('#load').hide();
},
clearForm: true,
resetForm: false
});
}
</script>
</body>
</html>