Changeset 6243 for temp/trunk
- Timestamp:
- 2006/10/13 12:02:46 (20 years ago)
- File:
-
- 1 edited
-
temp/trunk/html/install/index.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
temp/trunk/html/install/index.php
r6242 r6243 81 81 // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 82 82 $arrRet = $objDBParam->getHashArray(); 83 $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 83 84 84 85 /* … … 86 87 ¡Ê£Ä£Â¹½À®¤Î²¼°Ì¸ß´¹¤Î¤¿¤á¥¹¥¥Ã¥×»þ¤â¶¯À©¡Ë 87 88 */ 88 if(count($objPage->arrErr) == 0) { 89 90 } 89 91 90 92 91 if(count($objPage->arrErr) == 0) { … … 102 101 103 102 // ¥Æ¡¼¥Ö¥ë¤ÎºîÀ® 104 $objPage->arrErr = lfExecuteSQL("./sql/create_table_".$arrRet['db_type'].".sql", $ arrRet['db_user'], $arrRet['db_password'], $arrRet['db_server'], $arrRet['db_name'], $arrRet['db_type'], $arrRet['db_port']);103 $objPage->arrErr = lfExecuteSQL("./sql/create_table_".$arrRet['db_type'].".sql", $dsn); 105 104 if(count($objPage->arrErr) == 0) { 106 105 $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; … … 112 111 if(count($objPage->arrErr) == 0 and $arrRet['db_type'] == 'pgsql') { 113 112 // ¥Ó¥å¡¼¤ÎºîÀ® 114 $objPage->arrErr = lfExecuteSQL("./sql/create_view.sql", $ arrRet['db_user'], $arrRet['db_password'], $arrRet['db_server'], $arrRet['db_name'], $arrRet['db_type'], $arrRet['db_port']);113 $objPage->arrErr = lfExecuteSQL("./sql/create_view.sql", $dsn); 115 114 if(count($objPage->arrErr) == 0) { 116 115 $objPage->tpl_message.="¡û¡§¥Ó¥å¡¼¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; … … 122 121 // ½é´ü¥Ç¡¼¥¿¤ÎºîÀ® 123 122 if(count($objPage->arrErr) == 0) { 124 $objPage->arrErr = lfExecuteSQL("./sql/insert_data.sql", $ arrRet['db_user'], $arrRet['db_password'], $arrRet['db_server'], $arrRet['db_name'], $arrRet['db_type'], $arrRet['db_port']);123 $objPage->arrErr = lfExecuteSQL("./sql/insert_data.sql", $dsn); 125 124 if(count($objPage->arrErr) == 0) { 126 125 $objPage->tpl_message.="¡û¡§½é´ü¥Ç¡¼¥¿¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; … … 132 131 // ¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß 133 132 if(count($objPage->arrErr) == 0) { 134 $objPage->arrErr = lfExecuteSQL("./sql/column_comment.sql", $ arrRet['db_user'], $arrRet['db_password'], $arrRet['db_server'], $arrRet['db_name'], $arrRet['db_type'], $arrRet['db_port']);133 $objPage->arrErr = lfExecuteSQL("./sql/column_comment.sql", $dsn); 135 134 if(count($objPage->arrErr) == 0) { 136 135 $objPage->tpl_message.="¡û¡§¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; … … 142 141 // ¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß 143 142 if(count($objPage->arrErr) == 0) { 144 $objPage->arrErr = lfExecuteSQL("./sql/table_comment.sql", $ arrRet['db_user'], $arrRet['db_password'], $arrRet['db_server'], $arrRet['db_name'], $arrRet['db_type'], $arrRet['db_port']);143 $objPage->arrErr = lfExecuteSQL("./sql/table_comment.sql", $dsn); 145 144 if(count($objPage->arrErr) == 0) { 146 145 $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; … … 166 165 if ($arrRet['db_type'] == 'pgsql'){ 167 166 // ¥Ó¥å¡¼¤Îºï½ü 168 $objPage->arrErr = lfExecuteSQL("./sql/drop_view.sql", $ arrRet['db_user'], $arrRet['db_password'], $arrRet['db_server'], $arrRet['db_name'], $arrRet['db_type'], $arrRet['db_port'], false);167 $objPage->arrErr = lfExecuteSQL("./sql/drop_view.sql", $dsn, false); 169 168 if(count($objPage->arrErr) == 0) { 170 169 $objPage->tpl_message.="¡û¡§¥Ó¥å¡¼¤Îºï½ü¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; … … 177 176 // ¥Æ¡¼¥Ö¥ë¤Îºï½ü 178 177 if(count($objPage->arrErr) == 0) { 179 $objPage->arrErr = lfExecuteSQL("./sql/drop_table.sql", $ arrRet['db_user'], $arrRet['db_password'], $arrRet['db_server'], $arrRet['db_name'], $arrRet['db_type'], $arrRet['db_port'], false);178 $objPage->arrErr = lfExecuteSQL("./sql/drop_table.sql", $dsn, false); 180 179 if(count($objPage->arrErr) == 0) { 181 180 $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¤Îºï½ü¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; … … 556 555 557 556 // SQLʸ¤Î¼Â¹Ô 558 function lfExecuteSQL($filepath, $d b_user, $db_password, $db_server, $db_name, $db_type, $db_port, $disp_err = true) {557 function lfExecuteSQL($filepath, $dsn, $disp_err = true) { 559 558 $arrErr = array(); 560 559 … … 566 565 fclose($fp); 567 566 } 568 569 $dsn = $db_type."://".$db_user.":".$db_password."@".$db_server.":".$db_port."/".$db_name;570 567 571 568 $objDB = DB::connect($dsn);
Note: See TracChangeset
for help on using the changeset viewer.
