This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* 请不要使用弱密码!否则后果自负! | ||
* 若只在局域网开放,则可根据个人喜好开启或关闭密码。 | ||
* | ||
* @version 1.3.1 | ||
* @version 1.3.3 | ||
* | ||
* @author Yuan_Tuo <[email protected]> | ||
* @link https://imwcr.cn/ | ||
|
@@ -22,9 +22,10 @@ | |
* @link https://lcwebsite.cn/ | ||
* @link https://space.bilibili.com/52618445 | ||
*/ | ||
define('programVersion', '1.3.3'); | ||
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禁止直接访问!"); | ||
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禁止直接访问!"); | ||
} | ||
|
||
define('BDUSS', ''); // 你的 SVIP BDUSS | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* | ||
* 请勿随意修改此文件!如需更改相关配置请到 config.php ! | ||
* | ||
* @version 1.3.1 | ||
* @version 1.3.3 | ||
* | ||
* @author Yuan_Tuo <[email protected]> | ||
* @link https://imwcr.cn/ | ||
|
@@ -17,8 +17,14 @@ | |
* @link https://space.bilibili.com/52618445 | ||
*/ | ||
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禁止直接访问!"); | ||
http_response_code(403); header('Content-Type: text/plain; charset=utf-8'); header('Refresh: 3;url=./'); define('init', true); | ||
if (file_exists('config.php')) { | ||
require('config.php'); | ||
die("HTTP 403 禁止访问!\r\n此文件是 PanDownload 网页复刻版 PHP 语言版项目版本 " . programVersion . " 的有关文件!\r\n禁止直接访问!"); | ||
} else { | ||
http_response_code(503); header('Refresh: 5;url=https://github.com/yuantuo666/baiduwp-php'); | ||
die("HTTP 503 服务不可用!\r\n缺少相关配置和定义文件!无法正常运行程序!\r\n请重新 Clone 项目并配置!\r\n将在五秒内跳转到 GitHub 储存库!"); | ||
} | ||
} | ||
|
||
// main | ||
|
@@ -98,15 +104,15 @@ function CheckPassword() { // 校验密码 | |
if (isset($_SESSION["Password"])) { | ||
if ($_SESSION["Password"] === Password) { | ||
echo (isset($_POST["dir"]) || isset($_SESSION["ShowAlert"])) ? '' | ||
: '<script>sweetAlert("重要提示","请勿将密码告诉他人!此项目仅供测试使用!\r\n——Yuan_Tuo","info");</script>'; | ||
: '<script>sweetAlert("重要提示","请勿将密码告诉他人!此项目仅供测试使用!","info");</script>'; | ||
$_SESSION['ShowAlert'] = true; return; | ||
} | ||
} | ||
} else { | ||
if ($_POST["Password"] === Password) { | ||
$_SESSION['Password'] = $_POST["Password"]; | ||
echo (isset($_POST["dir"]) || isset($_SESSION["ShowAlert"])) ? '' | ||
: '<script>sweetAlert("重要提示","请勿将密码告诉他人!此项目仅供测试使用!\r\n——Yuan_Tuo","info");</script>'; | ||
: '<script>sweetAlert("重要提示","请勿将密码告诉他人!此项目仅供测试使用!","info");</script>'; | ||
$_SESSION['ShowAlert'] = true; return; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,14 @@ | |
* | ||
* 功能描述:使用百度 SVIP 账号获取真实下载地址,与 Pandownload 原版无关。 | ||
* 本项目是依据 [baiduwp](https://github.com/TkzcM/baiduwp "baiduwp") 的 JavaScript 版本改写而来,仅供大家学习参考。 | ||
* | ||
* 希望在使用时能够保留导航栏的 Made by Yuan_Tuo 和 Optimized by LC,感谢! | ||
* | ||
* 请勿随意修改此文件!如需更改相关配置请到 config.php ! | ||
* | ||
* 此项目 GitHub 地址:https://github.com/yuantuo666/baiduwp-php | ||
* | ||
* @version 1.3.1 | ||
* @version 1.3.3 | ||
* | ||
* @author Yuan_Tuo <[email protected]> | ||
* @link https://imwcr.cn/ | ||
|
@@ -23,7 +24,6 @@ | |
// 导入配置和函数 | ||
session_start(); | ||
define('init', true); | ||
define('programVersion', '1.3.1'); | ||
if (file_exists('config.php') && file_exists('functions.php')) { | ||
require('config.php'); require('functions.php'); | ||
} else { | ||
|
@@ -237,4 +237,4 @@ | |
<?php } ?> | ||
</div> | ||
</body> | ||
</html> | ||
</html> |