Location: PHPKode > projects > PHPEcho CMS > install/data/mysql_tables.php
<?php
$table[] = "
CREATE TABLE `".PREFIX."blocks` (
`id` tinyint(4) NOT NULL default '0',
`name` varchar(255) NOT NULL default '',
  `display_name` varchar(255) NOT NULL default '',
  `side` varchar(10) NOT NULL default '',
  `order` tinyint(4) NOT NULL default '0',
  `mysql` tinyint(4) NOT NULL default '0',
  `status` varchar(3) not null default 'ON',
  `contents` text NOT NULL
) TYPE=MyISAM;
";

$table[] = "
CREATE TABLE `".PREFIX."files` (
  `file_id` mediumint(9) NOT NULL auto_increment,
  `file_name` varchar(255) NOT NULL default '',
  `file_link` varchar(255) NOT NULL default '',
  `file_downloaded` mediumint(9) NOT NULL default '0',
  PRIMARY KEY  (`file_id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
";
$table[] = "
CREATE TABLE `".PREFIX."languages` (
  `lang_id` tinyint(4) NOT NULL default '0',
  `lang_dir` varchar(255) NOT NULL default '',
  `lang_name` varchar(255) NOT NULL default '',
  `lang_author` varchar(255) NOT NULL default '',
  `lang_email` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
";

$table[] = "
CREATE TABLE `".PREFIX."modules` (
  `id` mediumint(9) NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `display_name` varchar(255) NOT NULL default '',
  `show_menu` tinyint(4) NOT NULL default '0',
  `status` varchar(3) NOT NULL default 'ON'
) TYPE=MyISAM;
";

$table[] = "
CREATE TABLE `".PREFIX."news` (
  `id` mediumint(9) NOT NULL auto_increment,
  `title` varchar(255) NOT NULL default '',
  `text` text NOT NULL,
  `detailtext` text NOT NULL,
  `author` varchar(150) NOT NULL default 'Admin',
  `views` MEDIUMINT(9) NOT NULL DEFAULT '0',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
";

$table[] = "
CREATE TABLE `".PREFIX."settings` (
  `sitename` varchar(150) NOT NULL default '',
  `default_lang` varchar(255) NOT NULL default '',
  `maintenance` tinyint(4) NOT NULL default '0',
  `maintenance_message` longtext NOT NULL,
  `admin_mail` varchar(255) NOT NULL default '',
  `min_pass` tinyint(4) NOT NULL default '0',
  `keywords` longtext NOT NULL,
  `default_theme` varchar(255) NOT NULL default '',
  `numnews` tinyint(4) NOT NULL default '15',
  `numthreads` tinyint(4) NOT NULL default '15',
  `allusers_visits` bigint NOT NULL,
  `defaultmodule` tinyint(4) NOT NULL default '1',
  `lastnews` tinyint(4) NOT NULL default '3'
) TYPE=MyISAM;
";

$table[] = "
CREATE TABLE `".PREFIX."themes` (
  `tid` tinyint(4) NOT NULL default '0',
  `tdir` varchar(255) NOT NULL default '',
  `tname` varchar(255) NOT NULL default '',
  `tauthor` varchar(255) NOT NULL default '',
  `temail` varchar(255) NOT NULL default ''
) TYPE=MyISAM;
";
$table[] = "
CREATE TABLE `".PREFIX."users` (
  `id` mediumint(9) NOT NULL auto_increment,
  `username` varchar(50) NOT NULL default '',
  `password` varchar(32) NOT NULL default '',
  `email` varchar(255) NOT NULL default '',
  `language` varchar(255) NOT NULL default '',
  `theme` varchar(255) NOT NULL default '',
  `admin_level` tinyint(4) default '0',
  `online` tinyint(4) NOT NULL default '0',
  `user_visits` bigint not null,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=1 ;
";
$table[] = "
CREATE TABLE `".PREFIX."gallery` (
`id` MEDIUMINT NOT NULL auto_increment,
`title` VARCHAR( 200 ) NOT NULL ,
`link` VARCHAR( 255 ) NOT NULL ,
`author` VARCHAR( 50 ) NOT NULL ,
`cat` TINYINT NOT NULL,
PRIMARY KEY  (`id`)
) TYPE=MyISAM ;
";

$table[] = "
CREATE TABLE `".PREFIX."gallery_cats` (
`id` MEDIUMINT(9) NOT NULL auto_increment,
`name` VARCHAR( 200 ) NOT NULL,
PRIMARY KEY  (`id`) 
) TYPE=MyISAM ;
";

$table[] = "
CREATE TABLE `".PREFIX."news_comments` (
`id` mediumint(9) NOT NULL auto_increment,
`message` TEXT NOT NULL ,
`author` VARCHAR( 250 ) NOT NULL,
`news_id` mediumint(9) NOT NULL,
 PRIMARY KEY  (`id`) 
) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=1 ;
";

$table[] = "
CREATE TABLE `".PREFIX."sections` (
`id` MEDIUMINT NOT NULL auto_increment,
`name` VARCHAR(255) NOT NULL,
`desc` VARCHAR(255) NOT NULL,
`lastdate` VARCHAR(20) NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
";

$table[] = "
CREATE TABLE `".PREFIX."threads` (
`id` MEDIUMINT NOT NULL auto_increment,
`section_id` MEDIUMINT NOT NULL,
`parent` MEDIUMINT NOT NULL,
`title` VARCHAR(255) NOT NULL,
`contents` TEXT NOT NULL,
`author` VARCHAR(200) NOT NULL,
`date` VARCHAR(20) NOT NULL,
`nb_replies` MEDIUMINT NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;
";

$table[] = "
create table `".PREFIX."voting` (
`id` mediumint not null auto_increment,
`title` varchar(255) not null,
`date` varchar(20) not null,
primary key (`id`)
) type=MyISAM auto_increment=1 ;
";

$table[] = "
create table `".PREFIX."voting_elements` (
`id` mediumint not null auto_increment,
`parent` mediumint not null,
`title` varchar(255) not null,
`frequency` mediumint not null,
primary key (`id`)
) type=MyISAM auto_increment=1 ;
";

$table[] = "
create table `".PREFIX."statistics_os` (
`os` varchar(50) not null,
`counts` bigint not null
) type=MyISAM ;
";

$table[] = "
create table `".PREFIX."statistics_browser` (
`browser` varchar(50) not null,
`counts` bigint not null
) type=MyISAM ;
";

$table[] = "
create table `".PREFIX."admin_perms` (
`id` mediumint not null,
`perms` varchar(16) not null default '00000000000'
) type=MyISAM ;
";

$table[] = "
create table `".PREFIX."banners` (
`name` varchar(100) not null,
`position` tinyint not null
) type=MyISAM ;
";
?>
Return current item: PHPEcho CMS