<html>
<head>
<title>##@TABLE.strCaption h##</title>
<link REL="stylesheet" href="include/style.css" type="text/css">
<!--[if IE]>
<link REL="stylesheet" href="include/styleIE.css" type="text/css">
<![endif]-->
{BEGIN style_block}
<style>
#toplinks_caption{$id} {padding:0px 30px;font-size:12px;font-weight:bold;}
#mastertable_block{$id} {margin-left:50px;margin-top:10px}
#toplinks_block{$id} {width:100%;padding:3px;padding-left:30px}
#toplinks_block{$id} span {padding-left:40px;}
#search_records_block{$id} > * {vertical-align:middle;}
#search_records_block{$id} select {margin:3px 0px;}
#login_block{$id} {padding:10px; margin-bottom:3px}
#login_block{$id} * {margin-left:5px; padding:5px 0px;}
#menu_block{$id} {padding:10px;}
#menu_block{$id} * {list-style-type:none;}
#menu_block{$id} IMG {vertical-align:middle;}
#records_block{$id} {margin-left:203px;}
#record_controls{$id} {padding:10px 10px;}
#record_controls{$id} span {padding-left:10px;}
#recordcontrolsadd_block{$id} {padding:10px 10px;border: solid; border-width: 1px; border-color: #C0C0C0;}
#recordcontrolsadd_block{$id} span {padding-left:10px;}
#grid_block{$id} {border:solid 1px #C0C0C0;}
.grid_recordheader{$id} {padding:0 5px 5px;vertical-align:top;}
.grid_recordheader{$id} * {margin:0px 5px; vertical-align:top;}
body {margin-left:10px;}
</style>
{END style_block}
</head>
<body topmargin=5 {$bodyattrs}>
{BEGIN body}
{$header}
##if @TABLE.arrMasterTables.len##
    {BEGIN mastertable_block}
    <div id="mastertable_block{$id}">
    {$showmasterfile}
	<a {$backtomasterlink_attrs} class="toplinks"><b>##message BACK_TO_MASTER##</b></a>
	<br>
    </div>
    {END mastertable_block}
##endif##

{BEGIN toplinks_block}
<div id="toplinks_block{$id}" align=center>

##if @BUILDER.bCreateLoginPage##
    <span id="login_block{$id}">
    ##message LOGGED_AS ##&nbsp;<b>{$username}</b>&nbsp;
    <a href="login.##@ext##?a=logout">Admin area</a>

    ##if @BUILDER.Registration.bChangePwdPage && @BUILDER.nLoginMethod == SECURITY_TABLE##
        {BEGIN changepwd_link}
        <a href="changepwd.##@ext##">##message CHANGE_PASSWORD ##</a>
        {END changepwd_link}
    ##endif##
    </span>
##endif##

