{php} $iconRows = []; if (!empty($tplconfig['theme']['ad_slots']['icon1']['ad_data']) && is_array($tplconfig['theme']['ad_slots']['icon1']['ad_data'])) { foreach ($tplconfig['theme']['ad_slots']['icon1']['ad_data'] as $row) { if (!is_array($row)) { continue; } if (strtolower(trim((string)($row['active'] ?? 'off'))) !== 'on') { continue; } $expireAt = isset($row['date']) ? trim((string)$row['date']) : ''; if ($expireAt !== '') { $expireTs = strtotime($expireAt); if ($expireTs !== false && $expireTs < time()) { continue; } } if (empty($row['url']) || empty($row['image'])) { continue; } $iconRows[] = $row; } } if (!empty($iconRows)) { usort($iconRows, function ($a, $b) { $oa = intval($a['order'] ?? 0); $ob = intval($b['order'] ?? 0); if ($oa === $ob) { return 0; } return $oa < $ob ? -1 : 1; }); } {/php} {if condition="($tplconfig['theme']['ads']['btn'] eq 1 || ($tplconfig['theme']['ads']['btn'] eq 2 && isset($user['group_id']) && $user['group_id'] lt 3))"} {if condition="!empty($iconRows)"} {if condition="'[ads_icon1_marquee]' eq '1'"}
{volist name="iconRows" id="vo"}
{$vo.text|default=$vo.note|default=''}
{/volist}
{volist name="iconRows" id="vo"}
{$vo.text|default=$vo.note|default=''}
{/volist}
{else /}
{volist name="iconRows" id="vo"}
{$vo.text|default=$vo.note|default=''}
{/volist}
{/if} {/if} {/if}