{{function name="countPages" iPages=1 iPageNumber=1 sUrl="" sUrl2=""}}
	{{if $iPageNumber > 1}}
		<a href="{{$sUrl}}{{if $iPageNumber > 2}}&amp;iPage={{$iPageNumber - 1}}{{/if}}{{$sUrl2}}">&laquo;&nbsp;{{$lang.pages_prev}}</a>
	{{/if}}
	{{$iPaginationSpacer = false}}
	{{section name=pages start=1 loop=$iPages+1 step=1}}
		{{if $smarty.section.pages.index != $iPageNumber && (abs($smarty.section.pages.index - $iPageNumber) <= $config.pagination_counter_admin || $smarty.section.pages.index <= $config.pagination_counter_admin || $smarty.section.pages.index >=  + $iPages - $config.pagination_counter_admin + 1)}}
			<a href="{{$sUrl}}{{if $smarty.section.pages.index > 1}}&amp;iPage={{$smarty.section.pages.index}}{{/if}}{{$sUrl2}}">{{$smarty.section.pages.index}}</a>
		{{$iPaginationSpacer = false}}
		{{elseif $smarty.section.pages.index == $iPageNumber}}
			<strong>{{$smarty.section.pages.index}}</strong>
		{{else}}
			{{if $iPaginationSpacer === false}}
			<strong>...</strong>
			{{$iPaginationSpacer = true}}
			{{/if}}
		{{/if}}
	{{/section}}
	{{if $iPageNumber < $iPages}}
		<a href="{{$sUrl}}&amp;iPage={{$iPageNumber + 1}}{{$sUrl2}}">{{$lang.pages_next}}&nbsp;&raquo;</a>
	{{/if}}
{{/function}}

<h1>{{$lang.Fastorders}}</h1>
<div class="filter">
<form method="get" id="fastorder-search-form">
	<input type="hidden" name="p" value="fastorders-list" />
	<label for="product-search">{{$lang.search}}</label>
	<input type="text" name="sPhrase" value="{{$_GET.sPhrase}}" />
	<input type="submit" class="submit" value="{{$lang.search}}" />
</form>
<div class="clear"></div>
</div>
{{if count( $aFastOrders.aFastOrders ) > 0}}
	<table class="list" id="fastorders">
		<thead>
			<tr><td class="pages" colspan="7">{{if $aFastOrders.aPagesCountData.iCount > 1}}{{$lang.Pages}}: {{countPages iPages=$aFastOrders.aPagesCountData.iCount iPageNumber=$aFastOrders.aPagesCountData.iPageNumber sUrl='admin.php?p=fastorders-'|cat:$a sUrl2=$sUrlExt}}{{/if}}</td></tr>
			<tr>
				<th class="id">{{$lang.Id}}</th>
				<th class="name">{{$lang.First_surname}} / {{$lang.Company}}</th>
				<th class="address">{{$lang.Address}}</th>
				<th>{{$lang.Email}}</th>
				<th>{{$lang.Phone}}</th>
				<th>{{$lang.Order_content}}</th>
				<th class="actions">{{$lang.Actions}}</th></tr>
		</thead>
		<tfoot>
			<tr><td class="pages" colspan="7">{{if $aFastOrders.aPagesCountData.iCount > 1}}{{$lang.Pages}}: {{countPages iPages=$aFastOrders.aPagesCountData.iCount iPageNumber=$aFastOrders.aPagesCountData.iPageNumber sUrl='admin.php?p=fastorders-'|cat:$a sUrl2=$sUrlExt}}{{/if}}</td></tr>
		</tfoot>
		<tbody>
			{{foreach from=$aFastOrders.aFastOrders item=aFastOrder}}
				<tr>
					<td class="id">{{$aFastOrder.iOrder}}</td>
					<th class="name"><a href="?p=fastorders-form&amp;iOrder={{$aFastOrder.iOrder}}">{{$aFastOrder.sName}}</a></th>
					<td class="address">{{$aFastOrder.sStreet}}<br/>{{$aFastOrder.sZipCode}} {{$aFastOrder.sCity}}</td>
					<td class="mail">{{$aFastOrder.sEmail}}</td>
					<td class="phone">{{$aFastOrder.sPhone}}</td>
					<td class="description">{{$aFastOrder.sOrder}}</td>
					<td class="actions">
						<a href="?p=fastorders-form&amp;iOrder={{$aFastOrder.iOrder}}" class="fastorder-edit"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a>
						<a href="?p=fastorders-delete&amp;iOrder={{$aFastOrder.iOrder}}" class="fastorder-delete delete"><img src="{{$config.dir_templates}}admin/images/ico/delete.png" alt="{{$lang.Delete}}" title="{{$lang.Delete}}" /></a>
					</td>
				</tr>
			{{/foreach}}
		</tbody>
	</table>
{{else}}
	<div class="msg" id="error">
		<img src="{{$config.dir_templates}}admin/images/ico/msg_error.png" class="imgv" alt="" /> {{$lang.Data_not_found}}
	</div>
{{/if}}