From 2f7fee69bbe007f0d66eba94fdc60888042af966 Mon Sep 17 00:00:00 2001 From: Wayne Date: Wed, 13 Mar 2024 11:13:34 +0800 Subject: [PATCH] =?UTF-8?q?subdomain=E5=8E=BB=E9=99=A4=E5=B0=BE=E9=83=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/homestay.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/back/homestay.php b/back/homestay.php index c8abb34..af218ab 100755 --- a/back/homestay.php +++ b/back/homestay.php @@ -207,17 +207,16 @@ if ($_REQUEST['act'] == 'edit') { if (strlen($_POST['domain'])) { if (strpos($_POST['domain'], $_CFG['cf_domain']) !== false) { $sub_domain = str_replace($_CFG['cf_domain'], '', $_POST['domain']); - // 如果sub_domain最後有.,則去掉 + // sub_domain是為.結束,是的話就去掉 if (substr($sub_domain, -1) == '.') { $sub_domain = substr($sub_domain, 0, -1); } - include_once(ROOT_PATH . 'back/includes/cls_cloudflare.php'); $cf_obj = new cloudflare; $ret = $cf_obj->update_domain($cf['cf_iden'], trim($sub_domain)); if (!$ret) { - // sys_msg('網域自動修改失敗,請重新操作',1, array(), false); - $cf_iden = 0; + sys_msg('網域自動修改失敗,請重新操作',1, array(), false); + // $cf_iden = 0; } else { $cf_iden = $ad_ret; } @@ -228,7 +227,7 @@ if ($_REQUEST['act'] == 'edit') { if (strlen($_REQUEST['domain'])) { if (strpos($_REQUEST['domain'], $_CFG['cf_domain']) !== false) { $sub_domain = str_replace($_CFG['cf_domain'], '', $_REQUEST['domain']); - // 如果sub_domain最後有.,則去掉 + // sub_domain是為.結束,是的話就去掉 if (substr($sub_domain, -1) == '.') { $sub_domain = substr($sub_domain, 0, -1); } @@ -236,8 +235,8 @@ if ($_REQUEST['act'] == 'edit') { $cf_obj = new cloudflare; $ad_ret = $cf_obj->add_domain(trim($sub_domain)); if (!$ad_ret) { - // sys_msg('網域自動新增失敗,請重新操作',1, array(), false); - $cf_iden = 0; + sys_msg('網域自動新增失敗,請重新操作',1, array(), false); + // $cf_iden = 0; } else { $cf_iden = $ad_ret; }