CREATE TABLE IF NOT EXISTS `#__je_config` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `component` varchar(30) NOT NULL default '',
  `section` varchar(45) NOT NULL default '',
  `lable` varchar(255) NOT NULL default '',
  `name` varchar(45) NOT NULL default '',
  `type` set('selectlist','yesno','dropdown','text','textarea') NOT NULL default '',
  `description` tinytext NOT NULL,
  `values` tinytext NOT NULL,
  `selected` tinytext NOT NULL,
  `hidden` enum('Y','N') NOT NULL default 'N',
  `fieldset` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `name` (`name`)
) ;

INSERT INTO `#__je_config` (`id`,`component`,`section`,`lable`,`name`,`type`,`description`,`values`,`selected`,`hidden`,`fieldset`) VALUES 
 (NULL,'com_jxplorer','general','Is Offline','offline','yesno','If this component is online or  ofline','','0','N','Access Site'),
 (NULL,'com_jxplorer','view','Show create date field','show_ctime','yesno','To show or hide Crete tame column in admin aria to save screen place','1','1','N','Administration'),
 (NULL,'com_jxplorer','general','Initial Directory','homedir','text','The top level directory to explore. By defaul is root directory of Joomla instalation.','','d:/joomla development/www.j.svn.com/','N','Other settings'),
 (NULL,'com_jxplorer','general','Offline Message','offline_msg','textarea','Message to be displayed if site is offline','','This Component Is offline right now. Please, come back later.','N','Access Site'),
 (NULL,'com_jxplorer','view','Show Size','show_size','yesno','','','1','N','Administration'),
 (NULL,'com_jxplorer','view','Show Type','show_type','yesno','','','1','N','Administration'),
 (NULL,'com_jxplorer','view','Show Modified Time','show_mtime','yesno','','','1','N','Administration');
INSERT INTO `#__je_config` (`id`,`component`,`section`,`lable`,`name`,`type`,`description`,`values`,`selected`,`hidden`,`fieldset`) VALUES 
 (NULL,'com_jxplorer','general','File System Carachterset','charset','dropdown','The characterser is an essential vlaue. Because of the difference between Joomla 1.5 UTF-8 to dislay text and other charset that can be used by File System. For example My File System use windows-1251 and if I create file or folder without this value I wi','iso-8859-1, iso-8859-6, iso-8859-2, iso-8859-7, iso-8859-8, iso-8859-15, windows-1251, windows-1257, windows-1250, gb2312, big5, x-sjis, shift-jis, euc-jp, euc-kr, iso-10646-ucs-2, utf-16, utf-16be, utf-16le, utf-8','windows-1251','N','Other settings'),
 (NULL,'com_jxplorer','view','Show Publish','show_pub','yesno','','','1','N','Administration'),
 (NULL,'com_jxplorer','view','Show Access','show_access','yesno','','','1','N','Administration'),
 (NULL,'com_jxplorer','view','Default view','list_view','dropdown','How to display files','Tumbnails, Icons, Table','Tumbnails','N','Front-end'),
 (NULL,'com_jxplorer','view','Files per page','num_files','text','HOw many files show on one page','','20','N','Front-end');
INSERT INTO `#__je_config` (`id`,`component`,`section`,`lable`,`name`,`type`,`description`,`values`,`selected`,`hidden`,`fieldset`) VALUES 
 (NULL,'com_jxplorer','view','Show Toolbar','show_toolbar','yesno','To show or hide toolbar','','1','N','Front-end'),
 (NULL,'com_jxplorer','view','Show Search Field','show_search','yesno','To show or hide search box at the file list page','','1','N','Front-end'),
 (NULL,'com_jxplorer','general','Default Compreccion Type','compress','dropdown','','gz, bz2','gz','N','Other settings'),
 (NULL,'com_jxplorer','view','Show Permitions','show_perms','yesno','','','1','N','Administration'),
 (NULL,'com_jxplorer','view','Show Pagination','show_pagenav','yesno','Show or hide page navigation','','0','N','Front-end'),
 (NULL,'com_jxplorer','general','Group Access','access_group','selectlist','Which group can access this component','Public, Registered, Special','Public','N','Access Site'),
 (NULL,'com_jxplorer','view','Show all files','show_all','yesno','List all files including with access to registered for public users. This will not allow public user to download files but only see them.','','1','N','Front-end'),
 (NULL,'com_jxplorer','view','Thumbnails Path','tumb_path','text','','','images/jxplorer_thumbnails/','N','Thumbnails');
