source: branches/feature-module-update/html/admin/load_module_config.php @ 16582

Revision 16582, 1.9 KB checked in by nanasess, 17 years ago (diff)

ライセンス表記変更

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php
Line 
1<?php
2/**
3 * モジュール設定スクリプトをロードする。
4 * GETのクエリにmodule_idを渡す。
5 *
6 * 管理画面から呼び出すことを想定しているので、
7 * 認証は外さないこと
8 *
9 * This file is part of EC-CUBE
10 *
11 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
12 *
13 * http://www.lockon.co.jp/
14 *
15 * This program is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU General Public License
17 * as published by the Free Software Foundation; either version 2
18 * of the License, or (at your option) any later version.
19 *
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23 * GNU General Public License for more details.
24 *
25 * You should have received a copy of the GNU General Public License
26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
28 */
29require_once 'require.php';
30
31// 認証可否の判定
32SC_Utils::sfIsSuccess(new SC_Session());
33
34$module_id = isset($_GET['module_id']) ? $_GET['module_id'] : null;
35
36if(!empty($module_id) && is_numeric($module_id)) {
37
38    GC_Utils::gfPrintLog("loading module ====> module_id = " . $module_id);
39
40    $objQuery = new SC_Query();
41    $arrRet = $objQuery->select("module_name", "dtb_module2", "module_id = ?", array($module_id));
42
43    if (isset($arrRet[0]['module_name'])) {
44        $config_path = MODULE_PATH . $arrRet[0]['module_name'] . '/config.php';
45
46        if (file_exists($config_path)) {
47            require_once $config_path;
48            exit;
49        } else {
50            die("モジュールの取得に失敗しました: $path");
51        }
52    } else {
53        die("モジュールが存在しません: module_id => $module_id");
54    }
55}
56?>
Note: See TracBrowser for help on using the repository browser.