Index: branches/comu-ver2/html/install/index.php
===================================================================
--- branches/comu-ver2/html/install/index.php	(revision 17419)
+++ branches/comu-ver2/html/install/index.php	(revision 17477)
@@ -23,5 +23,5 @@
 require_once("../require.php");
 $INSTALL_DIR = realpath(dirname( __FILE__));
-require_once("../" . HTML2DATA_DIR . "module/Request.php");
+require_once(DATA_PATH . "module/Request.php");
 
 define("INSTALL_LOG", "./temp/install.log");
@@ -382,13 +382,13 @@
     // プログラムで書込みされるファイル・ディレクトリ
     $arrWriteFile = array(
-        ".." . HTML2DATA_DIR . "install.php",
-        "../user_data",
-        "../cp",
-        "../upload",
-        ".." . HTML2DATA_DIR . "cache/",
-        ".." . HTML2DATA_DIR . "class/",
-        ".." . HTML2DATA_DIR . "Smarty/",
-        ".." . HTML2DATA_DIR . "logs/",
-        ".." . HTML2DATA_DIR . "downloads/"
+        DATA_PATH . "install.php",
+        HTML_PATH . "user_data",
+        HTML_PATH . "cp",
+        HTML_PATH . "upload",
+        DATA_PATH . "cache/",
+        DATA_PATH . "class/",
+        DATA_PATH . "Smarty/",
+        DATA_PATH . "logs/",
+        DATA_PATH . "downloads/"
     );
 
@@ -434,41 +434,41 @@
     // 権限エラー等が発生していない場合
     if(!$err_file) {
-        $path = ".." . HTML2DATA_DIR . "Smarty/templates_c/admin";
+        $path = DATA_PATH . "Smarty/templates_c/admin";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = ".." . HTML2DATA_DIR . "Smarty/templates_c/mobile";
+        $path = DATA_PATH . "Smarty/templates_c/mobile";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = "../upload/temp_template";
+        $path = HTML_PATH . "upload/temp_template";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = "../upload/save_image";
+        $path = HTML_PATH . "upload/save_image";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = "../upload/temp_image";
+        $path = HTML_PATH . "upload/temp_image";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = "../upload/graph_image";
+        $path = HTML_PATH . "upload/graph_image";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = "../upload/mobile_image";
+        $path = HTML_PATH . "upload/mobile_image";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = "../upload/csv";
+        $path = HTML_PATH . "upload/csv";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = ".." . HTML2DATA_DIR . "downloads/module";
+        $path = DATA_PATH . "downloads/module";
         if(!file_exists($path)) {
             mkdir($path);
         }
-        $path = ".." . HTML2DATA_DIR . "downloads/update";
+        $path = DATA_PATH . "downloads/update";
         if(!file_exists($path)) {
             mkdir($path);
@@ -497,24 +497,6 @@
     $objPage->tpl_mode = 'step0_1';
     // ファイルコピー
-    $objPage->copy_mess = SC_Utils_Ex::sfCopyDir("./user_data/", "../user_data/", $objPage->copy_mess);
-    $objPage->copy_mess = SC_Utils_Ex::sfCopyDir("./save_image/", "../upload/save_image/", $objPage->copy_mess);
-    return $objPage;
-}
-
-// STEP0_2画面の表示(ファイルのコピー)
-function lfDispStep0_2($objPage) {
-    global $objWebParam;
-    global $objDBParam;
-    // hiddenに入力値を保持
-    $objPage->arrHidden = $objWebParam->getHashArray();
-    // hiddenに入力値を保持
-    $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray());
-    $objPage->arrHidden['db_skip'] = $_POST['db_skip'];
-    $objPage->arrHidden['agreement'] = $_POST['agreement'];
-    $objPage->tpl_mainpage = 'step0_1.tpl';
-    $objPage->tpl_mode = 'step0_1';
-    // ファイルコピー
-    $objPage->copy_mess =  SC_Utils_Ex::sfCopyDir("./user_data/", "../user_data/", $objPage->copy_mess);
-    $objPage->copy_mess =  SC_Utils_Ex::sfCopyDir("./save_image/", "../upload/save_image/", $objPage->copy_mess);
+    $objPage->copy_mess = SC_Utils_Ex::sfCopyDir("./user_data/", HTML_PATH . "user_data/", $objPage->copy_mess);
+    $objPage->copy_mess = SC_Utils_Ex::sfCopyDir("./save_image/", HTML_PATH . "upload/save_image/", $objPage->copy_mess);
     return $objPage;
 }
@@ -623,10 +605,4 @@
     global $objDb;
 
