diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-18 08:47:08 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-04-18 08:47:08 +0000 |
commit | 4632a09466e986b311136fd0150bd4004b003c16 (patch) | |
tree | abcf4a6bd0f8763634b3924b4e538eccdad9731c | |
parent | a8aff4f67f9cc15e93bcd46668ae8e698d778acf (diff) | |
download | ampache-4632a09466e986b311136fd0150bd4004b003c16.tar.gz ampache-4632a09466e986b311136fd0150bd4004b003c16.tar.bz2 ampache-4632a09466e986b311136fd0150bd4004b003c16.zip |
new install theme and fixed jpeg resize issues
-rw-r--r-- | albumart.php | 3 | ||||
-rwxr-xr-x | docs/CHANGELOG | 2 | ||||
-rw-r--r-- | install.php | 2 | ||||
-rw-r--r-- | lib/class/song.class.php | 1 | ||||
-rw-r--r-- | lib/ui.lib.php | 3 | ||||
-rw-r--r-- | modules/init.php | 2 | ||||
-rwxr-xr-x | sql/ampache.sql | 139 | ||||
-rw-r--r-- | templates/show_install.inc | 107 | ||||
-rw-r--r-- | templates/show_install_account.inc.php | 61 | ||||
-rw-r--r-- | templates/show_install_config.inc | 112 | ||||
-rw-r--r-- | update.php | 20 |
11 files changed, 202 insertions, 250 deletions
diff --git a/albumart.php b/albumart.php index 7d29decb..9d21b411 100644 --- a/albumart.php +++ b/albumart.php @@ -66,7 +66,8 @@ switch ($_REQUEST['type']) { } // else no image // Print the album art - $extension = substr($mime,strlen($mime)-3,3); + $extension= explode("/",$mime); + $extension = $data['1']; header("Content-type: $mime"); header("Content-Disposition: filename=" . $album->name . "." . $extension); if (!$_REQUEST['thumb']) { diff --git a/docs/CHANGELOG b/docs/CHANGELOG index 95354d55..ad13d094 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -4,6 +4,8 @@ -------------------------------------------------------------------------- v.3.3.2-Beta3 + - Fixed problem where jpegs wouldn't get resized (Thx blueorder) + - New Install and Update screen styles (Thx Ros) - Fixed a glitch that was causing m3u's to be built on every catalog add, rather then just on creation - Full re-write of Localplay, MPD controller added diff --git a/install.php b/install.php index c699c84c..ca733957 100644 --- a/install.php +++ b/install.php @@ -72,7 +72,7 @@ switch ($action) { case 'create_db': if (!install_insert_db($username,$password,$hostname,$database)) { - require_once('templates/show_install.inc'); + require_once('templates/show_install.inc.php'); break; } diff --git a/lib/class/song.class.php b/lib/class/song.class.php index ddaa96e7..45b37f1e 100644 --- a/lib/class/song.class.php +++ b/lib/class/song.class.php @@ -152,6 +152,7 @@ class Song { break; case 'mpc': $this->mime = "audio/x-musepack"; + $this->type = "MPC"; break; default: $this->mime = "audio/mpeg"; diff --git a/lib/ui.lib.php b/lib/ui.lib.php index 2bed47c6..ec5a1b28 100644 --- a/lib/ui.lib.php +++ b/lib/ui.lib.php @@ -762,7 +762,7 @@ function img_resize($image,$size,$type){ /* First check for php-gd */ $info = gd_info(); - if ($type == 'jpg' AND !$info['JPG Support']) { + if ( ($type == 'jpg' OR $type == 'jpeg') AND !$info['JPG Support']) { return false; } elseif ($type == 'png' AND !$info['PNG Support']) { @@ -785,6 +785,7 @@ function img_resize($image,$size,$type){ // determine image type and send it to the client switch ($type) { case 'jpg': + case 'jpeg': imagejpeg($img,null,100); break; case 'gif': diff --git a/modules/init.php b/modules/init.php index 63ce2c1d..538bb3fe 100644 --- a/modules/init.php +++ b/modules/init.php @@ -80,7 +80,7 @@ if (!$results['allow_stream_playback']) { /** This is the version.... fluf nothing more... **/ -$results['version'] = '3.3.2-Beta3 (Build 003)'; +$results['version'] = '3.3.2-Beta3 (Build 004)'; $results['raw_web_path'] = $results['web_path']; $results['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['web_path']; diff --git a/sql/ampache.sql b/sql/ampache.sql index 8c829e88..02b30e68 100755 --- a/sql/ampache.sql +++ b/sql/ampache.sql @@ -1,8 +1,10 @@ --- MySQL dump 10.9 +-- MySQL dump 10.10 -- -- Host: localhost Database: ampache -- ------------------------------------------------------ --- Server version 4.1.12-Debian_1-log +-- Server version 5.0.18-Debian_7 +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; /*!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' */; @@ -14,7 +16,7 @@ DROP TABLE IF EXISTS `access_list`; CREATE TABLE `access_list` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `name` varchar(255) NOT NULL default '', `start` int(11) unsigned NOT NULL default '0', `end` int(11) unsigned NOT NULL default '0', @@ -41,7 +43,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `album`; CREATE TABLE `album` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `name` varchar(255) NOT NULL default '', `prefix` enum('The','An','A') default NULL, `year` int(4) unsigned NOT NULL default '1984', @@ -68,7 +70,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `artist`; CREATE TABLE `artist` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `name` varchar(255) NOT NULL default '', `prefix` enum('The','An','A') default NULL, PRIMARY KEY (`id`), @@ -92,7 +94,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `catalog`; CREATE TABLE `catalog` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `name` varchar(128) NOT NULL default '', `path` varchar(255) NOT NULL default '', `catalog_type` enum('local','remote') NOT NULL default 'local', @@ -123,15 +125,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `flagged`; CREATE TABLE `flagged` ( - `id` int(11) NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, + `object_id` int(11) unsigned NOT NULL default '0', + `object_type` enum('artist','album','song') NOT NULL default 'song', `user` varchar(128) NOT NULL default '', - `type` enum('badmp3','badid3','newid3','setid3','del','sort','ren','notify','done') NOT NULL default 'badid3', - `song` int(11) unsigned NOT NULL default '0', - `date` int(11) unsigned NOT NULL default '0', - `comment` text, - UNIQUE KEY `id` (`id`), - UNIQUE KEY `song` (`song`), - KEY `type` (`type`) + `flag` enum('delete','retag','reencode','other') NOT NULL default 'other', + `date` int(11) unsigned NOT NULL, + `approved` tinyint(1) unsigned NOT NULL default '0', + `comment` varchar(255) NOT NULL default '', + PRIMARY KEY (`id`), + KEY `date` (`date`,`approved`) ) TYPE=MyISAM; -- @@ -145,87 +148,12 @@ UNLOCK TABLES; /*!40000 ALTER TABLE `flagged` ENABLE KEYS */; -- --- Table structure for table `flagged_song` --- - -DROP TABLE IF EXISTS `flagged_song`; -CREATE TABLE `flagged_song` ( - `id` int(11) unsigned NOT NULL auto_increment, - `song` int(11) unsigned NOT NULL default '0', - `file` varchar(255) NOT NULL default '', - `catalog` int(11) unsigned NOT NULL default '0', - `album` int(11) unsigned NOT NULL default '0', - `new_album` varchar(255) default NULL, - `comment` varchar(255) NOT NULL default '', - `year` mediumint(4) unsigned NOT NULL default '0', - `artist` int(11) unsigned NOT NULL default '0', - `new_artist` varchar(255) default NULL, - `title` varchar(255) NOT NULL default '', - `bitrate` mediumint(2) NOT NULL default '0', - `rate` mediumint(2) NOT NULL default '0', - `mode` varchar(25) default NULL, - `size` mediumint(4) unsigned NOT NULL default '0', - `time` mediumint(5) NOT NULL default '0', - `track` int(11) unsigned default NULL, - `genre` int(11) unsigned default NULL, - `played` tinyint(1) unsigned NOT NULL default '0', - `enabled` tinyint(1) unsigned NOT NULL default '1', - `update_time` int(11) unsigned default '0', - `addition_time` int(11) unsigned default '0', - PRIMARY KEY (`id`), - UNIQUE KEY `song` (`song`), - KEY `genre` (`genre`), - KEY `album` (`album`), - KEY `artist` (`artist`), - KEY `id` (`id`), - KEY `update_time` (`update_time`), - KEY `addition_time` (`addition_time`), - KEY `catalog` (`catalog`), - KEY `played` (`played`), - KEY `enabled` (`enabled`) -) TYPE=MyISAM; - --- --- Dumping data for table `flagged_song` --- - - -/*!40000 ALTER TABLE `flagged_song` DISABLE KEYS */; -LOCK TABLES `flagged_song` WRITE; -UNLOCK TABLES; -/*!40000 ALTER TABLE `flagged_song` ENABLE KEYS */; - --- --- Table structure for table `flagged_types` --- - -DROP TABLE IF EXISTS `flagged_types`; -CREATE TABLE `flagged_types` ( - `id` int(11) NOT NULL auto_increment, - `type` varchar(32) NOT NULL default '', - `value` varchar(128) NOT NULL default '', - `access` smallint(3) unsigned NOT NULL default '25', - PRIMARY KEY (`id`) -) TYPE=MyISAM; - --- --- Dumping data for table `flagged_types` --- - - -/*!40000 ALTER TABLE `flagged_types` DISABLE KEYS */; -LOCK TABLES `flagged_types` WRITE; -INSERT INTO `flagged_types` VALUES (1,'badmp3','Corrupt or low-quality mp3',25),(2,'badid3','Incomplete or incorrect song information',25),(3,'newid3','Updated id3 information is available',100),(4,'del','Remove this file',100),(5,'sort','Put this file in a directory matching the conventions of its catalog',100),(6,'ren','Rename this file from id3 info',100),(7,'notify','Notify the user who flagged this song that it has been updated.',100),(8,'done','Take no action on this song.',100),(9,'setid3','Schedule file for id3 update',100),(10,'disabled','Disabled this song',100); -UNLOCK TABLES; -/*!40000 ALTER TABLE `flagged_types` ENABLE KEYS */; - --- -- Table structure for table `genre` -- DROP TABLE IF EXISTS `genre`; CREATE TABLE `genre` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `name` varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM; @@ -270,7 +198,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `now_playing`; CREATE TABLE `now_playing` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `song_id` int(11) unsigned NOT NULL default '0', `user` varchar(128) default NULL, `start_time` int(11) unsigned NOT NULL default '0', @@ -294,7 +222,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `object_count`; CREATE TABLE `object_count` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `object_type` enum('album','artist','song','playlist','genre','catalog') NOT NULL default 'song', `object_id` int(11) unsigned NOT NULL default '0', `date` int(11) unsigned NOT NULL default '0', @@ -323,7 +251,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `playlist`; CREATE TABLE `playlist` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `name` varchar(128) NOT NULL default '', `user` varchar(128) NOT NULL default '', `type` enum('private','public') NOT NULL default 'private', @@ -349,10 +277,10 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `playlist_data`; CREATE TABLE `playlist_data` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `playlist` int(11) unsigned NOT NULL default '0', `song` int(11) unsigned default NULL, - `dyn_song` varchar(255) default NULL, + `dyn_song` text, `track` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `playlist` (`playlist`) @@ -374,7 +302,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `playlist_permission`; CREATE TABLE `playlist_permission` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `userid` varchar(128) NOT NULL default '', `playlist` int(11) unsigned NOT NULL default '0', `level` smallint(3) NOT NULL default '0', @@ -399,13 +327,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `preferences`; CREATE TABLE `preferences` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `name` varchar(128) NOT NULL default '', `value` varchar(255) NOT NULL default '', `description` varchar(255) NOT NULL default '', `level` int(11) unsigned NOT NULL default '100', `type` varchar(128) NOT NULL default '', - `locked` smallint(1) NOT NULL default '1', + `catagory` varchar(128) NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM; @@ -416,7 +344,7 @@ CREATE TABLE `preferences` ( /*!40000 ALTER TABLE `preferences` DISABLE KEYS */; LOCK TABLES `preferences` WRITE; -INSERT INTO `preferences` VALUES (1,'download','0','Allow Downloads',100,'options',0),(2,'upload','0','Allow Uploads',100,'options',0),(3,'quarantine','1','Quarantine All Uploads',100,'options',0),(4,'popular_threshold','10','Popular Threshold',25,'interface',0),(5,'font','Verdana, Helvetica, sans-serif','Interface Font',25,'theme',0),(6,'bg_color1','#ffffff','Background Color 1',25,'theme',0),(7,'bg_color2','#000000','Background Color 2',25,'theme',0),(8,'base_color1','#bbbbbb','Base Color 1',25,'theme',0),(9,'base_color2','#dddddd','Base Color 2',25,'theme',0),(10,'font_color1','#222222','Font Color 1',25,'theme',0),(11,'font_color2','#000000','Font Color 2',25,'theme',0),(12,'font_color3','#ffffff','Font Color 3',25,'theme',0),(13,'row_color1','#cccccc','Row Color 1',25,'theme',0),(14,'row_color2','#bbbbbb','Row Color 2',25,'theme',0),(15,'row_color3','#dddddd','Row Color 3',25,'theme',0),(16,'error_color','#990033','Error Color',25,'theme',0),(17,'font_size','10','Font Size',25,'theme',0),(18,'upload_dir',' ','Upload Directory',25,'options',0),(19,'sample_rate','32','Downsample Bitrate',25,'streaming',0),(20,'refresh_limit','0','Refresh Rate for Homepage',100,'interface',0),(21,'local_length','900','Session Expire in Seconds',100,'system',0),(22,'site_title','For The Love of Music','Website Title',100,'system',0),(23,'lock_songs','0','Lock Songs',100,'system',1),(24,'force_http_play','1','Forces Http play regardless of port',100,'system',1),(25,'http_port','80','Non-Standard Http Port',100,'system',1),(26,'catalog_echo_count','100','Catalog Echo Interval',100,'system',0),(27,'album_cache_limit','25','Album Cache Limit',100,'system',0),(28,'artist_cache_limit','50','Artist Cache Limit',100,'system',0),(29,'play_type','stream','Type of Playback',25,'streaming',0),(30,'direct_link','1','Allow Direct Links',100,'options',0),(31,'lang','en_US','Language',100,'interface',0),(32,'playlist_type','m3u','Playlist Type',100,'streaming',0),(33,'theme_name','classic','Theme',0,'theme',0),(34,'ellipse_threshold_album','27','Album Ellipse Threshold',0,'interface',0),(35,'ellipse_threshold_artist','27','Artist Ellipse Threshold',0,'interface',0),(36,'ellipse_threshold_title','27','Title Ellipse Threshold',0,'interface',0),(38,'condPL','1','Condense Localplay Playlist',0,'interface',0),(39,'quarantine_dir',' ','Quarantine Directory',100,'system',0); +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'),(5,'font','Verdana, Helvetica, sans-serif','Interface Font',25,'string','theme'),(6,'bg_color1','#ffffff','Background Color 1',25,'string','theme'),(7,'bg_color2','#000000','Background Color 2',25,'string','theme'),(8,'base_color1','#bbbbbb','Base Color 1',25,'string','theme'),(9,'base_color2','#dddddd','Base Color 2',25,'string','theme'),(10,'font_color1','#222222','Font Color 1',25,'string','theme'),(11,'font_color2','#000000','Font Color 2',25,'string','theme'),(12,'font_color3','#ffffff','Font Color 3',25,'string','theme'),(13,'row_color1','#cccccc','Row Color 1',25,'string','theme'),(14,'row_color2','#bbbbbb','Row Color 2',25,'string','theme'),(15,'row_color3','#dddddd','Row Color 3',25,'string','theme'),(16,'error_color','#990033','Error Color',25,'string','theme'),(17,'font_size','10','Font Size',25,'integer','theme'),(18,'upload_dir','/tmp','Upload Directory',25,'string','options'),(19,'sample_rate','32','Downsample Bitrate',25,'string','streaming'),(22,'site_title','For The Love of Music','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','theme'),(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','/tmp','Quarantine Directory',100,'string','system'),(40,'localplay_level','0','Localplay Access Level',100,'special','streaming'); UNLOCK TABLES; /*!40000 ALTER TABLE `preferences` ENABLE KEYS */; @@ -426,7 +354,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `ratings`; CREATE TABLE `ratings` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `user` varchar(128) NOT NULL default '', `object_type` enum('artist','album','song') NOT NULL default 'artist', `object_id` int(11) unsigned NOT NULL default '0', @@ -476,7 +404,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `song`; CREATE TABLE `song` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `file` varchar(255) NOT NULL default '', `catalog` int(11) unsigned NOT NULL default '0', `album` int(11) unsigned NOT NULL default '0', @@ -536,7 +464,7 @@ CREATE TABLE `update_info` ( /*!40000 ALTER TABLE `update_info` DISABLE KEYS */; LOCK TABLES `update_info` WRITE; -INSERT INTO `update_info` VALUES ('db_version','332005'); +INSERT INTO `update_info` VALUES ('db_version','332010'); UNLOCK TABLES; /*!40000 ALTER TABLE `update_info` ENABLE KEYS */; @@ -546,7 +474,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `upload`; CREATE TABLE `upload` ( - `id` int(11) unsigned NOT NULL auto_increment, + `id` int(11) unsigned NOT NULL, `user` varchar(128) NOT NULL default '', `file` varchar(255) NOT NULL default '', `action` enum('add','delete','quarantine') NOT NULL default 'add', @@ -572,6 +500,7 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( + `id` int(11) unsigned NOT NULL, `username` varchar(128) NOT NULL default '', `fullname` varchar(128) NOT NULL default '', `email` varchar(128) default NULL, @@ -580,6 +509,9 @@ CREATE TABLE `user` ( `disabled` tinyint(1) NOT NULL default '0', `offset_limit` int(5) unsigned NOT NULL default '50', `last_seen` int(11) unsigned NOT NULL default '0', + `create_date` int(11) unsigned default NULL, + `validation` varchar(128) default NULL, + PRIMARY KEY (`id`), UNIQUE KEY `username` (`username`) ) TYPE=MyISAM; @@ -638,6 +570,7 @@ CREATE TABLE `user_preference` ( LOCK TABLES `user_preference` WRITE; UNLOCK TABLES; /*!40000 ALTER TABLE `user_preference` ENABLE KEYS */; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; diff --git a/templates/show_install.inc b/templates/show_install.inc index 8203af62..3db12278 100644 --- a/templates/show_install.inc +++ b/templates/show_install.inc @@ -1,87 +1,68 @@ -<?php -/* - - Copyright (c) 2001 - 2005 Ampache.org - All rights reserved. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -*/ -/*! - @header Show Install Form and instructions - -*/ -?> <html> <head> <title>Ampache :: For The Love Of Music - Install</title> </head> <body> <script src="lib/general.js" language="javascript" type="text/javascript"></script> -<?php require_once(conf('prefix') . "/templates/style.inc"); ?> -<div class="text-box"> -<span class="header1"><?php echo _("Ampache Installation"); ?></span> -<p> -<?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> -</br /> -<ul> - <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li> - <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.php.dist file"); ?></li> -</ul> -<?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?> -</p> +<?php require_once(conf('prefix') . "/templates/install.css"); ?> +<div id="header"> +<h1><?php echo _("Ampache Installation"); ?></h1> +<p>For the love of Music</p> </div> -<div class="text-box"> -<b><?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?></b><br /> -<dl> - <dd><?php echo _("This step creates and inserts the Ampache database, as such please provide a mysql account with database creation rights. This step may take a while depending upon the speed of your computer"); ?></dd> -</dl> -<?php echo _("Step 2 - Creating the Ampache.cfg.php file"); ?><br /> -<?php echo _("Step 3 - Setup Initial Account"); ?><br /> -<br /><br /> -<span class="header2">Insert Ampache Database</span> -<?php echo $GLOBALS['error']->print_error('general'); ?> -<form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?action=create_db"; ?>" enctype="multipart/form-data" > -<table cellpadding="5" cellspacing="0" border="0"> +<div id="text-box"> + + <div class="notify"> + <b><?php echo _("Requirements"); ?></b> + <p> + <?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> + <br /> + <ul> + <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li> + <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.php.dist file"); ?></li> + </ul> +<?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?> + </p> + </div> + + <div class="content"> + <b><?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?></b><br /> + <dl> + <dd><?php echo _("This step creates and inserts the Ampache database, as such please provide a mysql account with database creation rights. This step may take a while depending upon the speed of your computer"); ?></dd> + </dl> + <?php echo _("Step 2 - Creating the Ampache.cfg.php file"); ?><br /> + <?php echo _("Step 3 - Setup Initial Account"); ?><br /> + <br /><br /> + <span class="header2">Insert Ampache Database</span> + <?php echo $GLOBALS['error']->print_error('general'); ?> + <form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?action=create_db"; ?>" enctype="multipart/form-data" > +<table> <tr> - <td><?php echo _("Desired Database Name"); ?></td> + <td class="align"><?php echo _("Desired Database Name"); ?></td> <td><input type="textbox" name="local_db" value="ampache" /></td> </tr> <tr> - <td><?php echo _("MySQL Hostname"); ?></td> + <td class="align"><?php echo _("MySQL Hostname"); ?></td> <td><input type="textbox" name="local_host" value="localhost" /></td> </tr> <tr> - <td><?php echo _("MySQL Administrative Username"); ?></td> + <td class="align"><?php echo _("MySQL Administrative Username"); ?></td> <td><input type="textbox" name="local_username" value="root" /></td> </tr> <tr> - <td><?php echo _("MySQL Administrative Password"); ?></td> + <td class="align"><?php echo _("MySQL Administrative Password"); ?></td> <td><input type="password" name="local_pass" /></td> </tr> <tr> - <td><?php echo _("Create Database User for New Database"); ?>? </td> + <td class="align"><?php echo _("Create Database User for New Database"); ?>? </td> <td> - <input type="checkbox" value="create_db_user" name="db_user" onclick="flipField('db_username');flipField('db_password');"> + <input type="checkbox" value="create_db_user" name="db_user" onClick="flipField('db_username');flipField('db_password');"> </td> <tr> - <td><?php echo _("Ampache Database Username"); ?></td> + <td class="align"><?php echo _("Ampache Database Username"); ?></td> <td><input type="textbox" id="db_username" name="db_username" value="ampache" disabled="disabled" /></td> </tr> <tr> - <td><?php echo _("Ampache Database User Password"); ?></td> + <td class="align"><?php echo _("Ampache Database User Password"); ?></td> <td><input type="password" id="db_password" name="db_password" value="" disabled="disabled" /></td> </tr> <tr> @@ -89,8 +70,14 @@ <td><input type="submit" value="<?php echo _("Insert Database"); ?>" /></td> </tr> -</table> -</form> + </table> + </form> + + </div> + <div id="bottom"> + <p><b>Ampache Installation.</b><br /> + For the love of Music.</p> + </div> </div> </body> diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php index 0206eacf..71ce402c 100644 --- a/templates/show_install_account.inc.php +++ b/templates/show_install_account.inc.php @@ -30,48 +30,57 @@ <title>Ampache :: For The Love Of Music - Install</title> </head> <body> -<?php require_once(conf('prefix') . "/templates/style.inc"); ?> -<div class="text-box"> -<span class="header1"><?php echo _("Ampache Installation"); ?></span> -<p> -<?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> -</br /> -<ul> +<?php require_once(conf('prefix') . "/templates/install.css"); ?> +<div id="header"> +<h1><?php echo _("Ampache Installation"); ?></h1> +<p>For the love of Music</p> +</div> + +<div id="text-box"> + + <div class="notify"> + <?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> + <br /> + <ul> <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li> <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.dist.php file"); ?></li> -</ul> + </ul> <?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?> -</p> -</div> + </div> -<div class="text-box"> -<?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?><br /> -<?php echo _("Step 2 - Creating the ampache.cfg.php file"); ?><br /> -<b><?php echo _("Step 3 - Setup Initial Account"); ?></b><br /> -<dl> + <div class="content"> + <?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?><br /> + <?php echo _("Step 2 - Creating the ampache.cfg.php file"); ?><br /> + <b><?php echo _("Step 3 - Setup Initial Account"); ?></b><br /> + <dl> <dd><?php echo _("This step creates your initial Ampache admin account. Once your admin account has been created you will be directed to the login page"); ?></dd> -</dl> -<br /><br /> -<span class="header2"><?php echo _('Create Admin Account'); ?></span> -<?php echo $GLOBALS['error']->print_error('general'); ?> -<form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=create_account"; ?>" enctype="multipart/form-data" > -<table cellpadding="5" cellspacing="0" border="0"> + </dl> + <br /><br /> + <span class="header2"><?php echo _('Create Admin Account'); ?></span> + <?php echo $GLOBALS['error']->print_error('general'); ?> + <form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=create_account"; ?>" enctype="multipart/form-data" > +<table> <tr> - <td><?php echo _("Username"); ?></td> + <td class="align"><?php echo _("Username"); ?></td> <td><input type="textbox" name="local_username" value="admin" /></td> </tr> <tr> - <td><?php echo _("Password"); ?></td> + <td class="align"><?php echo _("Password"); ?></td> <td><input type="password" name="local_pass" value="" /></td> </tr> <tr> <td> </td> <td><input type="submit" value="<?php echo _("Create Account"); ?>" /></td> </tr> -</table> -</form> -</div> + </table> + </form> + </div> + <div id="bottom"> + <p><b>Ampache Installation.</b><br /> + For the love of Music.</p> + </div> +</div> </body> </html> diff --git a/templates/show_install_config.inc b/templates/show_install_config.inc index a5c926f3..82ba6679 100644 --- a/templates/show_install_config.inc +++ b/templates/show_install_config.inc @@ -30,90 +30,93 @@ <title>Ampache :: For The Love Of Music - Install</title> </head> <body> -<?php require_once(conf('prefix') . "/templates/style.inc"); ?> -<div class="text-box"> -<span class="header1"><?php echo _("Ampache Installation"); ?></span> -<p> -<?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> -</br /> -<ul> - <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li> - <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.php.dist file"); ?></li> -</ul> -<?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?> -</p> +<?php require_once(conf('prefix') . "/templates/install.css"); ?> +<div id="header"> +<h1><?php echo _("Ampache Installation"); ?></h1> +<p>For the love of Music</p> </div> +<div id="text-box"> -<div class="text-box"> -<?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?><br /> -<b><?php echo _("Step 2 - Creating the Ampache.cfg.php file"); ?></b><br /> -<dl> - <dd><?php echo _("This steps takes the basic config values, and first attempts to write them out directly to your webserver. If access is denied it will prompt you to download the config file. Please put the downloaded config file in /config"); ?></dd> -</dl> -<?php echo _("Step 3 - Setup Initial Account"); ?></a><br /> -<br /><br /> -<span class="header2">Generate Config File</span> -<?php echo $GLOBALS['error']->print_error('general'); ?> -<form method="post" action="<?php echo $_SERVER['PHP_SELF'] . "?action=create_config"; ?>" enctype="multipart/form-data" > -<table cellpadding="5" cellspacing="0" border="0"> + <div class="notify"> + <?php echo _("This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites"); ?> + <br /> + <ul> + <li><?php echo _("A MySQL Server with a username and password that can create/modify databases"); ?></li> + <li><?php echo _("Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.php.dist file"); ?></li> + </ul> + <?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?> + </div> + + <div class="content"> + <?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?><br /> + <b><?php echo _("Step 2 - Creating the Ampache.cfg.php file"); ?></b><br /> + <dl> + <dd><?php echo _("This steps takes the basic config values, and first attempts to write them out directly to your webserver. If access is denied it will prompt you to download the config file. Please put the downloaded config file in /config"); ?></dd> + </dl> + <?php echo _("Step 3 - Setup Initial Account"); ?></a><br /> + <br /><br /> + <span class="header2">Generate Config File</span> + <?php echo $GLOBALS['error']->print_error('general'); ?> + <form method="post" action="<?php echo $_SERVER['PHP_SELF'] . "?action=create_config"; ?>" enctype="multipart/form-data" > + <table> <tr> - <td><?php echo _("Web Path"); ?></td> - <td><input type="textbox" name="web_path" value="<?php echo $web_path; ?>" /></td> + <td class="align"><?php echo _("Web Path"); ?></td> + <td class="align"><input type="textbox" name="web_path" value="<?php echo $web_path; ?>" /></td> </tr> <tr> - <td><?php echo _("Desired Database Name"); ?></td> - <td><input type="textbox" name="local_db" value="<?php echo scrub_out($_REQUEST['local_db']); ?>" /></td> + <td class="align"><?php echo _("Desired Database Name"); ?></td> + <td class="align"><input type="textbox" name="local_db" value="<?php echo scrub_out($_REQUEST['local_db']); ?>" /></td> </tr> <tr> - <td><?php echo _("MySQL Hostname"); ?></td> - <td><input type="textbox" name="local_host" value="<?php echo scrub_out($_REQUEST['local_host']); ?>" /></td> + <td class="align"><?php echo _("MySQL Hostname"); ?></td> + <td class="align"><input type="textbox" name="local_host" value="<?php echo scrub_out($_REQUEST['local_host']); ?>" /></td> </tr> <tr> - <td><?php echo _("MySQL Username"); ?></td> - <td><input type="textbox" name="local_username" value="<?php echo scrub_out($_REQUEST['local_username']); ?>" /></td> + <td class="align"><?php echo _("MySQL Username"); ?></td> + <td class="align"><input type="textbox" name="local_username" value="<?php echo scrub_out($_REQUEST['local_username']); ?>" /></td> </tr> <tr> - <td><?php echo _("MySQL Password"); ?></td> - <td><input type="password" name="local_pass" value="" /></td> + <td class="align"><?php echo _("MySQL Password"); ?></td> + <td class="align"><input type="password" name="local_pass" value="" /></td> </tr> <tr> <td> </td> <td><input type="submit" value="<?php echo _("Write Config"); ?>" /></td> </tr> -</table> -</form> -<br /> -<table border="0" cellpadding="0"> + </table> + </form> + <br /> + <table> <tr> - <td valign="top"><?php echo _("Ampache.cfg.php Exists"); ?></td> - <td valign="top">[ + <td class="align"><?php echo _("Ampache.cfg.php Exists"); ?></td> + <td>[ <?php if (!read_config_file($configfile)) { $status['read_config'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo " <span class=\"notok\">ERROR</span> "; } else { $status['read_config'] = 'true'; - echo " <font color=\"green\"> OK   </font> "; + echo " <span class=\"ok\">OK</span> "; } ?> ] </td> </tr> <tr> - <td valign="top"> + <td class="align"> <?php echo _("Ampache.cfg.php Configured?"); ?> </td> - <td valign="top">[ + <td>[ <?php $results = read_config($configfile, 0, 0); if (!check_config_values($results)) { $status['parse_config'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; + echo " <span class=\"notok\">ERROR</span> "; } else { $status['parse_config'] = 'true'; - echo " <font color=\"green\"> OK </font> "; + echo " <span class=\"ok\">OK</span> "; } ?> ] @@ -124,12 +127,17 @@ <td> <a href="<?php echo $GLOBALS['php_self']; ?>?action=show_create_config&local_db=<?php echo $_REQUEST['local_db']; ?>&local_host=<?php echo $_REQUEST['local_host']; ?>">[<?php echo _("Check for Config"); ?>]</a> </td> -</tr> -</table> -<br /> -<form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=show_create_account"; ?>" enctype="multipart/form-data"> -<input type="Submit" value="Continue to Step 3" /> -</form> + </tr> + </table> + <br /> + <form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=show_create_account"; ?>" enctype="multipart/form-data"> + <input type="Submit" value="Continue to Step 3" /> + </form> + </div> + <div id="bottom"> + <p><b>Ampache Installation.</b><br /> + For the love of Music.</p> + </div> </div> </body> @@ -66,21 +66,31 @@ $htmllang = str_replace("_","-",conf('lang')); <head> <link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" /> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" /> -<?php show_template('style'); ?> +<?php require_once(conf('prefix') . "/templates/install.css"); ?> <title>Ampache - Update</title> </head> <body> - -<p class="header1">Ampache - Update</p> -<p> +<div id="header"> +<h1><?php echo _("Ampache Update"); ?></h1> +<p>For the love of Music</p> +</div> +<div id="text-box"> + <div class="notify"> This page handles all database updates to Ampache starting with 3.2. According to your database your current version is: <?php echo $update->format_version($version); ; ?>. the following updates need to be performed<br /><br /> -</p> + </div> + <div class="content"> <?php $update->display_update(); ?> <form method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ; ?>/update.php?action=update"> <?php if ($update->need_update()) { ?><input type="submit" value="Update Now!" /> <?php } ?> </form> + </div> + <div id="bottom"> + <p><b>Ampache Installation.</b><br /> + For the love of Music.</p> + </div> +</div> </body> </html> |