Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6 from yuantuo666/master
Browse files Browse the repository at this point in the history
同步更新
  • Loading branch information
lc6464 authored Jun 14, 2021
2 parents 561c672 + 2c4508d commit 5eadfac
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 129 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,19 @@ PanDownload 网页复刻版,PHP 语言版<br/>
**SVIP账号**中可设置**SVIP账号****BDUSS****STOKEN**,添加账号后记得进入**会员账号切换模式**将模式改成**顺序模式****轮换模式**。<br />

## 📦New Changes
- 当前版本:`2.1.6`
- 更新日期:2021-05-01
- 当前版本:`2.1.7`
- 更新日期:2021-05-18
- 修改内容:
- 💥新增功能
- 新增Motrix下载方式
- 新增全账号轮换模式(无视是否限速,轮换数据库中账号)
- 新增 aria2 安卓端
- 新增解析链接失效时间设置
- 关于页面自动生成二维码
- ⚠错误修复
- 修复aria2推送token问题
- 修复语言设置错误提示中转跳用户设置页面链接错误
- 修复手机端推送 aria2 因文件夹不存在出错
- ♻代码优化
- 隐藏未启用数据库时奇怪的提示
- 增加推送错误提示
- 处理一些文字格式
- ws(s)链接时检测是否有效
- aira存储信息方式修改为localStorage
- 在新标签页打开 Motrix 首页
- ws(s)链接检测支持 IPv6

[查看更多](Update.md)

Expand Down
17 changes: 15 additions & 2 deletions Update.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Update
### `2.1.7` 版本:
- 更新日期:2021-05-18
- 修改内容:
- 💥新增功能
- 新增aria2安卓端
- 新增解析链接失效时间设置
- 关于页面自动生成二维码
- ⚠错误修复
- 修复语言设置错误提示中转跳用户设置页面链接错误
- 修复手机端推送 aria2 因文件夹不存在出错
- ♻代码优化
- 在新标签页打开Motrix首页
- ws(s)链接检测支持IPv6

### `2.1.6` 版本:
- 当前版本:`2.1.6`
- 更新日期:2021-05-01
- 修改内容:
- 💥新增功能
Expand Down Expand Up @@ -236,4 +249,4 @@ http://www.dupan.cc/ (站长QQ33703259) 所发布的源码已被篡改,添