INSERT INTO `#__je_config` (`id`,`component`,`section`,`lable`,`name`,`type`,`description`,`values`,`selected`,`hidden`,`fieldset`) VALUES 
 (NULL,'com_jxplorer','general','Enable Favorite System','favorite','yesno','','','1','N','Other settings'),
 (NULL,'com_jxplorer','view','File Date Format','date_format','text','Do not edit if not understand (php date() format)','','d, M. Y','N','Front-end'),
 (NULL,'com_jxplorer','general','Stop all downloads','download','yesno','Stop download functionality for all users','','0','N','Access Site'),
 (NULL,'com_jxplorer','view','Thumbnails Default Size','tumb_size','text','The size of the tumbnails','','150','N','Thumbnails'),
 (NULL,'com_jxplorer','view','Show Address Line','show_address','yesno','Show Address line. No need if Append to joomla path = YES','','1','N','Front-end'),
 (NULL,'com_jxplorer','view','Thumbnails Quality','tumb_quality','text','','','90','N','Thumbnails'),
 (NULL,'com_jxplorer','view','Show Copyright','show_rights','yesno','','','1','N','Front-end'),
 (NULL,'com_jxplorer','view','Append Joomla Path','joom_path','yesno','Appent path to standart Joomla Path','','1','N','Front-end');
INSERT INTO `#__je_config` (`id`,`component`,`section`,`lable`,`name`,`type`,`description`,`values`,`selected`,`hidden`,`fieldset`) VALUES 
 (NULL,'com_jxplorer','view','Thumbnails Click','tumb_click','selectlist','','Download Image, Preview Image','Download Image','N','Thumbnails'),
 (NULL,'com_jxplorer','general','Enable Comments System','comments','yesno','','','1','N','Other settings'),
 (NULL,'com_jxplorer','general','Enable Rating System','rating','yesno','','','1','N','Other settings'),
 (NULL,'com_jxplorer','general','Allow Uploads','uploads','yesno','','','1','N','uploads'),
 (NULL,'com_jxplorer','general','Upload Rulles','upload_rule','dropdown','','Upload to Current Folder, Upload to Spesial Folder, Upload to User Home Folder ','Upload to User Home Folder','N','uploads'),
 (NULL,'com_jxplorer','general','Upload Acces','upload_access','selectlist','','Public, Registered, Special','Public','N','uploads'),
 (NULL,'com_jxplorer','general','Upload Directory','upload_dir','text','Must be set if Upload Rulle = Upload to Spesial Folder','','d:/joomla development/www.j.svn.com/uploads/','N','uploads'),
 (NULL,'com_jxplorer','general','Upload Types','upload_type','text','','','pdf, txt, doc, png, gif, jpg, zip, tar, gz, xls, html','N','uploads');

CREATE TABLE IF NOT EXISTS `#__jx_comments` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `user_id` int(10) unsigned NOT NULL default '0',
  `comment` text NOT NULL,
  `ctime` datetime NOT NULL default '0000-00-00 00:00:00',
  `title` varchar(200) NOT NULL default '',
  `email` varchar(150) NOT NULL default '',
  `site` varchar(200) NOT NULL default '',
  `published` tinyint(1) unsigned NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ;

CREATE TABLE IF NOT EXISTS `#__jx_favorites` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `user_id` int(10) unsigned NOT NULL default '0',
  `file_id` int(10) unsigned NOT NULL default '0',
  `ctime` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`)
) ;

CREATE TABLE IF NOT EXISTS  `#__jx_index` (
  `id` int(3) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `dir` text NOT NULL,
  `size` bigint(20) NOT NULL default '0',
  `type` varchar(255) NOT NULL default '',
  `mtime` int(10) NOT NULL default '0',
  `ctime` int(10) unsigned NOT NULL default '0',
  `perms` varchar(11) NOT NULL default '',
  `access` tinyint(3) unsigned NOT NULL default '0',
  `published` tinyint(1) unsigned NOT NULL default '0',
  `index` enum('indexed','delete') NOT NULL default 'indexed',
  `trash` tinyint(1) unsigned NOT NULL default '0',
  `publish_home` tinyint(1) unsigned NOT NULL default '0',
  `checked_out` int(10) unsigned NOT NULL default '0',
  `checked_out_time` datetime NOT NULL default '0000-00-00 00:00:00',
  `rate_times` int(10) unsigned NOT NULL default '0',
  `rate_total` varchar(45) NOT NULL default '',
  `description` varchar(250) NOT NULL default 'No Description',
  `view` varchar(15) NOT NULL default '',
  `icon` varchar(45) NOT NULL default '',
  `user_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `trash` (`trash`),
  KEY `type` (`type`),
  KEY `name` (`name`)
) ;