From 183aa5d89332361c080f9e8bd7102103175f893e Mon Sep 17 00:00:00 2001 From: 131 Date: Thu, 20 Jun 2019 17:31:37 +0800 Subject: [PATCH] English v0.2.3 --- README.md | 10 ++++----- add_domain.php | 6 +++--- auth.php | 8 +++---- config.php | 6 +++--- delete_domain.php | 6 +++--- domains.php | 36 ++++++++++++++++---------------- edit_record.php | 24 ++++++++++----------- header.php | 4 ++-- index.php | 10 ++++----- manage_domain.php | 53 ++++++++++++++++++++++------------------------- 10 files changed, 80 insertions(+), 83 deletions(-) diff --git a/README.md b/README.md index d6c89cd..19e5d48 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # CFPMP Cloudflare Partner Management Panel -打开config.php,根据里面的注释进行设置后即可使用 +Open config.php and edit it -## 功能 -* CNAME接入 +## Functions +* CNAME * reCAPTCHA -* 设置回源地址为IP(基于sslip.io)(默认关闭此功能) +* Set original address as IP(Based on sslip.io)(Close by default) -可用示例:[https://cf.yuzu.im/](https://cf.yuzu.im/) +Demo: [https://cf.yuzu.im/](https://cf.yuzu.im/) diff --git a/add_domain.php b/add_domain.php index e60dcab..e3a972d 100644 --- a/add_domain.php +++ b/add_domain.php @@ -10,13 +10,13 @@ function msg($s){ } if (empty($_POST["domain"])){ - msg("域名不能为空"); + msg("Domain name mustn't be empty."); } $r=$cloudflare->zone_set($_POST["domain"],$_POST["domain"],"www:".$_POST["domain"]); if ($r["result"]=="success"){ - msg("添加成功"); + msg("Success"); }else{ - msg("添加失败:".$r["msg"]); + msg("Error: ".$r["msg"]); } \ No newline at end of file diff --git a/auth.php b/auth.php index bcdcc3c..1471580 100644 --- a/auth.php +++ b/auth.php @@ -14,10 +14,10 @@ function msg($s){ { if (!($cloudflare->reCAPTCHA($_POST["g-recaptcha-response"]))) { - msg("请完成验证码"); + msg("Please complete the captcha."); } }else{ - msg("请完成验证码"); + msg("Please complete the captcha."); } } @@ -30,8 +30,8 @@ function msg($s){ $_SESSION["email"]=$r["response"]["cloudflare_email"]; header("Location: domains.php"); }else{ - msg("登陆 / 注册失败:".$r["msg"]); + msg("Failed to sign in/up: ".$r["msg"]); } }else{ - msg("用户名和密码不能为空"); + msg("Username and password mustn't be empty."); } \ No newline at end of file diff --git a/config.php b/config.php index a1bccde..1869d55 100644 --- a/config.php +++ b/config.php @@ -3,13 +3,13 @@ // Cloudflare Partners host key define("HOST_KEY",""); -// 站点名称 +// Site name define("SITE_NAME",""); -// reCAPTCHA配置 +// reCAPTCHA define("Enable_reCAPTCHA",false); define("reCAPTCHA_Site",""); define("reCAPTCHA_Secret",""); -//A记录解析(基于sslip.io) +//A Record (Based on sslip.io) define("Enable_A_Record",false); \ No newline at end of file diff --git a/delete_domain.php b/delete_domain.php index 8ec143d..41b3d22 100644 --- a/delete_domain.php +++ b/delete_domain.php @@ -10,13 +10,13 @@ function msg($s){ } if (empty($_POST["domain"])){ - msg("域名不能为空"); + msg("Domain name mustn't be empty."); } $r=$cloudflare->zone_delete($_POST["domain"]); if ($r["result"]=="success"){ - msg("删除成功"); + msg("Deleted successfully."); }else{ - msg("删除失败:".$r["msg"]); + msg("Failed to delete: ".$r["msg"]); } \ No newline at end of file diff --git a/domains.php b/domains.php index 62ea686..5bdd6cd 100644 --- a/domains.php +++ b/domains.php @@ -20,13 +20,13 @@ Cloudflare Partners : > - 域名管理 + Domains Management

. - 登出 + Sign out
@@ -34,7 +34,7 @@
- +
@@ -43,7 +43,7 @@ - + @@ -54,8 +54,8 @@ $output.=' - - + + '; } @@ -66,11 +66,11 @@ -

查询失败: +

Failed to fetch domains: -

无域名,赶紧添加一个吧!

+

No domains.

