diff --git a/src/system/common.func.php b/src/system/common.func.php index 4e952c71..f637fb32 100755 --- a/src/system/common.func.php +++ b/src/system/common.func.php @@ -527,10 +527,10 @@ function GetUpdateSQL() fclose($fp); return $result; } -/*会员中心调用默认主题模板*/ -if (!function_exists('pasterTempletDiy')) { +/*会员中心调用默认主题模板*/ +if (!function_exists('obtaintheme')) { require_once DEDEINC."/archive/partview.class.php"; - function pasterTempletDiy($path) + function obtaintheme($path) { global $cfg_basedir, $cfg_templets_dir, $cfg_df_style; $tmpfile = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style.'/'.$path; @@ -539,9 +539,9 @@ if (!function_exists('pasterTempletDiy')) { $dtp->Display(); } } -//标签调用标签[field:id function='GetMyTags(@me,2)'/]2表示调用文档2个标签 -if (!function_exists('GetMyTags')) { - function GetMyTags($aid, $num=3) +//标签调用[field:id function='obtaintags(@me,3)'/]3表示调用文档3个标签 +if (!function_exists('obtaintags')) { + function obtaintags($aid, $num = 3) { global $dsql, $cfg_cmspath; $tags = ''; @@ -549,15 +549,32 @@ if (!function_exists('GetMyTags')) { $dsql->Execute('tag',$query); while($row = $dsql->GetArray('tag')) { $link = $cfg_cmspath."/apps/tags.php?/{$row['tid']}"; - $tags.= ($tags==''?"{$row['tag']}" : "{$row['tag']}"); + $tags .= ($tags==''?"{$row['tag']}" : "{$row['tag']}"); } return $tags; } } -//联动单筛选标签{dede:php}AddFilter(模型id,类型,'字段1,字段2');{/dede:php}类型对应以下case数值 +//提取文档多图片[field:body function='obtainimgs(@me,3)'/]3表示调用文档3张图片 +if (!function_exists('obtainimgs')) { + function obtainimgs($string, $num) + { + preg_match_all("/]*)\s*src=('|\")([^'\"]+)('|\")/", $string, $matches); + $imgsrc_arr = array_unique($matches[3]); + $count = count($imgsrc_arr); + $i = 0; + foreach($imgsrc_arr as $imgsrc) + { + if ($i == $num) break; + $result .= ""; + $i++; + } + return $result; + } +} +//联动单筛选{dede:php}AddFilter(模型id,类型,'字段1,字段2');{/dede:php}类型有三种,对应以下case值 function litimgurls($imgid = 0) { - global $lit_imglist, $dsql; + global $dsql, $lit_imglist; $row = $dsql->GetOne("SELECT c.addtable FROM `#@__archives` AS a LEFT JOIN `#@__channeltype` AS c ON a.channel=c.id WHERE a.id='$imgid'"); $addtable = trim($row['addtable']); $row = $dsql->GetOne("SELECT imgurls FROM `$addtable` WHERE aid='$imgid'"); @@ -586,7 +603,7 @@ function string_filter($str, $stype = "inject") } return $str; } -//联动单筛选发布三种类型 +//联动单筛选三种类型显示 function AddFilter($channelid, $type = 1, $fieldsnamef = '', $defaulttid = 0, $toptid = 0, $loadtype = 'autofield') { global $tid, $dsql, $id, $aid; diff --git a/src/theme/apps/download_links.htm b/src/theme/apps/download_links.htm index 125ce5ff..23aecb7a 100644 --- a/src/theme/apps/download_links.htm +++ b/src/theme/apps/download_links.htm @@ -10,7 +10,7 @@ - +
@@ -30,6 +30,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/flink_add.htm b/src/theme/apps/flink_add.htm index 0ca83786..7c79ff69 100644 --- a/src/theme/apps/flink_add.htm +++ b/src/theme/apps/flink_add.htm @@ -10,7 +10,7 @@ - +
@@ -77,6 +77,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/flink_list.htm b/src/theme/apps/flink_list.htm index ae42b885..8091b69a 100644 --- a/src/theme/apps/flink_list.htm +++ b/src/theme/apps/flink_list.htm @@ -10,7 +10,7 @@ - +
@@ -45,6 +45,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/heightsearch.htm b/src/theme/apps/heightsearch.htm index d5c4ec55..e36ccc03 100644 --- a/src/theme/apps/heightsearch.htm +++ b/src/theme/apps/heightsearch.htm @@ -10,7 +10,7 @@ - +
@@ -103,6 +103,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/list_diyform.htm b/src/theme/apps/list_diyform.htm index 13457b1e..0588aca2 100644 --- a/src/theme/apps/list_diyform.htm +++ b/src/theme/apps/list_diyform.htm @@ -10,7 +10,7 @@ - +
@@ -42,6 +42,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/post_diyform.htm b/src/theme/apps/post_diyform.htm index fb3a9eed..1ce6dd89 100644 --- a/src/theme/apps/post_diyform.htm +++ b/src/theme/apps/post_diyform.htm @@ -15,7 +15,7 @@ - +
@@ -43,6 +43,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/recommend.htm b/src/theme/apps/recommend.htm index 030757ec..2e3a5bde 100644 --- a/src/theme/apps/recommend.htm +++ b/src/theme/apps/recommend.htm @@ -10,7 +10,7 @@ - +
@@ -42,6 +42,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/showphoto.htm b/src/theme/apps/showphoto.htm index c6b14653..77560bc1 100644 --- a/src/theme/apps/showphoto.htm +++ b/src/theme/apps/showphoto.htm @@ -10,7 +10,7 @@ - +
@@ -31,6 +31,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/view_diyform.htm b/src/theme/apps/view_diyform.htm index ed3be722..ada02e2c 100644 --- a/src/theme/apps/view_diyform.htm +++ b/src/theme/apps/view_diyform.htm @@ -10,7 +10,7 @@ - +
@@ -37,6 +37,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/view_msg.htm b/src/theme/apps/view_msg.htm index 05c15bbf..634b9712 100644 --- a/src/theme/apps/view_msg.htm +++ b/src/theme/apps/view_msg.htm @@ -10,7 +10,7 @@ - +
@@ -39,6 +39,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/view_msg_catalog.htm b/src/theme/apps/view_msg_catalog.htm index 366f056d..ac3cf03e 100644 --- a/src/theme/apps/view_msg_catalog.htm +++ b/src/theme/apps/view_msg_catalog.htm @@ -10,7 +10,7 @@ - +
@@ -35,6 +35,6 @@
- + \ No newline at end of file diff --git a/src/theme/apps/vote.htm b/src/theme/apps/vote.htm index a39913c7..f18ac34f 100644 --- a/src/theme/apps/vote.htm +++ b/src/theme/apps/vote.htm @@ -10,7 +10,7 @@ - +
@@ -29,6 +29,6 @@
- + \ No newline at end of file diff --git a/src/user/templets/album_add.htm b/src/user/templets/album_add.htm index 7d677704..7f93b5a3 100755 --- a/src/user/templets/album_add.htm +++ b/src/user/templets/album_add.htm @@ -13,7 +13,7 @@ - +
@@ -100,7 +100,7 @@
- + \ No newline at end of file diff --git a/src/user/templets/album_edit.htm b/src/user/templets/album_edit.htm index 8057da61..7b21747a 100755 --- a/src/user/templets/album_edit.htm +++ b/src/user/templets/album_edit.htm @@ -13,7 +13,7 @@ - +
@@ -127,7 +127,7 @@
- + diff --git a/src/user/templets/archives_add.htm b/src/user/templets/archives_add.htm index 91bd75b9..1242ad51 100755 --- a/src/user/templets/archives_add.htm +++ b/src/user/templets/archives_add.htm @@ -12,7 +12,7 @@ - +
@@ -74,7 +74,7 @@
- + \ No newline at end of file diff --git a/src/user/templets/archives_edit.htm b/src/user/templets/archives_edit.htm index 3dd93d37..a378aab4 100755 --- a/src/user/templets/archives_edit.htm +++ b/src/user/templets/archives_edit.htm @@ -12,7 +12,7 @@ - +
@@ -73,7 +73,7 @@
- + \ No newline at end of file diff --git a/src/user/templets/archives_sg_add.htm b/src/user/templets/archives_sg_add.htm index 7bfdc83a..525e683f 100755 --- a/src/user/templets/archives_sg_add.htm +++ b/src/user/templets/archives_sg_add.htm @@ -12,7 +12,7 @@ - +
@@ -70,7 +70,7 @@
- + \ No newline at end of file diff --git a/src/user/templets/archives_sg_edit.htm b/src/user/templets/archives_sg_edit.htm index d7772f56..e3d03ee8 100755 --- a/src/user/templets/archives_sg_edit.htm +++ b/src/user/templets/archives_sg_edit.htm @@ -12,7 +12,7 @@ - +
@@ -69,7 +69,7 @@
- + \ No newline at end of file diff --git a/src/user/templets/article_add.htm b/src/user/templets/article_add.htm index c5d4d364..49ed4590 100755 --- a/src/user/templets/article_add.htm +++ b/src/user/templets/article_add.htm @@ -12,7 +12,7 @@ - +
@@ -78,7 +78,7 @@
- + \ No newline at end of file diff --git a/src/user/templets/article_edit.htm b/src/user/templets/article_edit.htm index 430a37eb..f1fcd364 100755 --- a/src/user/templets/article_edit.htm +++ b/src/user/templets/article_edit.htm @@ -12,7 +12,7 @@ - +
@@ -81,7 +81,7 @@
- + \ No newline at end of file diff --git a/src/user/templets/buy.htm b/src/user/templets/buy.htm index 8c4aa13b..6f9cfd1e 100755 --- a/src/user/templets/buy.htm +++ b/src/user/templets/buy.htm @@ -11,7 +11,7 @@ - +
@@ -110,6 +110,6 @@
- + \ No newline at end of file diff --git a/src/user/templets/buy_action_payment.htm b/src/user/templets/buy_action_payment.htm index cf81584c..db3c7d54 100755 --- a/src/user/templets/buy_action_payment.htm +++ b/src/user/templets/buy_action_payment.htm @@ -11,7 +11,7 @@ - +
@@ -75,6 +75,6 @@
- + \ No newline at end of file diff --git a/src/user/templets/content_list.htm b/src/user/templets/content_list.htm index 629c4989..17611746 100755 --- a/src/user/templets/content_list.htm +++ b/src/user/templets/content_list.htm @@ -11,7 +11,7 @@ - +
- + - +
- + - +
- + - +
- + \ No newline at end of file diff --git a/src/user/templets/login.htm b/src/user/templets/login.htm index ce5478b0..81279ba2 100755 --- a/src/user/templets/login.htm +++ b/src/user/templets/login.htm @@ -12,7 +12,7 @@ - +
@@ -48,6 +48,6 @@
- + \ No newline at end of file diff --git a/src/user/templets/mypay.htm b/src/user/templets/mypay.htm index 0f4161e4..965eab28 100755 --- a/src/user/templets/mypay.htm +++ b/src/user/templets/mypay.htm @@ -11,7 +11,7 @@ - +
- + - +
- + \ No newline at end of file diff --git a/src/user/templets/operation.htm b/src/user/templets/operation.htm index 626155b6..ad872509 100755 --- a/src/user/templets/operation.htm +++ b/src/user/templets/operation.htm @@ -11,7 +11,7 @@ - +
- + - +
- + - +
@@ -54,7 +54,7 @@
- + - +
@@ -49,7 +49,7 @@
- + - +
@@ -46,6 +46,6 @@
- + \ No newline at end of file diff --git a/src/user/templets/resetpassword3.htm b/src/user/templets/resetpassword3.htm index d56dc1a8..ad88a4c1 100755 --- a/src/user/templets/resetpassword3.htm +++ b/src/user/templets/resetpassword3.htm @@ -11,7 +11,7 @@ - +
@@ -40,6 +40,6 @@
- + \ No newline at end of file diff --git a/src/user/templets/soft_add.htm b/src/user/templets/soft_add.htm index 2ade5cf8..878c7391 100755 --- a/src/user/templets/soft_add.htm +++ b/src/user/templets/soft_add.htm @@ -12,7 +12,7 @@ - +
@@ -184,7 +184,7 @@
- + - +
@@ -181,7 +181,7 @@
- +