<?
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"); }

$result1 = $db2->sql_query("CREATE TABLE ".$prefix_install."_poll_check(
  `ip` varchar(20) NOT NULL default '',
  `time` varchar(14) NOT NULL default '',
  `pollID` int(10) NOT NULL default '0')");
################################################################################

$result2 = $db2->sql_query("CREATE TABLE ".$prefix_install."_poll_data(
  `pollID` int(11) NOT NULL default '0',
  `optionText` char(50) NOT NULL default '',
  `optionCount` int(11) NOT NULL default '0',
  `voteID` int(11) NOT NULL default '0')");

$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, 'Ummmm, non male', 0, 1)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, 'Discreto', 0, 2)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, 'Buono', 0, 3)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, 'Il migliore !', 0, 4)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, 'Cosa c'è di meglio ?', 0, 5)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, '', 0, 6)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, '', 0, 7)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, '', 0, 8)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, '', 0, 9)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, '', 0, 10)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, '', 0, 11)");
$db2->sql_query("INSERT INTO ".$prefix_install."_poll_data VALUES (1, '', 0, 12)");
################################################################################

$result3 = $db2->sql_query("CREATE TABLE ".$prefix_install."_poll_desc(
  `pollID` int(11) NOT NULL auto_increment,
  `pollTitle` varchar(100) NOT NULL default '',
  `timeStamp` int(11) NOT NULL default '0',
  `voters` mediumint(9) NOT NULL default '0',
  `planguage` varchar(30) NOT NULL default '',
  `artid` int(10) NOT NULL default '0',
  PRIMARY KEY  (`pollID`),
  KEY `pollID` (`pollID`))");

$db2->sql_query("INSERT INTO ".$prefix_install."_poll_desc VALUES (1, 'Che pensate di questo sito ?', 961405160, 0, 'Italian', 0)");
################################################################################

$result4 = $db2->sql_query("CREATE TABLE ".$prefix_install."_pollcomments(
  `tid` int(11) NOT NULL auto_increment,
  `pid` int(11) NOT NULL default '0',
  `pollID` int(11) NOT NULL default '0',
  `date` datetime default NULL,
  `name` varchar(60) NOT NULL default '',
  `email` varchar(60) default NULL,
  `url` varchar(60) default NULL,
  `host_name` varchar(60) default NULL,
  `subject` varchar(60) NOT NULL default '',
  `comment` text NOT NULL,
  `score` tinyint(4) NOT NULL default '0',
  `reason` tinyint(4) NOT NULL default '0',
  PRIMARY KEY  (`tid`),
  KEY `tid` (`tid`),
  KEY `pid` (`pid`),
  KEY `pollID` (`pollID`))");

?>