Index: /branches/comu-ver2/html/user_data/packages/default/css/admin_contents.css
===================================================================
--- /branches/comu-ver2/html/user_data/packages/default/css/admin_contents.css	(revision 18116)
+++ /branches/comu-ver2/html/user_data/packages/default/css/admin_contents.css	(revision 18179)
@@ -507,2 +507,12 @@
     vertical-align: top;
 }
+
+/* ログ表示用 */
+.log td {
+    padding-top: 0;
+    padding-bottom: 0;
+    vertical-align: top;
+}
+.log .date {
+    white-space: nowrap;
+}
Index: /branches/comu-ver2/html/admin/system/log.php
===================================================================
--- /branches/comu-ver2/html/admin/system/log.php	(revision 18179)
+++ /branches/comu-ver2/html/admin/system/log.php	(revision 18179)
@@ -0,0 +1,35 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2008 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+// {{{ requires
+require_once '../require.php';
+require_once CLASS_EX_PATH . 'page_extends/admin/system/LC_Page_Admin_System_Log_Ex.php';
+
+// }}}
+// {{{ generate page
+
+$objPage = new LC_Page_Admin_System_Log_Ex();
+register_shutdown_function(array($objPage, 'destroy'));
+$objPage->init();
+$objPage->process();
+?>
Index: /branches/comu-ver2/data/class/pages/admin/system/LC_Page_Admin_System_Log.php
===================================================================
--- /branches/comu-ver2/data/class/pages/admin/system/LC_Page_Admin_System_Log.php	(revision 18179)
+++ /branches/comu-ver2/data/class/pages/admin/system/LC_Page_Admin_System_Log.php	(revision 18179)
@@ -0,0 +1,139 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2008 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+// {{{ requires
+require_once(CLASS_PATH . "pages/LC_Page.php");
+
+/**
+ * ログ のページクラス.
+ *
+ * @package Page
+ * @author Seasoft 塚田将久
+ * @version $Id: LC_Page_Admin_System_System.php 17576 2008-08-28 06:08:09Z Seasoft $
+ */
+class LC_Page_Admin_System_Log extends LC_Page {
+
+    // }}}
+    // {{{ functions
+
+    /**
+     * Page を初期化する.
+     *
+     * @return void
+     */
+    function init() {
+        parent::init();
+        $this->tpl_mainpage = 'system/log.tpl';
+        $this->tpl_subnavi  = 'system/subnavi.tpl';
+        $this->tpl_subno    = 'log';
+        $this->tpl_mainno   = 'system';
+        $this->tpl_subtitle = 'ログ表示';
+        $this->line_max     = 50;
+    }
+
+    /**
+     * Page のプロセス.
+     *
+     * @return void
+     */
+    function process() {
+        SC_Utils_Ex::sfIsSuccess(new SC_Session);
+        $objView = new SC_AdminView();
+        
+        $this->lfInitParam();
+        
+        if (SC_Utils::sfIsInt($tmp = $this->objForm->getValue('line'))) {
+            $this->line_max = $tmp;
+        }
+        
+        $this->tpl_ec_log = $this->getEccubeLog();
+        
+        $objView->assignobj($this);
+        $objView->display(MAIN_FRAME);
+    }
+
+    /**
+     * デストラクタ.
+     *
+     * @return void
+     */
+    function destroy() {
+        parent::destroy();
+    }
+    
+    /**
+     * パラメータの初期化
+     *
+     * @return array
+     */
+    function lfInitParam() {
+        $this->objForm = new SC_FormParam;
+        $this->objForm->addParam('line_max', 'line_max', INT_LEN, '', array('NUM_CHECK', 'MAX_LENGTH_CHECK', 'EXIST_CHECK'));
+        $this->objForm->setParam($_POST);
+    }
+
+    /**
+     * EC-CUBE ログを取得する
+     *
+     * @return array
+     */
+    function getEccubeLog() {
+        
+        $index = 0;
+        $arrLogs = array();
+        for ($gen = 0 ; $gen <= MAX_LOG_QUANTITY; $gen++) {
+            $path = LOG_PATH;
+            if ($gen != 0) {
+                $path .= ".$gen";
+            }
+            
+            // ファイルが存在しない場合、前世代のログへ
+            if (!file_exists($path)) continue;
+            
+            $arrLogTmp = array_reverse(file($path));
+            
+            $body = '';
+            foreach ($arrLogTmp as $line) {
+                if (preg_match('/^(\d+\/\d+\/\d+ \d+:\d+:\d+) \[([^\]]+)\] (.*)$/', $line, $arrMatch)) {
+                    $arrLogLine = array();
+                    // 日時
+                    $arrLogLine['date'] = $arrMatch[1];
+                    // パス
+                    $arrLogLine['path'] = $arrMatch[2];
+                    // 内容
+                    $arrLogLine['body'] = $arrMatch[3] . $body;
+                    $body = '';
+                    
+                    $arrLogs[] = $arrLogLine;
+                    
+                    // 上限に達した場合、処理を抜ける
+                    if (count($arrLogs) >= $this->line_max) break 2;
+                } else {
+                    // 内容
+                    $body = "\n" . $line . $body;
+                }
+            }
+        }
+        return $arrLogs;
+    }
+}
Index: /branches/comu-ver2/data/Smarty/templates/default/admin/system/log.tpl
===================================================================
--- /branches/comu-ver2/data/Smarty/templates/default/admin/system/log.tpl	(revision 18179)
+++ /branches/comu-ver2/data/Smarty/templates/default/admin/system/log.tpl	(revision 18179)
@@ -0,0 +1,40 @@
+<!--{*
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+*}-->
+
+<h2>EC-CUBE ログ</h2>
+<p>直近の<!--{$line}-->行</p>
+<table class="list log">
+    <tr>
+        <th>日時</th>
+        <th>パス</th>
+        <th>内容</th>
+    </tr>
+    <!--{foreach from=$tpl_ec_log item=line}-->
+        <tr>
+            <td class="date"><!--{$line.date|escape}--></td>
+            <td class="path"><!--{$line.path|escape}--></td>
+            <td class="body"><!--{$line.body|escape|nl2br}--></td>
+        </tr>
+    <!--{/foreach}-->
+</table>
Index: /branches/comu-ver2/data/Smarty/templates/default/admin/system/subnavi.tpl
===================================================================
--- /branches/comu-ver2/data/Smarty/templates/default/admin/system/subnavi.tpl	(revision 17605)
+++ /branches/comu-ver2/data/Smarty/templates/default/admin/system/subnavi.tpl	(revision 18179)
@@ -28,3 +28,4 @@
 <li<!--{if $tpl_subno == 'masterdata'}--> class="on"<!--{/if}--> id="navi-system-masterdata"><a href="<!--{$smarty.const.URL_DIR}-->admin/system/masterdata.php"><span>マスタデータ管理</span></a></li>
 <li<!--{if $tpl_subno == 'system'}--> class="on"<!--{/if}--> id="navi-system-system"><a href="<!--{$smarty.const.URL_DIR}-->admin/system/system.php"><span>システム情報</span></a></li>
