<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} { padding-left:20px;}
#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}">

<span>
<font size=+0><b>&nbsp;Season&nbsp;
<select style="font: 10pt"
onchange="javascript: document.location='##@TABLE.strShortTableName h##_list.##@ext##?a=search&value=1&SearchFor='+this.options[this.selectedIndex].value+'&SearchOption=Contains&SearchField=sDate'">
<option value="">All</option>
<option value="2005" {$year2005_selected}>2005</option>
<option value="2006" {$year2006_selected}>2006</option>
<option value="2007" {$year2007_selected}>2007</option>
<option value="2008" {$year2008_selected}>2008</option>
<option value="2009" {$year2009_selected}>2009</option>
<option value="2010" {$year2010_selected}>2010</option>
<option value="2011" {$year2011_selected}>2011</option>
<option value="2012" {$year2012_selected}>2012</option>
<option value="2013" {$year2013_selected}>2013</option>
<option value="2014" {$year2014_selected}>2014</option>
<option value="2015" {$year2015_selected}>2015</option>
</select>
</b></font>

</span>

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

    ##if @BUILDER.bDynamicPermissions##
        ##if !IsAdminTable(@TABLE)##
            {BEGIN adminarea_link}
            <a href="admin_rights_list.##@ext##">##message AA_ADMINAREA##</a>
            {END adminarea_link}
        ##else##
            {BEGIN exitadminarea_link}
            <a {$exitaalink_attrs}>##message AA_EXIT_ADMINAREA##</a>
            {END exitadminarea_link}
        ##endif##
    ##endif##

    ##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 CreateMenu || IsAdminTable(@TABLE)##
    {BEGIN menu_block}
    <span id="menu_block{$id}">
        ##message QUICK_JUMP##:&nbsp;
        <select {$quickjump_attrs}>
            ##if !IsAdminTable(@TABLE) || !@BUILDER.m_bDynamicPermissions##
                <option value="menu.##@ext##">##message BACK_TO_MENU##</option>
                ##foreach @BUILDER.Tables as @t filter @t.bMenuItem order @t.nMenuOrder##
                    {BEGIN ##@t.strShortTableName##_tablelink}
                    <option {$##@t.strShortTableName##_optionattrs} ##if @t.strDataSourceTable==@TABLE.strDataSourceTable## selected##endif##>
                    ##@t.strCaption h##</option>
                    {END ##@t.strShortTableName##_tablelink}
                ##endfor##
	##if @BUILDER.bWebReports##
					{BEGIN webreport_link}
                    <option value="webreport.##@ext##" >##message WEBREPORTS_SHORT##</option>
					{END webreport_link}
	##endif##
            ##else##
                ##foreach @BUILDER.Tables as @t filter IsAdminTable(@t)##
                    {BEGIN ##@t.strShortTableName##_tablelink}
                    <option {$##@t.strShortTableName##_optionattrs}
                    ##if @t.strDataSourceTable==@TABLE.strDataSourceTable## selected##endif##>
                    ##if @t.strDataSourceTable=="admin_users"##
                    ##message AA_ADDEDIT_USERS##
                    ##elseif @t.strDataSourceTable=="admin_members"##
                    ##message AA_ASSIGN_USERS##
                    ##elseif @t.strDataSourceTable=="admin_rights"##
                    ##message AA_PERMISSIONS##
                    ##endif##
                    {END ##@t.strShortTableName##_tablelink}
                    </option>
                ##endfor##
            ##endif##
        </select>
    </span>
    {END menu_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}

<div id="recordcontrolsadd_block{$id}" class="shade">
##if @TABLE.bAdd || @TABLE.bInlineAdd##
{BEGIN newrecord_controls}
<span id="newrecords_block" class="shade">
##if @TABLE.bAdd##
{BEGIN add_link}
<span class='shade'>
 	<a href="##@TABLE.strShortTableName h##_add.##@ext##">Add new game</a>
</span>
{END add_link}
##endif##

##if @TABLE.bInlineAdd##
{BEGIN inlineadd_link}
<span class='shade'>
 	<a {$inlineaddlink_attrs}>##message INLINE_ADD##</a>
</span>
{END inlineadd_link}
##endif##
</span>
{END newrecord_controls}
##endif##
{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>##message SEARCH_FOR##: </b> &nbsp;&nbsp;&nbsp;
        {BEGIN searchform_field}
        <select id="ctlSearchField{$id}">
        <option value="">##message ANY_FIELD##</option>
        ##foreach Fields as @f filter @f.bSearch order @f.nAdvSearchPageOrder##
        <option value="##@f.strName h##" {$##@f.strName g##_searchfieldoption}>##@f.strLabel h##</option>
        ##endfor##
        </select>
        {END searchform_field}
        &nbsp;
        {BEGIN searchform_option}
        <select id="ctlSearchOption{$id}">
        <option value="Contains" {$Contains_searchtypeoption}>##message CONTAINS##</option>
        <option value="Equals" {$Equals_searchtypeoption}>##message EQUALS##</option>
        <option value="Starts with ..." {$Starts_with_____searchtypeoption}>##message STARTS_WITH##</option>
        <option value="More than ..." {$More_than_____searchtypeoption}>##message MORE_THAN##</option>
        <option value="Less than ..." {$Less_than_____searchtypeoption}>##message LESS_THAN##</option>
        <option value="Equal or more than ..." {$Equal_or_more_than_____searchtypeoption}>##message EQUAL_OR_MORE##</option>
        <option value="Equal or less than ..." {$Equal_or_less_than_____searchtypeoption}>##message EQUAL_OR_LESS##</option>
        <option value="Empty" {$Empty_searchtypeoption}>##message EMPTY##</option>
        </select>
        {END searchform_option}
        &nbsp;
        {BEGIN searchform_text}
        <input type=text size=20 {$searchfor_attrs}>
        {END searchform_text}
        &nbsp;
        {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##
    {BEGIN details_block}
    <span>Games found: <b>{$records_found}</b>&nbsp;&nbsp;&nbsp;&nbsp;</span>
    {END details_block}
    {BEGIN pages_block}
    <span>##message PAGE1## <b>{$page}</b> ##message PAGE2## <b>{$maxpages}</b></span>
    {END pages_block}

    &nbsp;&nbsp;&nbsp;&nbsp;
    {BEGIN recordspp_block}
    <span id="recordspp_block{$id}">
    Games per page:
    <select {$recordspp_attrs}>
    <option value="10" {$rpp10_selected}>10</option>
    <option value="20" {$rpp20_selected}>20</option>
    <option value="30" {$rpp30_selected}>30</option>
    <option value="50" {$rpp50_selected}>50</option>
    <option value="100" {$rpp100_selected}>100</option>
    <option value="500" {$rpp500_selected}>500</option>
    </select>
    </span>
    {END recordspp_block}
</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.bDelete##
{BEGIN delete_link}
<span><a href="#" {$deletelink_attrs}>##message DELETE_SELECTED##</a></span>
{END delete_link}
##endif##

##if @TABLE.bInlineEdit || @TABLE.bInlineAdd##
##if @TABLE.bInlineEdit##
{BEGIN editselected_link}
<span><a href="#" {$editselectedlink_attrs}>##message EDIT_SELECTED##</a></span>
{END editselected_link}
##endif##
{BEGIN saveall_link}
<span><a href="#" {$savealllink_attrs}>##message SAVE_ALL##</a></span>
{END saveall_link}
{BEGIN cancelall_link}
<span><a href="#" {$cancelalllink_attrs}>##message CANCEL_ALL##</a></span>
{END cancelall_link}
##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 id="usermessage{$id}" class="message"></div>


{BEGIN grid_block}
<table name="maintable" align=center cellpadding=0 cellspacing=0 border=0>
<tr><td width=50%><font size=+0><b>##@TABLE.strCaption hn##</b></font></td>
<td align=right><img src="images/cal.gif">
<a href=spcalendar_list.##@ext##?a=advsearch&asearchfield[]=sYear&asearchopt_sYear=Equals&value_sYear={$syear}&asearchfield[]=sMonth&asearchopt_sMonth=Equals&value_sMonth={$smonth}>Calendar View</a></td></tr>
<tr><td height=30 style="BACKGROUND-COLOR: #7575ff" colspan=2>
{$strMenu}
</td></tr>
<tr><td colspan=2>
<table cellspacing=0 cellpadding=3 border=0 id="grid_block{$id}" width=100%>
{BEGIN grid_header}
<tr valign="top">
{BEGIN record_header}

##if @TABLE.bEdit##
{BEGIN edit_column}
<td width=50 align="center"><img src="include/img/icon_edit.gif"></td>
{END edit_column}
##endif##

##if @TABLE.bInlineEdit##
{BEGIN inlineedit_column}
<td width=50 align="center"><img src="include/img/icon_edit.gif"></td>
{END inlineedit_column}
##endif##

##if @TABLE.bCopy##
{BEGIN copy_column}
<td width=50 align="center"><img src="include/img/icon_copy.gif"></td>
{END copy_column}
##endif##

##if @TABLE.arrKeyFields.len && (@TABLE.bDelete || @TABLE.bExportTo || @TABLE.bPrinterFriendly || @TABLE.bInlineEdit)##
{BEGIN checkbox_column}
<td width=50 align="center">
{BEGIN checkbox_header}
<input type=checkbox {$checkboxheader_attrs}>
{END checkbox_header}
</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>&nbsp;</td>
{END ##@t.strShortTableName##_dtable_column}
##endfor##

##foreach @TABLE.Fields as @f filter bListPage && strName!="Team2" order nListPageOrder##
{BEGIN ##@f.strName g##_fieldheadercolumn}
<td>
##if strName="Team1"##
<b>Game</b>
##else##
<b>##strLabel h##</b>
##endif##
</td>
{END ##@f.strName g##_fieldheadercolumn}
##endfor##
{BEGIN endrecordheader_block}
<td>&nbsp;</td>
{END endrecordheader_block}

{END record_header}
</tr>
{END grid_header}


{BEGIN grid_row}
<tr valign="top"  {$rowattrs} {$rowstyle}> 
{BEGIN grid_record}

##if @TABLE.bEdit##
{BEGIN edit_column}
<td align="center" valign=middle >
{BEGIN edit_link}
<a {$editlink_attrs}>##message EDIT##</a>
{END edit_link}
</td>
{END edit_column}
##endif##

##if @TABLE.bInlineEdit##
{BEGIN inlineedit_column}
<td align="center" valign=middle >
{BEGIN inlineedit_link}
<a {$inlineeditlink_attrs}>##message INLINE_EDIT##</a>
{END inlineedit_link}
</td>
{END inlineedit_column}
##endif##

##if @TABLE.bCopy##
{BEGIN copy_column}
<td align="center" valign=middle >
{BEGIN copy_link}
<a {$copylink_attrs}>##message COPY##</a>
{END copy_link}
</td>
{END copy_column}
##endif##

##if @TABLE.arrKeyFields.len && (@TABLE.bDelete || @TABLE.bExportTo || @TABLE.bPrinterFriendly || @TABLE.bInlineEdit)##
{BEGIN checkbox_column}
<td align="center" valign=middle >
{BEGIN checkbox}
<input type=checkbox {$checkbox_attrs}>
{END checkbox}
</td>
{END checkbox_column}
##endif##

##foreach @BUILDER.tables as @t filter @t.arrMasterTables[strMasterTable==@TABLE.strDataSourceTable].len##
{BEGIN ##@t.strShortTableName##_dtable_column}
<td align="center" valign=middle >
{BEGIN ##@t.strShortTableName##_dtable_link}
<a  {$##@t.strShortTableName##_dtablelink_attrs}>##@t.strCaption h####if @t.arrMasterTables[strMasterTable==@TABLE.strDataSourceTable].bDisplayChildCount##{BEGIN ##@t.strShortTableName##_childcount}({$##@t.strShortTableName##_childnumber})
{END ##@t.strShortTableName##_childcount}
##endif##
</a>
{END ##@t.strShortTableName##_dtable_link}
##if @t.arrMasterTables[strMasterTable==@TABLE.strDataSourceTable].nDetailPreview==dpINLINE##
{BEGIN ##@t.strShortTableName##_preview_link}
<a {$##@t.strShortTableName##_previewlink_attrs}>##message PREVIEW##</a>
{END ##@t.strShortTableName##_preview_link}
##endif##
</td>
{END ##@t.strShortTableName##_dtable_column}
##endfor##

##foreach Fields as @f filter bListPage && strName!="Team2" order nListPageOrder##
{BEGIN ##@f.strName g##_fieldcolumn}
##if @f.strName=="Team1"##
    <td valign=middle align=left {$##@f.strName g##_style}>{$Team1_value}&nbsp;-&nbsp;{$Team2_value}</td>
##else##    
<td valign=middle align=left {$##@f.strName g##_style}>
{$##@f.strName g##_value}
</td>
##endif##
{END ##@f.strName g##_fieldcolumn}
##endfor##

{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>
</td></tr></table>
{END grid_block}

{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}
</body>
</html>