Upgrading electrifiedForum to $version

"; print "System Information
"; print "PHP Version: $phpver
"; if (floor($phpver)<4) print "PHP Version Not 4.0 or Greater You may have problems
"; print "MySQL Version: $mysql[version]
"; if (!strstr($mysql[version],"3.23")) print "MySQL Version Not 3.23.x You may have problems
"; print "Server OS: $server[os]
"; print "Web Server Daemon: $server[web]
"; print "Server Hostname: $server[host]
"; print "
"; if ($ext[mysql]) print "MySQL Extension Loaded
"; if ($ext[ldap]) print "LDAP Extension Loaded (Not yet used)
"; print "

"; print "Updating MySQL Tables in database $config[dbname]...

"; if ($ext[mysql]) { if ($curver == "90") { print "Updating forums table (options)..."; if (mysql_db_query($config[dbname],"ALTER TABLE forums ADD options SMALLINT DEFAULT '1' not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Updating users table (votes)..."; if (mysql_db_query($config[dbname],"ALTER TABLE fusers ADD votes SMALLINT DEFAULT '0' not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Updating users table (rank)..."; if (mysql_db_query($config[dbname],"ALTER TABLE fusers ADD rank SMALLINT DEFAULT '0' not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Updating messages table (options)..."; if (mysql_db_query($config[dbname],"ALTER TABLE messages ADD options SMALLINT DEFAULT '1' not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Creating private messages table..."; if (mysql_db_query($config[dbname],"CREATE TABLE pmessages ( id smallint(6) NOT NULL auto_increment, mto varchar(20) NOT NULL, mfrom varchar(20) NOT NULL, status smallint(6) DEFAULT '0' NOT NULL, subject varchar(120) NOT NULL, message text NOT NULL, senttime timestamp(14), PRIMARY KEY (id), UNIQUE id (id), KEY mto (mto, mfrom), KEY status (status) );")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Creating Anonymous User..."; if (!$config[utable]) $config[utable] = 'fusers'; if (mysql_db_query($config[dbname],"INSERT INTO $config[utable] (username, password, level, options, location, email, homepage, showemail, icq, showicq, aim, showaim, yahoo, showyahoo, realname, age, birthday, showbirthday, gender, avatar, sig, disabled, rank, votes) VALUES ('Anonymous', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '')")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Extending Forum Table (forumpassword)..."; if (!$config[ftable]) $config[ftable] = 'forums'; if (mysql_db_query($config[dbname],"ALTER TABLE $config[ftable] ADD forumpassword VARCHAR (100) not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } } elseif ($curver == "95") { print "Creating private messages table..."; if (mysql_db_query($config[dbname],"CREATE TABLE pmessages ( id smallint(6) NOT NULL auto_increment, mto varchar(20) NOT NULL, mfrom varchar(20) NOT NULL, status smallint(6) DEFAULT '0' NOT NULL, subject varchar(120) NOT NULL, message text NOT NULL, senttime timestamp(14), PRIMARY KEY (id), UNIQUE id (id), KEY mto (mto, mfrom), KEY status (status) );")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Creating Anonymous User..."; if (!$config[utable]) $config[utable] = 'fusers'; if (mysql_db_query($config[dbname],"INSERT INTO $config[utable] (username, password, level, options, location, email, homepage, showemail, icq, showicq, aim, showaim, yahoo, showyahoo, realname, age, birthday, showbirthday, gender, avatar, sig, disabled, rank, votes) VALUES ('Anonymous', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '')")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Extending Forum Table (forumpassword)..."; if (!$config[ftable]) $config[ftable] = 'forums'; if (mysql_db_query($config[dbname],"ALTER TABLE $config[ftable] ADD forumpassword VARCHAR (100) not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } } elseif ($curver == "99") { print "Creating Anonymous User..."; if (!$config[utable]) $config[utable] = 'fusers'; if (mysql_db_query($config[dbname],"INSERT INTO $config[utable] (username, password, level, options, location, email, homepage, showemail, icq, showicq, aim, showaim, yahoo, showyahoo, realname, age, birthday, showbirthday, gender, avatar, sig, disabled, rank, votes) VALUES ('Anonymous', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '1', '', '')")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } print "Extending Forum Table (forumpassword)..."; if (!$config[ftable]) $config[ftable] = 'forums'; if (mysql_db_query($config[dbname],"ALTER TABLE $config[ftable] ADD forumpassword VARCHAR (100) not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } } elseif ($curver == "99rc3") { print "Extending Forum Table (forumpassword)..."; if (!$config[ftable]) $config[ftable] = 'forums'; if (mysql_db_query($config[dbname],"ALTER TABLE $config[ftable] ADD forumpassword VARCHAR (100) not null")) print "Success
"; else { print "Error: ".mysql_error()."
"; $errors++; } } else { print "ERROR: Unknown or unsupported version of electrifiedForum
"; $errors++; } } else { print "FATAL ERROR: Unable to update MySQL tables: MySQL Support Not Enabled in this version of PHP
"; $errors++; } print "
"; if (!$errors && !$warnings) print "Upgrade successful, No errors or warnings
Make sure you modify your realm files according to the readme..
"; elseif (!$errors) print "Upgrade complete but with warnings
Make sure you modify your realm files according to the readme..
"; else print "Errors occurred during Installation.
Consult the electrifiedpenguin.com forums for help
"; } } else { /* Installation Options Form */ ?>
Note: This upgrade script is only for use with eF versions 0.90 and above.

IMPORTANT - Please choose your current eF version:

Confirm upgrade to electrifiedForum for realm: