Skip to content

Commit

Permalink
修复帮助页面项目版本不显示问题;修复settings.php中使用setting.php错误;删除一些不必要的版本号;install.ph…
Browse files Browse the repository at this point in the history
…p增加一些提示并修复站点名称不显示的bug;Settings.php增加暗色模式
  • Loading branch information
yuantuo666 committed Feb 10, 2021
1 parent 02eddaf commit 17a9ed5
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 88 deletions.
53 changes: 10 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PanDownload 网页复刻版,PHP 语言版<br/>

![speed.gif](https://i.loli.net/2020/10/01/2mEqkClnPev8ORd.gif)

## warning!!
## Warning!!
http://www.dupan.cc/ (站长QQ33703259) 所发布的源码已被篡改,添加了后台并加密,添加的bduss会被上传网站后台,请勿使用<br />

现在已经公布了所有源码,可以通过github的commits查看以前的源码,从未添加过后台,也没有加密。<br />
Expand Down Expand Up @@ -40,56 +40,23 @@ dupan.cc所提供的源码已经被dupan.cc站长恶意修改并加密。使用
- 更换后台SVIP账号
- 更换服务器IP
- 使用了较新的 JavaScript 和 CSS 特性,旧版浏览器对此的支持性很差,使用新版的现代浏览器才能正常使用!建议使用的浏览器:
- `Microsoft Edge 88+` (最新版更好,Edge 的更新功能还不够方便吗?) [点此访问 Edge 官网](https://www.microsoft.com/zh-cn/edge)
- `Google Chrome 88+` (最新版更好,Chrome 的更新功能还不够方便吗?) [点此访问 Chrome 官网](https://www.google.cn/chrome/)
- `Firefox 85+` (最新版更好,Firefox 的更新功能还不够方便吗?) [点此访问 Firefox 官网](https://www.firefox.com.cn/)
- `Microsoft Edge 88+` [点此访问 Edge 官网](https://www.microsoft.com/zh-cn/edge)
- `Google Chrome 88+` [点此访问 Chrome 官网](https://www.google.cn/chrome/)
- `Firefox 85+` [点此访问 Firefox 官网](https://www.firefox.com.cn/)

# Setting
请在 `config.php` 中找到以下内容:
```
const BDUSS = '①';
const STOKEN = '②';
const SVIP_BDUSS = '③';
const IsCheckPassword = ④;
const Password = '⑤';
const Footer = '';
const APP_ID = '⑥';
const DEBUG = ⑦;
//连接数据库
const USING_DB = ⑧;
const DbConfig = array(
"servername" => "⑨",
"username" => "⑩",
"password" => "⑪",
"dbname" => "⑫",
"dbtable" => "⑬"
);
```
- 【必填】请在①②填入`你自己的百度账号信息`*(SVIP也可)*,用于获取下载列表,获取 cookie 方法见 [PD官网](https://pandownload.com/faq/cookie.html)
- 【必填】在③中必须填入`SVIP的BDUSS`,用于获取下载链接,获取cookie方法同上。
- 请在④中选择是否需要密码(`TRUE`或者`FALSE`)
- 若开启了密码,请在⑤中设置是首页密码
- 在⑥中是获取文件的Dlink时使用的app_id
- 在⑦中是是否开启DEBUG调试模式
- 在⑧中是是否使用数据库,限制每日下载ip
- 在⑨-⑬是数据库设置

- 详细信息可见 `config.php` 的注释
(将在下一版本增加后台配置功能)
---
### 数据库设置
请在`MySQL`中导入`bdwp.sql`文件。
首先Clone项目或进入[Releases](https://github.com/yuantuo666/baiduwp-php/releases)下载项目文件。<br />
然后访问 `install.php` 文件并填写相关信息。<br />
如果使用数据库,则需要先点击 `检查数据库连接` 连接数据库,保证账号密码正确。<br />
最后点击提交即可。<br />

## Demo
[暂不开放](http://imwcr.cn/api/bdwp/)<br />
因站长学习紧张加上精力有限,演示站没有时间维护,故暂时关闭。

## New Changes
- 当前版本:`1.4.5`
- 更新日期:2021-02-08
- 当前版本:`1.4.6`
- 更新日期:2021-02-10
- 修改内容
- 由LC优化代码

Expand Down
2 changes: 0 additions & 2 deletions api.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
*
* 提供一些接口服务
*
* @version 1.4.5
*
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
* @link https://space.bilibili.com/88197958
Expand Down
2 changes: 0 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
*
* 请勿随意修改此文件!如需更改相关配置请到 config.php !
*
* @version 1.4.5
*
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
* @link https://space.bilibili.com/88197958
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* 此项目 GitHub 地址:https://github.com/yuantuo666/baiduwp-php
*
* @version 1.4.5
* @version 1.4.6
*
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
Expand Down Expand Up @@ -529,7 +529,7 @@ function getip()
$return = '<div class="form-group my-4"><input type="text" class="form-control" name="Password" placeholder="' . Language["PassWord"] . '"></div>';
if (isset($_SESSION["Password"])) {
if ($_SESSION["Password"] === Password) {
$return = '<div>'.Language["PassWordVerified"].'</div>';
$return = '<div>' . Language["PassWordVerified"] . '</div>';
}
}
echo $return;
Expand Down
13 changes: 7 additions & 6 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* 此项目 GitHub 地址:https://github.com/yuantuo666/baiduwp-php
*
* @version 1.4.5
* @version 1.4.6
*
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
Expand Down Expand Up @@ -130,24 +130,25 @@
</div>
<hr />
<h5 class="card-title">解析账号设置</h5>
<p>需要在此设置账号的 cookie ,获取 cookie 方法见 <a href="https://pandownload.com/faq/cookie.html">PD官网</a></p>
<div class="form-group row">
<label class="col-sm-2 col-form-label">普通账号BDUSS</label>
<div class="col-sm-10">
<input class="form-control" name="BDUSS">
<input class="form-control" name="BDUSS" placeholder="例:liMlp3bFN1NWpVM**********PYjItRlJhNFNTSn5rNW5vQ0FrVzRYRTkyWHBiQVFBQUFBJCQAAAAAAAAAAA……">
<small class="form-text text-muted">用来获取文件列表及信息,不需要SVIP也可。</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">普通账号STOKEN</label>
<div class="col-sm-10">
<input class="form-control" name="STOKEN">
<input class="form-control" name="STOKEN" placeholder="例:0c27e6ebdb50252b**********a8b44f4ba448d0d62bc0527eead328d491a613">
<small class="form-text text-muted">用来获取文件列表及信息,不需要SVIP也可。</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">超级会员账号BDUSS</label>
<div class="col-sm-10">
<input class="form-control" name="SVIP_BDUSS">
<input class="form-control" name="SVIP_BDUSS" placeholder="例:W4tanVHelU2VGpxb**********0ZTZlUm1saEVtYnpTWjByfmxheWwxRFRtNlphQVFBQUFBJCQAAAAAAAAAAA……">
<small class="form-text text-muted">用来获取文件告诉下载地址,必须为SVIP账号,否则将获取到限速地址。</small>
</div>
</div>
Expand Down Expand Up @@ -208,7 +209,7 @@
<a href="javascript:CheckMySQLConnect();" class="btn btn-primary">检查数据库连接</a>
</div>
<hr />

<p>此操作将会清空你设置的数据库。如果你曾经使用过本项目,请备份好数据后再点击提交。</p>
<a href="javascript:CheckForm();" class="btn btn-primary">提交</a>
<br><br>

Expand Down Expand Up @@ -340,7 +341,7 @@ function CheckForm() {
//已经获取到所需信息,先导入数据库,再写配置到config.php

//处理post数据
$Sitename = (!empty($POST["Sitename"])) ? $_POST["Sitename"] : "";
$Sitename = (!empty($_POST["Sitename"])) ? $_POST["Sitename"] : "";
$IsCheckPassword = (!empty($_POST["IsCheckPassword"])) ? $_POST["IsCheckPassword"] : "";
$Password = (!empty($_POST["Password"])) ? $_POST["Password"] : "";
$ADMIN_PASSWORD = (!empty($_POST["ADMIN_PASSWORD"])) ? $_POST["ADMIN_PASSWORD"] : "";
Expand Down
4 changes: 2 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 1.4.5
* @version 1.4.6
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
* @link https://space.bilibili.com/88197958
*/
const programVersion = '1.4.5';
const programVersion = '1.4.6';
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
16 changes: 8 additions & 8 deletions language.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
*
* 此项目 GitHub 地址:https://github.com/yuantuo666/baiduwp-php
*
* @version 1.4.5
*
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
* @link https://space.bilibili.com/88197958
Expand Down Expand Up @@ -65,15 +63,15 @@
<div class="alert alert-primary" role="alert">
<h5 class="alert-heading">提示</h5>
<hr />
<p class="card-text">因百度限制,需修改浏览器 User Agent 后下载。<br />
<p class="card-text">因百度限制,需修改浏览器 User Agent 后下载。你可以在下方选择你喜欢的方式进行下载。<br />
<div class="page-inner">
<section class="normal" id="section-">
<div id="IDM"><a class="anchor" href="#IDM"></a>
<h4>IDM(推荐)</h4>
</div>
<ol>
<li>选项 -> 下载 -> 手动添加任务时使用的用户代理(UA)-> 填入 <b>LogStatistic</b></li>
<li><b>右键复制下载链接</b>(直接点击 或 右键调用 IDM 将传入浏览器的 UA,将会导致下载失败),在 IDM 新建任务,粘贴链接即可下载。</li>
<li><b>右键复制下载链接</b>(如果 直接点击 或 右键调用IDM 将传入浏览器的 UA 导致下载失败),在 IDM 新建任务,粘贴链接即可下载。</li>
</ol>
<div id="ADM"><a class="anchor" href="#ADM"></a>
<h4>ADM Pro(Android推荐)</h4>
Expand Down Expand Up @@ -119,9 +117,10 @@
<ol>
<li>本项目与PanDownload无关。</li>
<li>本项目仅以学习为目的,不得用于其他用途。</li>
<li>当前项目版本:<?php echo programVersion; ?></li>
<li>当前项目版本:' . programVersion . '</li>
<li><a href="https://github.com/yuantuo666/baiduwp-php" target="_blank">Github仓库</a></li>
<li><a href="https://imwcr.cn/" target="_blank">Made by Yuan_Tuo</a></li>
<li>项目作者:<a href="https://imwcr.cn/" target="_blank">Yuan_Tuo</a></li>
<li>项目协作者:<a href="https://lcwebsite.cn/" target="_blank">LC</a></li>
</ol>
</section>
<script>
Expand Down Expand Up @@ -237,9 +236,10 @@
<ol>
<li>本项目与PanDownload无关。</li>
<li>本项目仅以学习为目的,不得用于其他用途。</li>
<li>当前项目版本:<?php echo programVersion; ?></li>
<li>当前项目版本:' . programVersion . '</li>
<li><a href="https://github.com/yuantuo666/baiduwp-php" target="_blank">Github仓库</a></li>
<li><a href="https://imwcr.cn/" target="_blank">Made by Yuan_Tuo</a></li>
<li>项目作者:<a href="https://imwcr.cn/" target="_blank">Yuan_Tuo</a></li>
<li>项目协作者:<a href="https://lcwebsite.cn/" target="_blank">LC</a></li>
</ol>
</section>
<script>
Expand Down
39 changes: 18 additions & 21 deletions settings.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

/**
* PanDownload 网页复刻版,PHP 语言版Setting文件
* PanDownload 网页复刻版,PHP 语言版Settings文件
*
* 设置及后台功能
*
* @version 1.4.5
* @version 1.4.6
*
* @author Yuan_Tuo <[email protected]>
* @link https://imwcr.cn/
Expand Down Expand Up @@ -191,22 +191,19 @@ function GetIPTablePage(string $page)
<meta name="referrer" content="same-origin" />
<meta name="author" content="Yuan_Tuo" />
<meta name="version" content="<?php echo programVersion; ?>" />
<title>Setting</title>
<title><?php echo Sitename; ?> - Settings</title>
<link rel="icon" href="favicon.ico" />
<link rel="stylesheet" href="static/index.css" />
<link rel="stylesheet" disabled id="ColorMode-Auto" href="static/colorMode/auto.css" />
<link rel="stylesheet" disabled id="ColorMode-Dark" href="static/colorMode/dark.css" />
<link rel="stylesheet" disabled id="ColorMode-Light" href="static/colorMode/light.css" />
<link rel="stylesheet" href="static/colorMode/index.css" />
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.2/css/bootstrap.min.css" />
<link rel="stylesheet" disabled id="ColorMode-Dark" href="https://cdn.jsdelivr.net/gh/vinorodrigues/[email protected]/dist/bootstrap-nightfall.css" />
<link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/5.8.1/css/all.min.css" />
<link rel="stylesheet" disabled id="Swal2-Dark" href="https://cdn.jsdelivr.net/npm/@sweetalert2/[email protected]/dark.min.css" />
<link rel="stylesheet" disabled id="Swal2-Light" href="https://cdn.jsdelivr.net/npm/@sweetalert2/[email protected]/default.min.css" />
<script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
<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="static/colorMode/index.js"></script>
<script src="static/color.js"></script>
</head>

<body>
Expand Down Expand Up @@ -238,7 +235,7 @@ function GetIPTablePage(string $page)
<nav>
<ol class="breadcrumb my-4">
<li class="breadcrumb-item"><a href="index.php">baiduwp-php</a></li>
<li class="breadcrumb-item"><a href="setting.php">后台管理</a></li>
<li class="breadcrumb-item"><a href="settings.php">后台管理</a></li>
<li class="breadcrumb-item">数据分析</li>
</ol>
</nav>
Expand Down Expand Up @@ -279,7 +276,7 @@ function GetIPTablePage(string $page)
<script>
function AnalyseLoadmore() {
newpage = Number($("#AnalyseTable").attr("page")) + 1;
$.get("setting.php?m=API&act=AnalyseGetTable&page=" + String(newpage), function(data, status) {
$.get("settings.php?m=API&act=AnalyseGetTable&page=" + String(newpage), function(data, status) {
if (status == "success") {
$("#AnalyseTable").append(data);
$("#AnalyseTable").attr("page", newpage);
Expand Down Expand Up @@ -346,7 +343,7 @@ function AnalyseLoadmore() {
<nav>
<ol class="breadcrumb my-4">
<li class="breadcrumb-item"><a href="index.php">baiduwp-php</a></li>
<li class="breadcrumb-item"><a href="setting.php">后台管理</a></li>
<li class="breadcrumb-item"><a href="settings.php">后台管理</a></li>
<li class="breadcrumb-item">会员账号</li>
</ol>
</nav>
Expand Down Expand Up @@ -413,7 +410,7 @@ function AnalyseLoadmore() {
<script>
function SvipLoadmore() {
newpage = Number($("#SvipTable").attr("page")) + 1;
$.get("setting.php?m=API&act=SvipGetTable&page=" + String(newpage), function(data, status) {
$.get("settings.php?m=API&act=SvipGetTable&page=" + String(newpage), function(data, status) {
if (status == "success") {
$("#SvipTable").append(data);
$("#SvipTable").attr("page", newpage);
Expand All @@ -422,7 +419,7 @@ function SvipLoadmore() {
}

function SettingFirstAccount(id) {
$.get("setting.php?m=API&act=SvipSettingFirstAccount&id=" + String(id), function(data, status) {
$.get("settings.php?m=API&act=SvipSettingFirstAccount&id=" + String(id), function(data, status) {
if (status == "success") {
var json = JSON.parse(data);
Swal.fire(json.msg);
Expand All @@ -434,7 +431,7 @@ function SettingFirstAccount(id) {
<br><br><br>
<!-- 新增会员数据 -->
<h5 class="card-title">新增会员数据</h5>
<form action="setting.php?m=svip" method="post">
<form action="settings.php?m=svip" method="post">
<div class="form-group">
<label>账号名称</label>
<input type="text" class="form-control form-control-sm" name="name">
Expand All @@ -452,7 +449,7 @@ function SettingFirstAccount(id) {
<!-- 新增会员数据 -->
<br><br>
<h5 class="card-title">批量导入svip</h5>
<form action="setting.php?m=svip" method="post">
<form action="settings.php?m=svip" method="post">
<div class="form-group">
<label>账号名称</label>
<input type="text" class="form-control form-control-sm" name="name">
Expand Down Expand Up @@ -490,7 +487,7 @@ function SettingFirstAccount(id) {
<nav>
<ol class="breadcrumb my-4">
<li class="breadcrumb-item"><a href="index.php">baiduwp-php</a></li>
<li class="breadcrumb-item"><a href="setting.php">后台管理</a></li>
<li class="breadcrumb-item"><a href="settings.php">后台管理</a></li>
<li class="breadcrumb-item">IP黑/白名单</li>
</ol>
</nav>
Expand Down Expand Up @@ -524,7 +521,7 @@ function SettingFirstAccount(id) {
<script>
function IPLoadmore() {
newpage = Number($("#IPTable").attr("page")) + 1;
$.get("setting.php?m=API&act=IPGetTable&page=" + String(newpage), function(data, status) {
$.get("settings.php?m=API&act=IPGetTable&page=" + String(newpage), function(data, status) {
if (status == "success") {
$("#IPTable").append(data);
$("#IPTable").attr("page", newpage);
Expand All @@ -535,7 +532,7 @@ function IPLoadmore() {
<br><br><br>
<!-- 新增IP -->
<h5 class="card-title">新增IP</h5>
<form action="setting.php?m=iplist" method="post">
<form action="settings.php?m=iplist" method="post">
<div class="form-group">
<label>IP地址</label>
<input type="text" class="form-control form-control-sm" name="ip">
Expand Down Expand Up @@ -573,7 +570,7 @@ function IPLoadmore() {
<nav>
<ol class="breadcrumb my-4">
<li class="breadcrumb-item"><a href="index.php">baiduwp-php</a></li>
<li class="breadcrumb-item"><a href="setting.php">后台管理</a></li>
<li class="breadcrumb-item"><a href="settings.php">后台管理</a></li>
<li class="breadcrumb-item">下载次数限制修改</li>
</ol>
</nav>
Expand All @@ -592,7 +589,7 @@ function IPLoadmore() {
<br><br><br>
<!-- 修改下载次数 -->
<h5 class="card-title">修改下载次数</h5>
<form action="setting.php?m=DownloadTimes" method="post">
<form action="settings.php?m=DownloadTimes" method="post">
<div class="form-group">
<label>下载次数</label>
<input type="text" class="form-control form-control-sm" name="DownloadTimes">
Expand All @@ -606,7 +603,7 @@ function IPLoadmore() {
<nav>
<ol class="breadcrumb my-4">
<li class="breadcrumb-item"><a href="index.php">baiduwp-php</a></li>
<li class="breadcrumb-item"><a href="setting.php">后台管理</a></li>
<li class="breadcrumb-item"><a href="settings.php">后台管理</a></li>
<li class="breadcrumb-item">概览</li>
</ol>
</nav>
Expand Down
Loading

0 comments on commit 17a9ed5

Please sign in to comment.