<?php
// QuickTalk 2.5 build:20100731
session_start();
if ( !isset($_SESSION['qtg_setup_lang']) ) $_SESSION['qtg_setup_lang']='en';
include('qtg_lang_'.$_SESSION['qtg_setup_lang'].'.php');
include('../bin/config.php');
include('../bin/config_display.php');
$strAppl = 'QuickTalk guestbook 2.5';
$strPrevUrl = 'qtg_setup_1_db.php';
$strNextUrl = 'qtg_setup_3_db.php';
$strPrevLabel= $L['Back'];
$strNextLabel= $L['Next'];
// --------
// HTML START
// --------
include('qtg_setup_hd.php');
if ( isset($_POST['ok']) )
{
include('../bin/qt_lib_db.php');
if ( isset($_SESSION['qtg_dbopwd']) )
{
$qtg_user = $_SESSION['qtg_dbologin'];
$qtg_pwd = $_SESSION['qtg_dbopwd'];
}
define('TABMESSAGE', $qtg_prefix.'qtgmessage');
$oDB = new cDB($qtg_dbsystem,$qtg_host,$qtg_database,$qtg_user,$qtg_pwd,$qtg_port,$qtg_dsn);
if ( empty($oDB->error) )
{
// Install the tables
$strTable = TABMESSAGE;
echo "A) {$L['Installation']} MESSAGE... ";
include('qtg_table.php');
echo $L['Done'],'<br/>';
$_SESSION['qtgInstalled']=true;
}
else
{
echo '<div class="setup_err">',sprintf ($L['E_connect'],$qtg_database,$qtg_host),'</div>';
}
}
else
{
echo '
<table cellspacing="0">
<tr valign="top">
<td width="475" style="padding:5px">
<form method="post" name="install" action="qtg_setup_2_db.php">
<h2>',$L['Install_db'],'</h2><p>',sprintf($L['Create_table'],$qtg_database),' <input type="submit" name="ok" value="',$L['Ok'],'"/></p>
</form>
</td>
<td class="hidden"><div class="setup_help">',$L['Help_2'],'<br/>',$L['Upgrade2'],'</div></td>
</tr>
</table>
';
}
// --------
// HTML END
// --------
include('qtg_setup_ft.php');
?>