-    if(defined('HTML_PATH')) {
-        $install_dir = HTML_PATH;
-    } else {
-		$install_dir = realpath(dirname( __FILE__) . "/../") . "/";
-    }
-
     if(defined('SITE_URL')) {
         $normal_url = SITE_URL;
@@ -658,5 +634,4 @@
     $objWebParam->addParam("管理者：ログインID", "login_id", MTEXT_LEN, "", array("EXIST_CHECK","EXIST_CHECK", "ALNUM_CHECK"));
     $objWebParam->addParam("管理者：パスワード", "login_pass", MTEXT_LEN, "", array("EXIST_CHECK","EXIST_CHECK", "ALNUM_CHECK"));
-    $objWebParam->addParam("インストールディレクトリ", "install_dir", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK"), $install_dir);
     $objWebParam->addParam("URL(通常)", "normal_url", MTEXT_LEN, "", array("EXIST_CHECK","URL_CHECK","MAX_LENGTH_CHECK"), $normal_url);
     $objWebParam->addParam("URL(セキュア)", "secure_url", MTEXT_LEN, "", array("EXIST_CHECK","URL_CHECK","MAX_LENGTH_CHECK"), $secure_url);
@@ -812,12 +787,6 @@
     global $objWebParam;
     global $objDBParam;
-
-    $root_dir = $objWebParam->getValue('install_dir');
-    $root_dir = str_replace("\\", "/", $root_dir);
-    // 語尾に'/'をつける
-    if (!ereg("/$", $root_dir)) {
-		$root_dir = $root_dir . "/";
-    }
-
+    global $INSTALL_DIR;
+    
     $normal_url = $objWebParam->getValue('normal_url');
     // 語尾に'/'をつける
@@ -835,17 +804,9 @@
     $url_dir = ereg_replace("^https?://[a-zA-Z0-9_:~=&\?\.\-]+", "", $normal_url);
 
-    $data_path = SC_Utils_Ex::sfRmDupSlash($root_dir . HTML2DATA_DIR);
-    $data_path = str_replace("\\", "/", realpath($data_path));
-    // 語尾に'/'をつける
-    if (!ereg("/$", $data_path)) {
-		$data_path = $data_path . "/";
-    }
-
-    $filepath = $data_path . "install.php";
+    $filepath = DATA_PATH . "install.php";
 
     $config_data =
     "<?php\n".
     "    define ('ECCUBE_INSTALL', 'ON');\n" .
-    "    define ('HTML_PATH', '" . $root_dir . "');\n" .
     "    define ('SITE_URL', '" . $normal_url . "');\n" .
     "    define ('SSL_URL', '" . $secure_url . "');\n" .
@@ -858,5 +819,4 @@
     "    define ('DB_NAME', '" . $objDBParam->getValue('db_name') . "');\n" .
     "    define ('DB_PORT', '" . $objDBParam->getValue('db_port') .  "');\n" .
-    "    define ('DATA_PATH', '".$data_path."');\n" .
     "    define ('MOBILE_HTML_PATH', HTML_PATH . 'mobile/');\n" .
     "    define ('MOBILE_SITE_URL', SITE_URL . 'mobile/');\n" .
@@ -869,35 +829,4 @@
         fclose($fp);
     }
-/* install_mobile.incは使用しない用に変更
-
-    // モバイル版の設定ファイル install_mobile.inc を作成する。
-    $filepath = $data_path . "install_mobile.inc";
-
-    $config_data =
-    "<?php\n".
-    "    define ('ECCUBE_INSTALL', 'ON');\n" .
-    "    define ('HTML_PATH', '" . $root_dir . "mobile/');\n" .
-    "    define ('PC_HTML_PATH', '" . $root_dir . "');\n" .
-    "    define ('SITE_URL', '" . $normal_url . "mobile/');\n" .
-    "    define ('PC_SITE_URL', '" . $normal_url . "');\n" .
-    "    define ('SSL_URL', '" . $secure_url . "mobile/');\n" .
-    "    define ('PC_SSL_URL', '" . $secure_url . "');\n" .
-    "    define ('URL_DIR', '" . $url_dir . "mobile/');\n" .
-    "    define ('PC_URL_DIR', '" . $url_dir . "');\n" .
-    "    define ('DOMAIN_NAME', '" . $objWebParam->getValue('domain') . "');\n" .
-    "    define ('DB_TYPE', '" . $objDBParam->getValue('db_type') . "');\n" .
-    "    define ('DB_USER', '" . $objDBParam->getValue('db_user') . "');\n" .
-    "    define ('DB_PASSWORD', '" . $objDBParam->getValue('db_password') . "');\n" .
-    "    define ('DB_SERVER', '" . $objDBParam->getValue('db_server') . "');\n" .
-    "    define ('DB_NAME', '" . $objDBParam->getValue('db_name') . "');\n" .
-    "    define ('DB_PORT', '" . $objDBParam->getValue('db_port') .  "');\n" .
-    "    define ('DATA_PATH', '".$data_path."');\n" .
-    "?>";
-
-    if($fp = fopen($filepath,"w")) {
-        fwrite($fp, $config_data);
-        fclose($fp);
-    }
-*/
 }
 
