--
-- Table structure for table `config`
--

DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
  `id` int(11) NOT NULL auto_increment,
  `setting` varchar(100) NOT NULL,
  `value` varchar(255) NOT NULL,
  `title` varchar(255) default NULL,
  `groupid` int(5) NOT NULL default '1',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Data for table `config`
--

LOCK TABLES `config` WRITE;
/*!40000 ALTER TABLE `config` DISABLE KEYS */;
 INSERT INTO `config` VALUES 	(1,'site_title','SHOUTcast Management Interface','Site title',1),
				(2,'web_addr','http://localhost/smi','Site URL',1), 
				(3,'adm_email','yourmail@yourdomain.tld','Admin e-mail',1),
				(4,'smi_path','/var/www/html/smi','Path to SMI',1), 
				(5,'host_addr','127.0.0.1','Host address',1),
				(6,'start_portbase','8000','Starting portbase',2),
				(7,'nextport_method','low','Next port method',2),
				(8,'auto_start','on','Start on creation',2),
				(9,'ices_path','/usr/bin/ices','Path to Icecast binary',3),
				(10,'media_path','/path/to/media','Path to MP3 files',3),	
				(11,'mrtg','off','MRTG statistics',4),
				(12,'mrtg_interval','5','MRTG update interval (minutes)',4),  
				(13, 'sc_serv', 'shoutcast/1.9.8-linux/sc_serv', 'Server for your platform', 2),
				(14, 'flashplayer', 'off', 'Flash player in media playlist', 3),
				(15, 'media_url','http://<host address>/<media dir>', 'URL to MP3 files', 3);
/*!40000 ALTER TABLE `config` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `config_groups`
--
DROP TABLE IF EXISTS `config_groups`;
CREATE TABLE `config_groups` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(100) NOT NULL,
  `title` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Data for table `config_groups`
--

LOCK TABLES `config_groups` WRITE;
/*!40000 ALTER TABLE `config_groups` DISABLE KEYS */;
INSERT INTO `config_groups` VALUES 	(1,'General','General settings'),
					(2,'Server','Stream server settings'),
					(3,'AutoDJ','AutoDJ and media settings'),
					(4,'Integration','Integration settings'),
					(5,'Misc','Misc. settings');
/*!40000 ALTER TABLE `config_groups` ENABLE KEYS */;
UNLOCK TABLES;

