-- $Id: install.sql 934 2011-06-12 13:32:29Z mike007 $

CREATE TABLE `dl` (
	`id` int(11) NOT NULL auto_increment,
	`fichier` varchar(255) NOT NULL default '',
	`taille` int(11) NOT NULL default '0',
	`taille_str` varchar(31) NOT NULL default '',
	`type` varchar(15) NOT NULL default '',
	`chmod` int(11) NOT NULL default '0',
	`md5_file` varchar(255) NOT NULL default '',
	`niveau_repertoire` int(11) NOT NULL default '0',
	`visible` int(1) NOT NULL default '0',
	`licence` varchar(255) NOT NULL default '',
	`version` varchar(255) NOT NULL default '',
	`image` varchar(255) NOT NULL default '',
	`image_miniature` varchar(255) NOT NULL default '',
	`auteur` varchar(255) NOT NULL default '',
	`titre` varchar(255) NOT NULL default '',
	`description` text NOT NULL,
	`grade` int(11) NOT NULL default '0',
	`id_groupe` int(11) NOT NULL default '0',
	`filtre` varchar(255) NOT NULL default '',
	`date_creation` int(11) NOT NULL default '0',
	`date_modification` int(11) NOT NULL default '0',
	`date_hit` int(11) NOT NULL default '0',
	`hit` int(11) NOT NULL default '0',
	`vote_autorisation` int(1) NOT NULL default '1',
	`vote_nbr` int(11) NOT NULL default '0',
	`vote_somme` int(11) NOT NULL default '0',
	`vote` int(11) NOT NULL default '0',
	`variable_interne` varchar(255) NOT NULL default '',
	PRIMARY KEY  (`id`)
) TYPE=MyISAM COMMENT='Module download' AUTO_INCREMENT=1 ;

INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_aff_index', 'explorateur');
INSERT INTO `parametres` SET `nom`='dl_aff_choix', `valeur`='explorateur,tableau,miniature';
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_administration', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_administration', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_repertoire_ajouter', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_repertoire_ajouter', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_repertoire_defaut', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_repertoire_defaut', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_repertoire_editer', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_repertoire_editer', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_repertoire_supprimer', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_repertoire_supprimer', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_fichier_ajouter', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_fichier_ajouter', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_fichier_defaut', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_fichier_defaut', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_fichier_editer', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_fichier_editer', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_fichier_remplacer', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_fichier_remplacer', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_fichier_deplacer', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_fichier_deplacer', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_fichier_supprimer', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_fichier_supprimer', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grd_image_ajouter', '4');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_grp_image_ajouter', '0');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_upload', './modules/download/upload/');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_upload_image', './modules/download/upload_image/');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_nb_dl_pagetab', '5');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_nouveaute', '30');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_width_maxi', '100');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_height_maxi', '100');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_aff_drt', '1');
INSERT INTO `parametres` (`id`, `nom`, `valeur`) VALUES ('', 'dl_visible', '0');

DELETE FROM `votes_modules` WHERE `module` = 'download';
