-- http://www.phpmyadmin.net
--




--
-- Database: `cmsgentest`
--

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

--
-- Table structure for table `admin_advanced_settings`
--

CREATE TABLE IF NOT EXISTS `admin_advanced_settings` (
  `id` int(1) NOT NULL AUTO_INCREMENT,
  `ip_deny` text NOT NULL,
  `ip_allow` text NOT NULL,
    `site_offline` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `admin_advanced_settings`
--

INSERT INTO `admin_advanced_settings` (`id`, `ip_deny`, `ip_allow`) VALUES
(1, '192.168.65.01', '192.168.65.02');

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

--
-- Table structure for table `cmsgen_contenthistory`
--
CREATE TABLE `cmsgen_contenthistory` (
`id` INT NOT NULL AUTO_INCREMENT ,
`table_name` VARCHAR( 255 ) NOT NULL ,
`entry_id` INT NOT NULL ,
`edited_by` INT NOT NULL ,
`data` TEXT NOT NULL ,
`created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ,
PRIMARY KEY ( `id` )
) ENGINE = MYISAM ;

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

--
-- Table structure for table `backend_structure`
--

CREATE TABLE IF NOT EXISTS `backend_structure` (
  `field_type` varchar(255) NOT NULL,
  `html` text NOT NULL,
  `common_name` text NOT NULL COMMENT 'diverse name of the table cols that have similar functaionlity',
  `bValidator` varchar(255) NOT NULL,
  UNIQUE KEY `field_type` (`field_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;



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

--
-- Table structure for table `cmsgen_cpanel_links`
--

CREATE TABLE IF NOT EXISTS `cmsgen_cpanel_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `link` varchar(255) NOT NULL,
  `active` int(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `cmsgen_cpanel_links`
--



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

--
-- Table structure for table `cmsgen_default_values`
--

CREATE TABLE IF NOT EXISTS `cmsgen_default_values` (
  `field_type` varchar(255) NOT NULL,
  `value` text NOT NULL,
  UNIQUE KEY `field_type` (`field_type`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cmsgen_default_values`
--

INSERT INTO `cmsgen_default_values` (`field_type`, `value`) VALUES
('url', 'http://www.example.com'),
('textfield', 'Lorem Ipsum'),
('textarea', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sollicitudin vulputate enim, at egestas tellus tempus vitae. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam interdum dignissim tortor, ut consequat sem dignissim eu. Vestibulum consequat, justo sit amet commodo tristique, velit justo molestie lectus, ac scelerisque arcu ante et nulla. Fusce lacinia sapien sed sem pharetra volutpat. Mauris condimentum ultricies tempus. Sed mollis urna vitae urna lacinia imperdiet. Nulla facilisi. Quisque sagittis tincidunt orci. Aliquam erat volutpat.'),
('photo_upload', 'images/bulk.jpg'),
('email', 'admin@example.com');

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

--
-- Table structure for table `logs`
--

CREATE TABLE IF NOT EXISTS `logs` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `ip` varchar(39) NOT NULL,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `username` varchar(255) NOT NULL,
  `action` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `logs`
--



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

--
-- Table structure for table `site_options`
--

CREATE TABLE IF NOT EXISTS `site_options` (
  `id` int(11) unsigned NOT NULL,
  `project_name` varchar(255) NOT NULL,
  `favicon` varchar(255) NOT NULL,
  `title_bar` varchar(200) NOT NULL,
  `meta_description` varchar(255) NOT NULL,
  `meta_keywords` varchar(255) NOT NULL,
  `contact_email` varchar(255) NOT NULL,
  `from_email` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `site_options`
--

INSERT INTO `site_options` (`id`, `project_name`, `favicon`, `title_bar`, `meta_description`, `meta_keywords`, `contact_email`, `from_email`) VALUES
(1, 'CMS', '', '', '', '', 'email@site.com', 'email@site.com');

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

--
-- Table structure for table `system`
--

CREATE TABLE IF NOT EXISTS `system` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `table_name` varchar(100) NOT NULL,
  `field_name` varchar(255) NOT NULL,
  `field_type` varchar(255) NOT NULL,
  `foreign_table` varchar(100) NOT NULL,
  `foreign_field` varchar(255) NOT NULL,
  `mandatory` tinyint(1) NOT NULL,
  `parameters` text NOT NULL,
  `tooltip` text NOT NULL,
  `active` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT 'determines if the field is visible in the website or not',
  `is_visible` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=42 ;

--
-- Dumping data for table `system`
--

INSERT INTO `system` (`id`, `table_name`, `field_name`, `field_type`, `foreign_table`, `foreign_field`, `mandatory`, `parameters`, `active`) VALUES
(8, 'site_options', 'project_name', 'textfield', '', '', 1, '', 1),
(9, 'site_options', 'favicon', 'photo_upload', '', '', 0, '', 1),
(10, 'site_options', 'title_bar', 'textfield', '', '', 1, '', 1),
(11, 'site_options', 'meta_description', 'textarea_nostyles', '', '', 0, '', 1),
(12, 'site_options', 'meta_keywords', 'textarea_nostyles', '', '', 0, '', 1),
(13, 'admin_advanced_settings', 'site_offline', 'checkbox', '', '', 0, '', 1),
(14, 'site_options', 'contact_email', 'email', '', '', 0, '', 1),
(15, 'site_options', 'from_email', 'email', '', '', 0, '', 1),
(16, 'admin_advanced_settings', 'id', 'id', '', '', 1, '', 1),
(17, 'admin_advanced_settings', 'ip_deny', 'textarea_nostyles', '', '', 0, '', 1),
(18, 'admin_advanced_settings', 'ip_allow', 'textarea_nostyles', '', '', 0, '', 1),

(38, 'cmsgen_cpanel_links', 'id', 'id', '', '', 1, '', 1),
(39, 'cmsgen_cpanel_links', 'active', 'checkbox', '', '', 0, '', 1),
(40, 'cmsgen_cpanel_links', 'link', 'url', '', '', 1, '', 1),
(41, 'cmsgen_cpanel_links', 'name', 'textfield', '', '', 0, '', 1);

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

--
-- Table structure for table `table_options`
--

CREATE TABLE IF NOT EXISTS `table_options` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `table_name` varchar(255) NOT NULL,
  `display_fields` varchar(1000) NOT NULL,
  `link_format` varchar(255) NOT NULL,
  `disable_crud` int(1) NOT NULL COMMENT 'disable CReateUpdateDelete',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE IF NOT EXISTS `cmsgen_statistics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `browser` varchar(255) NOT NULL DEFAULT '',
  `ip` varchar(15) NOT NULL DEFAULT '',
  `thedate_visited` date NOT NULL DEFAULT '0000-00-00',
  `page` varchar(70) NOT NULL DEFAULT '',
  `from_page` varchar(200) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

