Page
[ class tree: Page ] [ index: Page ] [ all elements ]

Source for file LC_Page_Admin_OwnersStore_Log.php

Documentation is available at LC_Page_Admin_OwnersStore_Log.php

  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.lockon.co.jp/
  8.  *
  9.  * This program is free software; you can redistribute it and/or
  10.  * modify it under the terms of the GNU General Public License
  11.  * as published by the Free Software Foundation; either version 2
  12.  * of the License, or (at your option) any later version.
  13.  *
  14.  * This program is distributed in the hope that it will be useful,
  15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.  * GNU General Public License for more details.
  18.  *
  19.  * You should have received a copy of the GNU General Public License
  20.  * along with this program; if not, write to the Free Software
  21.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  22.  */
  23.  
  24. // {{{ requires
  25. require_once CLASS_EX_REALDIR 'page_extends/admin/LC_Page_Admin_Ex.php';
  26.  
  27. /**
  28.  * アプリケーション管理:インストールログ のページクラス.
  29.  *
  30.  * @package Page
  31.  * @author LOCKON CO.,LTD.
  32.  * @version $Id: LC_Page_Admin_OwnersStore_Log.php 20911 2011-05-04 19:29:41Z Seasoft $
  33.  */
  34. class LC_Page_Admin_OwnersStore_Log extends LC_Page_Admin_Ex {
  35.  
  36.     // }}}
  37.     // {{{ functions
  38.  
  39.     /**
  40.      * Page を初期化する.
  41.      *
  42.      * @return void 
  43.      */
  44.     function init({
  45.         parent::init();
  46.  
  47.         $this->tpl_mainpage 'ownersstore/log.tpl';
  48.         $this->tpl_mainno   'ownersstore';
  49.         $this->tpl_subno    'log';
  50.         $this->tpl_maintitle 'オーナーズストア';
  51.         $this->tpl_subtitle 'ログ管理';
  52.     }
  53.  
  54.     /**
  55.      * Page のプロセス.
  56.      *
  57.      * @return void 
  58.      */
  59.     function process({
  60.         $this->action();
  61.         $this->sendResponse();
  62.     }
  63.  
  64.     /**
  65.      * Page のアクション.
  66.      *
  67.      * @return void 
  68.      */
  69.     function action({
  70.         switch ($this->getMode()) {
  71.         case 'detail':
  72.             $objForm $this->initParam();
  73.             if ($objForm->checkError()) {
  74.                 SC_Utils_Ex::sfDispError('');
  75.             }
  76.             $this->arrLogDetail $this->getLogDetail($objForm->getValue('log_id'));
  77.             if (count($this->arrLogDetail== 0{
  78.                 SC_Utils_Ex::sfDispError('');
  79.             }
  80.             $this->tpl_mainpage 'ownersstore/log_detail.tpl';
  81.             break;
  82.         default:
  83.             break;
  84.         }
  85.         $this->arrInstallLogs $this->getLogs();
  86.     }
  87.  
  88.     /**
  89.      * デストラクタ.
  90.      *
  91.      * @return void 
  92.      */
  93.     function destroy({
  94.         parent::destroy();
  95.     }
  96.  
  97.     function getLogs({
  98.         $sql =<<<END
  99. SELECT
  100.     *
  101. FROM
  102.     dtb_module_update_logs JOIN (
  103.     SELECT
  104.         module_id,
  105.         module_name
  106.     FROM
  107.         dtb_module
  108.     ) AS modules USING(module_id)
  109. ORDER BY update_date DESC
  110. END;
  111.         $objQuery new SC_Query_Ex();
  112.         $arrRet $objQuery->getAll($sql);
  113.         return isset($arrRet$arrRet array();
  114.     }
  115.  
  116.     function initParam({
  117.         $objForm new SC_FormParam_Ex();
  118.         $objForm->addParam('log_id''log_id'INT_LEN''array('EXIST_CHECK''NUM_CHECK''MAX_LENGTH_CHECK'));
  119.         $objForm->setParam($_GET);
  120.         return $objForm;
  121.     }
  122.  
  123.     function getLogDetail($log_id{
  124.             $sql =<<<END
  125. SELECT
  126.     *
  127. FROM
  128.     dtb_module_update_logs JOIN (
  129.     SELECT
  130.         module_id,
  131.         module_name
  132.     FROM
  133.         dtb_module
  134.     ) AS modules USING(module_id)
  135. WHERE
  136.     log_id = ?
  137. END;
  138.         $objQuery new SC_Query_Ex();
  139.         $arrRet $objQuery->getAll($sqlarray($log_id));
  140.         return isset($arrRet[0]$arrRet[0array();
  141.     }
  142. }
  143. ?>

Documentation generated on Fri, 24 Feb 2012 14:01:30 +0900 by Seasoft