CREATE TABLE `nsgal_gal` (
  `galerie_id` int(11) NOT NULL auto_increment,
  `galerie_ref` int(11) NOT NULL default '0',
  `galerie_user` int(11) NOT NULL default '1',
  `galerie_nom` varchar(200) NOT NULL default '',
  `galerie_description` text NOT NULL,
  `galerie_icone` varchar(150) NOT NULL default '',
  `galerie_actif` int(11) NOT NULL default '1',
  `galerie_nbImg` int(11) NOT NULL default '0',
  `galerie_nbSousGal` int(11) NOT NULL default '0',
  PRIMARY KEY  (`galerie_id`),
  KEY `id` (`galerie_id`),
  KEY `id_2` (`galerie_id`)
) TYPE=MyISAM;


INSERT INTO `nsgal_gal` (`galerie_id`, `galerie_ref`, `galerie_user`, `galerie_nom`, `galerie_description`, `galerie_icone`, `galerie_actif`, `galerie_nbImg`, `galerie_nbSousGal`) VALUES (1, 0, 2, 'Galerie de test', 'Description de la galerie de test', '', 1, 0, 0);


CREATE TABLE `nsgal_groupes` (
  `groupe_id` int(11) NOT NULL auto_increment,
  `groupe_nom` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`groupe_id`)
) TYPE=MyISAM;

INSERT INTO `nsgal_groupes` (`groupe_id`, `groupe_nom`) VALUES (1, 'Administrateur'),
(2, 'Modérateur'),
(3, 'Membre'),
(4, 'Invité');


CREATE TABLE `nsgal_img` (
  `image_id` int(11) NOT NULL auto_increment,
  `image_nom` varchar(100) NOT NULL default '',
  `image_fichier` varchar(100) NOT NULL default '',
  `image_description` text NOT NULL,
  `image_ref` int(11) NOT NULL default '0',
  `image_user` int(11) NOT NULL default '0',
  `image_hits` int(11) NOT NULL default '0',
  `image_taille` int(11) NOT NULL default '0',
  `image_actif` int(11) NOT NULL default '1',
  PRIMARY KEY  (`image_id`),
  KEY `id` (`image_id`)
) TYPE=MyISAM;



CREATE TABLE `nsgal_users` (
  `user_id` int(11) NOT NULL auto_increment,
  `user_groupe` int(11) NOT NULL default '0',
  `user_pseudo` varchar(100) NOT NULL default '',
  `user_pass` varchar(40) NOT NULL default '',
  `user_email` varchar(100) NOT NULL default '',
  `user_sexe` varchar(5) NOT NULL default '',
  `user_age` char(2) NOT NULL default '',
  `user_ville` varchar(100) NOT NULL default '',
  `user_description` varchar(255) NOT NULL default '',
  `user_url` varchar(200) NOT NULL default '',
  `user_avatar` varchar(255) NOT NULL default '',
  `user_date` varchar(10) NOT NULL default '',
  `user_active` char(1) NOT NULL default '',
  PRIMARY KEY  (`user_id`)
) TYPE=MyISAM;

INSERT INTO `nsgal_users` (`user_id`, `user_groupe`, `user_pseudo`, `user_pass`, `user_email`, `user_sexe`, `user_age`, `user_ville`, `user_description`, `user_url`, `user_avatar`, `user_date`, `user_active`) VALUES (2, 1, 'nsgalphp', '375a3343891c9f93ae1a746d76559684', 'mail@localhost', 'Mascu', '30', 'maVille', 'maDescription', 'www.monsite.fr', 'monAvatar.gif', '01/01/1970', '1'),
(1, 4, 'Invité', 'Invité', 'Invité', '', '', '', '', '', '', '', '');
