diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-23 21:12:08 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2006-09-23 21:12:08 +0000 |
commit | c0456fee32673d628882fad7307c4989e35db820 (patch) | |
tree | dbf9c432f414e9fba146d6c3f563a6f2e31f5217 | |
parent | 6224281f3c405b0f41c597d504273fe5c237d4ad (diff) | |
download | ampache-c0456fee32673d628882fad7307c4989e35db820.tar.gz ampache-c0456fee32673d628882fad7307c4989e35db820.tar.bz2 ampache-c0456fee32673d628882fad7307c4989e35db820.zip |
new theme, temp breaking of all other themes... will be fixed I swear also re-indexing of mysql tables
-rw-r--r-- | lib/class/update.class.php | 156 | ||||
-rw-r--r-- | login.php | 8 | ||||
-rw-r--r-- | preferences.php | 2 | ||||
-rw-r--r-- | templates/basestyle.inc.php | 298 | ||||
-rw-r--r-- | templates/default.css | 580 | ||||
-rw-r--r-- | templates/header.inc | 7 | ||||
-rw-r--r-- | templates/show_login_form.inc | 31 | ||||
-rw-r--r-- | templates/show_preferences.inc | 9 | ||||
-rw-r--r-- | templates/style.inc | 222 | ||||
-rwxr-xr-x | themes/classic/images/ampache.gif | bin | 6343 -> 9631 bytes | |||
-rw-r--r-- | themes/classic/images/bg_login_0.jpg | bin | 0 -> 10936 bytes | |||
-rw-r--r-- | themes/classic/images/bg_login_1.jpg | bin | 0 -> 9435 bytes |
12 files changed, 777 insertions, 536 deletions
diff --git a/lib/class/update.class.php b/lib/class/update.class.php index e8de0190..ca5b4d6e 100644 --- a/lib/class/update.class.php +++ b/lib/class/update.class.php @@ -280,6 +280,13 @@ class Update { $version[] = array('version' => '332011','description' => $update_string); + $update_string = '- Reworked All Indexes on tables, hopefully leading to performance improvements.<br />' . + '- Added live_stream table for radio station support.<br />' . + '- Added id int(11) UNSIGNED fields to a few tables missing it.<br />' . + '- Removed DB Based color/font preferences and Theme preferences catagory.<br />'; + + $version[] = array('version' => '332012','description' => $update_string); + return $version; @@ -1630,5 +1637,154 @@ class Update { } // update_332011 + /** + * update_332012 + * Add live_stream table + */ + function update_332012() { + + $sql = "CREATE TABLE `live_stream` (" . + "`id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ," . + "`name` VARCHAR( 128 ) NOT NULL ," . + "`site_url` VARCHAR( 255 ) NOT NULL ," . + "`url` VARCHAR( 255 ) NOT NULL ," . + "`genre` INT( 11 ) UNSIGNED NOT NULL ," . + "`catalog` INT( 11 ) UNSIGNED NOT NULL ," . + "`frequency` VARCHAR( 32 ) NOT NULL ," . + "`call_sign` VARCHAR( 32 ) NOT NULL" . + ") ENGINE = MYISAM"; + + /* Clean Up Indexes */ + + // Access List + $sql = "ALTER TABLE `access_list` DROP INDEX `ip`"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `access_list` ADD INDEX `start` (`start`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `access_list` ADD INDEX `end` (`end`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `access_list` ADD INDEX `level` (`level`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `access_list` ADD `type` VARCHAR( 64 ) NOT NULL AFTER `level`"; + $db_results = mysql_query($sql, dbh()); + + // Album Table + $sql = "ALTER TABLE `album` DROP INDEX `id`"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `album` ADD INDEX `year` (`year`)"; + $db_results = mysql_query($sql, dbh()); + + // Artist Table + $sql = "ALTER TABLE `artist` DROP INDEX `id`"; + $db_results = mysql_query($sql, dbh()); + + // Flagged + $sql = "ALTER TABLE `flagged` ADD INDEX `object_id` (`object_id`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `flagged` ADD INDEX `object_type` (`object_type`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `flagged` ADD INDEX `user` (`user`)"; + $db_results = mysql_query($sql, dbh()); + + // Genre + $sql = "ALTER TABLE `genre` ADD INDEX `name` (`name`)"; + $db_results = mysql_query($sql, dbh()); + + // IP Tracking + $sql = "ALTER TABLE `ip_history` ADD INDEX `ip` (`ip`)"; + $db_results = mysql_query($sql,dbh()); + + $sql = "ALTER TABLE `ip_history` CHANGE `username` `user` VARCHAR( 128 ) NULL DEFAULT NULL"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `ip_history` ADD `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `ip_history` DROP `connections`"; + $db_results = mysql_query($sql, dbh()); + + + // Live Stream + $sql = "ALTER TABLE `live_stream` ADD INDEX `name` (`name`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `live_stream` ADD INDEX `genre` (`genre`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `live_stream` ADD INDEX `catalog` (`catalog`)"; + $db_results = mysql_query($sql, dbh()); + + // Object_count + $sql = "ALTER TABLE `object_count` CHANGE `object_type` `object_type` ENUM( 'album', 'artist', 'song', 'playlist', 'genre', 'catalog', 'live_stream', 'video' ) NOT NULL DEFAULT 'song'"; + $db_results = mysql_query($sql, dbh()); + + // Playlist + $sql = "ALTER TABLE `playlist` DROP INDEX `id`"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `playlist` ADD INDEX `type` (`type`)"; + $db_results = mysql_query($sql, dbh()); + + // Preferences + $sql = "ALTER TABLE `preferences` ADD INDEX `catagory` (`catagory`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `preferences` ADD INDEX `name` (`name`)"; + $db_results = mysql_query($sql, dbh()); + + // Session + $sql = "ALTER TABLE `session` ADD INDEX `expire` (`expire`)"; + $db_results = mysql_query($sql, dbh()); + + // Song + $sql = "ALTER TABLE `song` DROP INDEX `id`"; + $db_results = mysql_query($sql, dbh()); + + // User_catalog + $sql = "ALTER TABLE `user_catalog` ADD `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `user_catalog` ADD INDEX `user` (`user`)"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `user_catalog` ADD INDEX `catalog` (`catalog`)"; + $db_results = mysql_query($sql, dbh()); + + // User_preference + $sql = "ALTER TABLE `user_preference` DROP INDEX `user_2`"; + $db_results = mysql_query($sql, dbh()); + + $sql = "ALTER TABLE `user_preference` DROP INDEX `preference_2`"; + $db_results = mysql_query($sql, dbh()); + + // Preferences, remove colors,font,font-size + $sql = "DELETE FROM preferences WHERE `catagory`='theme' AND `name` !='theme_name'"; + $db_results = mysql_query($sql, dbh()); + + $sql = "UPDATE preferences SET `catagory`='interface' WHERE `catagory`='theme'"; + $db_results = mysql_query($sql, dbh()); + + /* Fix every users preferences */ + $sql = "SELECT * FROM user"; + $db_results = mysql_query($sql, dbh()); + + $user = new User(); + $user->fix_preferences('-1'); + + while ($r = mysql_fetch_assoc($db_results)) { + $user->fix_preferences($r['username']); + } // while results + + $this->set_version('db_version','332012'); + + } // update_332012 + } // end update class ?> @@ -121,22 +121,20 @@ $htmllang = str_replace("_","-",conf('lang')); <meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" /> <link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" /> <title> <?php echo conf('site_title'); ?> </title> - -<?php show_template('style'); ?> - <script type="text/javascript" language="javascript"> function focus(){ document.login.username.focus(); } </script> </head> -<body bgcolor="<?php echo conf('bg_color1'); ?>" onload="focus();"> +<body bgcolor="#D3D3D3" onload="focus();"> +<link rel="stylesheet" href="templates/default.css" type="text/css"> <?php require(conf('prefix') . "/templates/show_login_form.inc"); if (@is_readable(conf('prefix') . '/config/motd.php')) { - include conf('prefix') . '/config/motd.php'; + include conf('prefix') . '/config/motd.php'; } ?> diff --git a/preferences.php b/preferences.php index 906df6ff..ff92f4a8 100644 --- a/preferences.php +++ b/preferences.php @@ -30,7 +30,7 @@ require('lib/init.php'); /* Scrub in the needed mojo */ -if (!$_REQUEST['tab']) { $_REQUEST['tab'] = 'theme'; } +if (!$_REQUEST['tab']) { $_REQUEST['tab'] = 'interface'; } $user_id = scrub_in($_REQUEST['user_id']); diff --git a/templates/basestyle.inc.php b/templates/basestyle.inc.php deleted file mode 100644 index 0a5d4905..00000000 --- a/templates/basestyle.inc.php +++ /dev/null @@ -1,298 +0,0 @@ -<?php -/* - - Copyright (c) 2001 - 2006 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 Style File - @discussion this is the css that handles the menu mojo (#sidebar, etc) and the - outer layer of layout (#maincontainer, #topbar, #content, etc -*/ -?> -<style type="text/css"> -<!-- -/** - * Div Definitions - * These define how the page is laid out, be careful with these as changes to them - * can cause drastic layout changes - */ - #maincontainer - { - margin: 0px; - } - #topbar - { - height: 80px; - padding-top:10px; - padding-left:10px; - background-color: <?php echo conf('bg_color1'); ?>; - } - #topbarright - { - float: right; - } - #topbarleft - { - float: left; - } - .nodisplay { display: none;} - .display {} - #mpdpl td { - padding: 0px 2px 0px 2px; - text-align: left; - } -/** - * End Div Definitions - * This is the end of the main structure def's - */ - -/** - * Experimental for menus (Thx Sigger) - * TO DO: Fill in 1px border around menus & submenu items - * Make padding appply to the li, not just an a. Moving paddng: to li throws off the dropdown menu alignment. - */ - #content { -/* float: left; /* use for horizontal menu; comment out otherwise */ - padding-left:155px; - padding-right:5px; - } - #sidebar { - clear: both; - height: 100%; - margin-right: 5px; - float: left; - padding: 0; - list-style: none; - border: 1px solid #000; - line-height: 1.0; - } - #sidebar ul { - margin: 0px; - list-style: none; - padding: 0px; - font-family: verdana, arial, Helvetica, sans-serif; - line-height: 1.0; - } - #sidebar li { - margin: 0; - display: block; - border-bottom: 1px solid white; - border-left: 1px solid white; - border-right: 1px solid white; - border-top: 1px solid white; -/* float: left; /* use for horizontal menu; comment out otherwise */ - padding: 5px 0px 5px 10px; - width: 10.5em; - background-color: <?php echo conf('row_color2'); ?>; - } - #sidebar a, .navbutton { - display: block; /*Not sure why this is neccesary, but it is for IE*/ - text-decoration: none; - } - #sidebar li:hover, #sidebar li.sfhover { - color: <?php echo conf('font_color2'); ?>; - background-color: <?php echo conf('row_color3'); ?>; - } - #sidebar li:active { - background-color: <?php echo conf('row_color1'); ?>; - z-index:30; - } - #sidebar li ul { - float: left; - position: absolute; - width: 9em; - margin: -1.5em 0 0 10.5em; /* for vertical menu; comment out otherwise */ -/* margin: 0.5em 0 0 -1.1em; /* for horizontal menu; comment out otherwise */ - - left: -999em; /* this -999em puts the submenu item way off to the left until it's called back by a hover (below) */ - z-index:30; - } - #sidebar li:hover ul, #sidebar li.sfhover ul { - left: auto; /* this calls the submenu back when the parent li is hovered. */ - } -/*star rating styles */ - /* styles for the star rater */ - - .star-rating{ - list-style:none; - margin: 0px; - padding:0px; - width: 80px; - height: 15px; - position: relative; - background: url(<?php echo conf('web_path'); ?>/images/ratings/star_rating.gif) top left repeat-x; - } - .star-rating li{ - padding:0px; - margin:0px; - /*\*/ - float: right; - /* */ - } - .star-rating li a{ - display:block; - width:16px; - height: 15px; - text-decoration: none; - text-indent: -9000px; - z-index: 20; - position: absolute; - padding: 0px; - } - .star-rating li a:hover{ - background: url(<?php echo conf('web_path'); ?>/images/ratings/star_rating.gif) left center; - z-index: 2; - left: 0px; - } - li.zero-stars a:hover { - background: url(<?Php echo conf('web_path'); ?>/images/ratings/x.gif); - height: 15px; - left: 80px; - display: block; - } - a.zero-stars { - background: url(<?php echo conf('web_path'); ?>/images/ratings/x_off.gif); - height: 15px; - left: 80px; - display: block; - } - a.one-stars{ - left: 0px; - } - a.one-stars:hover{ - width:16px; - } - a.two-stars{ - left:16px; - } - a.two-stars:hover{ - width: 32px; - } - a.three-stars{ - left: 32px; - } - a.three-stars:hover{ - width: 48px; - } - a.four-stars{ - left: 48px; - } - a.four-stars:hover{ - width: 64px; - } - a.five-stars{ - left: 64px; - } - a.five-stars:hover{ - width: 80px; - } - li.current-rating{ - background: url(<?php echo conf('web_path'); ?>/images/ratings/star_rating.gif) left bottom; - position: absolute; - height: 15px; - display: block; - text-indent: -9000px; - z-index: 1; - } - #tablist { - padding: 3px 0; - margin: 12px 0 0 0; - font: bold 12px Verdana, sans-serif; - } - - #tablist li { - list-style: none; - margin: 0; - display: inline; - } - - #tablist li a { - padding: 3px 0.5em; - margin-left: 3px; - border: 1px solid <?php echo conf('row_color1'); ?>; - border-bottom: none; - background: <?php echo conf('row_color3'); ?>; - text-decoration: none; - } - - #tablist li a:link { color: <?php echo conf('font_color1'); ?>; } - #tablist li a:visited { color: <?php echo conf('bg_color2'); ?>; } - - #tablist li a:hover { - color: <?php echo conf('font_color2'); ?>; - background: <?php echo conf('row_color2'); ?>; - border-color: <?php echo conf('bg_color2'); ?>; - } - - #tablist li a#current { - color: <?php echo conf('font_color2'); ?>; - background: <?php echo conf('row_color2'); ?>; - border-color: <?php echo conf('bg_color2'); ?>; - border-bottom: 1px solid <?php echo conf('bg_color2'); ?>; - } -/* Other Required Styles */ - .confirmation-box { - padding-left:5px; - padding-top:5px; - padding-right:5px; - margin-bottom:10px; - display: table-cell; - background-color: <?php echo conf('base_color1'); ?>; - border-right:2px solid <?php echo conf('bg_color2'); ?>; - border-bottom:2px solid <?php echo conf('bg_color2'); ?>; - border-left:2px solid <?php echo conf('bg_color2'); ?>; - border-top:2px solid <?php echo conf('bg_color2'); ?>; - } - .text-action, .text-action li { - margin-top:5px; - list-style: none; - margin-bottom:5px; - padding-left:0px; - } - .text-action a, .text-action span { - background: <?php echo conf('base_color2'); ?>; - border:1px solid <?php echo conf('bg_color2'); ?>; - padding-left:2px; - padding-right:2px; - text-decoration: none; - } - .text-action #pt_active { - background: <?php echo conf('bg_color2'); ?>; - color: <?php echo conf('font_color3'); ?>; - border:1px solid <?php echo conf('base_color2'); ?>; - } - #nowplaying { - background: <?php echo conf('base_color1'); ?>; - } - .np_row { - display:block; - background: <?php echo conf('base_color2'); ?>; - padding-top: 3px; - padding-bottom: 3px; - } - .np_cell { - display: inline; - margin: 10px; - } - #bigdaddy { - padding: 5px; - } ---> -</style> diff --git a/templates/default.css b/templates/default.css new file mode 100644 index 00000000..3eabc34c --- /dev/null +++ b/templates/default.css @@ -0,0 +1,580 @@ +<!-- +/* + + Copyright (c) 2001 - 2006 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. + +*/ +--> +p { + color: #000000; +} + +a { + color: #000000; + font-family: Verdana, Helvetica, sans-serif; +} +a:visited + { + color: #000000; + font-family: Verdana, Helvetica, sans-serif; + } +a:active { + color: #000000; + font-family: Verdana, Helvetica, sans-serif; +} +.text-box { + display: table-cell; + padding-left:5px; + padding-top:5px; + padding-right:5px; + margin-bottom:10px; + background-color: #bbbbbb; + border-right:2px solid #000000; + border-bottom:2px solid #000000; + border-left:2px solid #000000; + border-top:2px solid #000000; +} +.selected_button { + background-color: black;color:white; +} +.unselected_button { + /* there really isn't anything for this */ +} +.display {} + +#mpdpl td { + padding: 0px 2px 0px 2px; + text-align: left; +} +table.tabledata {} +td { + padding: 0px 8px 0px 8px; + color: #000000; + font-family: Verdana, Helvetica, sans-serif; + font-size: 12px; +} +th { + padding-right: 10px; +} +input { + color: #000000; + font-family: Verdana, Helvetica, sans-serif; + font-size: 12px; + font-weight: bold; + background-color: #dddddd; + margin: 2px 2px 2px 2px; +} +select { + color: #000000; + font-family: Verdana, Helvetica, sans-serif; + font-size: 12px; + background-color: #dddddd; +} +textarea { + background-color: #dddddd; + color: #000000; + font-family: Verdana, Helvetica, sans-serif; + font-size: 12px; +} +.table-header { + background: url(/themes/classic/images/ampache-light-bg.gif) #dddddd repeat-x; + vertical-align: top; +} + .header1 + { + color: #000000; + font-family: Verdana, Helvetica, sans-serif; + font-size: 18px; + font-weight: 900; + } + .header2 + { + color: #000000; + font-family: Verdana, Helvetica, sans-serif; + font-size: 14px; + font-weight: 900; + } + .headrow + { + background:#cccccc; + font-size: 12px; + } + .odd + { + background:#bbbbbb; + font-size: 12px; + } + .even + { + background:#dddddd; + font-size: 12px; + } +.blank { + background: #fff; +} +.border { + background:#000000; +} +.header { + font-size: 12px; +} +.error { + color: #990033; +} +.fatalerror { + padding-top: 3px; + padding-left: 3px; + padding-right: 3px; + display: table-cell; + padding-bottom: 3px; + color: #990033; + border-right:4px solid #990033; + border-bottom:4px solid #990033; + border-left:4px solid #990033; + border-top:4px solid #990033; +} +.disabled { + text-decoration: line-through; +} +.smallbutton { + border:0px; + padding-left:1px; + padding-right:1px; + font-size: 11px; + cursor: pointer; +} +/* These three lines make a menu vertical */ + #content { float: none; } + #sidebar li { float: none; } + #sidebar li ul { margin: -1.5em 0 0 9em; } + +/* ////////////////////////////////////////////////////////////////*/ +/* De aqui pa'bajo, ros esta creando una hoja de estilos unica para todo Ampache */ + +/* General style rules */ +body{ + padding-top: 0px; + margin-top: 0px; + margin-left: 0px; + margin-right: 0px; + background-color:#d3d3d3; + font-family:Arial, Helvetica, Sans-Serif; +} + +#maincontainer{ + margin: 0px; +} + +.alphabet { + margin: 10px; + font-size: 10px; + font-weight: normal; +} + +/* Content block */ +#content { + top:90px; + margin-top:7px; + margin-left:135px; + /*float:left; use for horizontal menu; comment out otherwise */ + background:#fff url("/themes/classic/images/bg_content.gif") repeat-y right top; +} + +h3#content_title{ + font-family:Arial,Helvetica,Sans-Serif; + font-size:12px; + line-height:32px; + color:#fff; + margin:0px; + padding:0px; + background:#8B8B8B url("/themes/classic/images/content_corner.gif") no-repeat right top; +} + +h3#content_title span { + text-align:left; +} + +/* Styles for Header */ +div#Header{ + height:80px; + margin-bottom:3px; + padding:0px; +} + +#Header h1 { + background: transparent url("/themes/classic/images/bg_login_0.jpg") no-repeat top left; + border:0px; + width: 439px; + height: 84px; + float: left; + margin:0px; + padding:0px; +} + +#Header h1 span { + display:none +} + +#Header h2 { + background: transparent url(/001/h2.gif) no-repeat top left; + margin-top: 75px; + width: 200px; + height: 18px; + float: right; +} + +#Header h2 span { + font-size:10px; + margin-left:10px; +} + + +/* Sidebar */ +/** + * Experimental for menus (Thx Sigger) + * TO DO: Fill in 1px border around menus & submenu items + * Make padding apply to the li, not just an a. Moving padding: to li throws off the dropdown menu alignment. + */ + +div#sidebar{ + clear:both; + position:absolute; + left:5px; + top:87px; + background:url("/themes/classic/images/bg_navigation.gif") repeat-y left; +} + +#sidebar h3 { + border:0px; + width: 120px; + height: 28px; + margin:0px; + padding:0px; + background: transparent url("/themes/classic/images/sidebar_top.jpg") no-repeat left; + +} + +#sidebar h3 span { + display:none +} + +#sidebar ul { + margin: 0px; + list-style: none; + font-family:Arial, Helvetica, Sans-Serif; + font-size:10px; + padding: 0px; + line-height: 1.0; +} + +#sidebar li { + margin: 0; + display: block; + border-bottom: 1px solid #8B8B8B; + border-left: 1px solid #8B8B8B; + border-right: 1px solid #8B8B8B; + border-top: 1px solid #8B8B8B; + /* float: left; /* use for horizontal menu; comment out otherwise */ + padding: 5px 0px 5px 10px; + width: 10.5em; + background-color:#FFFFFF; +} + +#sidebar a, .navbutton { + display: block; /*Not sure why this is neccesary, but it is for IE*/ + text-decoration: none; +} + +#sidebar li:hover, #sidebar li.sfhover { + color:#000000; + background-color:#DDDDDD; +} + +#sidebar li:active { + background-color:#CCCCCC; + z-index:30; +} + +#sidebar li ul { + float: left; + position: absolute; + width: 9em; + margin: -1.5em 0 0 10.5em; /* for vertical menu; comment out otherwise */ +/* margin: 0.5em 0 0 -1.1em; /* for horizontal menu; comment out otherwise */ + left: -999em; /* this -999em puts the submenu item way off to the left until it's called back by a hover (below) */ + z-index:30; +} + +#sidebar li:hover ul, #sidebar li.sfhover ul { + left: auto; /* this calls the submenu back when the parent li is hovered. */ +} + +/* Styles for Now Playing */ +#nowplaying{ + clear: all; + margin: 10px; +} + +#np_container1{ + width: 250px; + height: 18px; + padding: 0px; + margin: 0px; + background: #fff url("/themes/classic/images/tb_tab.jpg") no-repeat top left; +} + +#np_container1 h1{ + font-size: 10px; + font-weight: bold; + padding: 2px; +} + +#np_container2{ + border-width: 1px 1px 1px 1px; + border-style: solid; + border-color:#ddd #999 #999 #ccc; + padding: 6px; + font-family: Verdana, sans-serif; + font-size: 10px; + line-height: 12px; + color: #000; + background: #D6D6D4 url("/themes/classic/images/bg_row.jpg") repeat top left; +} + + +/* Styles for Login template */ +#container{ + margin:100px auto 0px auto; + width:437px; + font-size: 12px; + text-align:center; +} +#container h1{ + background:url("/themes/classic/images/bg_login_0.jpg") no-repeat; + height:81px; + margin-bottom:8px; +} +#container h1 span{ + display:none; +} +#container div{ + background:url("/themes/classic/images/bg_login_1.jpg") no-repeat; + height:285px; +} +#loginp_0{ + color:#333; + margin-top:0px; + padding-top:60px; +} +.loginp_1{ + text-align:right; + padding-right:100px; +} +.loginp_1 span{ + font-weight:bold; +} +.loginp_1 input{ + border:1px solid #999; +} +input.text_input { +width:12em; +} +.loginp_1 input.check_input { +margin-right:5em; +} +/* Footer */ +#footer { + margin-left: 150px; + margin-bottom: 10px; +} + +#footer p { + color:#999999; + font-size:10px; +} +#topbar { + height: 80px; + padding-top:3px; + padding-left:10px; +} +#topbarright { + float: right; + font-size: 10px; +} +#topbarleft, #topbarleft a{ + float: left; +} +/* styles for the star ratings */ +.star-rating{ + list-style:none; + margin: 0px; + padding:0px; + width: 80px; + height: 15px; + position: relative; + background: url(/images/ratings/star_rating.gif) top left repeat-x; +} +.star-rating li{ + padding:0px; + margin:0px; + float: right; +} +.star-rating li a{ + display:block; + width:16px; + height: 15px; + text-decoration: none; + text-indent: -9000px; + z-index: 20; + position: absolute; + padding: 0px; +} +.star-rating li a:hover{ + background: url(/images/ratings/star_rating.gif) left center; + z-index: 2; + left: 0px; +} +li.zero-stars a:hover { + background: url(/images/ratings/x.gif); + height: 15px; + left: 80px; + display: block; +} +a.zero-stars { + background: url(/images/ratings/x_off.gif); + height: 15px; + left: 80px; + display: block; +} +a.one-stars{ + left: 0px; +} +a.one-stars:hover{ + width:16px; +} +a.two-stars{ + left:16px; +} +a.two-stars:hover{ + width: 32px; +} +a.three-stars{ + left: 32px; +} +a.three-stars:hover{ + width: 48px; +} +a.four-stars{ + left: 48px; +} +a.four-stars:hover{ + width: 64px; +} +a.five-stars{ + left: 64px; +} +a.five-stars:hover{ + width: 80px; +} +li.current-rating{ + background: url(/images/ratings/star_rating.gif) left bottom; + position: absolute; + height: 15px; + display: block; + text-indent: -9000px; + z-index: 1; +} +.confirmation-box { + padding-left:5px; + padding-top:5px; + padding-right:5px; + margin-bottom:10px; + display: table-cell; + background-color: #bbbbbb; + border-right:2px solid #000000; + border-bottom:2px solid #000000; + border-left:2px solid #000000; + border-top:2px solid #000000;} +.text-action, .text-action li { + margin-top:5px; + list-style: none; + margin-bottom:5px; + padding-left:0px; +} +.text-action a, .text-action span { + background: #dddddd; + border:1px solid #000000; + padding-left:2px; + padding-right:2px; + text-decoration: none; +} +.text-action #pt_active { + background: #000000; + color: #ffffff; + border:1px solid #dddddd; +} +#nowplaying { + background: #bbbbbb; +} +.np_row { + display:block; + background: #dddddd; + padding-top: 3px; + padding-bottom: 3px; +} +.np_cell { + display: inline; + margin: 10px; +} +#tablist { + padding: 3px 0; + margin: 12px 0 0 0; + font: bold 12px Verdana, sans-serif; +} + +#tablist li { + list-style: none; + margin: 0; + display: inline; +} + +#tablist li a { + padding: 3px 0.5em; + margin-left: 3px; + border: 1px solid #cccccc; + border-bottom: none; + background: #dddddd; + text-decoration: none; +} + +#tablist li a:link { color: #222222; } +#tablist li a:visited { color: #000000; } + +#tablist li a:hover { + color: #000000; + background: #bbbbbb; + border-color: #000000; +} + +#tablist li a#current { + color: #000000; + background: #bbbbbb; + border-color: #000000; + border-bottom: 1px solid #000000; +} + diff --git a/templates/header.inc b/templates/header.inc index a6928b2b..542f556e 100644 --- a/templates/header.inc +++ b/templates/header.inc @@ -33,23 +33,22 @@ if (conf('use_rss')) { ?> <link rel="alternate" type="application/rss+xml" title="<?php echo conf('rss_main_title'); ?>" href="<?php echo $web_path; ?>/rss.php" /> <?php } ?> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" /> -<?php require (conf('prefix') . '/templates/basestyle.inc.php'); show_template('style'); ?> <title><?php echo conf('site_title'); ?> - <?php echo $location['title']; ?></title> </head> <body> +<link rel="stylesheet" href="<?php echo $web_path; ?>/templates/default.css" type="text/css"> <script src="<?php echo $web_path; ?>/lib/general.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/kajax/ajax.js" language="javascript" type="text/javascript"></script> <div id="maincontainer"> <div id="topbar"><!-- This is the topbar row --> <div id="topbarleft"> <a href="http://www.ampache.org"> - <img class="pageheader" src="<?php echo $web_path; ?><?php echo conf('theme_path'); ?>/images/ampache.gif" border="0" title="Ampache: For the love of music" alt="Ampache: For the love of music" /> + <img src="<?php echo $web_path; ?><?php echo conf('theme_path'); ?>/images/ampache.gif" border="0" title="Ampache: For the love of music" alt="Ampache: For the love of music" /> </a> </div><!--End topbarleft --> <div id="topbarright"> <a href="http://www.ampache.org/index.php">Ampache v.<?php echo conf('version'); ?></a><br /> - <b><?php echo _("You are currently logged in as") . " " . $GLOBALS['user']->fullname; ?></b> - <br /> + <b><?php echo _('You are currently logged in as') . " " . $GLOBALS['user']->fullname; ?></b> </div> <!-- End topbarright --> </div><!-- End topbar --> <div id="sidebar"><!-- This is the sidebar --> diff --git a/templates/show_login_form.inc b/templates/show_login_form.inc index 7cb8a01b..3032bec3 100644 --- a/templates/show_login_form.inc +++ b/templates/show_login_form.inc @@ -19,6 +19,37 @@ */ ?> + +<div id="container"> + <h1><span><?php echo conf('site_title'); ?></span></h1> + <div> + <p id="loginp_0"><?php echo conf('site_title'); ?></p> + <form name="login" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ; ?>/login.php" style="Display:inline"> + <p class="loginp_1"><span><?php echo _('Login'); ; ?>:</span> + <input class="text_input" type="text" name="username" value="<?php echo $_REQUEST['username']; ; ?>" /></p> + <p class="loginp_1"><span><?php echo _('Password'); ; ?>:</span> + <input class="text_input" type="password" name="password" value="" /></p> + <p class="loginp_1"><?php echo _('Remember Me'); ?><input class="check_input" type="checkbox" name="rememberme" /></p> + <?php echo conf('login_message'); ; ?> + <?php $GLOBALS['error']->print_error('general'); ?> + <p><input class="button" type="submit" value="<?php echo _('Login'); ?>" /></p> + <input type="hidden" name="referrer" value="<?php echo $referrer; ?>" /> + <input type="hidden" name="action" value="login" /> + </form> + </div> +</div> + + +<?php +if (conf('allow_public_registration')) { ?> + <p align="center"> + [<a class="header2" href="<?php echo conf('web_path'); ?>/register.php"><?php echo _('Register'); ?></a>] + </p> +<?php } // end if (conf('allow_public_registration')) + + +exit(); +?> <br /><br /> <p align="center"> <a href="http://www.ampache.org"><img src="<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache.gif" title="<?php echo conf('site_title'); ?>" border="0" alt="Ampache" /> diff --git a/templates/show_preferences.inc b/templates/show_preferences.inc index 701cb488..fab54b53 100644 --- a/templates/show_preferences.inc +++ b/templates/show_preferences.inc @@ -31,7 +31,7 @@ * and display the information accordingly */ $current_tab = scrub_in($_REQUEST['tab']); -if (!$current_tab) { $current_tab = 'theme'; } +if (!$current_tab) { $current_tab = 'interface'; } $link = conf('web_path') . $target; /* CSS construction bs */ @@ -56,15 +56,12 @@ if (($GLOBALS['user']->has_access(100)) AND ($user_id == '-1' AND conf('use_auth <div id="tabcontainer"> <ul id="tablist"> -<li <?php echo $tab_theme; ?>> - <a href="<?php echo $link; ?>?tab=theme&user_id=<?php echo $user_id; ?>" <?php echo $a_theme; ?>>Theme</a> +<li <?php echo $tab_interface; ?>> + <a href="<?php echo $link; ?>?tab=interface&user_id=<?php echo $user_id; ?>" <?php echo $a_interface; ?>>Interface</a> </li> <li <?php echo $tab_streaming; ?>> <a href="<?php echo $link; ?>?tab=streaming&user_id=<?php echo $user_id; ?>" <?php echo $a_streaming; ?>>Streaming</a> </li> -<li <?php echo $tab_interface; ?>> - <a href="<?php echo $link; ?>?tab=interface&user_id=<?php echo $user_id; ?>" <?php echo $a_interface; ?>>Interface</a> -</li> <li <?php echo $tab_options; ?>> <a href="<?php echo $link; ?>?tab=options&user_id=<?php echo $user_id; ?>" <?php echo $a_options; ?>>Options</a> </li> diff --git a/templates/style.inc b/templates/style.inc deleted file mode 100644 index a94c43a1..00000000 --- a/templates/style.inc +++ /dev/null @@ -1,222 +0,0 @@ -<?php -/* - - Copyright (c) 2001 - 2006 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 Style File - @discussion this is the css that is included on every page of - ampache, mod this to change the look and feel of the site -*/ -?> -<style type="text/css"> -<!-- - body - { - padding-top: 0px; - margin-top: 0px; - margin-left: 0px; - margin-right: 0px; - background: <?php echo conf('bg_color1'); ?>; - font-family: <?php echo conf('font') ?>; - font-size: <?php echo conf('font_size'); ?>px; - color: <?php echo conf('font_color2'); ?>; - } - - p - { - color: <?php echo conf('font_color2'); ?>; - font-family: <?php echo conf('font')?>; - font-size: <?php echo conf('font_size'); ?>px; - } - a - { - color: <?php echo conf('font_color2') ?>; - font-family: <?php echo conf('font')?>; - } - a:visited - { - color: <?php echo conf('font_color2') ?>; - font-family: <?php echo conf('font')?>; - } - a:active - { - color: <?php echo conf('font_color2') ?>; - font-family: <?php echo conf('font')?>; - } - .text-box - { - display: table-cell; - padding-left:5px; - padding-top:5px; - padding-right:5px; - margin-bottom:10px; - background-color: <?php echo conf('base_color1'); ?>; - border-right:2px solid <?php echo conf('bg_color2'); ?>; - border-bottom:2px solid <?php echo conf('bg_color2'); ?>; - border-left:2px solid <?php echo conf('bg_color2'); ?>; - border-top:2px solid <?php echo conf('bg_color2'); ?>; - } - .selected_button - { - background-color: black;color:white; - } - .unselected_button - { - /* there really isn't anything for this */ - } - .npsong - { - background: #FFFF66; - font-weight: bold; - } - .nodisplay { display: none;} - .display {} - #mpdpl td { - padding: 0px 2px 0px 2px; - text-align: left; - } - table.tabledata - { - } - - td - { - padding: 0px 8px 0px 8px; - color: <?php echo conf('font_color2') ?>; - font-family: <?php echo conf('font')?>; - font-size: <?php echo conf('font_size'); ?>px; - } - th - { - padding-right: 10px; - } - input - { - color: <?php echo conf('font_color2'); ?>; - font-family: <?php echo conf('font'); ?>; - font-size: <?php echo conf('font_size'); ?>px; - font-weight: bold; - background-color: <?php echo conf('base_color2') ?>; - margin: 2px 2px 2px 2px; - } - select { - color: <?php echo conf('font_color2'); ?>; - font-family: <?php echo conf('font')?>; - font-size: <?php echo conf('font_size'); ?>px; - background-color: <?php echo conf('base_color2'); ?>; - } - textarea - { - background-color: <?php echo conf('base_color2'); ?>; - color: <?php echo conf('font_color2') ?>; - font-family: <?php echo conf('font')?>; - font-size: <?php echo conf('font_size'); ?>px; - } - .table-header - { - background: url(<?php echo conf('web_path'); ?><?php echo conf('theme_path'); ?>/images/ampache-light-bg.gif) <?php echo conf('base_color2')?> repeat-x; - vertical-align: top; - } - .header1 - { - color: <?php echo conf('font_color2'); ?>; - font-family: <?php echo conf('font'); ?>; - font-size: <?php echo conf('font_size') + 6; ?>px; - font-weight: 900; - } - .header2 - { - color: <?php echo conf('font_color2'); ?>; - font-family: <?php echo conf('font'); ?>; - font-size: <?php echo conf('font_size') + 2; ?>px; - font-weight: 900; - } - .headrow - { - background:<?php echo conf('row_color1'); ?>; - font-size: <?php echo conf('font_size'); ?>px; - } - .odd - { - background:<?php echo conf('row_color2'); ?>; - font-size: <?php echo conf('font_size'); ?>px; - } - .even - { - background:<?php echo conf('row_color3'); ?>; - font-size: <?php echo conf('font_size'); ?>px; - } - .blank - { - background: #fff; - } - .border - { - background:<?php echo conf('bg_color2'); ?>; - } - .header - { - font-size: <?php echo conf('font_size'); ?>px; - } - .error - { - color: <?php echo conf('error_color'); ?>; - } - .fatalerror - { - padding-top: 3px; - padding-left: 3px; - padding-right: 3px; - display: table-cell; - padding-bottom: 3px; - color: <?php echo conf('error_color'); ?>; - border-right:4px solid <?php echo conf('error_color'); ?>; - border-bottom:4px solid <?php echo conf('error_color'); ?>; - border-left:4px solid <?php echo conf('error_color'); ?>; - border-top:4px solid <?php echo conf('error_color'); ?>; - font-size: <?php echo conf('font_size')+2; ?>px; - font-weight: 900; - text-align: center; - } - .disabled - { - text-decoration: line-through; - } - .alphabet - { - font-size: <?php echo conf('font_size'); ?>px; - font-weight: normal; - } - .smallbutton - { - border:0px; - padding-left:1px; - padding-right:1px; - font-size: <?php echo conf('font_size') - 1; ?>px; - cursor: pointer; - } -/* These three lines make a menu vertical */ - #content { float: none; } - #sidebar li { float: none; } - #sidebar li ul { margin: -1.5em 0 0 9em; } - ---> -</style> diff --git a/themes/classic/images/ampache.gif b/themes/classic/images/ampache.gif Binary files differindex fb110191..b085c7f2 100755 --- a/themes/classic/images/ampache.gif +++ b/themes/classic/images/ampache.gif diff --git a/themes/classic/images/bg_login_0.jpg b/themes/classic/images/bg_login_0.jpg Binary files differnew file mode 100644 index 00000000..ea53491c --- /dev/null +++ b/themes/classic/images/bg_login_0.jpg diff --git a/themes/classic/images/bg_login_1.jpg b/themes/classic/images/bg_login_1.jpg Binary files differnew file mode 100644 index 00000000..ee10fe66 --- /dev/null +++ b/themes/classic/images/bg_login_1.jpg |