<html {$html_attrs}>
<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]-->
<style>
#height100{$id} {padding:10px;}
#toplinks_caption {padding:0px 30px;font-size:12px;font-weight:bold;}
#mastertable_block {margin-left:50px;margin-top:10px}
#toplinks_block {width:100%;padding:3px;padding-left:30px}
#toplinks_block span {padding-left:10px;}
#export_links * {padding:0}
#search_records_block { padding-left:20px;}
#search_records_block > * {vertical-align:middle;}
#search_records_block select {margin:3px 0px;}
#login_block {padding:10px; margin-bottom:3px}
#login_block * {margin-left:5px; padding:5px 0px;}
#menu_block {padding:10px;}
#menu_block * {list-style-type:none;}
#menu_block IMG {vertical-align:middle;}
#recordcontrols_block2 {padding:10px 10px;}
#recordcontrols_block2 span {padding-left:10px;}
#recordcontrols_block {padding:10px 10px;border: solid; border-width: 1px; border-color: #C0C0C0;}
#recordcontrols_block span {padding-left:10px;}
#grid_block {border:solid 1px #C0C0C0;}
.center_block {text-align:center;padding:5px}
.grid_recordheader {padding:0 5px 5px}
.grid_recordheader * {margin:0px 5px; vertical-align:middle}
body {margin:0px;padding:0px;}
table.report {border-collapse: collapse} 
table.report td 
{ 
	padding: 2px; 
	border-width: 1px; 
	border-style: solid; 
	border-color: #cccccc; 
}
##if @TABLE.arrReportGroupFields.len##
##foreach @TABLE.arrReportGroupFields as @f##
td.group_##@index##
{background-color: ##@f.strColor##;}
##endfor##
##foreach @TABLE.arrReportGroupFields as @f##
td.nbgroup_##@index##
{
	background-color: ##@f.strColor##;
	border-style:none;
}
##endfor##
##foreach @TABLE.arrReportGroupFields as @f##
td.header_##@index##
{background-color: ##@f.strHeaderColor##;}
##endfor##
##endif##
td.pagesummary
{background-color:#ffffbb;}
td.globalsummary
{background-color:#ffe0b0;}
</style>
</head>
<body marginheight=0 marginwidth=0 {$bodyattrs}>
{BEGIN body}
<div id="height100{$id}">
{$header}
{BEGIN toplinks_block}
<div id="toplinks_block">

&nbsp;<font><b>##@TABLE.strCaption hn##</b></font>

##if @BUILDER.bCreateLoginPage##
    <span id="login_block">
    ##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_href}>##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">
<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">
        ##message QUICK_JUMP##:&nbsp;
        <select {$quickjump_attrs}>
            ##if !IsAdminTable(@TABLE) || !@BUILDER.m_bDynamicPermissions##
                <option value="menu.##@ext##">##message BACK_TO_MENU##</option>
				{$quickjump_options}
            ##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.bPrinterFriendly##
{BEGIN print_link}
<span>
<a href="##@TABLE.strShortTableName h##_print.##@ext##">##message PRINT_THIS_PAGE##</a></span>
{END print_link}

{BEGIN printall_link}
<span>
<a href="##@TABLE.strShortTableName h##_print.##@ext##?all=1">##message PRINT_WHOLE_REPORT##</a></span>
{END printall_link}
{BEGIN export_link}
<span id="export_links">
<a href="##@TABLE.strShortTableName h##_print.##@ext##?all=1&format=excel"><img src="images/excel.gif" border="0"></a>
<a href="##@TABLE.strShortTableName h##_print.##@ext##?all=1&format=word"><img src="images/word.gif" border="0"></a>
##if @ext=="php" && @BUILDER.bViewPDF##
<a target="_blank" href="##@TABLE.strShortTableName h##_print.##@ext##?all=1&format=pdf"><img src="images/pdf.gif" border="0"></a>
##endif##
</span>
{END export_link}
##endif##

</div>
{END toplinks_block}

{BEGIN recordspp_block}
<div class="center_block ">
##if @TABLE.arrReportGroupFields.len##
##message GROUPS_PP##:&nbsp;
##else##
##message RECORDS_PP##:&nbsp;
##endif##
<select onChange="javascript: document.location='##@TABLE.strShortTableName h##_report.##@ext##?pagesize='+this.options[this.selectedIndex].value;">
{BEGIN rpp_options}
<option value="{$n}" {$selected}>{$txt}</option>
{END rpp_options}
</select>
</div>
{END recordspp_block}

<div class="center_block ">
{BEGIN pagination_block}
{$pagination}
{END pagination_block}
</div>
<div>