Changeset 6243 for temp/trunk


Ignore:
Timestamp:
2006/10/13 12:02:46 (20 years ago)
Author:
naka
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/install/index.php

    r6242 r6243  
    8181    // ÆþÎϥǡ¼¥¿¤òÅϤ¹¡£ 
    8282    $arrRet =  $objDBParam->getHashArray(); 
     83    $dsn = $arrRet['db_type']."://".$arrRet['db_user'].":".$arrRet['db_password']."@".$arrRet['db_server'].":".$arrRet['db_port']."/".$arrRet['db_name']; 
    8384     
    8485    /* 
     
    8687        ¡Ê£Ä£Â¹½À®¤Î²¼°Ì¸ß´¹¤Î¤¿¤á¥¹¥­¥Ã¥×»þ¤â¶¯À©¡Ë 
    8788    */ 
    88     if(count($objPage->arrErr) == 0) { 
    89          
    90     } 
     89     
    9190     
    9291    if(count($objPage->arrErr) == 0) { 
     
    102101     
    103102    // ¥Æ¡¼¥Ö¥ë¤ÎºîÀ® 
    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);  
    105104    if(count($objPage->arrErr) == 0) { 
    106105        $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 
     
    112111    if(count($objPage->arrErr) == 0 and $arrRet['db_type'] == 'pgsql') { 
    113112        // ¥Ó¥å¡¼¤ÎºîÀ® 
    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);  
    115114        if(count($objPage->arrErr) == 0) { 
    116115            $objPage->tpl_message.="¡û¡§¥Ó¥å¡¼¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 
     
    122121    // ½é´ü¥Ç¡¼¥¿¤ÎºîÀ® 
    123122    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);  
    125124        if(count($objPage->arrErr) == 0) { 
    126125            $objPage->tpl_message.="¡û¡§½é´ü¥Ç¡¼¥¿¤ÎºîÀ®¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 
     
    132131    // ¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß 
    133132    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);  
    135134        if(count($objPage->arrErr) == 0) { 
    136135            $objPage->tpl_message.="¡û¡§¥«¥é¥à¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 
     
    142141    // ¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß 
    143142    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);  
    145144        if(count($objPage->arrErr) == 0) { 
    146145            $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¥³¥á¥ó¥È¤Î½ñ¹þ¤ß¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 
     
    166165    if ($arrRet['db_type'] == 'pgsql'){ 
    167166        // ¥Ó¥å¡¼¤Îºï½ü 
    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);  
    169168        if(count($objPage->arrErr) == 0) { 
    170169            $objPage->tpl_message.="¡û¡§¥Ó¥å¡¼¤Îºï½ü¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 
     
    177176    // ¥Æ¡¼¥Ö¥ë¤Îºï½ü 
    178177    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);  
    180179        if(count($objPage->arrErr) == 0) { 
    181180            $objPage->tpl_message.="¡û¡§¥Æ¡¼¥Ö¥ë¤Îºï½ü¤ËÀ®¸ù¤·¤Þ¤·¤¿¡£<br>"; 
     
    556555 
    557556// SQLʸ¤Î¼Â¹Ô 
    558 function lfExecuteSQL($filepath, $db_user, $db_password, $db_server, $db_name, $db_type, $db_port, $disp_err = true) { 
     557function lfExecuteSQL($filepath, $dsn, $disp_err = true) { 
    559558    $arrErr = array(); 
    560559 
     
    566565            fclose($fp); 
    567566        } 
    568  
    569         $dsn = $db_type."://".$db_user.":".$db_password."@".$db_server.":".$db_port."/".$db_name; 
    570567         
    571568        $objDB = DB::connect($dsn); 
Note: See TracChangeset for help on using the changeset viewer.