标准化、PHPDoc、基础页面

This commit is contained in:
筱锋xiao_lfeng 2023-05-26 23:55:35 +08:00
parent 8574981ee4
commit 868db25b5e
4 changed files with 62 additions and 8 deletions

View File

@ -7,6 +7,14 @@
/**
* 此页面为博客审核页面
* 用户发起博客友链提交后,在此页面进行审核
* <p>
* 审核由博主进行审核,该页面为提交内容以及表单处理,处理结果存入数据库并返回邮件给用户
*
* @author 筱锋xiao_lfeng
* @since v1.0.0-Alpha
* @version v1.0.0-Beta
* @var array $Json_Data 最终数据编译输出
* @var array $Array_ConfigData 配置文件
*/
@ -58,7 +66,11 @@
} else Normal::Output(100); // 通讯密钥错误
/**
* 正则表达式检查用户信息
*
* @return false|void 返回结果为错误Json否则返回false表示检查完成
* @author 筱锋xiao_lfeng
* @since v1.0.0-Alpha
*/
function DataCheck()
{

View File

@ -38,25 +38,41 @@
Normal::CustomOutput('Success', 200, '操作成功', $AResult_Blog['data']);
} else if ($AResult_Blog['output'] == 'EmptyResult') {
Normal::CustomOutput('EmptyResult', 200, '没有数据');
} else Normal::Output(301, null, "Blog");
} else {
Normal::Output(301, null, "Blog");
}
} else if ($GetData['type'] == 1) { // 特定数据查询(一定查询)
if (empty($GetData['search']) && empty($GetData['link'])) { // 查找数据库
$AResult_Blog = Sql::SELECT("SELECT * FROM `index`.xf_blog_link WHERE `name` = '{$GetData['search']}' OR `url` = '{$GetData['link']}' $Data_UserSee");
if ($AResult_Blog['output'] == 'Success') {
Normal::CustomOutput('Success', 200, '操作成功', $AResult_Blog['data']);
} else Normal::Output(301, null, "Blog");
} else Normal::Output(501);
} else {
Normal::Output(301, null, "Blog");
}
} else {
Normal::Output(501);
}
} else if ($GetData['type'] == 2) { // 模糊查询
if (!empty($GetData['search'])) {// 查询数据库
$AResult_Blog = Sql::SELECT("SELECT * FROM `index`.xf_blog_link WHERE `owner_email` LIKE '%{$GetData['search']}%' OR `name` LIKE '%{$GetData['search']}%' OR `url` LIKE '%{$GetData['search']}%' $Data_UserSee");
if ($AResult_Blog['output'] == 'Success') {
Normal::CustomOutput('Success', 200, '操作成功', $AResult_Blog['data']);
} else Normal::Output(301, null, "Blog");
} else Normal::Output(501);
} else {
Normal::Output(301, null, "Blog");
}
} else {
Normal::Output(501);
}
} else if ($GetData['type'] == 3) { // 需要审批对象
$AResult_Blog = Sql::SELECT("SELECT * FROM `index`.xf_blog_link WHERE `location`=0");
if ($AResult_Blog['output'] == 'Success') {
Normal::CustomOutput('Success', 200, '操作成功', $AResult_Blog['data']);
} else Normal::Output(301, null, "Blog");
} else Normal::Output(404);
} else Normal::Output(100);
} else {
Normal::Output(301, null, "Blog");
}
} else {
Normal::Output(404);
}
} else {
Normal::Output(100);
}

View File

@ -5,4 +5,15 @@
* https://www.x-lf.com/
*/
require dirname(__FILE__, 3) . "/class/Normal.php";
/**
* API首页
* <hr>
* 无特别说明
*
* @since v1.0.0-beta
* @version v1.0.0-beta
*/
Normal::Output(200);

View File

@ -4,3 +4,18 @@
* 开发开源遵循 MIT 许可,若需商用请联系开发者
* https://www.x-lf.com/
*/
?>
<!doctype html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
</body>
</html>