### `1.0` 版本:
- 更新日期:2020-08-11
- 修改内容:项目创建
- 修改内容:项目创建
8 changes: 5 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
*
* 此项目 GitHub 地址:https://github.com/yuantuo666/baiduwp-php
*
* @version 2.1.6
* @version 2.1.7
*
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
* @link https://space.bilibili.com/88197958
*
*/
$programVersion_Index = "2.1.6";
$programVersion_Index = "2.1.7";
session_start();
define('init', true);
if (version_compare(PHP_VERSION, '7.0.0', '<')) {
Expand Down Expand Up @@ -91,6 +91,7 @@
<script src="https://cdn.staticfile.org/popper.js/1.12.5/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.1.2/js/bootstrap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/sweetalert2.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@keeex/qrcodejs-kx"></script>
<script src="static/color.js"></script>
<script src="static/functions.js"></script>
<script defer src="static/ready.js"></script>
Expand Down Expand Up @@ -377,8 +378,9 @@ function getip()
if (USING_DB) {
connectdb();

$DownloadLinkAvailableTime = (is_int(DownloadLinkAvailableTime)) ? DownloadLinkAvailableTime : 8;
// 查询数据库中是否存在已经保存的数据
$sql = "SELECT * FROM `$dbtable` WHERE `md5`='$md5' AND `ptime` > DATE_SUB(NOW(),INTERVAL 8 HOUR);";
$sql = "SELECT * FROM `$dbtable` WHERE `md5`='$md5' AND `ptime` > DATE_SUB(NOW(),INTERVAL $DownloadLinkAvailableTime HOUR);";
$mysql_query = mysqli_query($conn, $sql);
}
if (USING_DB and $result = mysqli_fetch_assoc($mysql_query)) {
Expand Down
12 changes: 11 additions & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function getConfig(&$var, string $name, $default = '')
getConfig($Password, 'Password');
getConfig($ADMIN_PASSWORD, 'ADMIN_PASSWORD');
getConfig($DownloadTimes, 'DownloadTimes', '5');
getConfig($DownloadLinkAvailableTime, 'DownloadLinkAvailableTime', '8');
getConfig($IsConfirmDownload, 'IsConfirmDownload', true);
getConfig($Footer, 'Footer');

Expand Down Expand Up @@ -201,7 +202,14 @@ function getDbConfig(&$var, string $key)
<label class="col-sm-2 col-form-label">下载次数限制修改</label>
<div class="col-sm-10">
<input class="form-control" name="DownloadTimes" value="<?php echo $DownloadTimes; ?>">
<small class="form-text">设置每一个IP的下载次数。</small>
<small class="form-text">设置每一个IP的下载次数。(仅开启数据库有效)</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">下载链接有效时间</label>
<div class="col-sm-10">
<input class="form-control" name="DownloadLinkAvailableTime" value="<?php echo $DownloadLinkAvailableTime; ?>">
<small class="form-text">设置解析出来的下载链接有效时间,超出对应时间则重新获取。(仅开启数据库有效,默认及最大为8小时,单位小时)</small>
</div>
</div>
<div class="form-group row">
Expand Down Expand Up @@ -529,6 +537,7 @@ function CheckForm() {
$Password = (!empty($_POST["Password"])) ? $_POST["Password"] : "";
$ADMIN_PASSWORD = (!empty($_POST["ADMIN_PASSWORD"])) ? $_POST["ADMIN_PASSWORD"] : "";
$DownloadTimes = (!empty($_POST["DownloadTimes"])) ? $_POST["DownloadTimes"] : "";
$DownloadLinkAvailableTime = (!empty($_POST["DownloadLinkAvailableTime"])) ? $_POST["DownloadLinkAvailableTime"] : "8";
$IsConfirmDownload = (!empty($_POST["IsConfirmDownload"])) ? $_POST["IsConfirmDownload"] : "true";
$Footer = (!empty($_POST["Footer"])) ? $_POST["Footer"] : "";

Expand Down Expand Up @@ -591,6 +600,7 @@ function CheckForm() {
$update_config = str_replace('<Password>', $Password, $update_config);
$update_config = str_replace('<ADMIN_PASSWORD>', $ADMIN_PASSWORD, $update_config);
$update_config = str_replace('<DownloadTimes>', $DownloadTimes, $update_config);
$update_config = str_replace('<DownloadLinkAvailableTime>', $DownloadLinkAvailableTime, $update_config);
$update_config = str_replace('<IsConfirmDownload>', $IsConfirmDownload, $update_config);
$update_config = str_replace('<Footer>', $Footer, $update_config);

Expand Down
5 changes: 3 additions & 2 deletions install/config_raw
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* PanDownload 网页复刻版,PHP 语言版配置文件
* !!!请勿修改本文件,如果手动修改后再在后台设置,可能导致config.php文件被清空!!!
*
* @version 2.1.6
* @version 2.1.7
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
* @link https://space.bilibili.com/88197958
*/
const programVersion = '2.1.6';
const programVersion = '2.1.7';
if (!defined('init')) {
http_response_code(403); header('Content-Type: text/plain; charset=utf-8'); header('Refresh: 3;url=./');
die("HTTP 403 禁止访问!\r\n此文件是 PanDownload 网页复刻版 PHP 语言版项目版本 " . programVersion . " 的配置文件!\r\n禁止直接访问!");
Expand Down Expand Up @@ -39,6 +39,7 @@ const DbConfig = array("servername" => "<servername>", "username" => "<username>

const ADMIN_PASSWORD = '<ADMIN_PASSWORD>';
const DownloadTimes = <DownloadTimes>;
const DownloadLinkAvailableTime = <DownloadLinkAvailableTime>;
const IsConfirmDownload = <IsConfirmDownload>;
const SVIPSwitchMod = <SVIPSwitchMod>;

Expand Down
Loading

0 comments on commit 5eadfac

Please sign in to comment.