<{if $setting.maxad}>
<{foreach from=$setting.maxad item=data key=key}> <{if $data.pic}>
<{/if}> <{/foreach}>

<{assign var="position" value=0}> <{counter start=0 assign="pos" print=false }> <{foreach from=$setting.maxad item=data key=key}> <{if $data.pic}> <{if $setting.bt.pos}> <{math equation="x * y" assign="position" x=$pos y=$setting.bt.pos}> <{/if}> <{if $data.alt and $setting.type!=1}> <{$data.alt}> <{/if}> <{counter assign="pos" print=false }> <{/if}> <{/foreach}>

<{/if}>