Migration of 1.1 to 1.2
  Welcome
 



This wizard will perform the migration of version 1.1 to 1.2 .

Before you continue , please make sure you have made a backup of you MYSQL database.
This can be done with PHPMYADMIN or a simular tool.
 

  Step 1
Database migration.
 


Tables will be altered during the next step..
Click on continue.
 

  Step 2
 
" ; include("../configuration/database.inc.php"); mysql_connect("$db_server", "$db_username", "$db_password"); mysql_select_db("$db_name"); $old_table_configuration = $table_configuration ; $new_table_configuration = $dbprefix."config" ; $query = "SELECT serverpath,url,sessioncode,language,editor,theme,sitename,startsection,highvisual,securitymethod,dateformat,email FROM $table_configuration"; $result = mysql_query($query) or die_script(mysql_error()); $row = mysql_fetch_array($result) ; $serverpath = $row['serverpath']; $url = $row['url']; $sessioncode = $row['sessioncode']; $language = $row['language']; $editor = $row['editor']; $theme = $row['theme']; $sitename = $row['sitename']; $startsection = $row['startsection']; $highvisual = $row['highvisual']; $securitymethod = $row['securitymethod']; $dateformat = $row['dateformat']; $email = $row['email']; echo "create new configuration table .....
" ; mysql_query("CREATE TABLE $new_table_configuration (config_key varchar(64) not NULL,config_value text, description varchar(255), PRIMARY KEY (config_key))"); echo "fill the new configuration table .....
" ; mysql_query("INSERT INTO $new_table_configuration VALUES ('serverpath', '$serverpath', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('url', '$url', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('language', '$language', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('sessioncode', '$sessioncode', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('editor', '$editor', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('theme', '$theme', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('sitename', '$sitename', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('startsection', '$startsection', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('highvisual', '$highvisual', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('securitymethod', '$securitymethod', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('dateformat', '$dateformat', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('email', '$email', '')"); mysql_query("DROP TABLE $old_table_configuration"); echo "get info from news module .....
" ; $query = "SELECT dbtables FROM $table_modules WHERE location='sn_news'"; $result = mysql_query($query) or die_script(mysql_error()); $moduletables = mysql_result($result,0); unset($query); unset($result); $moduletables = explode(",", $moduletables); $news_configtable = "$moduletables[2]"; $query = "SELECT template FROM $news_configtable"; // getting the template $result = mysql_query($query) or die_script(mysql_error()); $template = mysql_result($result,0); unset($query); unset($result); $query = "SELECT welcome FROM $news_configtable"; $result = mysql_query($query) or die_script(mysql_error()); $welcometext = mysql_result($result,0); unset($query); unset($result); mysql_query("INSERT INTO $new_table_configuration VALUES ('news_template', '$template', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('news_welcome_text', '$welcometext', '')"); echo "get info from ads module .....
" ; mysql_query("DROP TABLE $news_configtable"); $query = "SELECT dbtables FROM $table_modules WHERE location='sn_ads'"; // getting the table names $result = mysql_query($query) or die_script(mysql_error()); $moduletables = mysql_result($result,0); unset($query); unset($result); $moduletables = explode(",", $moduletables); $table_ads_config = "$moduletables[1]"; $query = "SELECT welcome FROM $table_ads_config"; // get the welcome text $result = mysql_query($query) or die_script(mysql_error()); $welcometext = mysql_result($result,0); unset($query); unset($result); $query = "SELECT disclaimer FROM $table_ads_config"; // get the disclaimer text $result = mysql_query($query) or die_script(mysql_error()); $disclaimer = mysql_result($result,0); unset($query); unset($result); mysql_query("INSERT INTO $new_table_configuration VALUES ('ads_disclaimer', '$disclaimer', '')"); mysql_query("INSERT INTO $new_table_configuration VALUES ('ads_welcome_text', '$welcometext', '')"); mysql_query("INSERT INTO $table_editors VALUES ('','Htmlarea Editor', 'htmlarea/editor.php', '')"); mysql_query("DROP TABLE $table_ads_config"); mysql_query("ALTER TABLE $new_table_configuration rename $old_table_configuration") ; echo "

migration is finished for version 1.2

You can now continue normal operation on your site." ; ?>

The S@S team.