summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-30 19:20:19 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-09-30 19:20:19 +0000
commit6eeea6fbcdd9a8a40bbcb94c767572e12a845551 (patch)
treee0e26e2473cb79722b62de0a5c4dd014addf51ac
parentc3aa64634e6ed040c6001b4bf43cf0411b632b5d (diff)
downloadampache-6eeea6fbcdd9a8a40bbcb94c767572e12a845551.tar.gz
ampache-6eeea6fbcdd9a8a40bbcb94c767572e12a845551.tar.bz2
ampache-6eeea6fbcdd9a8a40bbcb94c767572e12a845551.zip
new sql file and catalog fixes and user reg clean up and acl typo fix
-rw-r--r--admin/catalog.php24
-rw-r--r--config/ampache.cfg.php.dist1
-rwxr-xr-xdocs/CHANGELOG1
-rw-r--r--lib/class/catalog.class.php18
-rwxr-xr-xsql/ampache.sql262
-rw-r--r--templates/show_add_access.inc2
-rw-r--r--templates/show_user_registration.inc.php14
-rw-r--r--tv.php80
8 files changed, 149 insertions, 253 deletions
diff --git a/admin/catalog.php b/admin/catalog.php
index 19ef1d3b..7f65767b 100644
--- a/admin/catalog.php
+++ b/admin/catalog.php
@@ -63,30 +63,6 @@ switch ($_REQUEST['action']) {
$body = '';
show_confirmation($title,$body,$url);
break;
- case _("Add to all Catalogs"):
- if (conf('demo_mode')) { break; }
-
- /* If they are using the file MPD type, and it's currently enabled lets do a DBRefresh for em
- if (conf('mpd_method') == 'file' AND conf('allow_mpd_playback')) {
- // Connect to the MPD
- if (!class_exists('mpd')) { require_once(conf('prefix') . "/modules/mpd/mpd.class.php"); }
- if (!is_object($myMpd)) { $myMpd = new mpd(conf('mpd_host'),conf('mpd_port')); }
- if (!$myMpd->connected) {
- echo "<font class=\"error\">" . _("Error Connecting") . ": " . $myMpd->errStr . "</font>\n";
- log_event($_SESSION['userdata']['username'],' connection_failed ',"Error: Unable able to connect to MPD, " . $myMpd->errStr);
- } // MPD connect failed
-
- $myMpd->DBRefresh();
- } // if MPD enabled
- //FIXME: File Method no longer exists... leaving this in for a bit
- */
- $catalogs = $catalog->get_catalogs();
-
- foreach ($catalogs as $data) {
- $data->add_to_catalog($_REQUEST['update_type']);
- }
- include(conf('prefix') . '/templates/catalog.inc');
- break;
case 'update_all_catalogs':
$catalog = new Catalog();
$_REQUEST['catalogs'] = $catalog->get_catalog_ids();
diff --git a/config/ampache.cfg.php.dist b/config/ampache.cfg.php.dist
index 16eeb4cd..65f020c4 100644
--- a/config/ampache.cfg.php.dist
+++ b/config/ampache.cfg.php.dist
@@ -329,6 +329,7 @@ refresh_limit = "60"
# This will display the user agreement when registering
# For agreement text, edit templates/user_agreement.php
# User will need to accept the agreement before they can register
+# DEFAULT: false
#user_agreement = "false"
###########################################################
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 2cc735ff..5b69e542 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,7 @@
--------------------------------------------------------------------------
v.3.3.2
+ - Updated SQL file, changed default site title
- Fixed Duplicate Songs functions that have been broken for a
while
- Fixed some Install issues with incorrectly named templates
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 56afe800..dc87ba50 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -1015,7 +1015,7 @@ class Catalog {
/* Make sure the xmlrpc lib is loaded */
if (!class_exists('xmlrpc_client')) {
debug_event('xmlrpc',"Unable to load XMLRPC library",'1');
- echo "<font class=\"error\"><b>" . _("Error") . "</b>: " . _("Unable to load XMLRPC library, make sure XML-RPC is enabled") . "<br />\n";
+ echo "<span class=\"error\"><b>" . _("Error") . "</b>: " . _('Unable to load XMLRPC library, make sure XML-RPC is enabled') . "</span><br />\n";
return false;
} // end check for class
@@ -1035,7 +1035,7 @@ class Catalog {
/* encode the variables we need to send over */
$encoded_key = new xmlrpcval($this->key,"string");
$encoded_path = new xmlrpcval(conf('web_path'),"string");
-
+
$f = new xmlrpcmsg('remote_catalog_query', array($encoded_key,$encoded_path));
if (conf('debug')) { $client->setDebug(1); }
@@ -1712,22 +1712,28 @@ class Catalog {
@param $path The root path for this catalog
@param $name The name of the new catalog
*/
- function create_catalog_entry($path,$name,$key=0,$ren=0,$sort=0, $type='local') {
+ function create_catalog_entry($path,$name,$key=0,$ren=0,$sort=0, $type='') {
+
+ if (!$type) { $type = 'local'; }
// Current time
$date = time();
$path = sql_escape($path);
$name = sql_escape($name);
+ $key = sql_escape($key);
+ $ren = sql_escape($ren);
+ $sort = sql_escape($sort);
+ $type = sql_escape($type);
- if($id3cmd && $ren && $sort) {
+ if($ren && $sort) {
$sql = "INSERT INTO catalog (path,name,last_update,`key`,rename_pattern,sort_pattern,catalog_type) " .
" VALUES ('$path','$name','$date', '$key', '$ren', '$sort','$type')";
}
else {
- $sql = "INSERT INTO catalog (path,name,last_update) VALUES ('$path','$name','$date')";
+ $sql = "INSERT INTO catalog (path,name,`key`,`catalog_type`,last_update) VALUES ('$path','$name','$key','$type','$date')";
}
-
+
$db_results = mysql_query($sql, dbh());
$catalog_id = mysql_insert_id(dbh());
diff --git a/sql/ampache.sql b/sql/ampache.sql
index 1f940f63..a04ab7cd 100755
--- a/sql/ampache.sql
+++ b/sql/ampache.sql
@@ -1,8 +1,12 @@
--- MySQL dump 9.11
+-- MySQL dump 10.9
--
--- Host: localhost Database: ampache-dev
+-- Host: localhost Database: ampache
-- ------------------------------------------------------
--- Server version 4.0.24_Debian-10sarge1-log
+-- Server version 4.1.21-log
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,MYSQL323' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `access_list`
@@ -15,16 +19,23 @@ CREATE TABLE `access_list` (
`start` int(11) unsigned NOT NULL default '0',
`end` int(11) unsigned NOT NULL default '0',
`level` smallint(3) unsigned NOT NULL default '5',
+ `type` varchar(64) NOT NULL default '',
`user` varchar(128) default NULL,
`key` varchar(255) default NULL,
PRIMARY KEY (`id`),
- KEY `ip` (`start`)
+ KEY `start` (`start`),
+ KEY `end` (`end`),
+ KEY `level` (`level`)
) TYPE=MyISAM;
--
-- Dumping data for table `access_list`
--
+LOCK TABLES `access_list` WRITE;
+/*!40000 ALTER TABLE `access_list` DISABLE KEYS */;
+/*!40000 ALTER TABLE `access_list` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `album`
@@ -40,15 +51,10 @@ CREATE TABLE `album` (
`art_mime` varchar(128) default NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`),
- KEY `id` (`id`)
+ KEY `year` (`year`)
) TYPE=MyISAM;
--
--- Dumping data for table `album`
---
-
-
---
-- Table structure for table `artist`
--
@@ -58,16 +64,10 @@ CREATE TABLE `artist` (
`name` varchar(255) NOT NULL default '',
`prefix` enum('The','An','A') default NULL,
PRIMARY KEY (`id`),
- KEY `name` (`name`),
- KEY `id` (`id`)
+ KEY `name` (`name`)
) TYPE=MyISAM;
--
--- Dumping data for table `artist`
---
-
-
---
-- Table structure for table `catalog`
--
@@ -80,20 +80,15 @@ CREATE TABLE `catalog` (
`last_update` int(11) unsigned NOT NULL default '0',
`last_add` int(11) unsigned NOT NULL default '0',
`enabled` tinyint(1) unsigned NOT NULL default '1',
- `id3_set_command` varchar(255) NOT NULL default '/usr/bin/id3v2 -a "%a" -A "%A" -t "%t" -g %g -y %y -T %T -c "%c" "%filename"',
`rename_pattern` varchar(255) NOT NULL default '%a - %T - %t.mp3',
`sort_pattern` varchar(255) NOT NULL default '%C/%a/%A',
`gather_types` varchar(255) NOT NULL default '',
+ `key` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
KEY `enabled` (`enabled`)
) TYPE=MyISAM;
--
--- Dumping data for table `catalog`
---
-
-
---
-- Table structure for table `flagged`
--
@@ -108,15 +103,13 @@ CREATE TABLE `flagged` (
`approved` tinyint(1) unsigned NOT NULL default '0',
`comment` varchar(255) NOT NULL default '',
PRIMARY KEY (`id`),
- KEY `date` (`date`,`approved`)
+ KEY `date` (`date`,`approved`),
+ KEY `object_id` (`object_id`),
+ KEY `object_type` (`object_type`),
+ KEY `user` (`user`)
) TYPE=MyISAM;
--
--- Dumping data for table `flagged`
---
-
-
---
-- Table structure for table `genre`
--
@@ -124,32 +117,54 @@ DROP TABLE IF EXISTS `genre`;
CREATE TABLE `genre` (
`id` int(11) unsigned NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `name` (`name`)
) TYPE=MyISAM;
--
--- Dumping data for table `genre`
---
-
-
---
-- Table structure for table `ip_history`
--
DROP TABLE IF EXISTS `ip_history`;
CREATE TABLE `ip_history` (
- `username` varchar(128) default NULL,
+ `id` int(11) unsigned NOT NULL auto_increment,
+ `user` varchar(128) default NULL,
`ip` int(11) unsigned NOT NULL default '0',
- `connections` int(11) unsigned NOT NULL default '1',
`date` int(11) unsigned NOT NULL default '0',
- KEY `username` (`username`),
- KEY `date` (`date`)
+ PRIMARY KEY (`id`),
+ KEY `username` (`user`),
+ KEY `date` (`date`),
+ KEY `ip` (`ip`)
) TYPE=MyISAM;
--
--- Dumping data for table `ip_history`
+-- Table structure for table `live_stream`
--
+DROP TABLE IF EXISTS `live_stream`;
+CREATE TABLE `live_stream` (
+ `id` int(11) unsigned NOT NULL auto_increment,
+ `name` varchar(128) NOT NULL default '',
+ `site_url` varchar(255) NOT NULL default '',
+ `url` varchar(255) NOT NULL default '',
+ `genre` int(11) unsigned NOT NULL default '0',
+ `catalog` int(11) unsigned NOT NULL default '0',
+ `frequency` varchar(32) NOT NULL default '',
+ `call_sign` varchar(32) NOT NULL default '',
+ PRIMARY KEY (`id`),
+ KEY `catalog` (`catalog`),
+ KEY `genre` (`genre`),
+ KEY `name` (`name`)
+) TYPE=MyISAM;
+
+--
+-- Dumping data for table `live_stream`
+--
+
+LOCK TABLES `live_stream` WRITE;
+/*!40000 ALTER TABLE `live_stream` DISABLE KEYS */;
+/*!40000 ALTER TABLE `live_stream` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `now_playing`
@@ -169,6 +184,10 @@ CREATE TABLE `now_playing` (
-- Dumping data for table `now_playing`
--
+LOCK TABLES `now_playing` WRITE;
+/*!40000 ALTER TABLE `now_playing` DISABLE KEYS */;
+/*!40000 ALTER TABLE `now_playing` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `object_count`
@@ -177,7 +196,7 @@ CREATE TABLE `now_playing` (
DROP TABLE IF EXISTS `object_count`;
CREATE TABLE `object_count` (
`id` int(11) unsigned NOT NULL auto_increment,
- `object_type` enum('album','artist','song','playlist','genre','catalog') NOT NULL default 'song',
+ `object_type` enum('album','artist','song','playlist','genre','catalog','live_stream','video') NOT NULL default 'song',
`object_id` int(11) unsigned NOT NULL default '0',
`date` int(11) unsigned NOT NULL default '0',
`count` int(11) unsigned NOT NULL default '0',
@@ -193,6 +212,10 @@ CREATE TABLE `object_count` (
-- Dumping data for table `object_count`
--
+LOCK TABLES `object_count` WRITE;
+/*!40000 ALTER TABLE `object_count` DISABLE KEYS */;
+/*!40000 ALTER TABLE `object_count` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `playlist`
@@ -204,16 +227,20 @@ CREATE TABLE `playlist` (
`name` varchar(128) NOT NULL default '',
`user` varchar(128) NOT NULL default '',
`type` enum('private','public') NOT NULL default 'private',
- `date` timestamp(14) NOT NULL,
+ `date` timestamp NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`),
- KEY `id` (`id`)
+ KEY `type` (`type`)
) TYPE=MyISAM;
--
-- Dumping data for table `playlist`
--
+LOCK TABLES `playlist` WRITE;
+/*!40000 ALTER TABLE `playlist` DISABLE KEYS */;
+/*!40000 ALTER TABLE `playlist` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `playlist_data`
@@ -234,6 +261,10 @@ CREATE TABLE `playlist_data` (
-- Dumping data for table `playlist_data`
--
+LOCK TABLES `playlist_data` WRITE;
+/*!40000 ALTER TABLE `playlist_data` DISABLE KEYS */;
+/*!40000 ALTER TABLE `playlist_data` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `playlist_permission`
@@ -254,6 +285,10 @@ CREATE TABLE `playlist_permission` (
-- Dumping data for table `playlist_permission`
--
+LOCK TABLES `playlist_permission` WRITE;
+/*!40000 ALTER TABLE `playlist_permission` DISABLE KEYS */;
+/*!40000 ALTER TABLE `playlist_permission` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `preferences`
@@ -268,49 +303,20 @@ CREATE TABLE `preferences` (
`level` int(11) unsigned NOT NULL default '100',
`type` varchar(128) NOT NULL default '',
`catagory` varchar(128) NOT NULL default '',
- PRIMARY KEY (`id`)
-) TYPE=MyISAM;
+ PRIMARY KEY (`id`),
+ KEY `catagory` (`catagory`),
+ KEY `name` (`name`)
+) TYPE=MyISAM AUTO_INCREMENT=43;
--
-- Dumping data for table `preferences`
--
-INSERT INTO `preferences` VALUES (1,'download','0','Allow Downloads',100,'boolean','options');
-INSERT INTO `preferences` VALUES (2,'upload','0','Allow Uploads',100,'boolean','options');
-INSERT INTO `preferences` VALUES (3,'quarantine','1','Quarantine All Uploads',100,'boolean','options');
-INSERT INTO `preferences` VALUES (4,'popular_threshold','10','Popular Threshold',25,'integer','interface');
-INSERT INTO `preferences` VALUES (5,'font','Verdana, Helvetica, sans-serif','Interface Font',25,'string','theme');
-INSERT INTO `preferences` VALUES (6,'bg_color1','#ffffff','Background Color 1',25,'string','theme');
-INSERT INTO `preferences` VALUES (7,'bg_color2','#000000','Background Color 2',25,'string','theme');
-INSERT INTO `preferences` VALUES (8,'base_color1','#bbbbbb','Base Color 1',25,'string','theme');
-INSERT INTO `preferences` VALUES (9,'base_color2','#dddddd','Base Color 2',25,'string','theme');
-INSERT INTO `preferences` VALUES (10,'font_color1','#222222','Font Color 1',25,'string','theme');
-INSERT INTO `preferences` VALUES (11,'font_color2','#000000','Font Color 2',25,'string','theme');
-INSERT INTO `preferences` VALUES (12,'font_color3','#ffffff','Font Color 3',25,'string','theme');
-INSERT INTO `preferences` VALUES (13,'row_color1','#cccccc','Row Color 1',25,'string','theme');
-INSERT INTO `preferences` VALUES (14,'row_color2','#bbbbbb','Row Color 2',25,'string','theme');
-INSERT INTO `preferences` VALUES (15,'row_color3','#dddddd','Row Color 3',25,'string','theme');
-INSERT INTO `preferences` VALUES (16,'error_color','#990033','Error Color',25,'string','theme');
-INSERT INTO `preferences` VALUES (17,'font_size','10','Font Size',25,'integer','theme');
-INSERT INTO `preferences` VALUES (18,'upload_dir','','Upload Directory',25,'string','options');
-INSERT INTO `preferences` VALUES (19,'sample_rate','32','Downsample Bitrate',25,'string','streaming');
-INSERT INTO `preferences` VALUES (22,'site_title','For The Love of Music','Website Title',100,'string','system');
-INSERT INTO `preferences` VALUES (23,'lock_songs','0','Lock Songs',100,'boolean','system');
-INSERT INTO `preferences` VALUES (24,'force_http_play','1','Forces Http play regardless of port',100,'boolean','system');
-INSERT INTO `preferences` VALUES (25,'http_port','80','Non-Standard Http Port',100,'integer','system');
-INSERT INTO `preferences` VALUES (26,'catalog_echo_count','100','Catalog Echo Interval',100,'integer','system');
-INSERT INTO `preferences` VALUES (41,'localplay_controller','0','Localplay Type',100,'special','streaming');
-INSERT INTO `preferences` VALUES (29,'play_type','stream','Type of Playback',25,'special','streaming');
-INSERT INTO `preferences` VALUES (30,'direct_link','1','Allow Direct Links',100,'boolean','options');
-INSERT INTO `preferences` VALUES (31,'lang','en_US','Language',100,'special','interface');
-INSERT INTO `preferences` VALUES (32,'playlist_type','m3u','Playlist Type',100,'special','streaming');
-INSERT INTO `preferences` VALUES (33,'theme_name','classic','Theme',0,'special','theme');
-INSERT INTO `preferences` VALUES (34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'integer','interface');
-INSERT INTO `preferences` VALUES (35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'integer','interface');
-INSERT INTO `preferences` VALUES (36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'integer','interface');
-INSERT INTO `preferences` VALUES (39,'quarantine_dir','','Quarantine Directory',100,'string','system');
-INSERT INTO `preferences` VALUES (42,'min_album_size','0','Min Album Size',0,'integer','interface');
-INSERT INTO `preferences` VALUES (40,'localplay_level','0','Localplay Access Level',100,'special','streaming');
+LOCK TABLES `preferences` WRITE;
+/*!40000 ALTER TABLE `preferences` DISABLE KEYS */;
+INSERT INTO `preferences` VALUES (1,'download','0','Allow Downloads',100,'boolean','options'),(2,'upload','0','Allow Uploads',100,'boolean','options'),(3,'quarantine','1','Quarantine All Uploads',100,'boolean','options'),(4,'popular_threshold','10','Popular Threshold',25,'integer','interface'),(18,'upload_dir','','Upload Directory',25,'string','options'),(19,'sample_rate','32','Downsample Bitrate',25,'string','streaming'),(22,'site_title','Ampache :: Pour l\'Amour de la Musique','Website Title',100,'string','system'),(23,'lock_songs','0','Lock Songs',100,'boolean','system'),(24,'force_http_play','1','Forces Http play regardless of port',100,'boolean','system'),(25,'http_port','80','Non-Standard Http Port',100,'integer','system'),(26,'catalog_echo_count','100','Catalog Echo Interval',100,'integer','system'),(41,'localplay_controller','0','Localplay Type',100,'special','streaming'),(29,'play_type','stream','Type of Playback',25,'special','streaming'),(30,'direct_link','1','Allow Direct Links',100,'boolean','options'),(31,'lang','en_US','Language',100,'special','interface'),(32,'playlist_type','m3u','Playlist Type',100,'special','streaming'),(33,'theme_name','classic','Theme',0,'special','interface'),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'integer','interface'),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'integer','interface'),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'integer','interface'),(39,'quarantine_dir','','Quarantine Directory',100,'string','system'),(42,'min_album_size','0','Min Album Size',0,'integer','interface'),(40,'localplay_level','0','Localplay Access Level',100,'special','streaming');
+/*!40000 ALTER TABLE `preferences` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `ratings`
@@ -320,7 +326,7 @@ DROP TABLE IF EXISTS `ratings`;
CREATE TABLE `ratings` (
`id` int(11) unsigned NOT NULL auto_increment,
`user` varchar(128) NOT NULL default '',
- `object_type` enum('artist','album','song') NOT NULL default 'artist',
+ `object_type` enum('artist','album','song','steam','video') NOT NULL default 'artist',
`object_id` int(11) unsigned NOT NULL default '0',
`user_rating` enum('00','0','1','2','3','4','5') NOT NULL default '0',
PRIMARY KEY (`id`),
@@ -331,6 +337,10 @@ CREATE TABLE `ratings` (
-- Dumping data for table `ratings`
--
+LOCK TABLES `ratings` WRITE;
+/*!40000 ALTER TABLE `ratings` DISABLE KEYS */;
+/*!40000 ALTER TABLE `ratings` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `session`
@@ -344,15 +354,11 @@ CREATE TABLE `session` (
`value` text NOT NULL,
`ip` int(11) unsigned default NULL,
`type` enum('sso','mysql','ldap','http') NOT NULL default 'mysql',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `expire` (`expire`)
) TYPE=MyISAM;
--
--- Dumping data for table `session`
---
-
-
---
-- Table structure for table `song`
--
@@ -381,7 +387,6 @@ CREATE TABLE `song` (
KEY `genre` (`genre`),
KEY `album` (`album`),
KEY `artist` (`artist`),
- KEY `id` (`id`),
KEY `file` (`file`),
KEY `update_time` (`update_time`),
KEY `addition_time` (`addition_time`),
@@ -391,11 +396,6 @@ CREATE TABLE `song` (
) TYPE=MyISAM;
--
--- Dumping data for table `song`
---
-
-
---
-- Table structure for table `update_info`
--
@@ -410,7 +410,11 @@ CREATE TABLE `update_info` (
-- Dumping data for table `update_info`
--
-INSERT INTO `update_info` VALUES ('db_version','332011');
+LOCK TABLES `update_info` WRITE;
+/*!40000 ALTER TABLE `update_info` DISABLE KEYS */;
+INSERT INTO `update_info` VALUES ('db_version','332013');
+/*!40000 ALTER TABLE `update_info` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `upload`
@@ -432,6 +436,10 @@ CREATE TABLE `upload` (
-- Dumping data for table `upload`
--
+LOCK TABLES `upload` WRITE;
+/*!40000 ALTER TABLE `upload` DISABLE KEYS */;
+/*!40000 ALTER TABLE `upload` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `user`
@@ -458,6 +466,10 @@ CREATE TABLE `user` (
-- Dumping data for table `user`
--
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `user_catalog`
@@ -465,15 +477,23 @@ CREATE TABLE `user` (
DROP TABLE IF EXISTS `user_catalog`;
CREATE TABLE `user_catalog` (
+ `id` int(11) unsigned NOT NULL auto_increment,
`user` int(11) unsigned NOT NULL default '0',
`catalog` int(11) unsigned NOT NULL default '0',
- `level` smallint(3) NOT NULL default '25'
+ `level` smallint(3) NOT NULL default '25',
+ PRIMARY KEY (`id`),
+ KEY `user` (`user`),
+ KEY `catalog` (`catalog`)
) TYPE=MyISAM;
--
-- Dumping data for table `user_catalog`
--
+LOCK TABLES `user_catalog` WRITE;
+/*!40000 ALTER TABLE `user_catalog` DISABLE KEYS */;
+/*!40000 ALTER TABLE `user_catalog` ENABLE KEYS */;
+UNLOCK TABLES;
--
-- Table structure for table `user_preference`
@@ -485,49 +505,21 @@ CREATE TABLE `user_preference` (
`preference` int(11) unsigned NOT NULL default '0',
`value` varchar(255) NOT NULL default '',
KEY `user` (`user`),
- KEY `preference` (`preference`),
- KEY `user_2` (`user`),
- KEY `preference_2` (`preference`)
+ KEY `preference` (`preference`)
) TYPE=MyISAM;
--
-- Dumping data for table `user_preference`
--
-INSERT INTO `user_preference` VALUES ('-1',1,'0');
-INSERT INTO `user_preference` VALUES ('-1',2,'0');
-INSERT INTO `user_preference` VALUES ('-1',3,'1');
-INSERT INTO `user_preference` VALUES ('-1',4,'10');
-INSERT INTO `user_preference` VALUES ('-1',5,'Verdana, Helvetica, sans-serif');
-INSERT INTO `user_preference` VALUES ('-1',6,'#ffffff');
-INSERT INTO `user_preference` VALUES ('-1',7,'#000000');
-INSERT INTO `user_preference` VALUES ('-1',8,'#bbbbbb');
-INSERT INTO `user_preference` VALUES ('-1',9,'#dddddd');
-INSERT INTO `user_preference` VALUES ('-1',10,'#222222');
-INSERT INTO `user_preference` VALUES ('-1',11,'#000000');
-INSERT INTO `user_preference` VALUES ('-1',12,'#ffffff');
-INSERT INTO `user_preference` VALUES ('-1',13,'#cccccc');
-INSERT INTO `user_preference` VALUES ('-1',14,'#bbbbbb');
-INSERT INTO `user_preference` VALUES ('-1',15,'#dddddd');
-INSERT INTO `user_preference` VALUES ('-1',16,'#990033');
-INSERT INTO `user_preference` VALUES ('-1',17,'10');
-INSERT INTO `user_preference` VALUES ('-1',18,'');
-INSERT INTO `user_preference` VALUES ('-1',19,'32');
-INSERT INTO `user_preference` VALUES ('-1',22,'For The Love of Music');
-INSERT INTO `user_preference` VALUES ('-1',23,'0');
-INSERT INTO `user_preference` VALUES ('-1',24,'1');
-INSERT INTO `user_preference` VALUES ('-1',25,'80');
-INSERT INTO `user_preference` VALUES ('-1',26,'100');
-INSERT INTO `user_preference` VALUES ('-1',41,'0');
-INSERT INTO `user_preference` VALUES ('-1',29,'stream');
-INSERT INTO `user_preference` VALUES ('-1',30,'1');
-INSERT INTO `user_preference` VALUES ('-1',31,'en_US');
-INSERT INTO `user_preference` VALUES ('-1',32,'m3u');
-INSERT INTO `user_preference` VALUES ('-1',33,'classic');
-INSERT INTO `user_preference` VALUES ('-1',34,'27');
-INSERT INTO `user_preference` VALUES ('-1',35,'27');
-INSERT INTO `user_preference` VALUES ('-1',36,'27');
-INSERT INTO `user_preference` VALUES ('-1',39,'');
-INSERT INTO `user_preference` VALUES ('-1',40,'0');
-INSERT INTO `user_preference` VALUES ('-1',42,'0');
+LOCK TABLES `user_preference` WRITE;
+/*!40000 ALTER TABLE `user_preference` DISABLE KEYS */;
+INSERT INTO `user_preference` VALUES ('-1',1,'0'),('-1',2,'0'),('-1',3,'1'),('-1',4,'10'),('-1',17,'10'),('-1',18,''),('-1',19,'32'),('-1',22,'Ampache :: Pour l\'Amour de la Musique'),('-1',23,'0'),('-1',24,'1'),('-1',25,'80'),('-1',26,'100'),('-1',41,'0'),('-1',29,'stream'),('-1',30,'1'),('-1',31,'en_US'),('-1',32,'m3u'),('-1',33,'classic'),('-1',34,'27'),('-1',35,'27'),('-1',36,'27'),('-1',39,''),('-1',40,'0'),('-1',42,'0');
+/*!40000 ALTER TABLE `user_preference` ENABLE KEYS */;
+UNLOCK TABLES;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
diff --git a/templates/show_add_access.inc b/templates/show_add_access.inc
index 237f0c6f..3b92c65b 100644
--- a/templates/show_add_access.inc
+++ b/templates/show_add_access.inc
@@ -68,7 +68,7 @@
<option selected="selected" value="stream"><?php echo _('Stream Access'); ?></option>
<option value="interface"><?php echo _('Web Interface'); ?></option>
<option value="network"><?php echo _('Local Network Definition'); ?></option>
- <option vlaue="xml-rpc"><?php echo _('XML-RPC'); ?></option>
+ <option value="xml-rpc"><?php echo _('XML-RPC'); ?></option>
</select>
</td>
</tr>
diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php
index 091d85d5..3ddb95cd 100644
--- a/templates/show_user_registration.inc.php
+++ b/templates/show_user_registration.inc.php
@@ -59,15 +59,15 @@ $email = scrub_in($_REQUEST['email']);
/* If we should show the user agreement */
if(conf('user_agreement')){ ?>
<tr>
- <td height='15'>
+ <td height="15px">
</td>
</tr>
<tr>
- <td align='center' valign='top'>
- <table width='100%' border='0' cellpadding='0' cellspacing='0'>
- <tr class="table-header">
- <td align='center'>
- <font size="1"><b><u><?php echo _('User Agreement'); ?></u></b></font>
+ <td>
+ <table border="0" cellpadding="2" cellspacing="0">
+ <tr>
+ <td>
+ <span class="box-title"><?php echo _('User Agreement'); ?></span>
</td>
</tr>
<tr>
@@ -76,7 +76,7 @@ if(conf('user_agreement')){ ?>
</td>
</tr>
<tr>
- <td align='center' height='35' valign='center'>
+ <td>
<input type='checkbox' name='accept_agreement'> <?php echo _('I Accept'); ?>
<?php $GLOBALS['error']->print_error('user_agreement'); ?>
</td>
diff --git a/tv.php b/tv.php
index 68cb6443..5c9e985f 100644
--- a/tv.php
+++ b/tv.php
@@ -20,89 +20,9 @@
*/
-/*!
- @header TV Display for Ampache
- @discussion BIG now playing and (soon) on deck
-*/
require_once('lib/init.php');
-if (conf('refresh_interval')) {
- echo '<script language="JavaScript" type="text/javascript"> var mpd_elapsed = '.$myMpd->current_track_position." </script>\n";
- echo '<script language="JavaScript" type="text/javascript"> var mpd_song_length = '.$myMpd->current_track_length." </script>\n";
- echo '<script language="JavaScript" type="text/javascript"> var mpd_state = "'.$myMpd->state.'" </script>';
- }
-?>
-
-<?php
$dbh = dbh();
$web_path = conf('web_path');
-
-/* get playlist */
-
-if ($user->prefs['play_type'] == 'mpd') {
-$mpddir = conf('mpd_dir')."/";
-$sql = "SELECT song.id FROM song WHERE file = \"".
- $mpddir.$myMpd->playlist[$myMpd->current_track_id]['file']."\"";
- $db_results = @mysql_query($sql,dbh());
- while ($r = mysql_fetch_assoc($db_results)) {
- $song = new Song($r['id']);
- $song->format_song();
- $np_user = new User(0,$user->id);
- $results[] = array('song'=>$song,'user'=>$np_user);
- } // end while
-
-}
-else {
- $sql = "SELECT song_id,user_id FROM now_playing ORDER BY start_time DESC";
- $db_results = mysql_query($sql, dbh());
- while ($r = mysql_fetch_assoc($db_results)) {
- $song = new Song($r['song_id']);
- $song->format_song();
- $np_user = new User(0,$r['user_id']);
- $results[] = array('song'=>$song,'user'=>$np_user);
- } // end while
- } // end else
-
?>
-
-<?php if (count($results)) { ?>
-<!-- Big Daddy Table -->
-
-<table style="border: thin solid #000000; margin: 25 0 0 25px" class = "body" cellspacing="1" cellpadding="3" border="0" width=900>
- <tr>
- <td class="rowheader" style="background:#F6F600;font: italic 25 pt 'Times Roman', serif" colspan="2"><?php echo _("Now Playing"); ?></td>
- </tr>
-<?php
-foreach($results as $item) {
- $song = $item['song'];
- $np_user = $item['user'];
- if (is_object($song)) {
- echo '<tr><td>';
- echo "<table>\n";
-/* echo '<tr style="background:#F6F670"><td style="font: 35 pt Arial, sans-serif; height:125px; width:500">'.$song->f_title."</td></tr>\n";
- echo '<tr style="background:#F6F650"><td style="font: 35 pt Arial, sans-serif; height:125px">'.$song->f_artist."</td></tr>\n";
- echo '<tr style="background:#F6F670"><td style="font: 35 pt Arial, sans-serif; height:125px">'.$song->get_album_name()."</td></tr>\n";
-*/
- echo '<tr class="npsong"><td style="font: 35 pt Arial, sans-serif; height:125px; width:500">'.$song->f_title."</td></tr>\n";
- echo '<tr class="npsong"><td style="font: 35 pt Arial, sans-serif; height:125px">'.$song->f_artist."</td></tr>\n";
- echo '<tr class="npsong"><td style="font: 35 pt Arial, sans-serif; height:125px">'.$song->get_album_name()."</td></tr>\n";
- echo "</table>\n";
- if (conf('play_album_art')) {
- echo "\t<td align=\"center\">";
- echo "<a target=\"_blank\" href=\"" . conf('web_path') . "/albumart.php?id=" . $song->album . "\">";
- echo "<img align=\"middle\" border=\"0\" src=\"" . conf('web_path') . "/albumart.php?id=" . $song->album .
- "&amp;fast=1\" alt=\"Album Art\" height=\"350\" />";
- echo "</a>\n";
- echo "\t</td>\n";
- echo "</tr>\n";
- } // if album art on now playing
- else {
- echo "\n<td>\n</tr>";
- }
- } // if it's a song
-} // while we're getting songs
-?>
-</table>
-<?php } ?>
-