Index: branches/comu-ver2/html/install/templates/step1.tpl
===================================================================
--- branches/comu-ver2/html/install/templates/step1.tpl	(revision 16724)
+++ branches/comu-ver2/html/install/templates/step1.tpl	(revision 17477)
@@ -79,12 +79,4 @@
     <table width="500" border="0" cellspacing="1" cellpadding="8" summary=" ">
         <tr>
-            <td bgcolor="#f2f1ec" width="150" class="fs12n">HTMLパス<span class="red">※</span></td>
-            <td bgcolor="#ffffff" width="332" class="fs12">
-            <!--{assign var=key value="install_dir"}-->
-            <span class="red"><!--{$arrErr[$key]}--></span>
-            <input type="text" name="<!--{$key}-->" value="<!--{$arrForm[$key].value|escape}-->" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" size="40" class="box40" />
-            </td>
-        </tr>
-        <tr>
             <td bgcolor="#f2f1ec" width="150" class="fs12n">URL(通常)<span class="red">※</span></td>
             <td bgcolor="#ffffff" width="332" class="fs12">
Index: branches/comu-ver2/html/mobile/require.php
===================================================================
--- branches/comu-ver2/html/mobile/require.php	(revision 17137)
+++ branches/comu-ver2/html/mobile/require.php	(revision 17477)
@@ -21,21 +21,31 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
 
- */
-$include_dir = realpath(dirname( __FILE__));
-require_once($include_dir . "/../define.php");
+$include_dir = realpath(dirname( __FILE__)) . '/';
+
+if (!defined("HTML_PATH")) {
+    define("HTML_PATH", realpath($include_dir . '../') . '/');
+}
+
+require_once(HTML_PATH . "define.php");
+
+if (!defined("DATA_PATH")) {
+    define("DATA_PATH", HTML_PATH . HTML2DATA_DIR);
+}
+
 if (!defined("CLASS_PATH")) {
     /** クラスパス */
-    define("CLASS_PATH", $include_dir . "/.." . HTML2DATA_DIR . "class/");
+    define("CLASS_PATH", DATA_PATH . "class/");
 }
 
 if (!defined("CLASS_EX_PATH")) {
     /** クラスパス */
-    define("CLASS_EX_PATH", $include_dir . "/.." . HTML2DATA_DIR . "class_extends/");
+    define("CLASS_EX_PATH", DATA_PATH . "class_extends/");
 }
 
 if (!defined("CACHE_PATH")) {
     /** キャッシュ生成ディレクトリ */
-    define("CACHE_PATH", $include_dir . "/.." . HTML2DATA_DIR . "cache/");
+    define("CACHE_PATH", DATA_PATH . "cache/");
 }
 require_once(CLASS_EX_PATH . "SC_Initial_Mobile_Ex.php");
@@ -44,5 +54,6 @@
 $objInit->init();
 
-require_once($include_dir . "/.." . HTML2DATA_DIR . "include/module.inc");
+
+require_once(DATA_PATH . "include/module.inc");
 require_once(CLASS_EX_PATH . "util_extends/GC_Utils_Ex.php");
 require_once(CLASS_EX_PATH . "util_extends/SC_Utils_Ex.php");
@@ -75,5 +86,5 @@
 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Session_Ex.php");
 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mail_Ex.php");
-include_once($include_dir . "/require_plugin.php");
+include_once($include_dir . "require_plugin.php");
 
 // セッションハンドラ開始
Index: branches/comu-ver2/html/define.php
===================================================================
--- branches/comu-ver2/html/define.php	(revision 15745)
+++ branches/comu-ver2/html/define.php	(revision 17477)
@@ -1,8 +1,8 @@
 <?php
 /** HTMLディレクトリからのDATAディレクトリの相対パス */
-define("HTML2DATA_DIR", "/../data/");
+define("HTML2DATA_DIR", "../data/");
 
 /** DATA ディレクトリから HTML ディレクトリの相対パス */
