<[include file="common/group_list.tpl"]>
<div id="contents">
<[include file="common/group_menu.tpl"]>
  <br />
  <div id="site-info">
    <h3><img src="<[$TEMPLATE_DIR]>/img/icon_large/ninki.jpg" align="absmiddle" style="margin-right:8px;">人気ページランキング</h3>
    <br />
    <fieldset style="width:500px;padding-left:30px;">
    <legend>ランキング期間を指定して下さい。</legend>
    <table width="100%" border="0">
      <tr>
        <td>
        <form method="post" action="./index.php?mode=50&group_code=<[$current_group.group_code]>">
          ランキング期間:
          <select name="period" onchange="submit();">
            <option value="30"<[if $period == "30"]> selected<[/if]>>30日間</option>
            <option value="60"<[if $period == "60"]> selected<[/if]>>60日間</option>
            <option value="90"<[if $period == "90"]> selected<[/if]>>90日間</option>
          </select>
        </form>
        </td>
      </tr>
    </table>
    </fieldset>
    <table id="view-table" cellpadding="2" cellspacing="0" width="100%">
      <tr>
        <th>順位</th>
        <th>タイトル</th>
        <th colspan="2">ページビュー</th>
      </tr>
    <[foreach from=$access_array key=url item=access name=access]>
      <[math equation="ceil((a / m) * 200)" m=$access_array|@max a=$access assign=access_glaph_width]>
      <tr class="<[cycle values="odd,even"]>">
        <td><[if $smarty.foreach.access.iteration < 4]><img src="<[$TEMPLATE_DIR]>/img/icon/s_crown.gif">&nbsp;<[/if]><[$smarty.foreach.access.iteration]>位</td>
        <td class="ac_graph"><a href="<[$url]>" target="_blank"><[$title_array.$url|default:"タイトルなし"|escape]></a></td>
        <td class="ac_count"><[$access|number_format]></td>
        <td class="ac_graph"><img src="<[$TEMPLATE_DIR]>/img/icon/red.gif" width="<[$access_glaph_width]>" height="5"></td>
      </tr>
    <[foreachelse]>
      <tr class="odd">
        <td colspan="3">ログデータがありません。</td>
      </tr>
    <[/foreach]>
    </table>
  </div>
</div>