http://www.ol-Commerce.com, http://www.seifenparadies.de Copyright (c) 2004 OL-Commerce, 2006 Dipl.-Ing.(TH) Winfried Kaiser (w.kaiser@fortune.de, info@seifenparadies.de) -------------------------------------------------------------- based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(install_3.php,v 1.6 2002/08/15); www.oscommerce.com (c) 2004 OL - Commerce; www.ol-Commerce.com Released under the GNU General Public License --------------------------------------------------------------*/ require 'includes/application.php'; if (xtc_in_array('database', $_POST['install'])) { xtc_db_connect($_POST['DB_SERVER'], $_POST['DB_SERVER_USERNAME'], $_POST['DB_SERVER_PASSWORD']); $db_error = false; xtc_db_install($_POST['DB_DATABASE'], 'prefix_olcommerce.sql', $table_prefix); if ($db_error) { install_error($db_error); } else { if ($language == 'german') { $lang_par = "'Deutsch','de'"; } else { $lang_par = "'English','en'"; } $sql = INSERT_INTO . $table_prefix . "languages VALUES (1," . $lang_par . ",'icon.gif','" . $language . "',1,'iso-8859-15')"; @xtc_db_query($sql); $post_data .= ' <tr> <td> <table class="main_content_outer" cellspacing="0" cellpadding="0"> <tr>
@chmod($f, 0444); // Check all the data was written if ($bytes != $length) { $errormsg = sprintf('file_put_contents() Only %d of %d bytes written, possibly out of free disk space.', $bytes, $length); user_error($errormsg, E_USER_WARNING); return false; } // Return length return $bytes; } } // connect do database xtc_db_connect() or die('Kann keine Verbindung zur Datenbank erhalten!'); $db_error = false; $sql_file = DIR_FS_CATALOG . 'xtc_installer/livehelp.sql.php'; xtc_db_install(DB_DATABASE, $sql_file, EMPTY_STRING); if ($db_error) { $text = 'nicht '; } else { $dir = "../livehelp/"; $link = HTML_BR . HTML_BR . HTML_A_START . $dir . 'livehelp.php">Live Help starten</a>'; $text = $dir . "setup.php"; if (file_exists($text)) { srand(microtime() * 1000000); $pos = strrpos($text, DOT); $file_neu = substr($text, 0, $pos) . UNDERSCORE . rand(1, 1000000) . substr($text, $pos); @unlink($file_neu); @rename($text, $file_neu); } $file = $dir . 'config.php'; $config = file_get_contents($file);
require_once DIR_FS_INC . 'xtc_db_query.inc.php'; // include needed functions require_once DIR_FS_INC . 'xtc_redirect.inc.php'; require_once DIR_FS_INC . 'xtc_href_link.inc.php'; include 'language/' . $lang . '.php'; $inst_db = trim(stripslashes($_GET['inst_db'])); $config = trim(stripslashes($_GET['config'])); if (isset($inst_db) && $inst_db == 1) { $db_link = xtc_db_connect_installer($_SESSION['db']['DB_SERVER'], $_SESSION['db']['DB_SERVER_USERNAME'], $_SESSION['db']['DB_SERVER_PASSWORD'], $_SESSION['db']['DB_DATABASE']); $sql = 'ALTER DATABASE `' . $_SESSION['db']['DB_DATABASE'] . '` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;'; xtc_db_query($sql); $sql = 'SET NAMES utf8 COLLATE utf8_general_ci;'; xtc_db_query($sql); $db_error = false; $sql_file = DIR_FS_CATALOG . DIR_SHOPHELFER_INSTALLER . '/' . SHOPHELFER_SQL; xtc_db_install($_SESSION['db']['DB_DATABASE'], $sql_file); } if (isset($config) && $config == 1) { //create includes/configure.php include 'includes/templates/configure.php'; $fp = fopen(DIR_FS_CATALOG . 'includes/configure.php', 'w'); fputs($fp, $file_contents); fclose($fp); //create admin/includes/configure.php include 'includes/templates/configure_admin.php'; $fp = fopen(DIR_FS_CATALOG . 'admin/includes/configure.php', 'w'); fputs($fp, $file_contents); fclose($fp); } if (!$db_error) { xtc_redirect(xtc_href_link('install_shopinfo_step.php', '', 'NONSSL'));