| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656 |
- <?php
- namespace app\common\taglib;
- use think\template\TagLib;
- use think\Db;
- class Maccms extends Taglib {
- protected $tags = [
- 'link'=> ['attr'=>'order,by,type,not,start,num,cachetime'],
- 'area'=> ['attr'=>'order,start,num'],
- 'lang'=> ['attr'=>'order,start,num'],
- 'year'=> ['attr'=>'order,start,num'],
- 'class'=> ['attr'=>'order,start,num'],
- 'version'=> ['attr'=>'order,start,num'],
- 'state'=> ['attr'=>'order,start,num'],
- 'letter'=> ['attr'=>'order,start,num'],
- 'type' => ['attr' =>'order,by,start,num,id,ids,not,parent,flag,mid,format,cachetime'],
- 'comment'=>['attr' =>'order,by,start,num,paging,pageurl,id,pid,rid,mid,uid,half'],
- 'gbook'=>['attr' =>'order,by,start,num,paging,pageurl,rid,uid,half'],
- 'role'=>['attr' =>'order,by,start,num,paging,pageurl,id,ids,not,rid,actor,name,level,letter,half,timeadd,timehits,time,cachetime'],
- 'actor'=>['attr' =>'order,by,start,num,paging,pageurl,id,ids,not,area,sex,name,level,letter,type,typenot,starsign,blood,half,timeadd,timehits,time,cachetime'],
- 'topic' => ['attr' =>'order,by,start,num,id,ids,not,paging,pageurl,class,tag,half,timeadd,timehits,time,cachetime'],
- 'art' => ['attr' =>'order,by,start,num,id,ids,not,paging,pageurl,type,typenot,class,tag,level,letter,half,rel,timeadd,timehits,time,hitsmonth,hitsweek,hitsday,hits,cachetime'],
- 'vod' => ['attr' =>'order,by,start,num,id,ids,not,paging,pageurl,type,typenot,class,tag,area,lang,year,level,letter,half,rel,version,state,tv,weekday,timeadd,timehits,time,hitsmonth,hitsweek,hitsday,hits,isend,cachetime'],
- 'website'=>['attr' =>'order,by,start,num,paging,pageurl,id,ids,not,area,lang,name,level,letter,type,typenot,half,timeadd,timehits,time,cachetime'],
- 'foreach' => ['attr'=>'name,id,key'],
- 'for' => ['attr'=>'start,end,comparison,step,name'],
- ];
- public function tagFor($tag,$content)
- {
- if(empty($tag['start'])){
- $tag['start'] = 1;
- }
- if(empty($tag['end'])){
- $tag['end'] = 5;
- }
- if(empty($tag['comparison'])){
- $tag['comparison'] = 'elt';
- }
- if(empty($tag['step'])){
- $tag['step'] = 1;
- }
- if(empty($tag['name'])){
- $tag['name'] = 'i';
- }
- $parse='';
- $parse .= '{for start="'.$tag['start'].'" end="'.$tag['end'].'" comparison="'.$tag['comparison'].'" step="'.$tag['step'].'" name="'.$tag['name'].'"}';
- $parse .= $content;
- $parse .= '{/for}';
- return $parse;
- }
- public function tagForeach($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse='';
- $parse .= '{foreach name="'.$tag['name'].'" id="'.$tag['id'].'" key="'.$tag['key'].'"}';
- $parse .= $content;
- $parse .= '{/foreach}';
-
- return $parse;
- }
- public function tagArea($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Extend")->areaData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagLang($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Extend")->langData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagClass($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Extend")->classData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagYear($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Extend")->YearData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagVersion($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Extend")->versionData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagState($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Extend")->stateData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagLetter($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Extend")->letterData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagLink($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Link")->listCacheData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagType($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Type")->listCacheData($__TAG__);';
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagComment($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Comment")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagGbook($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Gbook")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagTopic($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Topic")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagActor($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Actor")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagRole($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Role")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagArt($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Art")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagVod($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Vod")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- public function tagWebsite($tag,$content)
- {
- if(empty($tag['id'])){
- $tag['id'] = 'vo';
- }
- if(empty($tag['key'])){
- $tag['key'] = 'key';
- }
- $parse = '<?php ';
- $parse .= '$__TAG__ = \'' . json_encode($tag) . '\';';
- $parse .= '$__LIST__ = model("Website")->listCacheData($__TAG__);';
- if($tag['paging']=='yes'){
- $parse .= '$__PAGING__ = mac_page_param($__LIST__[\'total\'],$__LIST__[\'limit\'],$__LIST__[\'page\'],$__LIST__[\'pageurl\'],$__LIST__[\'half\']);';
- }
- $parse .= ' ?>';
- $parse .= '{volist name="__LIST__[\'list\']" id="'.$tag['id'].'" key="'.$tag['key'].'"';
- if(!empty($tag['offset'])){
- $parse .= ' offset="'.$tag['offset'].'"';
- }
- if(!empty($tag['length'])){
- $parse .= ' length="'.$tag['length'].'"';
- }
- if(!empty($tag['mod'])){
- $parse .= ' mod="'.$tag['mod'].'"';
- }
- if(!empty($tag['empty'])){
- $parse .= ' empty="'.$tag['empty'].'"';
- }
- $parse .= '}';
- $parse .= $content;
- $parse .= '{/volist}';
- return $parse;
- }
- }
|