<?cs include:"zeromin2/header.cs" ?>

<?cs if:BBS ?><?cs include:"zeromin2/menu_bbs.cs" ?><?cs else ?><?cs include:"zeromin2/menu.cs" ?><?cs /if ?>

<?cs include:"zeromin2/log_side_menu.cs" ?>

<div id="main">

<form id="logUserContainerForm" action="<?cs var:html_escape(ZerominScript) ?>" method="post">

<div id="navhead">
  <hr />
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=bbs&amp;method=load&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false">掲示板管理</a>
  &gt;
<?cs if:BBS ?>
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=bbs&amp;method=load_index&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false">インデックス</a>
  &gt;
<?cs /if ?>
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_error&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;date=<?cs var:html_escape(Date) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false">ログ</a>
  &gt;
  <a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;date=<?cs var:html_escape(Date) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>" onclick="Zeromin2.redirect(this);return false">ユーザー行動履歴閲覧</a>
</div>

<h1>ユーザー行動履歴閲覧</h1>

<?cs if:Code0 ?>
<?cs if:Done_log_load_user ?><div class="" id="notify"></div><?cs /if ?>
<?cs else ?>
<?cs if:Code1 ?><div class="noticeFailed" id="notify"><p>実行権限がありません</p></div><?cs /if ?>
<?cs /if ?>

<script type="text/javascript" src="<?cs var:html_escape(StaticURI) ?>/js/jquery/datePicker.js" charset="UTF-8"></script>
<script type="text/javascript" src="<?cs var:html_escape(StaticURI) ?>/js/zeromin2/lookup.js" charset="UTF-8"></script>
<script type="text/javascript" charset="UTF-8">
//<![CDATA[
jQuery(function(){
var dp = jQuery.datePicker;
dp.setDateFormat( "ymd", '-' );
dp.setLanguageStrings(
    [ "日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日" ],
    [ "1月", "2月", "3月", "4月", "5月", "6月",
      "7月", "8月", "9月", "10月", "11月", "12月" ],
    { "p": "前", "n": "次", "c": "閉", "b": "選択" }
);
jQuery("#datePick").datePicker({ "startDate": "2000-01-01" });
Zeromin2.addStyleSheet("<?cs var:html_escape(StaticURI) ?>/css/datePicker.css");
Zeromin2.addStyleSheet("<?cs var:html_escape(StaticURI) ?>/css/domTT.css");
});
function lookup( ip, element, event ) {
    Zeromin2.lookup(
        jQuery("#logUserContainerForm").get(0), ip, element, event );
}
//]]>
</script>

<p>
エラーログを表示しています。以下から表示方法を変更することが出来ます。<br />
指定されないときは今日の分のログを表示します。<br />
<?cs if:IsMonth ?>
<a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;date=<?cs var:html_escape(PrevMonth) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>&amp;item=<?cs var:html_escape(Item) ?>" onclick="Zeromin2.redirect(this);return false">&lt;&lt;&nbsp;前の月</a>
<a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;date=<?cs var:html_escape(NextMonth) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>&amp;item=<?cs var:html_escape(Item) ?>" onclick="Zeromin2.redirect(this);return false">次の月&nbsp;&gt;&gt;</a>
<?cs /if ?>
<?cs if:IsDay ?>
<a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;date=<?cs var:html_escape(PrevDay) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>&amp;item=<?cs var:html_escape(Item) ?>" onclick="Zeromin2.redirect(this);return false">&lt;&lt;&nbsp;前の日</a>
<a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;date=<?cs var:html_escape(NextDay) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>&amp;item=<?cs var:html_escape(Item) ?>" onclick="Zeromin2.redirect(this);return false">次の日&nbsp;&gt;&gt;</a>
<?cs /if ?>
</p>

<p>
ページ単位：
<input type="text" name="item" size="5" value="<?cs var:html_escape(Item) ?>" /><br />
<input type="text" id="datePick" name="date" title="日付を選択して表示します" value="<?cs var:html_escape(Date) ?>" />&nbsp;
<input type="submit" value="表示" /><br />
(&nbsp;<?cs var:html_escape(Total) ?>件&nbsp;-&nbsp;現在<?cs var:html_escape(Current) ?>ページ目&nbsp;)<br />
<span class="page">
<?cs if:Prev ?><a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>&amp;item=<?cs var:html_escape(Item) ?>&amp;offset=<?cs var:html_escape(Prev) ?>" onclick="Zeromin2.redirect(this);return false">&lt;&lt;&nbsp;前</a><?cs /if ?>
<?cs each:item = Pages ?>
<a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>&amp;item=<?cs var:html_escape(Item) ?>&amp;offset=<?cs var:html_escape(item.num) ?>" onclick="Zeromin2.redirect(this);return false"><?cs var:html_escape(item.num) ?></a>
<?cs /each ?>
<?cs if:Next ?><a href="<?cs var:html_escape(ZerominScript) ?>?class=log&amp;method=load_user&amp;bbs=<?cs var:html_escape(BBS) ?>&amp;by=<?cs var:html_escape(By) ?>&amp;<?cs var:html_escape(SessionName) ?>=<?cs var:html_escape(Session) ?>&amp;item=<?cs var:html_escape(Item) ?>&amp;offset=<?cs var:html_escape(Next) ?>" onclick="Zeromin2.redirect(this);return false">次&nbsp;&gt;&gt;</a><?cs /if ?>
</span>
</p>

<table class="simple">
  <thead>
  <tr>
    <th>内容</th>
    <th>ユーザー名</th>
    <th>時刻</th>
    <th>IPアドレス</th>
  </tr>
  </thead>
  <tbody>
  <?cs each:item = Entries ?>
  <tr>
    <td><code><?cs var:html_escape(item.reason) ?></code></td>
    <td><?cs var:html_escape(item.user) ?></td>
    <td><?cs var:html_escape(item.date) ?></td>
    <td><a href="javascript:void(0)" onclick="lookup( '<?cs var:html_escape(item.ip) ?>', this, event )"><?cs var:html_escape(item.ip) ?></a></td>
  </tr>
  <?cs /each ?>
  </tbody>
</table>

<div class="formFooter">
<input type="hidden" name="<?cs var:html_escape(SessionName) ?>" value="<?cs var:html_escape(Session) ?>" />
<input type="hidden" name="token" value="<?cs var:html_escape(Token) ?>" />
<input type="hidden" name="class" value="log" />
<input type="hidden" name="method" value="load_user" />
<input type="hidden" name="bbs" value="<?cs var:html_escape(BBS) ?>" />
<input type="hidden" name="OK" value="load_user" />
<input type="hidden" name="NG" value="load_user" />
<br id="endmain" />
</div>

</form>

</div>

<?cs include:"zeromin2/footer.cs" ?>
