Changeset 15812
- Timestamp:
- 2007/09/20 22:57:50 (16 years ago)
- Location:
- branches/feature-templates
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-templates/data/Smarty/templates/admin/design/template.tpl
r15775 r15812 88 88 <td width="50">ºï½ü</td> 89 89 </tr> 90 <tr bgcolor="#ffffff" align="center" class="fs12n"> 91 <td width=""><input type="radio" name="template_code" value="default" <!--{if !$tplcode}-->checked<!--{/if}-->></td> 92 <td width="" colspan="3">¥Æ¥ó¥×¥ì¡¼¥È¤ò»ÈÍѤ·¤Ê¤¤</td> 93 </tr> 90 94 <!--{foreach from=$templates item=tpl}--> 91 95 <!--{assign var=tplcode value=$tpl.template_code}--> -
branches/feature-templates/data/Smarty/templates/admin/design/up_down.tpl
r15775 r15812 155 155 ¥Ç¥¶¥¤¥ó´ÉÍý¤ÇºîÀ®¤·¤¿¥Õ¥¡¥¤¥ë¤Î¥À¥¦¥ó¥í¡¼¥É¤ò¹Ô¤¤¤Þ¤¹¡£<br/> 156 156 ¥À¥¦¥ó¥í¡¼¥É¥Õ¥¡¥¤¥ë¤Ë¤Ï²¼µ¤ÎÆâÍÆ¤¬´Þ¤Þ¤ì¤Þ¤¹¡£ 157 <!--{if $now_template}--> 157 158 <ul> 158 159 <li>user_data/tpl_packages/<!--{$now_template}-->/*</li> 159 160 </ul> 161 <!--{/if}--> 160 162 <ul> 161 163 <li>user_data/css/contents.css</li> -
branches/feature-templates/data/class/SC_View.php
r15811 r15812 268 268 if (file_exists($template_dir . $tpl_mainpage) 269 269 && file_exists($template_dir . $template)) { 270 270 echo '<font color="#ffffff">ok</font>'; 271 271 $this->_smarty->template_dir = $template_dir; 272 $this->_smarty->compile_dir .="/$template_name";272 $this->_smarty->compile_dir = COMPILE_DIR . "/$template_name"; 273 273 } 274 274 } … … 308 308 (file_exists($template_dir . $tpl_mainpage) || file_exists($tpl_mainpage)) 309 309 && file_exists($template_dir . $template)) { 310 310 echo 'ok'; 311 311 $this->_smarty->template_dir = $template_dir; 312 $this->_smarty->compile_dir .="/$template_name";312 $this->_smarty->compile_dir = COMPILE_DIR . "/$template_name"; 313 313 } 314 314 } -
branches/feature-templates/html/admin/design/template.php
r15803 r15812 49 49 50 50 if ($template_code == 'default') { 51 $objPage->tpl_onload="alert('½é´ü¥Ç¥¶¥¤¥ó¤ØÌᤷ¤Þ¤·¤¿¡£');"; 51 lfRegisterTemplate(''); 52 $objPage->tpl_onload="alert('ÅÐÏ¿¤¬´°Î»¤·¤Þ¤·¤¿¡£');"; 52 53 break; 53 54 } … … 59 60 lfChangeTemplate($template_code); 60 61 62 // XXX ¥³¥ó¥Ñ¥¤¥ë¥Õ¥¡¥¤¥ë¤Î¥¯¥ê¥¢½èÍý¤ò¹Ô¤¦ 61 63 $objView->_smarty->clear_compiled_tpl(); 62 64 -
branches/feature-templates/html/install/index.php
r15056 r15812 11 11 12 12 class LC_Page { 13 14 15 16 'mysql' => 'MySQL' 17 18 19 20 'mysql' => '' 21 22 13 function LC_Page() { 14 $this->arrDB_TYPE = array( 15 'pgsql' => 'PostgreSQL', 16 'mysql' => 'MySQL' 17 ); 18 $this->arrDB_PORT = array( 19 'pgsql' => '', 20 'mysql' => '' 21 ); 22 } 23 23 } 24 24 … … 30 30 31 31 if($mode != '777') { 32 33 32 sfErrorHeader($temp_dir . "¤Ë¥æ¡¼¥¶½ñ¹þ¤ß¸¢¸Â(777)¤òÉÕÍ¿¤·¤Æ²¼¤µ¤¤¡£", true); 33 exit; 34 34 } 35 35 … … 50 50 // ¤è¤¦¤³¤½ 51 51 case 'welcome': 52 53 54 55 52 //$objPage = lfDispAgreement($objPage); 53 $objPage = lfDispStep0($objPage); 54 //$objPage->tpl_onload .= "fnChangeVisible('agreement_yes', 'next');"; 55 break; 56 56 57 57 /* ¸½ºßÊÝÎ±Ãæ … … 59 59 // »ÈÍѵöÂú·ÀÌó½ñ¤ÎƱ°Õ 60 60 case 'agreement': 61 62 63 */ 64 61 $objPage = lfDispStep0($objPage); 62 break; 63 */ 64 65 65 // ¥¢¥¯¥»¥¹¸¢¸Â¤Î¥Á¥§¥Ã¥¯ 66 66 case 'step0': 67 68 break; 67 $objPage = lfDispStep0_1($objPage); 68 break; 69 69 // ¥Õ¥¡¥¤¥ë¤Î¥³¥Ô¡¼ 70 70 case 'step0_1': 71 72 break; 71 $objPage = lfDispStep1($objPage); 72 break; 73 73 // WEB¥µ¥¤¥È¤ÎÀßÄê 74 74 case 'step1': 75 76 77 78 79 80 81 82 75 //ÆþÎÏÃͤΥ¨¥é¡¼¥Á¥§¥Ã¥¯ 76 $objPage->arrErr = lfCheckWEBError($objWebParam); 77 if(count($objPage->arrErr) == 0) { 78 $objPage = lfDispStep2($objPage); 79 } else { 80 $objPage = lfDispStep1($objPage); 81 } 82 break; 83 83 // ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÀßÄê 84 84 case 'step2': 85 86 87 88 89 90 91 92 85 //ÆþÎÏÃͤΥ¨¥é¡¼¥Á¥§¥Ã¥¯ 86 $objPage->arrErr = lfCheckDBError($objDBParam); 87 if(count($objPage->arrErr) == 0) { 88 $objPage = lfDispStep3($objPage); 89 } else { 90 $objPage = lfDispStep2($objPage); 91 } 92 break; 93 93 // ¥Æ¡¼¥Ö¥ë¤ÎºîÀ® 94 94 case 'step3': 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 $objPage->arrErr = lfAddTable("dtb_blayn", $dsn); // ¥Ö¥ì¥¤¥óIP´ÉÍý¥Æ¡¼¥Ö¥ë 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 $objPage->arrErr = lfExecuteSQL("./sql/create_table_".$arrRet['db_type'].".sql", $dsn); 133 134 135 136 $objPage->tpl_message.="¡ß¡§¥Æ¡¼¥Ö¥ë¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 137 138 139 140 141 142 $objPage->arrErr = lfExecuteSQL("./sql/create_view.sql", $dsn); 143 144 145 146 $objPage->tpl_message.="¡ß¡§¥Ó¥å¡¼¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 147 148 } 149 150 151 152 $objPage->arrErr = lfExecuteSQL("./sql/insert_data.sql", $dsn); 153 154 155 156 157 $objPage->tpl_message.="¡ß¡§½é´ü¥Ç¡¼¥¿¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 158 159 } 160 161 162 163 $objPage->arrErr = lfExecuteSQL("./sql/column_comment.sql", $dsn); 164 165 166 167 $objPage->tpl_message.="¡ß¡§¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 168 169 } 170 171 172 173 $objPage->arrErr = lfExecuteSQL("./sql/table_comment.sql", $dsn); 174 175 176 177 $objPage->tpl_message.="¡ß¡§¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 178 179 180 181 182 183 184 185 186 187 188 189 95 // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 96 $arrRet = $objDBParam->getHashArray(); 97 $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 98 99 /* 100 lfAddTable¤Ï¡¢¥Ð¡¼¥¸¥ç¥ó¥¢¥Ã¥×Åù¤ÇÄɲåơ¼¥Ö¥ë¤¬È¯À¸¤·¤¿¾ì¹ç¤Ë¼Â¹Ô¤¹¤ë¡£ 101 ¡Ê£Ä£Â¹½À®¤Î²¼°Ì¸ß´¹¤Î¤¿¤á¥¹¥¥Ã¥×»þ¤â¶¯À©¡Ë 102 */ 103 // ¥Æ¡¼¥Ö¥ë¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¤ËÄɲ䵤ì¤ë¡£ 104 $objPage->arrErr = lfAddTable("dtb_session", $dsn); // ¥»¥Ã¥·¥ç¥ó´ÉÍý¥Æ¡¼¥Ö¥ë 105 $objPage->arrErr = lfAddTable("dtb_module", $dsn); // ¥â¥¸¥å¡¼¥ë´ÉÍý¥Æ¡¼¥Ö¥ë 106 $objPage->arrErr = lfAddTable("dtb_campaign_order", $dsn); // ¥¥ã¥ó¥Ú¡¼¥ó¼õÃí¥Æ¡¼¥Ö¥ë 107 $objPage->arrErr = lfAddTable("dtb_mobile_kara_mail", $dsn); // ¶õ¥á¡¼¥ë´ÉÍý¥Æ¡¼¥Ö¥ë 108 $objPage->arrErr = lfAddTable("dtb_mobile_ext_session_id", $dsn); // ¥»¥Ã¥·¥ç¥óID´ÉÍý¥Æ¡¼¥Ö¥ë 109 $objPage->arrErr = lfAddTable("dtb_site_control", $dsn); // ¥µ¥¤¥È¾ðÊó´ÉÍý¥Æ¡¼¥Ö¥ë 110 $objPage->arrErr = lfAddTable("dtb_trackback", $dsn); // ¥È¥é¥Ã¥¯¥Ð¥Ã¥¯´ÉÍý¥Æ¡¼¥Ö¥ë 111 $objPage->arrErr = lfAddTable("dtb_blayn", $dsn); // ¥Ö¥ì¥¤¥óIP´ÉÍý¥Æ¡¼¥Ö¥ë 112 113 // ¥«¥é¥à¤òÄɲà 114 lfAddColumn($dsn); 115 116 // ¥Ç¡¼¥¿¤òÄɲà 117 lfAddData($dsn); 118 119 if(count($objPage->arrErr) == 0) { 120 // ¥¹¥¥Ã¥×¤¹¤ë¾ì¹ç¤Ë¤Ï¼¡²èÌ̤ØÁ«°Ü 121 $skip = $_POST["db_skip"]; 122 if ($skip == "on") { 123 // ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÀ¸À® 124 lfMakeConfigFile(); 125 $objPage = lfDispComplete($objPage); 126 //$objPage = lfDispStep4($objPage); 127 break; 128 } 129 } 130 131 // ¥Æ¡¼¥Ö¥ë¤ÎºîÀ® 132 $objPage->arrErr = lfExecuteSQL("./sql/create_table_".$arrRet['db_type'].".sql", $dsn); 133 if(count($objPage->arrErr) == 0) { 134 $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 135 } else { 136 $objPage->tpl_message.="¡ß¡§¥Æ¡¼¥Ö¥ë¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 137 } 138 139 // ¥Ó¥å¡¼¤ÎºîÀ® 140 if(count($objPage->arrErr) == 0 and $arrRet['db_type'] == 'pgsql') { 141 // ¥Ó¥å¡¼¤ÎºîÀ® 142 $objPage->arrErr = lfExecuteSQL("./sql/create_view.sql", $dsn); 143 if(count($objPage->arrErr) == 0) { 144 $objPage->tpl_message.="¡û¡§¥Ó¥å¡¼¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 145 } else { 146 $objPage->tpl_message.="¡ß¡§¥Ó¥å¡¼¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 147 } 148 } 149 150 // ½é´ü¥Ç¡¼¥¿¤ÎºîÀ® 151 if(count($objPage->arrErr) == 0) { 152 $objPage->arrErr = lfExecuteSQL("./sql/insert_data.sql", $dsn); 153 154 if(count($objPage->arrErr) == 0) { 155 $objPage->tpl_message.="¡û¡§½é´ü¥Ç¡¼¥¿¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 156 } else { 157 $objPage->tpl_message.="¡ß¡§½é´ü¥Ç¡¼¥¿¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 158 } 159 } 160 161 // ¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß 162 if(count($objPage->arrErr) == 0) { 163 $objPage->arrErr = lfExecuteSQL("./sql/column_comment.sql", $dsn); 164 if(count($objPage->arrErr) == 0) { 165 $objPage->tpl_message.="¡û¡§¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 166 } else { 167 $objPage->tpl_message.="¡ß¡§¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 168 } 169 } 170 171 // ¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß 172 if(count($objPage->arrErr) == 0) { 173 $objPage->arrErr = lfExecuteSQL("./sql/table_comment.sql", $dsn); 174 if(count($objPage->arrErr) == 0) { 175 $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 176 } else { 177 $objPage->tpl_message.="¡ß¡§¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 178 } 179 } 180 181 if(count($objPage->arrErr) == 0) { 182 // ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÀ¸À® 183 lfMakeConfigFile(); 184 $objPage = lfDispStep3($objPage); 185 $objPage->tpl_mode = 'step4'; 186 } else { 187 $objPage = lfDispStep3($objPage); 188 } 189 break; 190 190 case 'step4': 191 192 193 191 $objPage = lfDispStep4($objPage); 192 break; 193 194 194 // ¥Æ¡¼¥Ö¥ëÎàºï½ü 195 195 case 'drop': 196 197 198 199 200 201 202 203 204 205 206 207 196 // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 197 $arrRet = $objDBParam->getHashArray(); 198 $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 199 200 // Äɲåơ¼¥Ö¥ë¤¬¤¢¤ì¤Ðºï½ü¤¹¤ë¡£ 201 lfDropTable("dtb_module", $dsn); 202 lfDropTable("dtb_session", $dsn); 203 lfDropTable("dtb_campaign_order", $dsn); 204 lfDropTable("dtb_mobile_ext_session_id", $dsn); 205 lfDropTable("dtb_mobile_kara_mail", $dsn); 206 lfDropTable("dtb_site_control", $dsn); 207 lfDropTable("dtb_trackback", $dsn); 208 208 lfDropTable("dtb_blayn", $dsn); 209 210 211 212 $objPage->arrErr = lfExecuteSQL("./sql/drop_view.sql", $dsn, false); 213 214 215 216 $objPage->tpl_message.="¡ß¡§¥Ó¥å¡¼¤Îºï½ü¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 217 218 219 220 221 222 $objPage->arrErr = lfExecuteSQL("./sql/drop_table.sql", $dsn, false); 223 224 225 226 $objPage->tpl_message.="¡ß¡§¥Æ¡¼¥Ö¥ë¤Îºï½ü¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 227 228 229 230 209 210 if ($arrRet['db_type'] == 'pgsql'){ 211 // ¥Ó¥å¡¼¤Îºï½ü 212 $objPage->arrErr = lfExecuteSQL("./sql/drop_view.sql", $dsn, false); 213 if(count($objPage->arrErr) == 0) { 214 $objPage->tpl_message.="¡û¡§¥Ó¥å¡¼¤Îºï½ü¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 215 } else { 216 $objPage->tpl_message.="¡ß¡§¥Ó¥å¡¼¤Îºï½ü¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 217 } 218 } 219 220 // ¥Æ¡¼¥Ö¥ë¤Îºï½ü 221 if(count($objPage->arrErr) == 0) { 222 $objPage->arrErr = lfExecuteSQL("./sql/drop_table.sql", $dsn, false); 223 if(count($objPage->arrErr) == 0) { 224 $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¤Îºï½ü¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 225 } else { 226 $objPage->tpl_message.="¡ß¡§¥Æ¡¼¥Ö¥ë¤Îºï½ü¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 227 } 228 } 229 $objPage = lfDispStep3($objPage); 230 break; 231 231 // ´°Î»²èÌÌ 232 232 case 'complete': 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 } else { 252 $objQuery->insert("dtb_baseinfo", $sqlval); 253 254 255 256 257 258 259 260 $objQuery->query($sql, array($login_id)); 261 262 263 264 265 $objQuery->query($sql, array($login_id, $login_pass)); 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 233 // ¥·¥ç¥Ã¥×¥Þ¥¹¥¿¾ðÊó¤Î½ñ¤¹þ¤ß 234 $arrRet = $objDBParam->getHashArray(); 235 236 $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 237 $sqlval['shop_name'] = $objWebParam->getValue('shop_name'); 238 $sqlval['email01'] = $objWebParam->getValue('admin_mail'); 239 $sqlval['email02'] = $objWebParam->getValue('admin_mail'); 240 $sqlval['email03'] = $objWebParam->getValue('admin_mail'); 241 $sqlval['email04'] = $objWebParam->getValue('admin_mail'); 242 $sqlval['email05'] = $objWebParam->getValue('admin_mail'); 243 $sqlval['top_tpl'] = "default1"; 244 $sqlval['product_tpl'] = "default1"; 245 $sqlval['detail_tpl'] = "default1"; 246 $sqlval['mypage_tpl'] = "default1"; 247 $objQuery = new SC_Query($dsn); 248 $cnt = $objQuery->count("dtb_baseinfo"); 249 if($cnt > 0) { 250 $objQuery->update("dtb_baseinfo", $sqlval); 251 } else { 252 $objQuery->insert("dtb_baseinfo", $sqlval); 253 } 254 255 // ´ÉÍý¼ÔÅÐÏ¿ 256 $login_id = $objWebParam->getValue('login_id'); 257 $login_pass = sha1($objWebParam->getValue('login_pass') . ":" . AUTH_MAGIC); 258 259 $sql = "DELETE FROM dtb_member WHERE login_id = ?"; 260 $objQuery->query($sql, array($login_id)); 261 262 $sql = "INSERT INTO dtb_member (name, login_id, password, creator_id, authority, work, del_flg, rank, create_date, update_date) 263 VALUES ('´ÉÍý¼Ô',?,?,0,0,1,0,1, now(), now());"; 264 265 $objQuery->query($sql, array($login_id, $login_pass)); 266 267 global $GLOBAL_ERR; 268 $GLOBAL_ERR = ""; 269 $objPage = lfDispComplete($objPage); 270 271 // ¥µ¥¤¥È¾ðÊó¤òÁ÷¿® 272 $req = new HTTP_Request("http://www.ec-cube.net/mall/use_site.php"); 273 $req->setMethod(HTTP_REQUEST_METHOD_POST); 274 275 $arrSendData = array(); 276 foreach($_POST as $key => $val){ 277 if (ereg("^senddata_*", $key)){ 278 $arrSendDataTmp = array(str_replace("senddata_", "", $key) => $val); 279 $arrSendData = array_merge($arrSendData, $arrSendDataTmp); 280 } 281 } 282 283 $req->addPostDataArray($arrSendData); 284 285 if (!PEAR::isError($req->sendRequest())) { 286 $response1 = $req->getResponseBody(); 287 } else { 288 $response1 = ""; 289 } 290 $req->clearPostData(); 291 292 break; 293 293 case 'return_step0': 294 295 break; 294 $objPage = lfDispStep0($objPage); 295 break; 296 296 case 'return_step1': 297 298 297 $objPage = lfDispStep1($objPage); 298 break; 299 299 case 'return_step2': 300 301 300 $objPage = lfDispStep2($objPage); 301 break; 302 302 case 'return_step3': 303 304 303 $objPage = lfDispStep3($objPage); 304 break; 305 305 case 'return_agreement': 306 307 308 306 $objPage = lfDispAgreement($objPage); 307 $objPage->tpl_onload .= "fnChangeVisible('agreement_yes', 'next');"; 308 break; 309 309 case 'return_welcome': 310 310 default: 311 312 311 $objPage = lfDispWelcome($objPage); 312 break; 313 313 } 314 314 … … 323 323 // ¤è¤¦¤³¤½²èÌ̤Îɽ¼¨ 324 324 function lfDispWelcome($objPage) { 325 326 327 328 329 330 331 332 333 334 335 325 global $objWebParam; 326 global $objDBParam; 327 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 328 $objPage->arrHidden = $objWebParam->getHashArray(); 329 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 330 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 331 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 332 $objPage->arrHidden['agreement'] = $_POST['agreement']; 333 $objPage->tpl_mainpage = 'welcome.tpl'; 334 $objPage->tpl_mode = 'welcome'; 335 return $objPage; 336 336 } 337 337 338 338 // »ÈÍѵöÂú·ÀÌó½ñ¤Îɽ¼¨ 339 339 function lfDispAgreement($objPage) { 340 341 342 343 344 345 346 347 $objPage->arrHidden['agreement'] = $_POST['agreement']; 348 349 350 351 } 352 353 // STEP0²èÌ̤Îɽ¼¨(¥Õ¥¡¥¤¥ë¸¢¸Â¥Á¥§¥Ã¥¯) 340 global $objWebParam; 341 global $objDBParam; 342 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 343 $objPage->arrHidden = $objWebParam->getHashArray(); 344 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 345 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 346 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 347 $objPage->arrHidden['agreement'] = $_POST['agreement']; 348 $objPage->tpl_mainpage = 'agreement.tpl'; 349 $objPage->tpl_mode = 'agreement'; 350 return $objPage; 351 } 352 353 // STEP0²èÌ̤Îɽ¼¨(¥Õ¥¡¥¤¥ë¸¢¸Â¥Á¥§¥Ã¥¯) 354 354 function lfDispStep0($objPage) { 355 global $objWebParam; 356 global $objDBParam; 357 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 358 $objPage->arrHidden = $objWebParam->getHashArray(); 359 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 360 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 361 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 362 $objPage->arrHidden['agreement'] = $_POST['agreement']; 363 $objPage->tpl_mainpage = 'step0.tpl'; 364 $objPage->tpl_mode = 'step0'; 365 366 // ¥×¥í¥°¥é¥à¤Ç½ñ¹þ¤ß¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥ì¥¯¥È¥ê 367 $arrWriteFile = array( 368 ".." . HTML2DATA_DIR . "install.php", 369 "../user_data", 370 "../cp", 371 "../upload", 372 ".." . HTML2DATA_DIR . "Smarty/templates_c", 373 ".." . HTML2DATA_DIR . "downloads", 374 ".." . HTML2DATA_DIR . "logs" 375 ); 376 377 $mess = ""; 378 $err_file = false; 379 foreach($arrWriteFile as $val) { 380 if(file_exists($val)) { 381 $mode = lfGetFileMode($val); 382 $real_path = realpath($val); 383 384 // ¥Ç¥£¥ì¥¯¥È¥ê¤Î¾ì¹ç 385 if(is_dir($val)) { 386 if($mode == "777") { 387 $mess.= ">> ¡û¡§$real_path($mode) <br>¥¢¥¯¥»¥¹¸¢¸Â¤ÏÀµ¾ï¤Ç¤¹¡£<br>"; 388 } else { 389 $mess.= ">> ¡ß¡§$real_path($mode) <br>¥æ¡¼¥¶½ñ¹þ¤ß¸¢¸Â(777)¤òÉÕÍ¿¤·¤Æ²¼¤µ¤¤¡£<br>"; 390 $err_file = true; 391 } 392 } else { 393 if($mode == "666") { 394 $mess.= ">> ¡û¡§$real_path($mode) <br>¥¢¥¯¥»¥¹¸¢¸Â¤ÏÀµ¾ï¤Ç¤¹¡£<br>"; 395 } else { 396 $mess.= ">> ¡ß¡§$real_path($mode) <br>¥æ¡¼¥¶½ñ¹þ¤ß¸¢¸Â(666)¤òÉÕÍ¿¤·¤Æ²¼¤µ¤¤¡£<br>"; 397 $err_file = true; 398 } 399 } 400 } else { 401 $mess.= ">> ¡ß¡§$val ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£<br>"; 402 $err_file = true; 403 } 404 } 405 406 // ¸¢¸Â¥¨¥é¡¼Åù¤¬È¯À¸¤·¤Æ¤¤¤Ê¤¤¾ì¹ç 407 if(!$err_file) { 408 $path = ".." . HTML2DATA_DIR . "Smarty/templates_c/admin"; 409 if(!file_exists($path)) { 410 mkdir($path); 411 } 412 $path = ".." . HTML2DATA_DIR . "Smarty/templates_c/mobile"; 413 if(!file_exists($path)) { 414 mkdir($path); 415 } 416 $path = "../upload/temp_template"; 417 if(!file_exists($path)) { 418 mkdir($path); 419 } 420 $path = "../upload/save_image"; 421 if(!file_exists($path)) { 422 mkdir($path); 423 } 424 $path = "../upload/temp_image"; 425 if(!file_exists($path)) { 426 mkdir($path); 427 } 428 $path = "../upload/graph_image"; 429 if(!file_exists($path)) { 430 mkdir($path); 431 } 355 global $objWebParam; 356 global $objDBParam; 357 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 358 $objPage->arrHidden = $objWebParam->getHashArray(); 359 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 360 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 361 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 362 $objPage->arrHidden['agreement'] = $_POST['agreement']; 363 $objPage->tpl_mainpage = 'step0.tpl'; 364 $objPage->tpl_mode = 'step0'; 365 366 // ¥×¥í¥°¥é¥à¤Ç½ñ¹þ¤ß¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥ì¥¯¥È¥ê 367 $arrWriteFile = array( 368 ".." . HTML2DATA_DIR . "install.php", 369 "../user_data", 370 "../cp", 371 "../upload", 372 ".." . HTML2DATA_DIR . "Smarty/templates_c", 373 ".." . HTML2DATA_DIR . "downloads", 374 ".." . HTML2DATA_DIR . "logs" 375 ); 376 377 $mess = ""; 378 $err_file = false; 379 foreach($arrWriteFile as $val) { 380 if(file_exists($val)) { 381 $mode = lfGetFileMode($val); 382 $real_path = realpath($val); 383 384 // ¥Ç¥£¥ì¥¯¥È¥ê¤Î¾ì¹ç 385 if(is_dir($val)) { 386 if($mode == "777") { 387 $mess.= ">> ¡û¡§$real_path($mode) <br>¥¢¥¯¥»¥¹¸¢¸Â¤ÏÀµ¾ï¤Ç¤¹¡£<br>"; 388 } else { 389 $mess.= ">> ¡ß¡§$real_path($mode) <br>¥æ¡¼¥¶½ñ¹þ¤ß¸¢¸Â(777)¤òÉÕÍ¿¤·¤Æ²¼¤µ¤¤¡£<br>"; 390 $err_file = true; 391 } 392 } else { 393 if($mode == "666") { 394 $mess.= ">> ¡û¡§$real_path($mode) <br>¥¢¥¯¥»¥¹¸¢¸Â¤ÏÀµ¾ï¤Ç¤¹¡£<br>"; 395 } else { 396 $mess.= ">> ¡ß¡§$real_path($mode) <br>¥æ¡¼¥¶½ñ¹þ¤ß¸¢¸Â(666)¤òÉÕÍ¿¤·¤Æ²¼¤µ¤¤¡£<br>"; 397 $err_file = true; 398 } 399 } 400 } else { 401 $mess.= ">> ¡ß¡§$val ¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó¡£<br>"; 402 $err_file = true; 403 } 404 } 405 406 // ¸¢¸Â¥¨¥é¡¼Åù¤¬È¯À¸¤·¤Æ¤¤¤Ê¤¤¾ì¹ç 407 if(!$err_file) { 408 $path = ".." . HTML2DATA_DIR . "Smarty/templates_c/admin"; 409 if(!file_exists($path)) { 410 mkdir($path); 411 } 412 $path = ".." . HTML2DATA_DIR . "Smarty/templates_c/mobile"; 413 if(!file_exists($path)) { 414 mkdir($path); 415 } 416 $path = ".." . HTML2DATA_DIR . "Smarty/templates_c/default1"; 417 if(!file_exists($path)) { 418 mkdir($path); 419 } 420 $path = "../upload/temp_template"; 421 if(!file_exists($path)) { 422 mkdir($path); 423 } 424 $path = "../upload/save_image"; 425 if(!file_exists($path)) { 426 mkdir($path); 427 } 428 $path = "../upload/temp_image"; 429 if(!file_exists($path)) { 430 mkdir($path); 431 } 432 $path = "../upload/graph_image"; 433 if(!file_exists($path)) { 434 mkdir($path); 435 } 432 436 $path = "../upload/mobile_image"; 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 } 448 449 450 451 452 453 454 } 455 456 // STEP0_1²èÌ̤Îɽ¼¨(¥Õ¥¡¥¤¥ë¤Î¥³¥Ô¡¼) 437 if(!file_exists($path)) { 438 mkdir($path); 439 } 440 $path = "../upload/csv"; 441 if(!file_exists($path)) { 442 mkdir($path); 443 } 444 $path = ".." . HTML2DATA_DIR . "downloads/module"; 445 if(!file_exists($path)) { 446 mkdir($path); 447 } 448 $path = ".." . HTML2DATA_DIR . "downloads/update"; 449 if(!file_exists($path)) { 450 mkdir($path); 451 } 452 } 453 454 $objPage->mess = $mess; 455 $objPage->err_file = $err_file; 456 457 return $objPage; 458 } 459 460 // STEP0_1²èÌ̤Îɽ¼¨(¥Õ¥¡¥¤¥ë¤Î¥³¥Ô¡¼) 457 461 function lfDispStep0_1($objPage) { 458 459 460 461 462 463 464 465 466 467 468 469 470 $objPage->copy_mess = sfCopyDir("./save_image/", "../upload/save_image/", $objPage->copy_mess); 471 472 } 473 474 // STEP0_2²èÌ̤Îɽ¼¨(¥Õ¥¡¥¤¥ë¤Î¥³¥Ô¡¼) 462 global $objWebParam; 463 global $objDBParam; 464 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 465 $objPage->arrHidden = $objWebParam->getHashArray(); 466 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 467 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 468 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 469 $objPage->arrHidden['agreement'] = $_POST['agreement']; 470 $objPage->tpl_mainpage = 'step0_1.tpl'; 471 $objPage->tpl_mode = 'step0_1'; 472 // ¥Õ¥¡¥¤¥ë¥³¥Ô¡¼ 473 $objPage->copy_mess = sfCopyDir("./user_data/", "../user_data/", $objPage->copy_mess); 474 $objPage->copy_mess = sfCopyDir("./save_image/", "../upload/save_image/", $objPage->copy_mess); 475 return $objPage; 476 } 477 478 // STEP0_2²èÌ̤Îɽ¼¨(¥Õ¥¡¥¤¥ë¤Î¥³¥Ô¡¼) 475 479 function lfDispStep0_2($objPage) { 476 477 478 479 480 481 482 483 484 485 486 487 488 $objPage->copy_mess = sfCopyDir("./save_image/", "../upload/save_image/", $objPage->copy_mess); 489 480 global $objWebParam; 481 global $objDBParam; 482 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 483 $objPage->arrHidden = $objWebParam->getHashArray(); 484 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 485 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 486 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 487 $objPage->arrHidden['agreement'] = $_POST['agreement']; 488 $objPage->tpl_mainpage = 'step0_1.tpl'; 489 $objPage->tpl_mode = 'step0_1'; 490 // ¥Õ¥¡¥¤¥ë¥³¥Ô¡¼ 491 $objPage->copy_mess = sfCopyDir("./user_data/", "../user_data/", $objPage->copy_mess); 492 $objPage->copy_mess = sfCopyDir("./save_image/", "../upload/save_image/", $objPage->copy_mess); 493 return $objPage; 490 494 } 491 495 492 496 function lfGetFileMode($path) { 493 494 497 $mode = substr(sprintf('%o', fileperms($path)), -3); 498 return $mode; 495 499 } 496 500 497 501 // STEP1²èÌ̤Îɽ¼¨ 498 502 function lfDispStep1($objPage) { 499 500 501 502 503 504 505 506 503 global $objDBParam; 504 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 505 $objPage->arrHidden = $objDBParam->getHashArray(); 506 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 507 $objPage->arrHidden['agreement'] = $_POST['agreement']; 508 $objPage->tpl_mainpage = 'step1.tpl'; 509 $objPage->tpl_mode = 'step1'; 510 return $objPage; 507 511 } 508 512 509 513 // STEP2²èÌ̤Îɽ¼¨ 510 514 function lfDispStep2($objPage) { 511 512 513 514 515 516 517 518 519 515 global $objWebParam; 516 global $objDBParam; 517 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 518 $objPage->arrHidden = $objWebParam->getHashArray(); 519 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 520 $objPage->arrHidden['agreement'] = $_POST['agreement']; 521 $objPage->tpl_mainpage = 'step2.tpl'; 522 $objPage->tpl_mode = 'step2'; 523 return $objPage; 520 524 } 521 525 522 526 // STEP3²èÌ̤Îɽ¼¨ 523 527 function lfDispStep3($objPage) { 524 525 526 527 528 529 530 531 532 533 534 528 global $objWebParam; 529 global $objDBParam; 530 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 531 $objPage->arrHidden = $objWebParam->getHashArray(); 532 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 533 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 534 $objPage->arrHidden['agreement'] = $_POST['agreement']; 535 $objPage->tpl_db_skip = $_POST['db_skip']; 536 $objPage->tpl_mainpage = 'step3.tpl'; 537 $objPage->tpl_mode = 'step3'; 538 return $objPage; 535 539 } 536 540 537 541 // STEP4²èÌ̤Îɽ¼¨ 538 542 function lfDispStep4($objPage) { 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 543 global $objWebParam; 544 global $objDBParam; 545 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 546 $objPage->arrHidden = $objWebParam->getHashArray(); 547 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 548 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 549 $objPage->arrHidden['agreement'] = $_POST['agreement']; 550 551 $normal_url = $objWebParam->getValue('normal_url'); 552 // ¸ìÈø¤Ë'/'¤ò¤Ä¤±¤ë 553 if (!ereg("/$", $normal_url)) $normal_url = $normal_url . "/"; 554 555 $arrDbParam = $objDBParam->getHashArray(); 556 $dsn = $arrDbParam['db_type']."://".$arrDbParam['db_user'].":".$arrDbParam['db_password']."@".$arrDbParam['db_server'].":".$arrDbParam['db_port']."/".$arrDbParam['db_name']; 557 558 $objPage->tpl_site_url = $normal_url; 559 $objPage->tpl_shop_name = $objWebParam->getValue('shop_name'); 560 $objPage->tpl_cube_ver = ECCUBE_VERSION; 561 $objPage->tpl_php_ver = phpversion(); 562 $objPage->tpl_db_ver = sfGetDBVersion($dsn); 563 $objPage->tpl_db_skip = $_POST['db_skip']; 564 $objPage->tpl_mainpage = 'step4.tpl'; 565 $objPage->tpl_mode = 'complete'; 566 return $objPage; 563 567 } 564 568 565 569 // ´°Î»²èÌ̤Îɽ¼¨ 566 570 function lfDispComplete($objPage) { 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 $objPage->tpl_sslurl = $secure_url; 583 571 global $objWebParam; 572 global $objDBParam; 573 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 574 $objPage->arrHidden = $objWebParam->getHashArray(); 575 // hidden¤ËÆþÎÏÃͤòÊÝ»ý 576 $objPage->arrHidden = array_merge($objPage->arrHidden, $objDBParam->getHashArray()); 577 $objPage->arrHidden['db_skip'] = $_POST['db_skip']; 578 $objPage->tpl_mainpage = 'complete.tpl'; 579 $objPage->tpl_mode = 'complete'; 580 581 $secure_url = $objWebParam->getValue('secure_url'); 582 // ¸ìÈø¤Ë'/'¤ò¤Ä¤±¤ë 583 if (!ereg("/$", $secure_url)) { 584 $secure_url = $secure_url . "/"; 585 } 586 $objPage->tpl_sslurl = $secure_url; 587 return $objPage; 584 588 } 585 589 586 590 // WEB¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ 587 591 function lfInitWebParam($objWebParam) { 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 $objWebParam->addParam("¥É¥á¥¤¥ó", "domain", MTEXT_LEN, "", array("MAX_LENGTH_CHECK")); 628 629 592 593 if(defined('HTML_PATH')) { 594 $install_dir = HTML_PATH; 595 } else { 596 $install_dir = realpath(dirname( __FILE__) . "/../") . "/"; 597 } 598 599 if(defined('SITE_URL')) { 600 $normal_url = SITE_URL; 601 } else { 602 $dir = ereg_replace("install/.*$", "", $_SERVER['REQUEST_URI']); 603 $normal_url = "http://" . $_SERVER['HTTP_HOST'] . $dir; 604 } 605 606 if(defined('SSL_URL')) { 607 $secure_url = SSL_URL; 608 } else { 609 $dir = ereg_replace("install/.*$", "", $_SERVER['REQUEST_URI']); 610 $secure_url = "http://" . $_SERVER['HTTP_HOST'] . $dir; 611 } 612 613 // Ź̾¡¢´ÉÍý¼Ô¥á¡¼¥ë¥¢¥É¥ì¥¹¤ò¼èÆÀ¤¹¤ë¡£(ºÆ¥¤¥ó¥¹¥È¡¼¥ë»þ) 614 if(defined('DEFAULT_DSN')) { 615 $ret = sfTabaleExists("dtb_baseinfo", DEFAULT_DSN); 616 if($ret) { 617 $objQuery = new SC_Query(); 618 $arrRet = $objQuery->select("shop_name, email01", "dtb_baseinfo"); 619 $shop_name = $arrRet[0]['shop_name']; 620 $admin_mail = $arrRet[0]['email01']; 621 } 622 } 623 624 $objWebParam->addParam("Ź̾", "shop_name", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK"), $shop_name); 625 $objWebParam->addParam("´ÉÍý¼Ô¡§¥á¡¼¥ë¥¢¥É¥ì¥¹", "admin_mail", MTEXT_LEN, "", array("EXIST_CHECK","EMAIL_CHECK","EMAIL_CHAR_CHECK","MAX_LENGTH_CHECK"), $admin_mail); 626 $objWebParam->addParam("´ÉÍý¼Ô¡§¥í¥°¥¤¥óID", "login_id", MTEXT_LEN, "", array("EXIST_CHECK","EXIST_CHECK", "ALNUM_CHECK")); 627 $objWebParam->addParam("´ÉÍý¼Ô¡§¥Ñ¥¹¥ï¡¼¥É", "login_pass", MTEXT_LEN, "", array("EXIST_CHECK","EXIST_CHECK", "ALNUM_CHECK")); 628 $objWebParam->addParam("¥¤¥ó¥¹¥È¡¼¥ë¥Ç¥£¥ì¥¯¥È¥ê", "install_dir", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK"), $install_dir); 629 $objWebParam->addParam("URL(Ä̾ï)", "normal_url", MTEXT_LEN, "", array("EXIST_CHECK","URL_CHECK","MAX_LENGTH_CHECK"), $normal_url); 630 $objWebParam->addParam("URL(¥»¥¥å¥¢)", "secure_url", MTEXT_LEN, "", array("EXIST_CHECK","URL_CHECK","MAX_LENGTH_CHECK"), $secure_url); 631 $objWebParam->addParam("¥É¥á¥¤¥ó", "domain", MTEXT_LEN, "", array("MAX_LENGTH_CHECK")); 632 633 return $objWebParam; 630 634 } 631 635 632 636 // DB¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ 633 637 function lfInitDBParam($objDBParam) { 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 $db_user = "eccube_db_user"; 663 664 665 666 667 668 669 670 $objDBParam->addParam("DB¥Ñ¥¹¥ï¡¼¥É", "db_password", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK")); 671 672 638 639 if(defined('DB_SERVER')) { 640 $db_server = DB_SERVER; 641 } else { 642 $db_server = "127.0.0.1"; 643 } 644 645 if(defined('DB_TYPE')) { 646 $db_type = DB_TYPE; 647 } else { 648 $db_type = ""; 649 } 650 651 if(defined('DB_PORT')) { 652 $db_port = DB_PORT; 653 } else { 654 $db_port = ""; 655 } 656 657 if(defined('DB_NAME')) { 658 $db_name = DB_NAME; 659 } else { 660 $db_name = "eccube_db"; 661 } 662 663 if(defined('DB_USER')) { 664 $db_user = DB_USER; 665 } else { 666 $db_user = "eccube_db_user"; 667 } 668 669 $objDBParam->addParam("DB¤Î¼ïÎà", "db_type", INT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK"), $db_type); 670 $objDBParam->addParam("DB¥µ¡¼¥Ð", "db_server", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK"), $db_server); 671 $objDBParam->addParam("DB¥Ý¡¼¥È", "db_port", INT_LEN, "", array("MAX_LENGTH_CHECK"), $db_port); 672 $objDBParam->addParam("DB̾", "db_name", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK"), $db_name); 673 $objDBParam->addParam("DB¥æ¡¼¥¶", "db_user", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK"), $db_user); 674 $objDBParam->addParam("DB¥Ñ¥¹¥ï¡¼¥É", "db_password", MTEXT_LEN, "", array("EXIST_CHECK","MAX_LENGTH_CHECK")); 675 676 return $objDBParam; 673 677 } 674 678 675 679 // ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ 676 680 function lfCheckWebError($objFormParam) { 677 678 679 680 681 682 683 684 685 686 687 688 $objErr->arrErr['secure_url'] = "URL¤Ë°Û¤Ê¤ë³¬Áؤò»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£"; 689 690 691 692 693 694 695 $objErr->doFunc( array("´ÉÍý¼Ô¡§¥Ñ¥¹¥ï¡¼¥É",'login_pass',4 ,15 ) ,array( "NUM_RANGE_CHECK" ) ); 696 697 681 // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 682 $arrRet = $objFormParam->getHashArray(); 683 $objErr = new SC_CheckError($arrRet); 684 $objErr->arrErr = $objFormParam->checkError(); 685 686 // ¥Ç¥£¥ì¥¯¥È¥ê̾¤Î¤ß¼èÆÀ¤¹¤ë 687 $normal_dir = ereg_replace("^https?://[a-zA-Z0-9_~=&\?\.\-]+", "", $arrRet['normal_url']); 688 $secure_dir = ereg_replace("^https?://[a-zA-Z0-9_~=&\?\.\-]+", "", $arrRet['secure_url']); 689 690 if($normal_dir != $secure_dir) { 691 $objErr->arrErr['normal_url'] = "URL¤Ë°Û¤Ê¤ë³¬Áؤò»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£"; 692 $objErr->arrErr['secure_url'] = "URL¤Ë°Û¤Ê¤ë³¬Áؤò»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£"; 693 } 694 695 // ¥í¥°¥¤¥óID¥Á¥§¥Ã¥¯ 696 $objErr->doFunc(array("´ÉÍý¼Ô¡§¥í¥°¥¤¥óID",'login_id',ID_MIN_LEN , ID_MAX_LEN) ,array("NUM_RANGE_CHECK")); 697 698 // ¥Ñ¥¹¥ï¡¼¥É¤Î¥Á¥§¥Ã¥¯ 699 $objErr->doFunc( array("´ÉÍý¼Ô¡§¥Ñ¥¹¥ï¡¼¥É",'login_pass',4 ,15 ) ,array( "NUM_RANGE_CHECK" ) ); 700 701 return $objErr->arrErr; 698 702 } 699 703 700 704 // ÆþÎÏÆâÍÆ¤Î¥Á¥§¥Ã¥¯ 701 705 function lfCheckDBError($objFormParam) { 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 $objPage->tpl_db_version = sfGetDBVersion($dsn); 720 721 722 723 724 725 726 727 728 706 global $objPage; 707 708 // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 709 $arrRet = $objFormParam->getHashArray(); 710 711 $objErr = new SC_CheckError($arrRet); 712 $objErr->arrErr = $objFormParam->checkError(); 713 714 if(count($objErr->arrErr) == 0) { 715 // Àܳ³Îǧ 716 $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 717 // Debug¥â¡¼¥É»ØÄê 718 $options['debug'] = PEAR_DB_DEBUG; 719 $objDB = DB::connect($dsn, $options); 720 // ÀܳÀ®¸ù 721 if(!PEAR::isError($objDB)) { 722 // ¥Ç¡¼¥¿¥Ù¡¼¥¹¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤Î¼èÆÀ 723 $objPage->tpl_db_version = sfGetDBVersion($dsn); 724 } else { 725 $objErr->arrErr['all'] = ">> " . $objDB->message . "<br>"; 726 // ¥¨¥é¡¼Ê¸¤ò¼èÆÀ¤¹¤ë 727 ereg("\[(.*)\]", $objDB->userinfo, $arrKey); 728 $objErr->arrErr['all'].= $arrKey[0] . "<br>"; 729 gfPrintLog($objDB->userinfo, INSTALL_LOG); 730 } 731 } 732 return $objErr->arrErr; 729 733 } 730 734 731 735 // SQLʸ¤Î¼Â¹Ô 732 736 function lfExecuteSQL($filepath, $dsn, $disp_err = true) { 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 } 763 764 765 766 767 768 737 $arrErr = array(); 738 739 if(!file_exists($filepath)) { 740 $arrErr['all'] = ">> ¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó"; 741 } else { 742 if($fp = fopen($filepath,"r")) { 743 $sql = fread($fp, filesize($filepath)); 744 fclose($fp); 745 } 746 // Debug¥â¡¼¥É»ØÄê 747 $options['debug'] = PEAR_DB_DEBUG; 748 $objDB = DB::connect($dsn, $options); 749 // Àܳ¥¨¥é¡¼ 750 if(!PEAR::isError($objDB)) { 751 // ²þ¹Ô¡¢¥¿¥Ö¤ò1¥¹¥Ú¡¼¥¹¤ËÊÑ´¹ 752 $sql = preg_replace("/[\r\n\t]/"," ",$sql); 753 $sql_split = split(";",$sql); 754 foreach($sql_split as $key => $val){ 755 if (trim($val) != "") { 756 $ret = $objDB->query($val); 757 if(PEAR::isError($ret) && $disp_err) { 758 $arrErr['all'] = ">> " . $ret->message . "<br>"; 759 // ¥¨¥é¡¼Ê¸¤ò¼èÆÀ¤¹¤ë 760 ereg("\[(.*)\]", $ret->userinfo, $arrKey); 761 $arrErr['all'].= $arrKey[0] . "<br>"; 762 $objPage->update_mess.=">> ¥Æ¡¼¥Ö¥ë¹½À®¤ÎÊѹ¹¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 763 gfPrintLog($ret->userinfo, INSTALL_LOG); 764 } 765 } 766 } 767 } else { 768 $arrErr['all'] = ">> " . $objDB->message; 769 gfPrintLog($objDB->userinfo, INSTALL_LOG); 770 } 771 } 772 return $arrErr; 769 773 } 770 774 771 775 // ÀßÄê¥Õ¥¡¥¤¥ë¤ÎºîÀ® 772 776 function lfMakeConfigFile() { 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 777 global $objWebParam; 778 global $objDBParam; 779 780 $root_dir = $objWebParam->getValue('install_dir'); 781 // ¸ìÈø¤Ë'/'¤ò¤Ä¤±¤ë 782 if (!ereg("/$", $root_dir)) { 783 $root_dir = $root_dir . "/"; 784 } 785 786 $normal_url = $objWebParam->getValue('normal_url'); 787 // ¸ìÈø¤Ë'/'¤ò¤Ä¤±¤ë 788 if (!ereg("/$", $normal_url)) { 789 $normal_url = $normal_url . "/"; 790 } 791 792 $secure_url = $objWebParam->getValue('secure_url'); 793 // ¸ìÈø¤Ë'/'¤ò¤Ä¤±¤ë 794 if (!ereg("/$", $secure_url)) { 795 $secure_url = $secure_url . "/"; 796 } 797 798 // ¥Ç¥£¥ì¥¯¥È¥ê¤Î¼èÆÀ 799 $url_dir = ereg_replace("^https?://[a-zA-Z0-9_~=&\?\.\-]+", "", $normal_url); 800 801 $data_path = sfRmDupSlash($root_dir . HTML2DATA_DIR); 798 802 $data_path = realpath($data_path); 799 803 // ¸ìÈø¤Ë'/'¤ò¤Ä¤±¤ë 800 801 802 803 804 805 $config_data = 806 807 808 " define ('HTML_PATH', '" . $root_dir . "');\n" . 809 810 811 " define ('URL_DIR', '" . $url_dir . "');\n" . 812 813 814 " define ('DB_USER', '" . $objDBParam->getValue('db_user') . "');\n" . 815 816 817 818 819 804 if (!ereg("/$", $data_path)) { 805 $data_path = $data_path . "/"; 806 } 807 $filepath = $data_path . "install.php"; 808 809 $config_data = 810 "<?php\n". 811 " define ('ECCUBE_INSTALL', 'ON');\n" . 812 " define ('HTML_PATH', '" . $root_dir . "');\n" . 813 " define ('SITE_URL', '" . $normal_url . "');\n" . 814 " define ('SSL_URL', '" . $secure_url . "');\n" . 815 " define ('URL_DIR', '" . $url_dir . "');\n" . 816 " define ('DOMAIN_NAME', '" . $objWebParam->getValue('domain') . "');\n" . 817 " define ('DB_TYPE', '" . $objDBParam->getValue('db_type') . "');\n" . 818 " define ('DB_USER', '" . $objDBParam->getValue('db_user') . "');\n" . 819 " define ('DB_PASSWORD', '" . $objDBParam->getValue('db_password') . "');\n" . 820 " define ('DB_SERVER', '" . $objDBParam->getValue('db_server') . "');\n" . 821 " define ('DB_NAME', '" . $objDBParam->getValue('db_name') . "');\n" . 822 " define ('DB_PORT', '" . $objDBParam->getValue('db_port') . "');\n" . 823 " define ('DATA_PATH', '".$data_path."');\n" . 820 824 " define ('MOBILE_HTML_PATH', HTML_PATH . 'mobile/');\n" . 821 825 " define ('MOBILE_SITE_URL', SITE_URL . 'mobile/');\n" . 822 826 " define ('MOBILE_SSL_URL', SSL_URL . 'mobile/');\n" . 823 827 " define ('MOBILE_URL_DIR', URL_DIR . 'mobile/');\n" . 824 825 826 827 828 829 828 "?>"; 829 830 if($fp = fopen($filepath,"w")) { 831 fwrite($fp, $config_data); 832 fclose($fp); 833 } 830 834 } 831 835 … … 833 837 function lfAddTable($table_name, $dsn) { 834 838 global $objPage; 835 836 837 838 839 840 841 842 843 $objPage->tpl_message.="¡ß¡§Äɲåơ¼¥Ö¥ë($table_name)¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 844 845 846 $objPage->tpl_message.="¡û¡§Äɲåơ¼¥Ö¥ë($table_name)¤¬³Îǧ¤µ¤ì¤Þ¤·¤¿¡£<br>"; 847 } 848 849 839 $arrErr = array(); 840 if(!sfTabaleExists($table_name, $dsn)) { 841 list($db_type) = split(":", $dsn); 842 $sql_path = "./sql/add/". $table_name . "_" .$db_type .".sql"; 843 $arrErr = lfExecuteSQL($sql_path, $dsn); 844 if(count($arrErr) == 0) { 845 $objPage->tpl_message.="¡û¡§Äɲåơ¼¥Ö¥ë($table_name)¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 846 } else { 847 $objPage->tpl_message.="¡ß¡§Äɲåơ¼¥Ö¥ë($table_name)¤ÎºîÀ®¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡£<br>"; 848 } 849 } else { 850 $objPage->tpl_message.="¡û¡§Äɲåơ¼¥Ö¥ë($table_name)¤¬³Îǧ¤µ¤ì¤Þ¤·¤¿¡£<br>"; 851 } 852 853 return $arrErr; 850 854 } 851 855 852 856 // ¥Æ¡¼¥Ö¥ë¤Îºï½ü¡Ê´û¤Ë¥Æ¡¼¥Ö¥ë¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Î¤ßºï½ü¤¹¤ë¡Ë 853 857 function lfDropTable($table_name, $dsn) { 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 858 $arrErr = array(); 859 if(sfTabaleExists($table_name, $dsn)) { 860 // Debug¥â¡¼¥É»ØÄê 861 $options['debug'] = PEAR_DB_DEBUG; 862 $objDB = DB::connect($dsn, $options); 863 // ÀܳÀ®¸ù 864 if(!PEAR::isError($objDB)) { 865 $objDB->query("DROP TABLE " . $table_name); 866 } else { 867 $arrErr['all'] = ">> " . $objDB->message . "<br>"; 868 // ¥¨¥é¡¼Ê¸¤ò¼èÆÀ¤¹¤ë 869 ereg("\[(.*)\]", $objDB->userinfo, $arrKey); 870 $arrErr['all'].= $arrKey[0] . "<br>"; 871 gfPrintLog($objDB->userinfo, INSTALL_LOG); 872 } 873 } 874 return $arrErr; 871 875 } 872 876 873 877 // ¥«¥é¥à¤ÎÄɲáʴû¤Ë¥«¥é¥à¤¬Â¸ºß¤¹¤ë¾ì¹ç¤ÏºîÀ®¤·¤Ê¤¤¡Ë 874 878 function lfAddColumn($dsn) { 875 876 877 // ¼õÃí¥Æ¡¼¥Ö¥ë 878 sfColumnExists("dtb_order", "memo01", "text", $dsn, true); 879 880 881 882 883 884 885 886 887 888 889 890 // ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë 891 sfColumnExists("dtb_order_temp", "order_id", "text", $dsn, true); 892 sfColumnExists("dtb_order_temp", "memo01", "text", $dsn, true); 893 894 895 896 897 898 899 900 901 902 903 904 sfColumnExists("dtb_payment", "charge_flg", "int2 default 1", $dsn, true); 905 sfColumnExists("dtb_payment", "rule_min", "numeric", $dsn, true); 906 sfColumnExists("dtb_payment", "upper_rule_max", "numeric", $dsn, true); 907 sfColumnExists("dtb_payment", "module_id", "int4", $dsn, true); 908 909 sfColumnExists("dtb_payment", "memo01", "text", $dsn, true); 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 sfColumnExists("dtb_campaign", "deliv_free_flg", "int2 NOT NULL DEFAULT 0", $dsn, true); 927 928 929 930 879 global $objDBParam; 880 881 // ¼õÃí¥Æ¡¼¥Ö¥ë 882 sfColumnExists("dtb_order", "memo01", "text", $dsn, true); 883 sfColumnExists("dtb_order", "memo02", "text", $dsn, true); 884 sfColumnExists("dtb_order", "memo03", "text", $dsn, true); 885 sfColumnExists("dtb_order", "memo04", "text", $dsn, true); 886 sfColumnExists("dtb_order", "memo05", "text", $dsn, true); 887 sfColumnExists("dtb_order", "memo06", "text", $dsn, true); 888 sfColumnExists("dtb_order", "memo07", "text", $dsn, true); 889 sfColumnExists("dtb_order", "memo08", "text", $dsn, true); 890 sfColumnExists("dtb_order", "memo09", "text", $dsn, true); 891 sfColumnExists("dtb_order", "memo10", "text", $dsn, true); 892 sfColumnExists("dtb_order", "campaign_id", "int4", $dsn, true); 893 894 // ¼õÃí°ì»þ¥Æ¡¼¥Ö¥ë 895 sfColumnExists("dtb_order_temp", "order_id", "text", $dsn, true); 896 sfColumnExists("dtb_order_temp", "memo01", "text", $dsn, true); 897 sfColumnExists("dtb_order_temp", "memo02", "text", $dsn, true); 898 sfColumnExists("dtb_order_temp", "memo03", "text", $dsn, true); 899 sfColumnExists("dtb_order_temp", "memo04", "text", $dsn, true); 900 sfColumnExists("dtb_order_temp", "memo05", "text", $dsn, true); 901 sfColumnExists("dtb_order_temp", "memo06", "text", $dsn, true); 902 sfColumnExists("dtb_order_temp", "memo07", "text", $dsn, true); 903 sfColumnExists("dtb_order_temp", "memo08", "text", $dsn, true); 904 sfColumnExists("dtb_order_temp", "memo09", "text", $dsn, true); 905 sfColumnExists("dtb_order_temp", "memo10", "text", $dsn, true); 906 907 // »Ùʧ¾ðÊ󥯡¼¥Ö¥ë 908 sfColumnExists("dtb_payment", "charge_flg", "int2 default 1", $dsn, true); 909 sfColumnExists("dtb_payment", "rule_min", "numeric", $dsn, true); 910 sfColumnExists("dtb_payment", "upper_rule_max", "numeric", $dsn, true); 911 sfColumnExists("dtb_payment", "module_id", "int4", $dsn, true); 912 sfColumnExists("dtb_payment", "module_path", "text", $dsn, true); 913 sfColumnExists("dtb_payment", "memo01", "text", $dsn, true); 914 sfColumnExists("dtb_payment", "memo02", "text", $dsn, true); 915 sfColumnExists("dtb_payment", "memo03", "text", $dsn, true); 916 sfColumnExists("dtb_payment", "memo04", "text", $dsn, true); 917 sfColumnExists("dtb_payment", "memo05", "text", $dsn, true); 918 sfColumnExists("dtb_payment", "memo06", "text", $dsn, true); 919 sfColumnExists("dtb_payment", "memo07", "text", $dsn, true); 920 sfColumnExists("dtb_payment", "memo08", "text", $dsn, true); 921 sfColumnExists("dtb_payment", "memo09", "text", $dsn, true); 922 sfColumnExists("dtb_payment", "memo10", "text", $dsn, true); 923 924 // ¥¥ã¥ó¥Ú¡¼¥ó¥Æ¡¼¥Ö¥ë 925 sfColumnExists("dtb_campaign", "directory_name", "text NOT NULL", $dsn, true); 926 sfColumnExists("dtb_campaign", "limit_count", "int4 NOT NULL DEFAULT 0", $dsn, true); 927 sfColumnExists("dtb_campaign", "total_count", "int4 NOT NULL DEFAULT 0", $dsn, true); 928 sfColumnExists("dtb_campaign", "orverlapping_flg", "int2 NOT NULL DEFAULT 0", $dsn, true); 929 sfColumnExists("dtb_campaign", "cart_flg", "int2 NOT NULL DEFAULT 0", $dsn, true); 930 sfColumnExists("dtb_campaign", "deliv_free_flg", "int2 NOT NULL DEFAULT 0", $dsn, true); 931 932 // ¸ÜµÒ 933 sfColumnExists("dtb_customer", "mailmaga_flg", "int2", $dsn, true); 934 931 935 // ¥¤¥ó¥Ç¥Ã¥¯¥¹¤Î³Îǧ 932 933 934 935 936 937 938 939 940 941 942 936 if (!sfColumnExists("dtb_customer", "mobile_phone_id", "text", $dsn, true)) { 937 // ¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÎÄɲà 938 sfIndexExists("dtb_customer", "mobile_phone_id", "dtb_customer_mobile_phone_id_key", 64, $dsn, true); 939 } 940 941 // ¸ÜµÒ¥á¡¼¥ë 942 if ($objDBParam->getValue('db_type') == 'mysql') { 943 sfColumnExists("dtb_customer_mail", "secret_key", "varchar(50) unique", $dsn, true); 944 } else { 945 sfColumnExists("dtb_customer_mail", "secret_key", "text unique", $dsn, true); 946 } 943 947 } 944 948 945 949 // ¥Ç¡¼¥¿¤ÎÄɲáʴû¤Ë¥Ç¡¼¥¿¤¬Â¸ºß¤¹¤ë¾ì¹ç¤ÏºîÀ®¤·¤Ê¤¤¡Ë 946 950 function lfAddData($dsn) { 947 948 949 lfInsertCSVData(1,'category_id','¥«¥Æ¥´¥êID',53,'now()','now()', $dsn); 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 951 // CSV¥Æ¡¼¥Ö¥ë 952 if(sfTabaleExists('dtb_csv', $dsn)) { 953 lfInsertCSVData(1,'category_id','¥«¥Æ¥´¥êID',53,'now()','now()', $dsn); 954 lfInsertCSVData(4,'order_id','ÃíʸID',1,'now()','now()', $dsn); 955 lfInsertCSVData(4,'campaign_id','¥¥ã¥ó¥Ú¡¼¥óID',2,'now()','now()', $dsn); 956 lfInsertCSVData(4,'customer_id','¸ÜµÒID',3,'now()','now()', $dsn); 957 lfInsertCSVData(4,'message','Í×˾Åù',4,'now()','now()', $dsn); 958 lfInsertCSVData(4,'order_name01','¸ÜµÒ̾1',5,'now()','now()', $dsn); 959 lfInsertCSVData(4,'order_name02','¸ÜµÒ̾2',6,'now()','now()', $dsn); 960 lfInsertCSVData(4,'order_kana01','¸ÜµÒ̾¥«¥Ê1',7,'now()','now()', $dsn); 961 lfInsertCSVData(4,'order_kana02','¸ÜµÒ̾¥«¥Ê2',8,'now()','now()', $dsn); 962 lfInsertCSVData(4,'order_email','¥á¡¼¥ë¥¢¥É¥ì¥¹',9,'now()','now()', $dsn); 963 lfInsertCSVData(4,'order_tel01','ÅÅÏÃÈÖ¹æ1',10,'now()','now()', $dsn); 964 lfInsertCSVData(4,'order_tel02','ÅÅÏÃÈÖ¹æ2',11,'now()','now()', $dsn); 965 lfInsertCSVData(4,'order_tel03','ÅÅÏÃÈÖ¹æ3',12,'now()','now()', $dsn); 966 lfInsertCSVData(4,'order_fax01','FAX1',13,'now()','now()', $dsn); 967 lfInsertCSVData(4,'order_fax02','FAX2',14,'now()','now()', $dsn); 968 lfInsertCSVData(4,'order_fax03','FAX3',15,'now()','now()', $dsn); 969 lfInsertCSVData(4,'order_zip01','Í¹ÊØÈÖ¹æ1',16,'now()','now()', $dsn); 970 lfInsertCSVData(4,'order_zip02','Í¹ÊØÈÖ¹æ2',17,'now()','now()', $dsn); 971 lfInsertCSVData(4,'order_pref','ÅÔÆ»Éܸ©',18,'now()','now()', $dsn); 972 lfInsertCSVData(4,'order_addr01','½»½ê1',19,'now()','now()', $dsn); 973 lfInsertCSVData(4,'order_addr02','½»½ê2',20,'now()','now()', $dsn); 974 lfInsertCSVData(4,'order_sex','ÀÊÌ',21,'now()','now()', $dsn); 975 lfInsertCSVData(4,'order_birth','À¸Ç¯·îÆü',22,'now()','now()', $dsn); 976 lfInsertCSVData(4,'order_job','¿¦¼ï',23,'now()','now()', $dsn); 977 lfInsertCSVData(4,'deliv_name01','ÇÛÁ÷Àè̾Á°',24,'now()','now()', $dsn); 978 lfInsertCSVData(4,'deliv_name02','ÇÛÁ÷Àè̾Á°',25,'now()','now()', $dsn); 979 lfInsertCSVData(4,'deliv_kana01','ÇÛÁ÷À襫¥Ê',26,'now()','now()', $dsn); 980 lfInsertCSVData(4,'deliv_kana02','ÇÛÁ÷À襫¥Ê',27,'now()','now()', $dsn); 981 lfInsertCSVData(4,'deliv_tel01','ÅÅÏÃÈÖ¹æ1',28,'now()','now()', $dsn); 982 lfInsertCSVData(4,'deliv_tel02','ÅÅÏÃÈÖ¹æ2',29,'now()','now()', $dsn); 983 lfInsertCSVData(4,'deliv_tel03','ÅÅÏÃÈÖ¹æ3',30,'now()','now()', $dsn); 984 lfInsertCSVData(4,'deliv_fax01','FAX1',31,'now()','now()', $dsn); 985 lfInsertCSVData(4,'deliv_fax02','FAX2',32,'now()','now()', $dsn); 986 lfInsertCSVData(4,'deliv_fax03','FAX3',33,'now()','now()', $dsn); 987 lfInsertCSVData(4,'deliv_zip01','Í¹ÊØÈÖ¹æ1',34,'now()','now()', $dsn); 988 lfInsertCSVData(4,'deliv_zip02','Í¹ÊØÈÖ¹æ2',35,'now()','now()', $dsn); 989 lfInsertCSVData(4,'deliv_pref','ÅÔÆ»Éܸ©',36,'now()','now()', $dsn); 990 lfInsertCSVData(4,'deliv_addr01','½»½ê1',37,'now()','now()', $dsn); 991 lfInsertCSVData(4,'deliv_addr02','½»½ê2',38,'now()','now()', $dsn); 992 lfInsertCSVData(4,'payment_total','¤ª»Ùʧ¤¤¹ç·×',39,'now()','now()', $dsn); 993 } 990 994 } 991 995 992 996 // CSV¥Æ¡¼¥Ö¥ë¤Ø¤Î¥Ç¡¼¥¿¤ÎÄɲà 993 997 function lfInsertCSVData($csv_id,$col,$disp_name,$rank,$create_date,$update_date, $dsn) { 994 995 998 $sql = "insert into dtb_csv(csv_id,col,disp_name,rank,create_date,update_date) values($csv_id,'$col','$disp_name',$rank,$create_date,$update_date);"; 999 sfDataExists("dtb_csv", "csv_id = ? AND col = ?", array($csv_id, $col), $dsn, $sql, true); 996 1000 } 997 1001 ?>
Note: See TracChangeset
for help on using the changeset viewer.