@@ -82,33 +82,33 @@
-
添加域名
+
Add domain
- +
- - + +
-
删除域名
+
Delete domain
- 你确定要删除域名 + Are you sure you want to delete domain - 吗? + ?
- - + +
@@ -122,7 +122,7 @@ ?>
- +
diff --git a/edit_record.php b/edit_record.php index 7daebf9..38e7bb8 100644 --- a/edit_record.php +++ b/edit_record.php @@ -10,28 +10,28 @@ function msg($s){ } if (empty($_POST["domain"])){ - $_SESSION["msg"]="域名不能为空"; + $_SESSION["msg"]="Domain name mustn't be empty."; header("Location: domains.php"); exit(0); } if (empty($_POST["action"])){ - msg("操作不存在"); + msg("Unknown action."); } if (empty($_POST["record"])){ - msg("记录不能为空"); + msg("Record mustn't be empty."); } $re=$cloudflare->zone_lookup($_POST["domain"]); if ($re["result"]!="success"){ - msg("操作失败:".$re["msg"]); + msg("Error: ".$re["msg"]); } if ($re["response"]["zone_exists"]!=true){ - msg("该域名未在Cloudflare接入"); + msg("This domain isn't managed by Cloudflare."); } if ($re["response"]["zone_hosted"]!=true){ - msg("该域名未在".SITE_NAME."接入"); + msg("This domain isn't managed by ".SITE_NAME."."); } $r=$cloudflare->remove_zone_name($re["response"]["zone_name"],$re["response"]); @@ -44,12 +44,12 @@ function msg($s){ $result=$cloudflare->update_record($r["zone_name"],$r["hosted_cnames"]); if ($result["result"]=="success") { - msg("删除成功"); + msg("Deleted successfully."); }else{ - msg("删除失败:".$result["msg"]); + msg("Failed to delete: ".$result["msg"]); } }else{ - msg("记录不存在"); + msg("This record isn't existed."); } }elseif($_POST["action"]=="edit") { @@ -59,11 +59,11 @@ function msg($s){ $result=$cloudflare->update_record($r["zone_name"],$r["hosted_cnames"]); if ($result["result"]=="success") { - msg("更新成功"); + msg("Updated successfully."); }else{ - msg("更新失败:".$result["msg"]); + msg("Failed to update: ".$result["msg"]); } }else{ - msg("缺少参数"); + msg("Missing parameters."); } } diff --git a/header.php b/header.php index d265540..baa4b9b 100644 --- a/header.php +++ b/header.php @@ -9,8 +9,8 @@ - - + + diff --git a/index.php b/index.php index 36fa587..51980e3 100644 --- a/index.php +++ b/index.php @@ -26,17 +26,17 @@
-

登入 +

Sign in

- +
- +
@@ -46,7 +46,7 @@
- +
@@ -64,7 +64,7 @@
- +
diff --git a/manage_domain.php b/manage_domain.php index 6befac5..da13c23 100644 --- a/manage_domain.php +++ b/manage_domain.php @@ -12,21 +12,21 @@ function msg($s){ if (empty($_GET["domain"])) { - msg("域名不能为空"); + msg("Domain name mustn't be empty."); } $re=$cloudflare->zone_lookup($_GET["domain"]); if ($re["result"]!="success") { - msg("查询失败:".$re["msg"]); + msg("Failed to fetch data: ".$re["msg"]); } if ($re["response"]["zone_exists"]!=true) { - msg("该域名未在Cloudflare接入"); + msg("This domain isn't managed by Cloudflare."); } if ($re["response"]["zone_hosted"]!=true) { - msg("该域名未在".SITE_NAME."接入"); + msg("This domain isn't managed by ".SITE_NAME."."); } $r=$cloudflare->remove_zone_name($re["response"]["zone_name"],$re["response"]); @@ -43,7 +43,7 @@ function msg($s){ Cloudflare Partners : > - 域名管理 > + Domain Management > @@ -52,7 +52,7 @@ function msg($s){
. - 登出 + Sign out
@@ -65,9 +65,9 @@ function msg($s){ - - - + + + @@ -86,7 +86,7 @@ function msg($s){ '
域名Domain
'.$value.'管理删除ManageDelete
记录CNAME记录回源地址RecordCNAME RecordOriginal address
- + +
-
修改记录
+
Edit record
" name="domain" />
- +
- +
- - + +
@@ -173,7 +170,7 @@ function delete_record(record) { document.getElementById("delete_record2").inner } function add_record(){ - document.getElementById("edit_record_title").innerHTML = "添加记录"; + document.getElementById("edit_record_title").innerHTML = "Add record"; document.getElementById("edit_record1").value = ""; document.getElementById("edit_record2").value = ""; mdui.updateTextFields(); @@ -184,7 +181,7 @@ function add_record(){ } function edit_record(record,value){ - document.getElementById("edit_record_title").innerHTML = "修改记录"; + document.getElementById("edit_record_title").innerHTML = "Edit record"; document.getElementById("edit_record1").value = record; document.getElementById("edit_record2").value = value; mdui.updateTextFields(); @@ -205,7 +202,7 @@ function edit_record(record,value){ ?>
- +