source: branches/feature-module-update/html/upgrade/index.php @ 16383

Revision 16383, 1.1 KB checked in by adachi, 15 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 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
9    header("HTTP/1.1 400 Bad Request");
10    exit();
11}
12
13// {{{ requires
14require_once '../require.php';
15require_once '../admin/require.php';
16require_once DATA_PATH  . 'module/Services/JSON.php';
17
18// }}}
19// {{{ generate page
20
21$objPage = lfPageFactory();
22$objPage->init();
23$objPage->process();
24register_shutdown_function(array($objPage, "destroy"));
25
26function lfPageFactory() {
27    $mode = isset($_POST['mode']) ? $_POST['mode'] : '';
28
29    $prefix = 'LC_Page_Upgrade_';
30    $file   = CLASS_PATH . "pages/upgrade/${prefix}";
31    $class  = $prefix;
32
33    switch ($mode) {
34    case 'echo_key':
35        $file  .= 'EchoKey.php';
36        $class .= 'EchoKey';
37        break;
38    case 'products_list':
39        $file  .= 'ProductsList.php';
40        $class .= 'ProductsList';
41        break;
42    default:
43        header("HTTP/1.1 400 Bad Request");
44        exit();
45        break;
46    }
47
48    require_once $file;
49    return new $class;
50}
51?>
52
Note: See TracBrowser for help on using the repository browser.