{config_load file="$skin_config"} {$lng.lbl_select_product} {literal} {/literal}
{capture name=dialog} #{$productid}: {$product} - Pay dates

Choose pay dates from calendar below


{$current_date|date_format:"%Y"} Year
{if $year_array} {section name=dayofyear loop=$days_array} {if $days_array[dayofyear]} {/if} {/section} {section name=month loop=$year_array} {if %month.index% is div by 4} {/if} {math equation="index+5" index=%month.index% assign="month_index"} {if $month_index is div by 4} {/if} {/section}
{$year_array[month].month|date_format:"%B"}
{section name=weekday loop=$year_array[month].month_array start=0 max=7 step=1} {section name=weeknum loop=$year_array[month].month_array start=0 max=$year_array[month].wnum step=1} {if $year_array[month].month_array[weekday][weeknum].day} {if $year_array[month].month_array[weekday][weeknum].date} {assign var="suffix" value="On"} {else} {assign var="suffix" value="Off"} {/if} {if $year_array[month].month_array[weekday][weeknum].day eq $current_date} {else} {/if} {/section} {/section}
{if $smarty.section.weekday.index == 1}Mo {elseif $smarty.section.weekday.index == 2}Tu {elseif $smarty.section.weekday.index == 3}Wd {elseif $smarty.section.weekday.index == 4}Th {elseif $smarty.section.weekday.index == 5}Fr {elseif $smarty.section.weekday.index == 6}St {elseif $smarty.section.weekday.index == 0}Su {/if} {else} {/if} {$year_array[month].month_array[weekday][weeknum].day|date_format:"%d"} 

Pay type: {$pay_type}  
{/if} {/capture}
{include file="dialog.tpl" content=$smarty.capture.dialog title="Pay dates" extra="width=90%"}