From 868db25b5efb10a0e39c3aa7c860266c62ac111c Mon Sep 17 00:00:00 2001 From: XiaoLFeng Date: Fri, 26 May 2023 23:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E5=87=86=E5=8C=96=E3=80=81PHPDoc?= =?UTF-8?q?=E3=80=81=E5=9F=BA=E7=A1=80=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/blog/friends_link/approval/index.php | 12 +++++++ public/api/blog/friends_link/select/index.php | 32 ++++++++++++++----- public/api/index.php | 11 +++++++ public/index.php | 15 +++++++++ 4 files changed, 62 insertions(+), 8 deletions(-) diff --git a/public/api/blog/friends_link/approval/index.php b/public/api/blog/friends_link/approval/index.php index cd03c48..76c06e5 100644 --- a/public/api/blog/friends_link/approval/index.php +++ b/public/api/blog/friends_link/approval/index.php @@ -7,6 +7,14 @@ /** + * 此页面为博客审核页面 + * 用户发起博客友链提交后,在此页面进行审核 + *

+ * 审核由博主进行审核,该页面为提交内容以及表单处理,处理结果存入数据库并返回邮件给用户 + * + * @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() { diff --git a/public/api/blog/friends_link/select/index.php b/public/api/blog/friends_link/select/index.php index a1b0086..a4e487c 100644 --- a/public/api/blog/friends_link/select/index.php +++ b/public/api/blog/friends_link/select/index.php @@ -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); \ No newline at end of file + } else { + Normal::Output(301, null, "Blog"); + } + } else { + Normal::Output(404); + } +} else { + Normal::Output(100); +} \ No newline at end of file diff --git a/public/api/index.php b/public/api/index.php index 7061409..4144abc 100644 --- a/public/api/index.php +++ b/public/api/index.php @@ -5,4 +5,15 @@ * https://www.x-lf.com/ */ +require dirname(__FILE__, 3) . "/class/Normal.php"; +/** + * API首页 + *


+ * 无特别说明 + * + * @since v1.0.0-beta + * @version v1.0.0-beta + */ + +Normal::Output(200); \ No newline at end of file diff --git a/public/index.php b/public/index.php index c1c054f..7ae9295 100644 --- a/public/index.php +++ b/public/index.php @@ -4,3 +4,18 @@ * 开发开源遵循 MIT 许可,若需商用请联系开发者 * https://www.x-lf.com/ */ + +?> + + + + + + + Document + + + + +