--
-- Host: localhost    Database: clubwang
-- ------------------------------------------------------


--
-- Table structure for table `cpg131_albums`
--

CREATE TABLE `cpg131_albums` (
  `aid` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `visibility` int(11) NOT NULL DEFAULT '0',
  `uploads` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `comments` enum('YES','NO') NOT NULL DEFAULT 'YES',
  `votes` enum('YES','NO') NOT NULL DEFAULT 'YES',
  `pos` int(11) NOT NULL DEFAULT '0',
  `category` int(11) NOT NULL DEFAULT '0',
  `pic_count` int(11) NOT NULL DEFAULT '0',
  `thumb` int(11) NOT NULL DEFAULT '0',
  `last_addition` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `stat_uptodate` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `keyword` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`aid`),
  KEY `alb_category` (`category`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_albums`
--


--
-- Table structure for table `cpg131_banned`
--

CREATE TABLE `cpg131_banned` (
  `ban_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `ip_addr` tinytext,
  `expiry` datetime DEFAULT NULL,
  PRIMARY KEY (`ban_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_banned`
--


--
-- Table structure for table `cpg131_categories`
--

CREATE TABLE `cpg131_categories` (
  `cid` int(11) NOT NULL AUTO_INCREMENT,
  `owner_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `pos` int(11) NOT NULL DEFAULT '0',
  `parent` int(11) NOT NULL DEFAULT '0',
  `thumb` int(11) NOT NULL DEFAULT '0',
  `subcat_count` int(11) NOT NULL DEFAULT '0',
  `alb_count` int(11) NOT NULL DEFAULT '0',
  `pic_count` int(11) NOT NULL DEFAULT '0',
  `stat_uptodate` enum('YES','NO') NOT NULL DEFAULT 'NO',
  PRIMARY KEY (`cid`),
  KEY `cat_parent` (`parent`),
  KEY `cat_pos` (`pos`),
  KEY `cat_owner_id` (`owner_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_categories`
--

INSERT INTO `cpg131_categories` VALUES (1,0,'User galleries','This category contains albums that belong to Coppermine users.',0,0,0,0,0,0,'NO');

--
-- Table structure for table `cpg131_comments`
--

CREATE TABLE `cpg131_comments` (
  `pid` mediumint(10) NOT NULL DEFAULT '0',
  `msg_id` mediumint(10) NOT NULL AUTO_INCREMENT,
  `msg_author` varchar(25) NOT NULL DEFAULT '',
  `msg_body` text NOT NULL,
  `msg_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `msg_raw_ip` tinytext,
  `msg_hdr_ip` tinytext,
  `author_md5_id` varchar(32) NOT NULL DEFAULT '',
  `author_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`msg_id`),
  KEY `com_pic_id` (`pid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_comments`
--


--
-- Table structure for table `cpg131_config`
--

CREATE TABLE `cpg131_config` (
  `name` varchar(40) NOT NULL DEFAULT '',
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_config`
--

INSERT INTO `cpg131_config` VALUES ('albums_per_page','12'),('album_list_cols','2'),('display_pic_info','0'),('alb_list_thumb_size','50'),('allowed_mov_types','ALL'),('allowed_doc_types','ALL'),('allowed_snd_types','ALL'),('allowed_img_types','ALL'),('allow_private_albums','1'),('allow_user_registration','0'),('allow_duplicate_emails_addr','0'),('caption_in_thumbview','1'),('views_in_thumbview','1'),('charset','language file'),('cookie_name','cpg131'),('cookie_path','/'),('debug_mode','0'),('debug_notice','0'),('default_dir_mode','0777'),('default_file_mode','0666'),('default_sort_order','na'),('ecards_more_pic_target','http://www.clubwang.com/coppermine/'),('enable_smilies','1'),('filter_bad_words','0'),('forbiden_fname_char','$/\\\\:*?&quot;\'&lt;&gt;|`'),('fullpath','albums/'),('gallery_admin_email','you@somewhere.com'),('gallery_description','Your online photo album'),('gallery_name','Coppermine Photo Gallery'),('im_options','-antialias'),('impath',''),('jpeg_qual','80'),('keep_votes_time','30'),('lang','english'),('main_page_layout','breadcrumb/catlist/alblist/random,2/lastup,2'),('main_table_width','100%'),('make_intermediate','1'),('max_com_lines','10'),('max_com_size','512'),('max_com_wlength','38'),('max_img_desc_length','512'),('max_tabs','12'),('max_upl_size','1024'),('max_upl_width_height','2048'),('min_votes_for_rating','1'),('normal_pfx','normal_'),('picture_table_width','600'),('picture_width','400'),('randpos_interval','1195913170'),('read_exif_data','0'),('reg_requires_valid_email','1'),('subcat_level','2'),('theme','classic'),('thumbcols','4'),('thumbrows','3'),('thumb_method','gd2'),('thumb_pfx','thumb_'),('thumb_width','100'),('userpics','userpics/'),('user_field1_name',''),('user_field2_name',''),('user_field3_name',''),('user_field4_name',''),('display_comment_count','0'),('show_private','0'),('first_level','1'),('display_film_strip','1'),('max_film_strip_items','5'),('thumb_use','ht'),('comment_email_notification','0'),('read_iptc_data','0'),('reg_notify_admin_email','0'),('disable_comment_flood_protect','0'),('upl_notify_admin_email','0'),('display_uploader','0'),('language_list','0'),('language_flags','0'),('theme_list','0'),('language_reset','1'),('theme_reset','1'),('allow_memberlist','0'),('display_faq','0'),('show_bbcode_help','1'),('log_ecards','0'),('email_comment_notification','0'),('enable_zipdownload','1'),('slideshow_interval','5000');

--
-- Table structure for table `cpg131_ecards`
--

CREATE TABLE `cpg131_ecards` (
  `eid` int(11) NOT NULL AUTO_INCREMENT,
  `sender_name` varchar(50) NOT NULL DEFAULT '',
  `sender_email` text NOT NULL,
  `recipient_name` varchar(50) NOT NULL DEFAULT '',
  `recipient_email` text NOT NULL,
  `link` text NOT NULL,
  `date` tinytext NOT NULL,
  `sender_ip` tinytext NOT NULL,
  PRIMARY KEY (`eid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to log ecards';

--
-- Dumping data for table `cpg131_ecards`
--


--
-- Table structure for table `cpg131_exif`
--

CREATE TABLE `cpg131_exif` (
  `filename` varchar(255) NOT NULL DEFAULT '',
  `exifData` text NOT NULL,
  UNIQUE KEY `filename` (`filename`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_exif`
--


--
-- Table structure for table `cpg131_filetypes`
--

CREATE TABLE `cpg131_filetypes` (
  `extension` char(7) NOT NULL DEFAULT '',
  `mime` char(30) DEFAULT NULL,
  `content` char(15) DEFAULT NULL,
  PRIMARY KEY (`extension`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Used to store the file extensions';

--
-- Dumping data for table `cpg131_filetypes`
--

INSERT INTO `cpg131_filetypes` VALUES ('jpg','image/jpg','image'),('jpeg','image/jpeg','image'),('jpe','image/jpg','image'),('gif','image/gif','image'),('png','image/png','image'),('bmp','image/bmp','image'),('jpc','image/jpc','image'),('jp2','image/jp2','image'),('jpx','image/jpx','image'),('jb2','image/jb2','image'),('swc','image/swc','image'),('iff','image/iff','image'),('asf','video/x-ms-asf','movie'),('asx','video/x-ms-asx','movie'),('mpg','video/mpeg','movie'),('mpeg','video/mpeg','movie'),('wmv','video/x-ms-wmv','movie'),('swf','application/x-shockwave-flash','movie'),('avi','video/avi','movie'),('mov','video/quicktime','movie'),('mp3','audio/mpeg3','audio'),('midi','audio/midi','audio'),('mid','audio/midi','audio'),('wma','audio/x-ms-wma','audio'),('wav','audio/wav','audio'),('ogg','audio/ogg','audio'),('psd','image/psd','document'),('ram','audio/x-pn-realaudio','document'),('ra','audio/x-realaudio','document'),('rm','audio/x-realmedia','document'),('tiff','image/tiff','document'),('tif','image/tif','document'),('doc','application/msword','document'),('txt','text/plain','document'),('rtf','text/richtext','document'),('pdf','application/pdf','document'),('xls','application/excel','document'),('pps','application/powerpoint','document'),('ppt','application/powerpoint','document'),('zip','application/zip','document'),('rar','application/rar','document'),('gz','application/gz','document'),('mdb','application/msaccess','document');

--
-- Table structure for table `cpg131_pictures`
--

CREATE TABLE `cpg131_pictures` (
  `pid` int(11) NOT NULL AUTO_INCREMENT,
  `aid` int(11) NOT NULL DEFAULT '0',
  `filepath` varchar(255) NOT NULL DEFAULT '',
  `filename` varchar(255) NOT NULL DEFAULT '',
  `filesize` int(11) NOT NULL DEFAULT '0',
  `total_filesize` int(11) NOT NULL DEFAULT '0',
  `pwidth` smallint(6) NOT NULL DEFAULT '0',
  `pheight` smallint(6) NOT NULL DEFAULT '0',
  `hits` int(10) NOT NULL DEFAULT '0',
  `mtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `ctime` int(11) NOT NULL DEFAULT '0',
  `owner_id` int(11) NOT NULL DEFAULT '0',
  `owner_name` varchar(40) NOT NULL DEFAULT '',
  `pic_rating` int(11) NOT NULL DEFAULT '0',
  `votes` int(11) NOT NULL DEFAULT '0',
  `title` varchar(255) NOT NULL DEFAULT '',
  `caption` text NOT NULL,
  `keywords` varchar(255) NOT NULL DEFAULT '',
  `approved` enum('YES','NO') NOT NULL DEFAULT 'NO',
  `user1` varchar(255) NOT NULL DEFAULT '',
  `user2` varchar(255) NOT NULL DEFAULT '',
  `user3` varchar(255) NOT NULL DEFAULT '',
  `user4` varchar(255) NOT NULL DEFAULT '',
  `url_prefix` tinyint(4) NOT NULL DEFAULT '0',
  `randpos` int(11) NOT NULL DEFAULT '0',
  `pic_raw_ip` tinytext,
  `pic_hdr_ip` tinytext,
  PRIMARY KEY (`pid`),
  KEY `owner_id` (`owner_id`),
  KEY `pic_hits` (`hits`),
  KEY `pic_rate` (`pic_rating`),
  KEY `aid_approved` (`aid`,`approved`),
  KEY `randpos` (`randpos`),
  KEY `pic_aid` (`aid`),
  KEY `search` (`title`,`caption`(1),`keywords`,`filename`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_pictures`
--


--
-- Table structure for table `cpg131_temp_data`
--

CREATE TABLE `cpg131_temp_data` (
  `unique_ID` varchar(8) NOT NULL DEFAULT '',
  `encoded_string` blob NOT NULL,
  `timestamp` int(11) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`unique_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Holds temporary file data for multiple file uploads';

--
-- Dumping data for table `cpg131_temp_data`
--


--
-- Table structure for table `cpg131_usergroups`
--

CREATE TABLE `cpg131_usergroups` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `group_name` varchar(255) NOT NULL DEFAULT '',
  `group_quota` int(11) NOT NULL DEFAULT '0',
  `has_admin_access` tinyint(4) NOT NULL DEFAULT '0',
  `can_rate_pictures` tinyint(4) NOT NULL DEFAULT '0',
  `can_send_ecards` tinyint(4) NOT NULL DEFAULT '0',
  `can_post_comments` tinyint(4) NOT NULL DEFAULT '0',
  `can_upload_pictures` tinyint(4) NOT NULL DEFAULT '0',
  `can_create_albums` tinyint(4) NOT NULL DEFAULT '0',
  `pub_upl_need_approval` tinyint(4) NOT NULL DEFAULT '1',
  `priv_upl_need_approval` tinyint(4) NOT NULL DEFAULT '1',
  `upload_form_config` tinyint(4) NOT NULL DEFAULT '3',
  `custom_user_upload` tinyint(4) NOT NULL DEFAULT '0',
  `num_file_upload` tinyint(4) NOT NULL DEFAULT '5',
  `num_URI_upload` tinyint(4) NOT NULL DEFAULT '3',
  PRIMARY KEY (`group_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_usergroups`
--

INSERT INTO `cpg131_usergroups` VALUES (1,'Administrators',0,1,1,1,1,1,1,0,0,3,0,5,3),(2,'Registered',1024,0,1,1,1,1,1,1,0,3,0,5,3),(3,'Anonymous',0,0,1,0,0,0,0,1,1,0,0,5,3),(4,'Banned',0,0,0,0,0,0,0,1,1,0,0,5,3);

--
-- Table structure for table `cpg131_votes`
--

CREATE TABLE `cpg131_votes` (
  `pic_id` mediumint(9) NOT NULL DEFAULT '0',
  `user_md5_id` varchar(32) NOT NULL DEFAULT '',
  `vote_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pic_id`,`user_md5_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cpg131_votes`
--


--
-- Dumping events for database 'clubwang'
--

--
-- Dumping routines for database 'clubwang'
--


