clearCache(); if (!isset($_POST['step'])) { $_POST['step'] = 1; } $db = new db(); ## look for version history! ## see if history table exists $checkTable = $db->getRows("SHOW TABLE STATUS LIKE '".$glob['dbprefix']."CubeCart_history';"); ## table esists look for version history if ($checkTable) { $versionData = $db->select("SELECT version FROM `".$glob['dbprefix']."CubeCart_history` ORDER BY `id` DESC"); } if (!isset($_GET['l'])) $_GET['l'] = "en"; $langFolder = preg_replace('/[^a-zA-Z0-9_\-\+]/', '',$_GET['l']); define('LANG_FOLDER', $langFolder); require("..".CC_DS."language".CC_DS.LANG_FOLDER.CC_DS."common.inc.php"); require("..".CC_DS."language".CC_DS.LANG_FOLDER.CC_DS."setup.inc.php"); if ($versionData) { $oldVersion = $versionData[0]['version']; } else { ## table doesn't exist use old ini.inc.php file $oldIniPath = "..".CC_DS."includes".CC_DS."ini.inc.php"; if (!file_exists($oldIniPath)) die($lang['setup']['critical_upgrade_error']); include($oldIniPath); $oldVersion = $ini['ver']; } $stageName = $lang['setup']['stage1Name']; $noInstallSteps = 3; include("includes".CC_DS."header.inc.php"); ?>
'.sprintf($lang['setup']['alreadyUpgraded'], $thisVersion).'

'; } else { ?>
>1 >2 >3

".sprintf($lang['setup']['upgrade_precis'],$oldVersion,$thisVersion)."

"; if(!isset($glob['license_key'])){ ?>


".$lang['setup']['database_upgraded']."

"; } } else if ($_POST['step'] == 3) { ## do any other required updates include "otherupdates.php"; ## If there are no more steps we can insert the update history if (!isset($nextStep)) { $db->misc("INSERT INTO `".$glob['dbprefix']."CubeCart_history` (`version` ,`time`) VALUES ('".$thisVersion."', '".time()."');"); } ## Make sure enclding/collation is correct $db->misc("ALTER DATABASE `".$glob['dbdatabase']."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;"); $tables = $db->getRows("SHOW TABLE STATUS LIKE '".$glob['dbprefix']."CubeCart_%';"); if(is_array($tables)){ foreach($tables as $table) { $db->misc("ALTER TABLE `".$table[0]."` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;"); } } } ?> 0) { ?>


  • /

  • /