diff --git a/back/homestay.php b/back/homestay.php index ec99f0d..7d26193 100755 --- a/back/homestay.php +++ b/back/homestay.php @@ -261,7 +261,8 @@ elseif ($_REQUEST['act'] == 'update') $cf_obj = new cloudflare; $ret=$cf_obj->update_domain($cf['cf_iden'],trim($sub_domain)); if(!$ret){ - sys_msg('網域自動修改失敗,請重新操作',1, array(), false); + // sys_msg('網域自動修改失敗,請重新操作',1, array(), false); + $cf_iden=0; }else{ $cf_iden=$ad_ret; } @@ -278,7 +279,8 @@ elseif ($_REQUEST['act'] == 'update') $cf_obj = new cloudflare; $ad_ret=$cf_obj->add_domain(trim($sub_domain)); if(!$ad_ret){ - sys_msg('網域自動新增失敗,請重新操作',1, array(), false); + // sys_msg('網域自動新增失敗,請重新操作',1, array(), false); + $cf_iden=0; }else{ $cf_iden=$ad_ret; } diff --git a/back/includes/cls_cloudflare.php b/back/includes/cls_cloudflare.php index 5b1a21c..da36264 100755 --- a/back/includes/cls_cloudflare.php +++ b/back/includes/cls_cloudflare.php @@ -114,12 +114,11 @@ class cloudflare $t_result = curl_exec($ch); curl_close($ch); $result=json_decode($t_result,true); - print_r($result); + if($result['success']){ return $result['result']['id']; } - return false; - + return false; } function get_record($name){