init(); register_shutdown_function(array($objPage, "destroy")); $objPage->process($mode); function lfPageFactory($mode) { $prefix = 'LC_Page_Upgrade_'; $file = CLASS_PATH . "pages/upgrade/${prefix}"; $class = $prefix; switch ($mode) { case 'products_list': $file .= 'ProductsList.php'; $class .= 'ProductsList'; break; case 'patch_download': case 'download': case 'auto_update': $file .= 'Download.php'; $class .= 'Download'; break; case 'site_check': $file .= 'SiteCheck.php'; $class .= 'SiteCheck'; break; default: header("HTTP/1.1 400 Bad Request"); GC_Util::gfPrintLog("modeの値が正しくありません。:".$mode); exit(); break; } require_once $file; return new $class; } ?>