Mercurial > epgrec.yaz
view install/step3.php @ 164:254d8a21bf36
fix: ͽÌóºÑ¤ß¤Î̤¼Â¹ÔÏ¿²è¤Ërecomplete.php¤¬É¬ÍפʤΤÇÌᤷ¤¿
author | Sushi-k <epgrec@park.mda.or.jp> |
---|---|
date | Tue, 06 Apr 2010 11:03:45 +0900 |
parents | 9c5e597ef6c6 |
children |
line wrap: on
line source
<?php include_once("../config.php"); include_once("../Smarty/Smarty.class.php"); include_once("../DBRecord.class.php"); include_once("../Settings.class.php"); include_once("../reclib.php" ); include_once("../tableStruct.inc.php"); $settings = Settings::factory(); $settings->post(); // ã„ã£ãŸã‚“ä¿å˜ã™ã‚‹ $settings->save(); // データベース接続ãƒã‚§ãƒƒã‚¯ $dbh = @mysql_connect( $settings->db_host, $settings->db_user, $settings->db_pass ); if( $dbh == false ) { jdialog( "MySQLã«æŽ¥ç¶šã§ãã¾ã›ã‚“。ホストå/ユーザーå/パスワードをå†ãƒã‚§ãƒƒã‚¯ã—ã¦ãã ã•ã„", "step2.php" ); exit(); } $sqlstr = "use ".$settings->db_name; $res = @mysql_query( $sqlstr ); if( $res == false ) { jdialog( "データベースåãŒç•°ãªã‚‹ã‚ˆã†ã§ã™", "step2.php" ); exit(); } // DBテーブルã®ä½œæˆ try { $rec = new DBRecord( RESERVE_TBL ); $rec->createTable( RESERVE_STRUCT ); $rec = new DBRecord( PROGRAM_TBL ); $rec->createTable( PROGRAM_STRUCT ); $rec = new DBRecord( CHANNEL_TBL ); $rec->createTable( CHANNEL_STRUCT ); $rec = new DBRecord( CATEGORY_TBL ); $rec->createTable( CATEGORY_STRUCT ); $rec = new DBRecord( KEYWORD_TBL ); $rec->createTable( KEYWORD_STRUCT ); $rec = new DBRecord( LOG_TBL ); $rec->createTable( LOG_STRUCT ); } catch( Exception $e ) { jdialog("テーブルã®ä½œæˆã«å¤±æ•—ã—ã¾ã—ãŸã€‚データベースã«æ¨©é™ãŒãªã„ç‰ã®ç†ç”±ãŒè€ƒãˆã‚‰ã‚Œã¾ã™ã€‚", "step2.php" ); exit(); } $smarty = new Smarty(); $smarty->template_dir = "../templates/"; $smarty->compile_dir = "../templates_c/"; $smarty->cache_dir = "../cache/"; $smarty->assign( "record_mode", $RECORD_MODE ); $smarty->assign( "settings", $settings ); $smarty->assign( "install_path", INSTALL_PATH ); $smarty->assign( "post_to", "step4.php" ); $smarty->assign( "sitetitle", "インストールステップ3" ); $smarty->assign( "message" , "環境è¨å®šã‚’è¡Œã„ã¾ã™ã€‚ã“れらã®è¨å®šã¯ãƒ‡ãƒ•ã‚©ãƒ«ãƒˆã®ã¾ã¾ã§ã‚‚制é™ä»˜ããªãŒã‚‰å‹•ä½œã—ã¾ã™ã€‚" ); $smarty->display("envSetting.html"); ?>