DROP TABLE IF EXISTS `config_sets`;
CREATE TABLE `config_sets` (
  `id` int(11) NOT NULL auto_increment,
  `configid` int(11) NOT NULL,
  `value` varchar(255) NOT NULL,
  `caption` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Data for table `config_sets`
--

LOCK TABLES `config_sets` WRITE;
/*!40000 ALTER TABLE `config_sets` DISABLE KEYS */;
INSERT INTO `config_sets` VALUES 	(1,7,'high','Higher than last port used'),
					(2,7,'low','Lowest vacant port available'),
					(3,8,'on','Enabled'),
					(4,8,'off','Disabled'),
					(5,11,'on','Enabled'),
					(6,11,'off','Disabled'),
					(7,14,'on','Enabled'),
					(8,14,'off','Disabled');
/*!40000 ALTER TABLE `config_sets` ENABLE KEYS */;
UNLOCK TABLES;


--
-- Table structure for table `events`
--

DROP TABLE IF EXISTS `events`;
CREATE TABLE `events` (
  `id` int(10) NOT NULL auto_increment,
  `event_user` varchar(25) default NULL,
  `event` text,
  `visible` int(1) default '1',
  `timestamp` varchar(20) default '00:00:00 0000-00-00',
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `media`
--

DROP TABLE IF EXISTS `media`;
CREATE TABLE `media` (
  `id` int(10) NOT NULL auto_increment,
  `files` varchar(500) default NULL,
  `song` varchar(250) NOT NULL default '',
  `artist` varchar(250) NOT NULL default '',
  `album` varchar(250) NOT NULL default '',
  `year` int(25) NOT NULL default '0000',
  `comment` varchar(250) NOT NULL default '',
  `genre` tinyint(3) UNSIGNED default 255,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `members`
--

DROP TABLE IF EXISTS `members`;
CREATE TABLE `members` (
  `user_id` int(4) NOT NULL auto_increment,
  `username` varchar(65) NOT NULL default '',
  `password` varchar(65) NOT NULL default '',
  `fname` varchar(25) default NULL,
  `lname` varchar(25) default NULL,
  `email` varchar(75) default NULL,
  `access` int(11) default NULL,
  PRIMARY KEY  (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


/*!40000 ALTER TABLE `members` DISABLE KEYS */;
LOCK TABLES `members` WRITE;
INSERT INTO `members` VALUES ('','admin','21232f297a57a5a743894a0e4a801fc3','','','',5),('','tech','21232f297a57a5a743894a0e4a801fc3','','','',3);
UNLOCK TABLES;
/*!40000 ALTER TABLE `members` ENABLE KEYS */;


--
-- Table structure for table `playlist`
--

DROP TABLE IF EXISTS `playlist`;
CREATE TABLE `playlist` (
  `id` int(11) NOT NULL auto_increment,
  `file` varchar(200) NOT NULL,
  `uid` int(11) NOT NULL,
  `name` varchar(200) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `playlist_content`
--

DROP TABLE IF EXISTS `playlist_content`;
CREATE TABLE `playlist_content` (
  `id` int(11) NOT NULL auto_increment,
  `fid` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `playlist_cache`
--

DROP TABLE IF EXISTS `playlist_cache`;
CREATE TABLE `playlist_cache` (
  `id` int(11) NOT NULL auto_increment,
  `fid` int(11) NOT NULL,
  `pid` int(11) NOT NULL,
  `current_fid` int(11) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
 
--
-- Table structure for table `requests`
--

DROP TABLE IF EXISTS `requests`;
CREATE TABLE `requests` (
  `id` int(11) NOT NULL auto_increment,
  `fid` int(11) NOT NULL,
  `sid` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `servers`
--

DROP TABLE IF EXISTS `servers`;
CREATE TABLE `servers` (
  `id` int(5) NOT NULL auto_increment,
  `created` varchar(50) default NULL,
  `MaxUser` int(10) default '32',
  `Password` varchar(25) default 'changeme',
  `PortBase` int(5) default '8000',
  `LogFile` varchar(50) default 'sc_serv.log',
  `RealTime` int(1) default '1',
  `ScreenLog` int(1) default '1',
  `W3CEnable` varchar(3) default 'yes',
  `W3CLog` varchar(25) default 'sc_w3c.log',
  `SrcIP` varchar(15) default 'ANY',
  `DestIP` varchar(15) default 'ANY',
  `Yport` int(5) default '80',
  `NameLookups` int(1) default NULL,
  `RelayPort` int(5) default NULL,
  `RelayServer` varchar(15) default NULL,
  `AdminPassword` varchar(25) default 'changeme',
  `AutoDumpUsers` int(1) default NULL,
  `AutoDumpSourceTime` int(1) default '30',
  `TitleFormat` varchar(50) default NULL,
  `URLFormat` varchar(50) default NULL,
  `PublicServer` varchar(25) default 'default',
  `AllowRelay` varchar(3) default 'Yes',
  `AllowPublicRelay` varchar(3) default 'Yes',
  `MetaInterval` int(5) default '32768',
  `ListenerTimer` int(10) default NULL,
  `BanFile` varchar(25) default NULL,
  `RipFile` varchar(25) default NULL,
  `RIPOnly` varchar(3) default NULL,
  `Unique` varchar(25) default NULL,
  `CpuCount` int(2) default NULL,
  `Sleep` varchar(5) default NULL,
  `CleanXML` varchar(3) default NULL,
  `ShowLastSongs` varchar(10) default '10',
  `servername` varchar(50) default NULL,
  `enabled` tinyint(1) default '0',
  `listeners` int(10) default NULL,
  `maxlisteners` int(10) default NULL,
  `ownder` int(10) default NULL,
  `owner` int(10) default NULL,
  `autodj` int(11) NOT NULL default '0',
  `Playlist` int(11) default NULL,
  `random` tinyint(4) NOT NULL default '0',
  `genre` varchar(250) NOT NULL default '',
  `website` varchar(250) NOT NULL default '',
  `bitrate` int(4) default NULL,
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Table structure for table `smi`
--

DROP TABLE IF EXISTS `smi`;
CREATE TABLE `smi` (
	`ver_id` tinyint(1) UNSIGNED NOT NULL,
        `version` varchar(10) NOT NULL,
        PRIMARY KEY (`ver_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Inserting data for table `smi`
--

LOCK TABLES `smi` WRITE;
/*!40000 ALTER TABLE `smi` DISABLE KEYS */;
INSERT INTO `smi` VALUES(1,'0.3.4');
UNLOCK TABLES;

--
-- Table structure for table `genres`
--

DROP TABLE IF EXISTS `genres`;
CREATE TABLE `genres` (
  `genreID` tinyint(3) UNSIGNED NOT NULL,
  `genreTitle` varchar(250) NOT NULL,
  PRIMARY KEY  (`genreID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Inserting data for table `genres`
--

LOCK TABLES `genres` WRITE;
/*!40000 ALTER TABLE `genres` DISABLE KEYS */;
INSERT INTO `genres` VALUES (0,'Blues'),(1,'Classic Rock'),(2,'Country'),(3,'Dance'),(4,'Disco'),(5,'Funk'),(6,'Grunge'),(7,'Hip-Hop'),(8,'Jazz'),(9,'Metal'),(10,'New Age'),(11,'Oldies'),(12,'Other'),(13,'Pop'),(14,'R&B'),(15,'Rap'),(16,'Reggae'),(17,'Rock'),(18,'Techno'),(19,'Industrial'),(20,'Alternative'),(21,'Ska'),(22,'Death Metal'),(23,'Pranks'),(24,'Soundtrack'),(25,'Euro-Techno'),(26,'Ambient'),(27,'Trip-Hop'),(28,'Vocal'),(29,'Jazz+Funk'),(30,'Fusion'),(31,'Trance'),(32,'Classical'),(33,'Instrumental'),(34,'Acid'),(35,'House'),(36,'Game'),(37,'Sound Clip'),(38,'Gospel'),(39,'Noise'),(40,'AlternRock'),(41,'Bass'),(42,'Soul'),(43,'Punk'),(44,'Space'),(45,'Meditative'),(46,'Instrumental Pop'),(47,'Instrumental Rock'),(48,'Ethnic'),(49,'Gothic'),(50,'Darkwave'),(51,'Techno-Industrial'),(52,'Electronic'),(53,'Pop-Folk'),(54,'Eurodance'),(55,'Dream'),(56,'Southern Rock'),(57,'Comedy'),(58,'Cult'),(59,'Gangsta'),(60,'Top 40'),(61,'Christian Rap'),(62,'Pop/Funk'),(63,'Jungle'),(64,'Native American'),(65,'Cabaret'),(66,'New Wave'),(67,'Psychadelic'),(68,'Rave'),(69,'Showtunes'),(70,'Trailer'),(71,'Lo-Fi'),(72,'Tribal'),(73,'Acid Punk'),(74,'Acid Jazz'),(75,'Polka'),(76,'Retro'),(77,'Musical'),(78,'Rock & Roll'),(79,'Hard Rock'),(80,'Folk'),(81,'Folk-Rock'),(82,'National Folk'),(83,'Swing'),(84,'Fast Fusion'),(85,'Bebob'),(86,'Latin'),(87,'Revival'),(88,'Celtic'),(89,'Bluegrass'),(90,'Avantgarde'),(91,'Gothic Rock'),(92,'Progressive Rock'),(93,'Psychedelic Rock'),(94,'Symphonic Rock'),(95,'Slow Rock'),(96,'Big Band'),(97,'Chorus'),(98,'Easy Listening'),(99,'Acoustic'),(100,'Humour'),(101,'Speech'),(102,'Chanson'),(103,'Opera'),(104,'Chamber Music'),(105,'Sonata'),(106,'Symphony'),(107,'Booty Bass'),(108,'Primus'),(109,'Porn Groove'),(110,'Satire'),(111,'Slow Jam'),(112,'Club'),(113,'Tango'),(114,'Samba'),(115,'Folklore'),(116,'Ballad'),(117,'Power Ballad'),(118,'Rhythmic Soul'),(119,'Freestyle'),(120,'Duet'),(121,'Punk Rock'),(122,'Drum Solo'),(123,'A capella'),(124,'Euro-House'),(125,'Dance Hall'), (255, 'N/A');
/*!40000 ALTER TABLE `genres` ENABLE KEYS */;
UNLOCK TABLES;
