<?
if (!defined('INSTALL_MODULES')) {
	die ("You can't access this file directly...");
}

if ((!is_god($admin)) && (!is_user($user)) && (!is_admin($admin))) { 
redirect_url("".$admin_file.".php?op=modules"); }


$numbertables = 4;


$result1 = $db2->sql_query("CREATE TABLE ".$prefix_install."_reviews(
  `id` int(10) NOT NULL auto_increment,
  `date` date NOT NULL default '0000-00-00',
  `title` varchar(150) NOT NULL default '',
  `text` text NOT NULL,
  `reviewer` varchar(20) default NULL,
  `email` varchar(60) default NULL,
  `score` int(10) NOT NULL default '0',
  `cover` varchar(100) NOT NULL default '',
  `url` varchar(100) NOT NULL default '',
  `url_title` varchar(50) NOT NULL default '',
  `hits` int(10) NOT NULL default '0',
  `rlanguage` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `id` (`id`))");

################################################################################

$result2 = $db2->sql_query("CREATE TABLE ".$prefix_install."_reviews_add(
   `id` int(10) NOT NULL auto_increment,
  `date` date default NULL,
  `title` varchar(150) NOT NULL default '',
  `text` text NOT NULL,
  `reviewer` varchar(20) NOT NULL default '',
  `email` varchar(60) default NULL,
  `score` int(10) NOT NULL default '0',
  `url` varchar(100) NOT NULL default '',
  `url_title` varchar(50) NOT NULL default '',
  `rlanguage` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `id` (`id`))");

################################################################################

$result3 = $db2->sql_query("CREATE TABLE ".$prefix_install."_reviews_comments(
   `cid` int(10) NOT NULL auto_increment,
  `rid` int(10) NOT NULL default '0',
  `userid` varchar(25) NOT NULL default '',
  `date` datetime default NULL,
  `comments` text,
  `score` int(10) NOT NULL default '0',
  PRIMARY KEY  (`cid`),
  KEY `cid` (`cid`),
  KEY `rid` (`rid`),
  KEY `userid` (`userid`))");

################################################################################

$result4 = $db2->sql_query("CREATE TABLE ".$prefix_install."_reviews_main(
  `title` varchar(100) default NULL,
  `description` text)");

$db2->sql_query("INSERT INTO ".$prefix_install."_reviews_main VALUES ('Reviews Sezione Titolo', 'Reviews Sezione Descrizione')");

?>