Location: PHPKode > projects > Content*Builder > contentbuilder/system/setup/updates/update_051_052.php
<?php

// start 0.5.1 - 0.5.2 Updates
$test = mysql_query("ALTER TABLE ".TABLE."_columns ADD groupsAllowed BIGINT(10) UNSIGNED");
$test = mysql_query("ALTER TABLE ".TABLE."_columns COMMENT = 'v.01'");
	
$counter = 0;
$query = mysql_query("SELECT * FROM ".TABLE."_usergroups");
while($resultRow = mysql_fetch_object($query)) {
	$tmpID[]   = pow(2, $counter);
	$gID[]     = $resultRow->groupID;
	$gName[]   = $resultRow->name;
	$gPermID[] = $resultRow->permID;
	++$counter;
}
$tmpQuery = mysql_query("DELETE FROM ".TABLE."_usergroups");
$tmpQuery = mysql_query("ALTER TABLE ".TABLE."_usergroups CHANGE groupID groupID BIGINT(20) UNSIGNED NOT NULL COMMENT = 'v0.1'");
if(is_array($gID)) {
	foreach($gID as $k => $v) {
		$tmpQuery = mysql_query("INSERT INTO ".TABLE."_usergroups VALUES ('".$gID[$k]."', '".$gPermID[$k]."', '".$gName[$k]."')");
	}
}
$tmpQuery = mysql_query("ALTER TABLE ".TABLE."_usergroups COMMENT = 'v0.1'");

$tmpQuery = mysql_query("CREATE TABLE ".TABLE."_art_content (
  ide int(6) unsigned NOT NULL default '0',
  language int(4) unsigned NOT NULL default '0',
  title varchar(255) NOT NULL default '',
  description text NOT NULL,
  intro text NOT NULL,
  content text NOT NULL,
  keywords varchar(255) NOT NULL default '',
  UNIQUE KEY ide (ide,language)
) TYPE=MyISAM;");


$tmpQuery = mysql_query("CREATE TABLE ".TABLE."_art_general (
  ide int(6) unsigned NOT NULL auto_increment,
  folderID varchar(32) NOT NULL default '',
  userID varchar(32) NOT NULL default '',
  mediaID int(6) unsigned NOT NULL default '0',
  iconID int(6) unsigned NOT NULL default '0',
  title varchar(255) NOT NULL default '',
  datetime datetime NOT NULL default '0000-00-00 00:00:00',
  publishFrom timestamp(14) NOT NULL,
  publishTo timestamp(14) NOT NULL,
  stage int(4) unsigned NOT NULL default '0',
  parse int(4) unsigned NOT NULL default '0',
  options bigint(32) unsigned NOT NULL default '0',
  languages bigint(32) unsigned NOT NULL default '0',
  PRIMARY KEY  (ide)
) TYPE=MyISAM;");

$tmpQuery = mysql_query("INSERT INTO ".TABLE."_options VALUES (32, 'artAmount', '10', 'system', '')");
$tmpQuery = mysql_query("INSERT INTO ".TABLE."_options VALUES (33, 'skinDir', 'templates/default/', 'system', '')");
$tmpQuery = mysql_query("INSERT INTO ".TABLE."_options VALUES (34, 'BTPL_location', '../', 'system', '')");
$tmpQuery = mysql_query("INSERT INTO ".TABLE."_options VALUES (35, 'default_lang', '1', 'art', '')");
$tmpQuery = mysql_query("INSERT INTO ".TABLE."_mm_folder VALUES ('Gallerie', 3, 0, NULL, 'gallery', 'protected', 10031)");
$tmpQuery = mysql_query("INSERT INTO ".TABLE."_options VALUES (36, 'gallery', '3', 'gallery', '1')");
$tmpQuery = mysql_query("INSERT INTO ".TABLE."_options VALUES (37, 'allowedTypes', '2', 'gallery', '2')");

// end 0.5.1 - 0.5.2 Updates

?>
Return current item: Content*Builder