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

Revision 16539, 1.4 KB checked in by adachi, 16 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';
17require_once DATA_PATH . 'module/Request.php';
18require_once DATA_PATH . "module/Tar.php";
19
20// }}}
21// {{{ generate page
22
23$objPage = lfPageFactory();
24register_shutdown_function(array($objPage, "destroy"));
25$objPage->init();
26$objPage->process();
27
28
29function lfPageFactory() {
30    $mode = isset($_POST['mode']) ? $_POST['mode'] : '';
31
32    $prefix = 'LC_Page_Upgrade_';
33    $file   = CLASS_PATH . "pages/upgrade/${prefix}";
34    $class  = $prefix;
35
36    switch ($mode) {
37    case 'echo_key':
38        $file  .= 'EchoKey.php';
39        $class .= 'EchoKey';
40        break;
41    case 'products_list':
42        $file  .= 'ProductsList.php';
43        $class .= 'ProductsList';
44        break;
45    case 'download':
46        $file  .= 'Download.php';
47        $class .= 'Download';
48        break;
49    case 'auto_update':
50        $file  .= 'AutoUpdate.php';
51        $class .= 'AutoUpdate';
52        break;
53    case 'site_check':
54        $file  .= 'SiteCheck.php';
55        $class .= 'SiteCheck';
56        break;
57    default:
58        header("HTTP/1.1 400 Bad Request");
59        exit();
60        break;
61    }
62
63    require_once $file;
64    return new $class;
65}
66?>
67
Note: See TracBrowser for help on using the repository browser.