-- phpMyAdmin SQL Dump
-- version 3.3.7deb3build0.10.10.1
-- http://www.phpmyadmin.net
--
-- Serveur: localhost
-- Généré le : Lun 24 Janvier 2011 à 21:19
-- Version du serveur: 5.1.49
-- Version de PHP: 5.3.3-1ubuntu9.3

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";

--
-- Base de données: `cms`
--

-- --------------------------------------------------------

--
-- Structure de la table `class`
--

CREATE TABLE IF NOT EXISTS `class` (
  `ClassName` varchar(100) NOT NULL,
  `SyName` varchar(100) NOT NULL,
  `Type` enum('mod','lib') NOT NULL,
  PRIMARY KEY (`ClassName`,`SyName`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `class`
--

INSERT INTO `class` (`ClassName`, `SyName`, `Type`) VALUES
('news', 'news', 'mod'),
('user', 'user', 'mod'),
('admin', 'admin', 'mod');

-- --------------------------------------------------------

--
-- Structure de la table `group`
--

CREATE TABLE IF NOT EXISTS `group` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(100) NOT NULL,
  `group_description` text NOT NULL,
  `group_color` varchar(7) NOT NULL,
  `group_apply_moderator` enum('yes','no') NOT NULL,
  `group_type` enum('system','predefined','defined') NOT NULL,
  PRIMARY KEY (`group_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Contenu de la table `group`
--

INSERT INTO `group` (`group_id`, `group_name`, `group_description`, `group_color`, `group_apply_moderator`, `group_type`) VALUES
(1, 'REGISTRED', 'REGISTRED_DESC', '', 'yes', 'system'),
(2, 'admins', 'Les administrateurs du site.', '', 'yes', 'defined'),
(3, 'webmasters', 'Personnes chargés de l''entretient du site.', '', 'yes', 'defined');

-- --------------------------------------------------------

--
-- Structure de la table `jobs`
--

CREATE TABLE IF NOT EXISTS `jobs` (
  `Jname` varchar(100) NOT NULL,
  `Jlib` varchar(100) NOT NULL,
  `Jdispo` text NOT NULL,
  PRIMARY KEY (`Jname`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `jobs`
--

INSERT INTO `jobs` (`Jname`, `Jlib`, `Jdispo`) VALUES
('template', 'smarty', '{"smarty"}'),
('translator', 'corelib', '{"corelib"}'),
('session', 'corelib', '{"corelib"}'),
('hash', 'corelib', '{"corelib"}'),
('auth', 'corelib', '{"corelib"}'),
('user', 'corelib', '{"corelib"}'),
('form', 'corelib', '{"corelib"}'),
('access', 'corelib', '{"corelib"}');

-- --------------------------------------------------------

--
-- Structure de la table `modules`
--

CREATE TABLE IF NOT EXISTS `modules` (
  `SyName` varchar(100) NOT NULL,
  `autoStart` enum('yes','no') NOT NULL DEFAULT 'no',
  `libraries` tinytext NOT NULL,
  `active` enum('yes','no') NOT NULL DEFAULT 'yes',
  `Name` varchar(100) NOT NULL,
  `Class` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`SyName`),
  KEY `active` (`active`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `modules`
--

INSERT INTO `modules` (`SyName`, `autoStart`, `libraries`, `active`, `Name`, `Class`) VALUES
('news', 'no', '{}', 'yes', 'News', 'mod_news'),
('user', 'yes', '{}', 'yes', 'Utilisateur', 'mod_user'),
('admin', 'no', '{}', 'yes', 'admin', 'mod_admin');

-- --------------------------------------------------------

--
-- Structure de la table `news`
--

CREATE TABLE IF NOT EXISTS `news` (
  `news_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `news_title` tinytext NOT NULL,
  `news_time` datetime NOT NULL,
  `news_state` enum('active','foread','unactive') NOT NULL DEFAULT 'foread',
  `news_endtime` datetime DEFAULT NULL,
  `news_author` varchar(60) NOT NULL,
  `news_content` text NOT NULL,
  PRIMARY KEY (`news_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Contenu de la table `news`
--

INSERT INTO `news` (`news_id`, `news_title`, `news_time`, `news_state`, `news_endtime`, `news_author`, `news_content`) VALUES
(1, 'La révolte des bontiv', '2011-01-15 00:00:00', 'active', NULL, 'bontiv', '<h2>Pourquoi bontiv ?</h2>\r\n<p>En fait je ne sais pas.</p>\r\n<p>Mais il est cool le CMS, non ?</p>');

-- --------------------------------------------------------

--
-- Structure de la table `settings`
--

CREATE TABLE IF NOT EXISTS `settings` (
  `name` varchar(255) NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `settings`
--

INSERT INTO `settings` (`name`, `value`) VALUES
('def_mod', 'mod_news'),
('gzoutput', 'false'),
('themedir', 'themes'),
('themepath', '/cms/themes/'),
('theme', 'bluewater'),
('sitepath', '/cms/index.php/');

-- --------------------------------------------------------

--
-- Structure de la table `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `registred` enum('yes','no') NOT NULL DEFAULT 'yes',
  `active` enum('yes','no') NOT NULL DEFAULT 'yes',
  `pseudo` varchar(100) NOT NULL,
  `pseudo_clean` varchar(100) NOT NULL,
  `mail` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;

--
-- Contenu de la table `user`
--

INSERT INTO `user` (`user_id`, `registred`, `active`, `pseudo`, `pseudo_clean`, `mail`) VALUES
(0, 'no', 'yes', 'Invité', 'invité', ''),
(4, 'yes', 'yes', 'Bontiv', 'bontiv', 'prog.bontiv@gmail.com');

-- --------------------------------------------------------

--
-- Structure de la table `user_access`
--

CREATE TABLE IF NOT EXISTS `user_access` (
  `access_id` int(11) NOT NULL AUTO_INCREMENT,
  `access` tinytext NOT NULL,
  `flags` int(11) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `owner_type` enum('user','group') NOT NULL,
  PRIMARY KEY (`access_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Contenu de la table `user_access`
--

INSERT INTO `user_access` (`access_id`, `access`, `flags`, `owner_id`, `owner_type`) VALUES
(1, '/', 7, 4, 'user');

-- --------------------------------------------------------

--
-- Structure de la table `user_auth`
--

CREATE TABLE IF NOT EXISTS `user_auth` (
  `user_id` int(11) NOT NULL,
  `user_login` varchar(100) NOT NULL,
  `user_pass` varchar(34) NOT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Contenu de la table `user_auth`
--

INSERT INTO `user_auth` (`user_id`, `user_login`, `user_pass`) VALUES
(4, 'bontiv', '#ffc8203a1074514bef6aa0afe34b260d5');

-- --------------------------------------------------------

--
-- Structure de la table `user_group`
--

CREATE TABLE IF NOT EXISTS `user_group` (
  `affiliate_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `child_id` int(11) NOT NULL,
  `child_type` enum('user','group') NOT NULL,
  `default` enum('yes','no') NOT NULL,
  `moderator` enum('yes','no') NOT NULL,
  PRIMARY KEY (`affiliate_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Contenu de la table `user_group`
--

INSERT INTO `user_group` (`affiliate_id`, `group_id`, `child_id`, `child_type`, `default`, `moderator`) VALUES
(1, 2, 3, 'group', 'no', 'no'),
(2, 3, 4, 'user', 'yes', 'yes');

