From 5f35e4cb012bb706d56ab0843b9b388d263341b7 Mon Sep 17 00:00:00 2001 From: tianya <8445295+llgoer@user.noreply.gitee.com> Date: Tue, 3 May 2022 23:28:35 +0800 Subject: [PATCH] Update customfields.func.php --- src/system/customfields.func.php | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/system/customfields.func.php b/src/system/customfields.func.php index 9dee089c..e7b3776b 100755 --- a/src/system/customfields.func.php +++ b/src/system/customfields.func.php @@ -68,7 +68,7 @@ function GetFormItem($ctag, $admintype = 'admin') foreach ($items as $v) { $v = trim($v); if ($v != '') { - $myformItem .= ($i == 0 ? " $v" : " $v"); + $myformItem .= ($i == 0 ? "
" : "
"); $i++; } } @@ -80,9 +80,9 @@ function GetFormItem($ctag, $admintype = 'admin') $v = trim($v); if ($v != '') { if ($admintype == 'membermodel') { - $myformItem .= ""; + $myformItem .= "
"; } else { - $myformItem .= " $v"; + $myformItem .= "
"; } } } @@ -99,10 +99,10 @@ function GetFormItem($ctag, $admintype = 'admin') $innertext = GetEditor($fieldname, $dfvalue, 360, 'Member', 'string'); } } else if ($fieldType == "multitext") { - $innertext = ""; + $innertext = ""; } else if ($fieldType == "datetime") { $nowtime = GetDateTimeMk(time()); - $innertext = ""; + $innertext = ""; } else if ($fieldType == 'img' || $fieldType == 'imgfile') { if ($admintype == 'diy') { $innertext = ""; @@ -123,7 +123,7 @@ function GetFormItem($ctag, $admintype = 'admin') } } else if ($fieldType == 'int' || $fieldType == 'float') { $dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : '0'); - $innertext = "(填写数值)"; + $innertext = "(填写数值)"; } else if ($fieldType == 'relation') { $dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : ''); $channel = ($ctag->GetAtt('channel') == "") ? "1" : $ctag->GetAtt('channel'); @@ -145,7 +145,7 @@ if(typeof SelectArcList === "undefined") { EOT; } else { $dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : ''); - $innertext = " + $innertext = " "; } $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); @@ -242,7 +242,7 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a } $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; - if (preg_match("/^http:\/\//i", $iurl) && $GLOBALS['cfg_isUrlOpen']) { + if (preg_match("/^(http|https):\/\//i", $iurl) && $GLOBALS['cfg_isUrlOpen']) { //远程图片 $reimgs = ''; if ($GLOBALS['cfg_isUrlOpen']) { @@ -352,7 +352,7 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') foreach ($items as $v) { $v = trim($v); if ($v == '') continue; - $myformItem .= ($fvalue == $v ? " $v" : " $v"); + $myformItem .= ($fvalue == $v ? "
" : "
"); } } $innertext = $myformItem; @@ -368,9 +368,9 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') continue; } if (in_array($v, $fvalues)) { - $myformItem .= " $v"; + $myformItem .= "
"; } else { - $myformItem .= " $v"; + $myformItem .= "
"; } } } @@ -402,10 +402,10 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') } $innertext = $myformItem; } else if ($ftype == "multitext") { - $innertext = ""; + $innertext = ""; } else if ($ftype == "datetime") { $nowtime = GetDateTimeMk($fvalue); - $innertext = ""; + $innertext = ""; } else if ($ftype == "img") { $ndtp = new DedeTagParse(); $ndtp->LoadSource($fvalue); @@ -416,18 +416,18 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '') $ntag = $ndtp->GetTag("img"); $fvalue = trim($ntag->GetInnerText()); } - $innertext = " "; + $innertext = " "; } else if ($ftype == "imgfile") { - $innertext = " "; + $innertext = " "; } else if ($ftype == "media") { - $innertext = " "; + $innertext = " "; } else if ($ftype == "addon") { - $innertext = " "; + $innertext = " "; } else if ($ftype == "int" || $ftype == "float") { - $innertext = "(填写数值)"; + $innertext = "(填写数值)"; } else if ($ftype == "relation") { $channel = ($ctag->GetAtt('channel') == "") ? "1" : $ctag->GetAtt('channel'); - $innertext = "
+ $innertext = "
"; if ($ctag->GetAtt('automake') == 1) { $innertext .= ""; @@ -444,7 +444,7 @@ if(typeof SelectArcList === "undefined") { EOT; } else { - $innertext = ""; + $innertext = ""; } $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); $formitem = str_replace('~form~', $innertext, $formitem);