Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.
/ CFPMP Public archive

Commit 8c0b4a9

Browse files
committed
v0.1.1
Fixed : Issue #1 Thanks @myitmx
1 parent bb8db21 commit 8c0b4a9

File tree

9 files changed

+24
-19
lines changed

9 files changed

+24
-19
lines changed

add_domain.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
include_once("cf.class.php");
33

4-
CF::is_login();
4+
$cloudflare->is_login();
55

66
function msg($s){
77
$_SESSION["msg"]=$s;
@@ -13,7 +13,7 @@ function msg($s){
1313
msg("域名不能为空");
1414
}
1515

16-
$r=CF::zone_set($_POST["domain"],$_POST["domain"],"www:".$_POST["domain"]);
16+
$r=$cloudflare->zone_set($_POST["domain"],$_POST["domain"],"www:".$_POST["domain"]);
1717

1818
if ($r["result"]=="success"){
1919
msg("添加成功");

auth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function msg($s){
1212
{
1313
if (!empty($_POST["g-recaptcha-response"]))
1414
{
15-
if (!(CF::reCAPTCHA($_POST["g-recaptcha-response"])))
15+
if (!($cloudflare->reCAPTCHA($_POST["g-recaptcha-response"])))
1616
{
1717
msg("请完成验证码");
1818
}
@@ -23,7 +23,7 @@ function msg($s){
2323

2424
if ((!empty($_POST["email"]))&&(!empty($_POST["password"])))
2525
{
26-
$r=CF::login($_POST["email"],$_POST["password"]);
26+
$r=$cloudflare->login($_POST["email"],$_POST["password"]);
2727
if ($r["result"]=="success")
2828
{
2929
$_SESSION["user_key"]=$r["response"]["user_key"];

cf.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,6 @@ public function reCAPTCHA($response){
134134
return false;
135135
}
136136
}
137-
}
137+
}
138+
139+
$cloudflare=new CF();

delete_domain.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
include_once("cf.class.php");
33

4-
CF::is_login();
4+
$cloudflare->is_login();
55

66
function msg($s){
77
$_SESSION["msg"]=$s;
@@ -13,7 +13,7 @@ function msg($s){
1313
msg("域名不能为空");
1414
}
1515

16-
$r=CF::zone_delete($_POST["domain"]);
16+
$r=$cloudflare->zone_delete($_POST["domain"]);
1717

1818
if ($r["result"]=="success"){
1919
msg("删除成功");

domains.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
include_once("cf.class.php");
44

5-
CF::is_login();
5+
$cloudflare->is_login();
66

7-
$r=CF::user_lookup();
7+
$r=$cloudflare->user_lookup();
88

99
include_once("header.php");
1010
?>

edit_record.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
include_once("cf.class.php");
33

4-
CF::is_login();
4+
$cloudflare->is_login();
55

66
function msg($s){
77
$_SESSION["mng_msg"]=$s;
@@ -23,7 +23,7 @@ function msg($s){
2323
msg("记录不能为空");
2424
}
2525

26-
$re=CF::zone_lookup($_POST["domain"]);
26+
$re=$cloudflare->zone_lookup($_POST["domain"]);
2727
if ($re["result"]!="success"){
2828
msg("操作失败:".$re["msg"]);
2929
}
@@ -34,14 +34,14 @@ function msg($s){
3434
msg("该域名未在".SITE_NAME."接入");
3535
}
3636

37-
$r=CF::remove_zone_name($re["response"]["zone_name"],$re["response"]);
37+
$r=$cloudflare->remove_zone_name($re["response"]["zone_name"],$re["response"]);
3838

3939
if ($_POST["action"]=="delete")
4040
{
4141
if (!empty($r["hosted_cnames"][$_POST["record"]]))
4242
{
4343
unset($r["hosted_cnames"][$_POST["record"]]);
44-
$result=CF::update_record($r["zone_name"],$r["hosted_cnames"]);
44+
$result=$cloudflare->update_record($r["zone_name"],$r["hosted_cnames"]);
4545
if ($result["result"]=="success")
4646
{
4747
msg("删除成功");
@@ -56,7 +56,7 @@ function msg($s){
5656
if (!empty($_POST["value"]))
5757
{
5858
$r["hosted_cnames"][$_POST["record"]]=$_POST["value"];
59-
$result=CF::update_record($r["zone_name"],$r["hosted_cnames"]);
59+
$result=$cloudflare->update_record($r["zone_name"],$r["hosted_cnames"]);
6060
if ($result["result"]=="success")
6161
{
6262
msg("更新成功");

footer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</a>.</span>
88
<br />
99
<span>
10-
<a href="https://github.com/Netrvin/CFPMP" target="_blank">CFPMP</a> v0.1.0</span>
10+
<a href="https://github.com/Netrvin/CFPMP" target="_blank">CFPMP</a> v0.1.1</span>
1111
</center>
1212
</div>
1313
</body>

index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
include_once("cf.class.php");
44

5-
CF::logout();
5+
$cloudflare->logout();
66

77
include_once("header.php");
88
?>

manage_domain.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
include_once("cf.class.php");
44

5-
CF::is_login();
5+
$cloudflare->is_login();
66

77
function msg($s){
88
$_SESSION["msg"]=$s;
@@ -15,7 +15,7 @@ function msg($s){
1515
msg("域名不能为空");
1616
}
1717

18-
$re=CF::zone_lookup($_GET["domain"]);
18+
$re=$cloudflare->zone_lookup($_GET["domain"]);
1919
if ($re["result"]!="success")
2020
{
2121
msg("查询失败:".$re["msg"]);
@@ -29,7 +29,7 @@ function msg($s){
2929
msg("该域名未在".SITE_NAME."接入");
3030
}
3131

32-
$r=CF::remove_zone_name($re["response"]["zone_name"],$re["response"]);
32+
$r=$cloudflare->remove_zone_name($re["response"]["zone_name"],$re["response"]);
3333

3434
include_once("header.php");
3535
?>
@@ -107,6 +107,9 @@ function msg($s){
107107
<p>
108108
注 (2):根据先前的测试(2018-02-15),目前启用Universal SSL无需再专门配置CNAME记录,只需配置所需接入的域名的CNAME记录。证书将在24小时内下发。一切以实际情况为准
109109
</p>
110+
<p>
111+
注 (3):回源地址以<strong>CNAME</strong>形式填写,暂时不支持<strong>A</strong>记录和<strong>AAAA</strong>记录
112+
</p>
110113
</div>
111114
</div>
112115
</div>

0 commit comments

Comments
 (0)