+<li<!--{if $tpl_mainno == 'system' && $tpl_subno == 'log'}--> class="on"<!--{/if}--> id="navi-system-log"><a href="<!--{$smarty.const.URL_DIR}-->admin/system/log.php"><span>ログ表示</span></a></li>
 </ul>
Index: /branches/comu-ver2/data/class_extends/page_extends/admin/system/LC_Page_Admin_System_Log_Ex.php
===================================================================
--- /branches/comu-ver2/data/class_extends/page_extends/admin/system/LC_Page_Admin_System_Log_Ex.php	(revision 18179)
+++ /branches/comu-ver2/data/class_extends/page_extends/admin/system/LC_Page_Admin_System_Log_Ex.php	(revision 18179)
@@ -0,0 +1,67 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2008 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+// {{{ requires
+require_once(CLASS_PATH . "pages/admin/system/LC_Page_Admin_System_Log.php");
+
+/**
+ * ログ のページクラス(拡張).
+ *
+ * LC_Page_Admin_System_Log をカスタマイズする場合はこのクラスを編集する.
+ *
+ * @package Page
+ * @author Seasoft 塚田将久
+ * @version $Id: LC_Page_Admin_System_Log_Ex.php 17573 2008-08-28 03:56:51Z Seasoft $
+ */
+class LC_Page_Admin_System_Log_Ex extends LC_Page_Admin_System_Log {
+
+    // }}}
+    // {{{ functions
+
+    /**
+     * Page を初期化する.
+     *
+     * @return void
+     */
+    function init() {
+        parent::init();
+    }
+
+    /**
+     * Page のプロセス.
+     *
+     * @return void
+     */
+    function process() {
+        parent::process();
+    }
+
+    /**
+     * デストラクタ.
+     *
+     * @return void
+     */
+    function destroy() {
+        parent::destroy();
+    }
+}