-define("DATA_DIR2HTML", "/../html/");
+define("DATA_DIR2HTML", "../html/");
 
 /*
Index: branches/comu-ver2/html/admin/require.php
===================================================================
--- branches/comu-ver2/html/admin/require.php	(revision 17182)
+++ branches/comu-ver2/html/admin/require.php	(revision 17477)
@@ -21,19 +21,30 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
-$include_dir = realpath(dirname( __FILE__));
-require_once($include_dir . "/../define.php");
+
+$include_dir = realpath(dirname( __FILE__)) . '/';
+
+if (!defined("HTML_PATH")) {
+    define("HTML_PATH", realpath($include_dir . '../') . '/');
+}
+
+require_once(HTML_PATH . "define.php");
+
+if (!defined("DATA_PATH")) {
+    define("DATA_PATH", HTML_PATH . HTML2DATA_DIR);
+}
+
 if (!defined("CLASS_PATH")) {
     /** クラスパス */
-    define("CLASS_PATH", $include_dir . "/.." . HTML2DATA_DIR . "class/");
+    define("CLASS_PATH", DATA_PATH . "class/");
 }
 
 if (!defined("CLASS_EX_PATH")) {
     /** クラスパス */
-    define("CLASS_EX_PATH", $include_dir . "/.." . HTML2DATA_DIR . "class_extends/");
+    define("CLASS_EX_PATH", DATA_PATH . "class_extends/");
 }
 
 if (!defined("CACHE_PATH")) {
     /** キャッシュ生成ディレクトリ */
-    define("CACHE_PATH", $include_dir . "/.." . HTML2DATA_DIR . "cache/");
+    define("CACHE_PATH", DATA_PATH . "cache/");
 }
 require_once(CLASS_EX_PATH . "SC_Initial_Ex.php");
@@ -42,5 +53,6 @@
 $objInit->init();
 
-require_once($include_dir . "/.." . HTML2DATA_DIR . "include/module.inc");
+
+require_once(DATA_PATH . "include/module.inc");
 require_once(CLASS_EX_PATH . "util_extends/GC_Utils_Ex.php");
 require_once(CLASS_EX_PATH . "util_extends/SC_Utils_Ex.php");
@@ -67,6 +79,6 @@
 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Session_Ex.php");
 
-require_once($include_dir . "/.." . HTML2DATA_DIR . "module/Mail.php");
-require_once($include_dir . "/.." . HTML2DATA_DIR . "module/Mail/mime.php");
+require_once(DATA_PATH . "module/Mail.php");
+require_once(DATA_PATH . "module/Mail/mime.php");
 
 // インストールチェック
@@ -75,4 +87,5 @@
 // セッションハンドラ開始
 $objSession = new SC_Helper_Session_Ex();
+
 // セッション初期化・開始
 require_once CLASS_PATH . 'session/SC_SessionFactory.php';
Index: branches/comu-ver2/html/require.php
===================================================================
--- branches/comu-ver2/html/require.php	(revision 17137)
+++ branches/comu-ver2/html/require.php	(revision 17477)
@@ -22,19 +22,29 @@
  */
 
-$include_dir = realpath(dirname( __FILE__));
-require_once($include_dir . "/define.php");
+$include_dir = realpath(dirname( __FILE__)) . '/';
+
+if (!defined("HTML_PATH")) {
+    define("HTML_PATH", realpath($include_dir) . '/');
+}
+
+require_once(HTML_PATH . "define.php");
+
+if (!defined("DATA_PATH")) {
+    define("DATA_PATH", HTML_PATH . HTML2DATA_DIR);
+}
+
 if (!defined("CLASS_PATH")) {
     /** クラスパス */
-    define("CLASS_PATH", $include_dir . HTML2DATA_DIR . "class/");
+    define("CLASS_PATH", DATA_PATH . "class/");
 }
 
 if (!defined("CLASS_EX_PATH")) {
     /** クラスパス */
-    define("CLASS_EX_PATH", $include_dir . HTML2DATA_DIR . "class_extends/");
+    define("CLASS_EX_PATH", DATA_PATH . "class_extends/");
 }
 
 if (!defined("CACHE_PATH")) {
     /** キャッシュ生成ディレクトリ */
-    define("CACHE_PATH", $include_dir . HTML2DATA_DIR . "cache/");
+    define("CACHE_PATH", DATA_PATH . "cache/");
 }
 require_once(CLASS_EX_PATH . "SC_Initial_Ex.php");
@@ -44,5 +54,5 @@
 
 
-require_once($include_dir . HTML2DATA_DIR . "include/module.inc");
+require_once(DATA_PATH . "include/module.inc");
 require_once(CLASS_EX_PATH . "util_extends/GC_Utils_Ex.php");
 require_once(CLASS_EX_PATH . "util_extends/SC_Utils_Ex.php");
@@ -76,5 +86,5 @@
 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mail_Ex.php");
 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mobile_Ex.php");
-include_once($include_dir . "/require_plugin.php");
+include_once($include_dir . "require_plugin.php");
 
 // セッションハンドラ開始
