<?php
// QuickTalk 2.5 build:20100731
session_start();
$strV = '2.5';
if ( isset($_SESSION['qtg_setup_lang']) ) { $strLang = $_SESSION['qtg_setup_lang']; } else { $strLang = 'en'; }
include('qtg_lang_'.$strLang.'.php');
include('../bin/config.php');
include('../bin/config_display.php');
$strAppl = 'QuickTalk guestbook '.$strV;
$strPrevUrl = 'qtg_setup_1_txt.php';
$strNextUrl = '../qtg_index.php';
$strPrevLabel= $L['Back'];
$strNextLabel= $L['Finish'];
$strMessage='';
if ( !isset($_SESSION['qtg_setup_mail']) ) $_SESSION['qtg_setup_mail']='';
// Search version and Check !
if ( empty($qtg_database) ) { $strVersion=$strV; } else { $strVersion=$qtg_database; }
// UPDATE TO 2.5
// none
// --------
// HTML START
// --------
include('qtg_setup_hd.php');
echo $strMessage;
// config_display
$strFile = "../bin/config_display.php";
$strTxt = '<?php
$qtg_language = "'.$qtg_language.'";
$qtg_menulang = '.($qtg_menulang ? 'true' : 'false').';
$qtg_skin = "'.$qtg_skin.'";
$qtg_formatdate = "'.$qtg_formatdate.'";
$qtg_formattime = "'.$qtg_formattime.'";
$qtg_banner = '.($qtg_banner ? 'true' : 'false').';
$qtg_title = "'.$qtg_title.'";
$qtg_home = "'.$qtg_home.'";
$qtg_email = "'.$_SESSION['qtg_setup_mail'].'";
$qtg_pagewidth = "'.$qtg_pagewidth.'";
$qtg_show_size = '.$qtg_show_size.';
$qtg_page_size = '.$qtg_page_size.';
$qtg_use_age = '.($qtg_use_age ? 'true' : 'false').';
$qtg_use_email = '.($qtg_use_email ? 'true' : 'false').';
$qtg_use_from = '.($qtg_use_from ? 'true' : 'false').';
$qtg_use_from_type = '.$qtg_use_from_type.';
$qtg_column_default = '.($qtg_column_default ? 'true' : 'false').';
$qtg_column_change = '.($qtg_column_change ? 'true' : 'false').';
$qtg_separateform = '.($qtg_separateform ? 'true' : 'false').';
$qtg_bbc_bold = '.($qtg_bbc_bold ? 'true' : 'false').';
$qtg_bbc_italic = '.($qtg_bbc_italic ? 'true' : 'false').';
$qtg_bbc_underline = '.($qtg_bbc_underline ? 'true' : 'false').';
$qtg_bbc_url = '.($qtg_bbc_url ? 'true' : 'false').';
$qtg_bbc_smiley = '.($qtg_bbc_smiley ? 'true' : 'false').'; ?>';
if ( !is_writable($strFile) ) $error="Impossible to write into the file [$strFile].";
if ( empty($error) )
{
if ( !$handle=fopen($strFile, 'w') ) $error="Impossible to open the file [$strFile].";
}
if ( empty($error) )
{
if ( fwrite($handle,$strTxt)===FALSE )
{
$error = "Impossible to write into the file [$strFile].";
}
else
{
fclose($handle);
}
}
if ( empty($error) )
{
if ( isset($_SESSION['qtgInstalled']) )
{
echo $L['S_install_exit'];
echo '<div style="width:350px; padding:10px; border-style:solid; border-color:#FF0000; border-width:1px; background-color:#EEEEEE">',$L['End_message'],'<br/>',$L['User'],': <b>',$qtg_user,'</b><br/>',$L['Password'],': <b>',$qtg_pwd,'</b><br/></div><br/>';
}
else
{
echo $L['N_install'];
}
echo '<br/><br/><a href="../check.php">',$L['Check_install'],'</a><br/><br/>';
}
else
{
echo '<br/><p class="error">',$error,'</p>';
}
// --------
// HTML END
// --------
include('qtg_setup_ft.php');
?>