mysql_query("CREATE TABLE ".$prefix."_pages (pid INT(10) DEFAULT '0' NOT NULL AUTO_INCREMENT, title VARCHAR(255) NOT NULL, subtitle VARCHAR(255) NOT NULL, active int(1) NOT NULL default '0', page_header TEXT NOT NULL, text TEXT NOT NULL, page_footer TEXT NOT NULL, signature TEXT NOT NULL, date datetime default NULL, counter int(10) NOT NULL default '0', clanguage varchar(30) NOT NULL default '', PRIMARY KEY (pid))");
// New Table Creation
mysql_query("CREATE TABLE ".$prefix."_encyclopedia (eid INT(10) DEFAULT '0' AUTO_INCREMENT, title VARCHAR(255) NOT NULL, description TEXT NOT NULL, elanguage varchar(30) NOT NULL default '', active INT(1) NOT NULL default '0', PRIMARY KEY (eid))");
mysql_query("CREATE TABLE ".$prefix."_encyclopedia_text (tid INT(10) DEFAULT '0' AUTO_INCREMENT, eid INT(10) NOT NULL default '0', title VARCHAR(255) NOT NULL, text TEXT NOT NULL, counter INT(10) DEFAULT '0' NOT NULL , PRIMARY KEY (tid))");
// Modules Table Alteration
mysql_query("ALTER TABLE ".$prefix."_modules ADD custom_title VARCHAR(255) NOT NULL AFTER title");
// Blocks Table Alteration
mysql_query("ALTER TABLE ".$prefix."_blocks ADD view int(1) DEFAULT '0' NOT NULL AFTER blockfile");
mysql_query("update ".$prefix."_blocks set view='2' where bkey='admin'");
$result = mysql_query("select bid, bkey from ".$prefix."_blocks where bkey!=''");