<?
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."_nsnsections_articles(
  `artid` int(11) NOT NULL auto_increment,
  `secid` int(11) NOT NULL default '0',
  `title` text,
  `content` text,
  `counter` int(11) default '0',
  `slanguage` varchar(30) default NULL,
  `time` datetime NOT NULL default '0000-00-00 00:00:00',
  `view` int(1) default '0',
  `groups` text,
  `actif` int(1) default '1',
  PRIMARY KEY  (`artid`))");

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

$result2 = $db2->sql_query("CREATE TABLE ".$prefix_install."_nsnsections_config(
  `config_name` varchar(255) NOT NULL default '',
  `config_value` text NOT NULL,
  PRIMARY KEY  (`config_name`))");

$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('title', 'Les Rubriques sur')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('sstitle', 'Accueil des rubriques')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('blockr', '0')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('nblect', '1')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('nbword', '1')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('fimp', '1')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('actsearch', '0')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('class', 'title desc')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('nbart', '1')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('affvis', '1')");
$db2->sql_query("INSERT INTO ".$prefix_install."_nsnsections_config VALUES ('afftime', '1')");

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

$result3 = $db2->sql_query("CREATE TABLE ".$prefix_install."_nsnsections_rubriques(
  `secid` int(11) NOT NULL auto_increment,
  `secname` varchar(40) default NULL,
  `image` varchar(50) default NULL,
  `view` int(1) default '0',
  `groups` text,
  `actif` int(1) default '1',
  PRIMARY KEY  (`secid`))");

?>