<PCPIN:TPL name="main">
<table id="main_contents" border="0" cellspacing="0" cellpadding="0" width="100%">
  <tr>
    <td id="contents_header">
      Games
    </td>
  </tr>
  <tr>
    <td>
      <table class="contents_tbl" id="contents_tbl" border="0" cellspacing="0" cellpadding="0" width="100%">
        <PCPIN:TPL name="games_list" type="condition" conditionvar="DISPLAY">
          <PCPIN:SUB condition="empty">
            <tr>
              <td style="text-align:center">
                <b>No game stats found</b>
              </td>
            </tr>
          </PCPIN:SUB>
          <PCPIN:SUB condition="default">
            <PCPIN:TPL name="pages" type="simplecondition" requiredvars="TOTAL_PAGES" />
            <tr>
              <td style="text-align:center;width:1%;" nowrap="nowrap">
                <b>Nr.</b>
                &nbsp;
                <a href="{FORMLINK}?do=games&amp;sort_by=nr&amp;sort_dir=asc">
                  <img alt="Sort results by game nr. in ascending order" title="Sort results by game nr. in ascending order" src="./image/icons/arrow_up_13x9.gif" />
                </a>
                <a href="{FORMLINK}?do=games&amp;sort_by=nr&amp;sort_dir=desc">
                  <img alt="Sort results by game nr. in descending order" title="Sort results by game nr. in descending order" src="./image/icons/arrow_down_13x9.gif" />
                </a>
              </td>
              <td style="text-align:center">
                <b>Map</b>
                &nbsp;
                <a href="{FORMLINK}?do=games&amp;sort_by=map&amp;sort_dir=asc">
                  <img alt="Sort results by map in ascending order" title="Sort results by map in ascending order" src="./image/icons/arrow_up_13x9.gif" />
                </a>
                <a href="{FORMLINK}?do=games&amp;sort_by=map&amp;sort_dir=desc">
                  <img alt="Sort results by map in descending order" title="Sort results by map in descending order" src="./image/icons/arrow_down_13x9.gif" />
                </a>
              </td>
              <td style="text-align:center">
                <b>Players</b>
                &nbsp;
                <a href="{FORMLINK}?do=games&amp;sort_by=players&amp;sort_dir=asc">
                  <img alt="Sort results by players in ascending order" title="Sort results by players in ascending order" src="./image/icons/arrow_up_13x9.gif" />
                </a>
                <a href="{FORMLINK}?do=games&amp;sort_by=players&amp;sort_dir=desc">
                  <img alt="Sort results by players in descending order" title="Sort results by players in descending order" src="./image/icons/arrow_down_13x9.gif" />
                </a>
              </td>
              <td style="text-align:center">
                <b>Clients</b>
                &nbsp;
                <a href="{FORMLINK}?do=games&amp;sort_by=clients&amp;sort_dir=asc">
                  <img alt="Sort results by clients in ascending order" title="Sort results by clients in ascending order" src="./image/icons/arrow_up_13x9.gif" />
                </a>
                <a href="{FORMLINK}?do=games&amp;sort_by=clients&amp;sort_dir=desc">
                  <img alt="Sort results by clients in descending order" title="Sort results by clients in descending order" src="./image/icons/arrow_down_13x9.gif" />
                </a>
              </td>
              <td style="text-align:center">
                <b>Duration</b>
                &nbsp;
                <a href="{FORMLINK}?do=games&amp;sort_by=duration&amp;sort_dir=asc">
                  <img alt="Sort results by duration in ascending order" title="Sort results by duration in ascending order" src="./image/icons/arrow_up_13x9.gif" />
                </a>
                <a href="{FORMLINK}?do=games&amp;sort_by=duration&amp;sort_dir=desc">
                  <img alt="Sort results by duration in descending order" title="Sort results by duration in descending order" src="./image/icons/arrow_down_13x9.gif" />
                </a>
              </td>
              <td style="text-align:center">
                &nbsp;
              </td>
            </tr>
            <PCPIN:TPL name="game_row">
              <tr class="tbl_hrow_{ROW}" onclick="$('game_details_{NR}').click()">
                <td style="text-align:right;width:1%;" title="Game Nr." nowrap="nowrap">
                  <a id="game_details_{NR}" href="{FORMLINK}?do=game_stats&amp;game_nr={NR}" title="Show statistics for this game">{NR}</a>
                </td>
                <td title="Map" style="text-align:center" id="map_name_cell_{NR}">
                  {MAP}
                  <img id="game_dummy_{NR}" src="./image/clearpixel.gif" alt="" title="" onload="loadedThumbs.push(new Array($('map_name_cell_{NR}'), 'game_map_{NR}'))" />
                  <img src="{MAP_IMG}" alt="" title="" id="game_map_{NR}" class="map_image" style="display:none" />
                </td>
                <td title="Players" style="text-align:center">
                  {PLAYERS}
                </td>
                <td title="Clients" style="text-align:center">
                  {CLIENTS}
                </td>
                <td title="Duration" style="text-align:center">
                  {DURATION}
                </td>
                <td title="{NAME_TXT}: Played games" style="text-align:center">
                  <a href="{FORMLINK}?do=game_stats&amp;game_nr={NR}" title="Show statistics for this game">Details</a>
                </td>
              </tr>
            </PCPIN:TPL>
            <PCPIN:TPL name="pages" type="simplecondition" requiredvars="TOTAL_PAGES">
              <tr>
                <td colspan="6" style="text-align:right">
                  <b>Pages ({TOTAL_PAGES}):</b>
                  &nbsp;&nbsp;<a href="{FORMLINK}?do=games&amp;sort_by={SORT_BY}&amp;sort_dir={SORT_DIR}&amp;page=1" title="Go to first page">&laquo;First</a>
                  <PCPIN:TPL name="pages_previous" type="simplecondition" requiredvars="PAGE">
                    &nbsp;&nbsp;<a href="{FORMLINK}?do=games&amp;sort_by={SORT_BY}&amp;sort_dir={SORT_DIR}&amp;page={PAGE}" title="Go to previous page">&laquo;</a>
                  </PCPIN:TPL>
                  <PCPIN:TPL name="pages_page" type="condition" conditionvar="LINKED">
                    <PCPIN:SUB condition="empty">
                      &nbsp;&nbsp;[{PAGE}]
                    </PCPIN:SUB>
                    <PCPIN:SUB condition="default">
                      &nbsp;&nbsp;<a href="{FORMLINK}?do=games&amp;sort_by={SORT_BY}&amp;sort_dir={SORT_DIR}&amp;page={PAGE}" title="Go to page [{PAGE}]">{PAGE}</a>
                    </PCPIN:SUB>
                  </PCPIN:TPL>
                  <PCPIN:TPL name="pages_next" type="simplecondition" requiredvars="PAGE">
                    &nbsp;&nbsp;<a href="{FORMLINK}?do=games&amp;sort_by={SORT_BY}&amp;sort_dir={SORT_DIR}&amp;page={PAGE}" title="Go to next page">&raquo;</a>
                  </PCPIN:TPL>
                  &nbsp;&nbsp;<a href="{FORMLINK}?do=games&amp;sort_by={SORT_BY}&amp;sort_dir={SORT_DIR}&amp;page={TOTAL_PAGES}" title="Go to last page">Last&raquo;</a>
                </td>
              </tr>
            </PCPIN:TPL>
          </PCPIN:SUB>
        </PCPIN:TPL>
      </table>
    </td>
  </tr>
</table>
</PCPIN:TPL>