##if @BUILDER.arrLanguages.len>1##
{BEGIN languages_block}
<span id="languages_block{$id}">
<b>##message LANGUAGE ##:</b>&nbsp;&nbsp;&nbsp;&nbsp;
	<select {$langselector_attrs}>
	##foreach @BUILDER.arrLanguages as @lang##
		<option value="##@lang h##" {$##@lang g##_langattrs}>##@lang h##</option>
	##endfor##
	</select>
</span>
{END languages_block}
##endif##

##if Fields[bAdvancedSearch=1].len##
{BEGIN asearch_link}
<span><a href="##@TABLE.strShortTableName h##_search.##@ext##">##message ADVANCED_SEARCH##</a></span>
{END asearch_link}
##endif##

##if @TABLE.bExportTo##
{BEGIN export_link}
<span><a href="##@TABLE.strShortTableName h##_export.##@ext##">##message EXPORT_RESULTS##</a></span>
{END export_link}
##endif##

##if @TABLE.bPrinterFriendly##
{BEGIN print_link}
<span>
<a target="_blank" href="##@TABLE.strShortTableName h##_print.##@ext##">
<img src="images/printer.gif" border=0></a>&nbsp;
<a href="##@TABLE.strShortTableName h##_print.##@ext##">##message PRINTER_FRIENDLY##</a></span>
{END print_link}
##if @TABLE.bPrintAll##
{BEGIN printall_link}
<span>
<a target="_blank" href="##@TABLE.strShortTableName h##_print.##@ext##?all=1">
<img src="images/printer.gif" border=0></a>&nbsp;
<a href="##@TABLE.strShortTableName h##_print.##@ext##?all=1">##message PRINT_ALL_PAGES##</a></span>
{END printall_link}
##endif##
##endif##

##if @TABLE.bImport##
{BEGIN import_link}
<span><a href="##@TABLE.strShortTableName h##_import.##@ext##">##message IMPORT##</a></span>
{END import_link}
##endif##
</div>
{END toplinks_block}


<TABLE WIDTH=95% CELLPADDING=4 CELLSPACING=1 BORDER=0 align=center style="border: solid; border-width: 1px; border-color: #C0C0C0;">
<tr>
<td width=210 valign=top align=center>
<div id="recordcontrolsadd_block{$id}" class="shade">
{BEGIN search_records_block} 
<span id="search_records_block{$id}" class="shade">
    ##if Fields[bSearch=1].len##
    {BEGIN searchform}
    <span class="shade" id="searchform{$id}">
        <b>Keyword search:</b><br />
        {BEGIN searchform_field}
        {$ctlSearchField}
        {END searchform_field}
        {BEGIN searchform_option}
        {$ctlSearchOption}
        {END searchform_option}
        {BEGIN searchform_text}
        <input type=text size=20 {$searchfor_attrs}><br />
        {END searchform_text}
        {BEGIN searchform_search}
        <input type=button class="button" value="##message SEARCH##" {$searchbutton_attrs}>
        {END searchform_search}
        &nbsp;	
        {BEGIN searchform_showall}	
        <input type=button class="button" value="##message SHOW_ALL##" {$showallbutton_attrs}>
        {END searchform_showall}
    </span>
    {END searchform}
    ##endif##
</span>
{END search_records_block} 
</div>

{BEGIN record_controls}
<div id="record_controls{$id}">

##if @TABLE.bListVerticalLayout##
##if @TABLE.arrKeyFields.len && (@TABLE.bDelete || @TABLE.bExportTo || @TABLE.bPrinterFriendly || @TABLE.bInlineEdit)##
{BEGIN selectall_link}
<span><a href="#" {$selectalllink_attrs}>##message SELECT##</a></span>
{END selectall_link}
##endif##
##endif##

##if @TABLE.bExportTo && @TABLE.arrKeyFields.len##
{BEGIN exportselected_link}
<span><a href="#" {$exportselectedlink_attrs}>##message EXPORT_SELECTED##</a></span>
{END exportselected_link}
##endif##

##if @TABLE.bPrinterFriendly && @TABLE.arrKeyFields.len##
{BEGIN printselected_link}
<span><a href="#" {$printselectedlink_attrs}>##message PRINT_SELECTED##</a></span>
{END printselected_link}
##endif##
</div>
{END record_controls}
<div align=left style="padding-left:20">{$ListLoad}</div>

</td>

<td>

{BEGIN grid_block}
<table name="maintable" cellspacing=2 cellpadding=3 border=0 id="grid_block{$id}" style="border: solid; border-width: 1px; border-color: #C0C0C0;" align=center width="100%">

{BEGIN grid_row}
<tr valign="top" {$rowstyle} {$rowattrs}> 
{BEGIN grid_record}
<td>
<table cellpadding=4 cellspacing=0 border=0 width=100%>
<tr class=shade>
<td width=100 rowspan=4>
<A {$viewlink_attrs}>{$Picture_value}</A>
</td>
<td>
{$Category_value}&nbsp;>>&nbsp;{$Subcategory_value}
</td>
<td width=70>&nbsp;</td>
</tr>

<tr class=shade>
<td><b>{$Title_value}</b>
</td>
<td>
##if @TABLE.arrKeyFields.len && (@TABLE.bDelete || @TABLE.bExportTo || @TABLE.bPrinterFriendly || @TABLE.bInlineEdit)##
{BEGIN checkbox_column}
{BEGIN checkbox}
<input type=checkbox {$checkbox_attrs}>
{END checkbox}
{END checkbox_column}
##endif##
</td>
</tr>
<tr class=shade>
<td><font color=red size=2.5pt><b>${$Price_value}</b></font></td>
<td>
##if @TABLE.bView##
{BEGIN view_column}
{BEGIN view_link}
<a {$viewlink_attrs}>More details</a>
{END view_link}
{END view_column}
##endif##
</td>
</tr>

<tr class=shade>
<td>{$Details_value}&nbsp;
</td>
<td>{$but_value}</td>
</tr>

##foreach Fields as @f filter @f.strName!="but" && @f.strName!="Picture" && @f.strName!="Category" && @f.strName!="Subcategory" && @f.strName!="Details" && @f.strName!="Price" && @f.strName!="Title" && bListPage order nListPageOrder##
{BEGIN ##@f.strName g##_fieldcolumn}
<tr class=shade><td>&nbsp;</td><td colspan=2>
{$##@f.strName g##_value}
</td>
</tr>
{END ##@f.strName g##_fieldcolumn}
##endfor##
</table>
</td>

{BEGIN endrecord_block}
<td class=body2 {$endrecordblock_attrs}>&nbsp;</td>
{END endrecord_block}
{END grid_record}
</tr>
{END grid_row}

##if Fields[strTotalsType].len##
{BEGIN totals_row}
<tr>
{BEGIN totals_record}

##if @TABLE.bEdit##
{BEGIN edit_column}
<td width=50 align="center" class="blackshade">&nbsp;</td>
{END edit_column}
##endif##

##if @TABLE.bInlineEdit##
{BEGIN inlineedit_column}
<td width=100 align="center" class="blackshade">&nbsp;</td>
{END inlineedit_column}
##endif##

##if @TABLE.bCopy##
{BEGIN copy_column}
<td width=50 align="center" class="blackshade">&nbsp;</td>
{END copy_column}
##endif##

##if @TABLE.bView##
{BEGIN view_column}
<td width=50 align="center" class="blackshade">&nbsp;</td>
{END view_column}
##endif##

##if @TABLE.arrKeyFields.len && (@TABLE.bDelete || @TABLE.bExportTo || @TABLE.bPrinterFriendly || @TABLE.bInlineEdit)##
{BEGIN checkbox_column}
<td width=50 align="center" class="blackshade">
&nbsp;
</td>
{END checkbox_column}
##endif##

##foreach @BUILDER.tables as @t filter @t.arrMasterTables[strMasterTable==@TABLE.strDataSourceTable].len##
{BEGIN ##@t.strShortTableName##_dtable_column}
<td width=50 class="blackshade">&nbsp;</td>
{END ##@t.strShortTableName##_dtable_column}
##endfor##

##foreach Fields as @f filter bListPage order nListPageOrder##
{BEGIN ##@f.strName g##_fieldfootercolumn}
<td valign=middle align=center class="blackshade">
{BEGIN ##@f.strName g##_showtotal}
##if strTotalsType=="COUNT"##
	##message COUNT##
##elseif strTotalsType=="TOTAL"##
	##message TOTAL##:
##elseif strTotalsType=="AVERAGE"##
	##message AVERAGE##:
##endif##
{$##@f.strName g##_total}
{END ##@f.strName g##_showtotal}
</td>
{END ##@f.strName g##_fieldfootercolumn}
##endfor##

{BEGIN endrecordtotals_block}
<td>&nbsp;</td>
{END endrecordtotals_block}
{END totals_record}
</tr>
{END totals_row}
##endif##
</table>
{END grid_block}

</td></tr></table>


{BEGIN pagination_block}
<p align=center class=toplist >{$pagination}</p>
{END pagination_block}

{BEGIN message_block}
<p align=center valign=middle class=toplist><b>{$message}</b></p>
{END message_block}
{$footer}
{END body}
{$info}
</body>
</html>