diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 07:31:05 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 07:31:05 +0000 |
commit | a31560aec4f004e58930277758f5412d86c62adc (patch) | |
tree | 845ff6947d26b22a0f4527901dbefc97bca89d78 /templates | |
parent | 8b27d66add7ca9ba57d7e9488612cb54be4b11c1 (diff) | |
download | ampache-a31560aec4f004e58930277758f5412d86c62adc.tar.gz ampache-a31560aec4f004e58930277758f5412d86c62adc.tar.bz2 ampache-a31560aec4f004e58930277758f5412d86c62adc.zip |
it technically logs in and streams.. but thats it, complete rewrite almost everything broken
Diffstat (limited to 'templates')
-rw-r--r-- | templates/header.inc.php (renamed from templates/header.inc) | 27 | ||||
-rw-r--r-- | templates/install.css | 37 | ||||
-rw-r--r-- | templates/javascript_refresh.inc.php | 4 | ||||
-rw-r--r-- | templates/show_admin_info.inc.php | 14 | ||||
-rw-r--r-- | templates/show_admin_tools.inc.php | 5 | ||||
-rw-r--r-- | templates/show_all_recent.inc.php | 1 | ||||
-rw-r--r-- | templates/show_box.inc.php | 4 | ||||
-rw-r--r-- | templates/show_flagged.inc.php | 6 | ||||
-rw-r--r-- | templates/show_index.inc.php | 14 | ||||
-rw-r--r-- | templates/show_local_catalog_info.inc.php | 30 | ||||
-rw-r--r-- | templates/show_login_form.inc | 31 | ||||
-rw-r--r-- | templates/show_playtype_switch.inc.php | 10 | ||||
-rw-r--r-- | templates/show_random_albums.inc.php | 6 | ||||
-rw-r--r-- | templates/show_recently_played.inc.php | 6 | ||||
-rw-r--r-- | templates/show_test.inc | 63 | ||||
-rw-r--r-- | templates/show_user_stats.inc.php | 14 | ||||
-rw-r--r-- | templates/sidebar.inc.php | 20 | ||||
-rw-r--r-- | templates/subnavbar.inc.php | 4 |
18 files changed, 123 insertions, 173 deletions
diff --git a/templates/header.inc b/templates/header.inc.php index 44bc37f1..3ce776bf 100644 --- a/templates/header.inc +++ b/templates/header.inc.php @@ -18,8 +18,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = conf('web_path'); -$htmllang = str_replace("_","-",conf('lang')); + +if (INIT_LOADED != '1') { exit; } + +$web_path = Config::get('web_path'); +$htmllang = str_replace("_","-",Config::get('lang')); $location = get_location(); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -28,8 +31,8 @@ $location = get_location(); <head> <link rel="shortcut icon" href="<?php echo $web_path; ?>/favicon.ico" /> <?php -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" /> +if (Config::get('use_rss')) { ?> +<link rel="alternate" type="application/rss+xml" title="<?php echo Config::get('rss_main_title'); ?>" href="<?php echo $web_path; ?>/rss.php" /> <link rel="alternate" type="application/rss+xml" title="Ampache Latest Artists Additions" href="<?php echo $web_path; ?>/rss.php?type=latestartist" /> <link rel="alternate" type="application/rss+xml" title="Ampache Latest Albums Additions" href="<?php echo $web_path; ?>/rss.php?type=latestalbum" /> <link rel="alternate" type="application/rss+xml" title="Ampache Most Popular Albums" href="<?php echo $web_path; ?>/rss.php?type=popularalbum" /> @@ -37,9 +40,9 @@ if (conf('use_rss')) { ?> <link rel="alternate" type="application/rss+xml" title="Ampache Most Popular Songs" href="<?php echo $web_path; ?>/rss.php?type=popularsong" /> <link rel="alternate" type="application/rss+xml" title="Ampache Recently Played" href="<?php echo $web_path; ?>/rss.php?type=recentlyplayed" /> <?php } ?> -<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo conf('site_charset'); ?>" /> -<title><?php echo conf('site_title'); ?> - <?php echo $location['title']; ?></title> -<link rel="stylesheet" href="<?php echo $web_path; ?><?php echo conf('theme_path'); ?>/templates/default.css" type="text/css" media="screen" /> +<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=<?php echo Config::get('site_charset'); ?>" /> +<title><?php echo Config::get('site_title'); ?> - <?php echo $location['title']; ?></title> +<link rel="stylesheet" href="<?php echo $web_path; ?><?php echo Config::get('theme_path'); ?>/templates/default.css" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php echo $web_path; ?>/templates/print.css" type="text/css" media="print" /> <link rel="stylesheet" href="<?php echo $web_path; ?>/templates/handheld.css" type="text/css" media="handheld" /> </head> @@ -57,23 +60,23 @@ if (conf('use_rss')) { ?> <div id="topbar"><!-- This is the topbar row --> <div id="topbarleft"> <a href="http://www.ampache.org"> - <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" /> + <img src="<?php echo $web_path; ?><?php echo Config::get('theme_path'); ?>/images/ampache.png" 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 /> + <a href="http://www.ampache.org/index.php">Ampache v.<?php echo Config::get('version'); ?></a><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 --> - <?php require_once(conf('prefix') . '/templates/sidebar.inc.php'); ?> + <?php require_once(Config::get('prefix') . '/templates/sidebar.inc.php'); ?> </div><!-- End sidebar --> <div id="content"> <!-- I hate IE... --> <table class="smeg-ie"><tr><td> -<?php if (conf('int_config_version') != conf('config_version') AND $GLOBALS['user']->has_access(100)) { ?> +<?php if (Config::get('int_config_version') != Config::get('config_version') AND $GLOBALS['user']->has_access(100)) { ?> <div class="fatalerror"> <?php echo _('Error Config File Out of Date'); ?> - <a href="<?php echo conf('web_path'); ?>/admin/system.php?action=generate_config"><?php echo _('Generate New Config'); ?></a> + <a href="<?php echo Config::get('web_path'); ?>/admin/system.php?action=generate_config"><?php echo _('Generate New Config'); ?></a> </div> <?php } ?> diff --git a/templates/install.css b/templates/install.css index 5a23b1c5..5faade68 100644 --- a/templates/install.css +++ b/templates/install.css @@ -1,34 +1,10 @@ -<!-- -/* - - 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. -*/ ---> - -<style type="text/css"> -<!-- body { font-family:Arial, Helvetica, sans-serif; font-size: 1em; - margin: 0; - padding: 0; - text-align: center; - background: #FFFFFF url(images/top_bg.jpg) repeat-x top left; + margin: 0; + padding: 0; + text-align: center; + background: #FFFFFF url(../images/top_bg.jpg) repeat-x top left; } /* Header */ @@ -133,8 +109,3 @@ margin:10px 10 10px 10px; #bottom p { font-size:10px; } - ---> -</style> - - diff --git a/templates/javascript_refresh.inc.php b/templates/javascript_refresh.inc.php index 5a7d7874..c53c9cd8 100644 --- a/templates/javascript_refresh.inc.php +++ b/templates/javascript_refresh.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -23,7 +23,7 @@ <script type="text/javascript" language="javascript"> <!-- Begin // Set refresh interval (in seconds) -var refreshinterval=<?php echo conf('refresh_limit'); ?>; +var refreshinterval=<?php echo Config::get('refresh_limit'); ?>; function doLoad() { diff --git a/templates/show_admin_info.inc.php b/templates/show_admin_info.inc.php index c8ecb222..ddf2a77b 100644 --- a/templates/show_admin_info.inc.php +++ b/templates/show_admin_info.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -18,24 +18,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = conf('web_path'); +$web_path = Config::get('web_path'); /* Flagged Information Gathering */ -$flag = new Flag(); -$flagged = $flag->get_recent(10); +$flagged = Flag::get_recent(10); /* Disabled Information Gathering */ -$catalog = new Catalog(); -$songs = $catalog->get_disabled(10); +$songs = Catalog::get_disabled(10); ?> <?php show_box_top(_('Last Ten Flagged Records')); ?> - <?php require (conf('prefix') . '/templates/show_flagged.inc.php'); ?> + <?php require Config::get('prefix') . '/templates/show_flagged.inc.php'; ?> <?php show_box_bottom(); ?> <?php show_box_top(_('Disabled Songs')); ?> <!-- Show Last 10 Disabled Songs --> - <?php require (conf('prefix') . '/templates/show_disabled_songs.inc'); ?> + <?php require Config::get('prefix') . '/templates/show_disabled_songs.inc'; ?> <div class="text-action"> <a href="<?php echo $web_path; ?>/admin/catalog.php?action=show_disabled"><?php echo _('Show All'); ?>...</a> </div> diff --git a/templates/show_admin_tools.inc.php b/templates/show_admin_tools.inc.php index 7dcb2efc..02237e59 100644 --- a/templates/show_admin_tools.inc.php +++ b/templates/show_admin_tools.inc.php @@ -19,9 +19,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = conf('web_path'); -$catalog = new Catalog(); -$catalogs = $catalog->get_catalogs(); +$web_path = Config::get('web_path'); +$catalogs = Catalog::get_catalogs(); ?> <?php show_box_top(_('Catalogs')); ?> diff --git a/templates/show_all_recent.inc.php b/templates/show_all_recent.inc.php index e0867f0d..5b30f8ed 100644 --- a/templates/show_all_recent.inc.php +++ b/templates/show_all_recent.inc.php @@ -20,6 +20,7 @@ */ ?> +<table> <tr> <td valign="top"> <?php show_info_box(_('Newest Artist Additions'), '', $artists); ?> diff --git a/templates/show_box.inc.php b/templates/show_box.inc.php index 9e76be58..75201d3e 100644 --- a/templates/show_box.inc.php +++ b/templates/show_box.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -24,7 +24,7 @@ <?php if (count($items)) { ?> <?php foreach ($items as $item) { - echo "<li>".$item->link."</li>\n"; + echo "<li>".$item->f_link."</li>\n"; } ?> <?php } else { echo '<span class="error">' . _('Not Enough Data') . '</span>'; } ?> diff --git a/templates/show_flagged.inc.php b/templates/show_flagged.inc.php index 5a6dec51..0860d805 100644 --- a/templates/show_flagged.inc.php +++ b/templates/show_flagged.inc.php @@ -19,9 +19,9 @@ */ -$web_path = conf('web_path'); +$web_path = Config::get('web_path'); ?> -<form id="songs" method="post" enctype="multipart/form-data" action="<?php echo conf('web_path'); ?>/admin/flag.php?action=reject_flags"> +<form id="songs" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/admin/flag.php?action=reject_flags"> <table class="tabledata" cellspacing="0" cellpadding="0"> <tr class="table-header"> <th><a href="#" onclick="check_select('song'); return false;"><?php echo _('Select'); ?></a></th> @@ -37,7 +37,7 @@ $web_path = conf('web_path'); <td align="center"> <input type="checkbox" name="song[]" value="<?php echo $flag->id; ?>" id="song_<?php echo $flag->id; ?>" /> </td> - <td><a href="<?php echo conf('web_path'); ?>/admin/flag.php?action=show_edit_song&song=<?php echo $flag->object_id; ?>"><?php $flag->print_name(); ?></a></td> + <td><a href="<?php echo Config::get('web_path'); ?>/admin/flag.php?action=show_edit_song&song=<?php echo $flag->object_id; ?>"><?php $flag->print_name(); ?></a></td> <td><?php echo scrub_out($flag->f_user_username); ?></td> <td><?php $flag->print_flag(); ?></td> <td><?php echo scrub_out($flag->comment); ?></td> diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index f9536acf..525ddc07 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.inc.php @@ -21,10 +21,8 @@ ?> <?php if (isset($_REQUEST['xspf']) && isset ($_REQUEST['play_info'])){ - -require_once(conf('prefix') . '/templates/show_embed_xspf.inc.php'); + require_once Config::get('prefix') . '/templates/show_embed_xspf.inc.php'; } - ?> <div id="np_data"> @@ -34,16 +32,20 @@ require_once(conf('prefix') . '/templates/show_embed_xspf.inc.php'); <div id="random_selection"> <?php $albums = get_random_albums('6'); - if (count($albums)) { require_once(conf('prefix') . '/templates/show_random_albums.inc.php'); } + if (count($albums)) { require_once Config::get('prefix') . '/templates/show_random_albums.inc.php'; } ?> </div> <div id="recently_played"> <?php $data = get_recently_played(); - if (count($data)) { require_once(conf('prefix') . '/templates/show_recently_played.inc.php'); } + if (count($data)) { require_once Config::get('prefix') . '/templates/show_recently_played.inc.php'; } ?> </div> <div id="catalog_info"> <?php show_local_catalog_info(); ?> </div> - +<div id="recent_added"> + <?php show_box_top(); ?> + <?php show_all_recent('5'); ?> + <?php show_box_bottom(); ?> +</div> diff --git a/templates/show_local_catalog_info.inc.php b/templates/show_local_catalog_info.inc.php index a9704de3..dd6d1802 100644 --- a/templates/show_local_catalog_info.inc.php +++ b/templates/show_local_catalog_info.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All Rights Reserved this program is free software; you can redistribute it and/or @@ -23,20 +23,24 @@ <?php show_box_top(_('Catalog Statistics')); ?> <table cellspacing="1" cellpadding="3" width="100%" border="0"> <tr class="table-header"> - <td><?php echo _("Connected Users"); ?></td> - <td><?php echo _("Total Users"); ?></td> - <td><?php echo _("Albums"); ?></td> - <td><?php echo _("Artists"); ?></td> - <td><?php echo _("Songs"); ?></td> - <td><?php echo _("Catalog Size"); ?></td> - <td><?php echo _("Catalog Time"); ?></td> + <td><?php echo _('Connected Users'); ?></td> + <td><?php echo _('Total Users'); ?></td> + <td><?php echo _('Albums'); ?></td> + <td><?php echo _('Artists'); ?></td> + <td><?php echo _('Songs'); ?></td> + <td><?php echo _('Genres'); ?></td> + <td><?php echo _('Folders'); ?></td> + <td><?php echo _('Catalog Size'); ?></td> + <td><?php echo _('Catalog Time'); ?></td> </tr> <tr> - <td><?php echo $connected_users[0]; ?></td> - <td><?php echo $users[0]; ?></td> - <td><?php echo $albums[0]; ?></td> - <td><?php echo $artists[0]; ?></td> - <td><?php echo $songs['songs']; ?></td> + <td><?php echo $results['connected']; ?></td> + <td><?php echo $results['users'] ?></td> + <td><?php echo $results['albums']; ?></td> + <td><?php echo $results['artists']; ?></td> + <td><?php echo $results['songs']; ?></td> + <td><?php echo $results['genres']; ?></td> + <td><?php echo $results['folders']; ?></td> <td><?php echo $total_size; ?> <?php echo $size_unit; ?></td> <td><?php echo $time_text; ?></td> </tr> diff --git a/templates/show_login_form.inc b/templates/show_login_form.inc index 7ff9bbe3..b46d77ff 100644 --- a/templates/show_login_form.inc +++ b/templates/show_login_form.inc @@ -1,6 +1,6 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All Rights Reserved This program is free software; you can redistribute it and/or @@ -21,29 +21,44 @@ /* Check and see if their remember me is the same or lower then local * if so disable the checkbox */ -if (conf('local_length') >= conf('remember_length')) { +if (Config::get('session_length') >= Config::get('remember_length')) { $remember_disabled = 'disabled="disabled"'; } +$htmllang = str_replace("_","-",Config::get('lang')); ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=<?php echo Config::get('site_charset'); ?>" /> +<link rel="shortcut icon" href="<?php echo Config::get('web_path'); ?>/favicon.ico" /> +<link rel="stylesheet" href="templates/print.css" type="text/css" media="print" /> +<link rel="stylesheet" href="templates/handheld.css" type="text/css" media="handheld" /> +<link rel="stylesheet" href="<?php echo Config::get('web_path'); ?><?php echo Config::get('theme_path'); ?>/templates/default.css" type="text/css" media="screen" /> +<title> <?php echo Config::get('site_title'); ?> </title> +<script type="text/javascript" language="javascript"> +function focus(){ document.login.username.focus(); } +</script> +</head> +<body bgcolor="#D3D3D3" onload="focus();"> <div id="container"> - <h1><span><?php echo conf('site_title'); ?></span></h1> + <h1><span><?php echo Config::get('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 id="loginp_0"><?php echo Config::get('site_title'); ?></p> + <form name="login" method="post" enctype="multipart/form-data" action="<?php echo Config::get('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" <?php echo $remember_disabled; ?> /></p> - <?php echo conf('login_message'); ; ?> - <?php $GLOBALS['error']->print_error('general'); ?> + <?php echo Config::get('login_message'); ?> + <?php Error::display('general'); ?> <p><input class="button" type="submit" value="<?php echo _('Login'); ?>" /></p> <input type="hidden" name="referrer" value="<?php echo scrub_out($_SERVER['HTTP_REFERRER']); ?>" /> <input type="hidden" name="action" value="login" /> </form> - <?php if (conf('allow_public_registration')) { ?> + <?php if (Config::get('allow_public_registration')) { ?> <span class="text-action"> <a href="<?php echo conf('web_path'); ?>/register.php"><?php echo _('Register'); ?></a> </span> diff --git a/templates/show_playtype_switch.inc.php b/templates/show_playtype_switch.inc.php index 47427b15..3f30002f 100644 --- a/templates/show_playtype_switch.inc.php +++ b/templates/show_playtype_switch.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -26,13 +26,13 @@ if (has_preference_access('play_type')){ ?> <!--<select id="play_type_switch" style="font-size:0.9em;" name="type"> --> <select id="play_type_switch" name="type" onchange="ajaxPut('<?php echo $ajax_url; ?>?action=change_play_type<?php echo $required_info; ?>');return true;"> - <?php if (conf('allow_stream_playback')) { ?> + <?php if (Config::get('allow_stream_playback')) { ?> <option value="stream" <?php echo $is_stream; ?>><?php echo _('Stream'); ?></option> - <?php } if (conf('allow_localplay_playback')) { ?> + <?php } if (Config::get('allow_localplay_playback')) { ?> <option value="localplay" <?php echo $is_localplay; ?>><?php echo _('Localplay'); ?></option> - <?php } if (conf('allow_downsample_playback')) { ?> + <?php } if (Config::get('allow_downsample_playback')) { ?> <option value="downsample" <?php echo $is_downsample; ?>><?php echo _('Downsample'); ?></option> - <?php } if (conf('allow_democratic_playback')) { ?> + <?php } if (Config::get('allow_democratic_playback')) { ?> <option value="democratic" <?php echo $is_democratic; ?>><?php echo _('Democratic'); ?></option> <?php } ?> <option value="xspf_player" <?php echo $is_xspf_player; ?>><?php echo _('XSPF Player'); ?></option> diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php index f20db3f6..a64e203b 100644 --- a/templates/show_random_albums.inc.php +++ b/templates/show_random_albums.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = conf('web_path'); +$web_path = Config::get('web_path'); ?> <?php show_box_top(_('Albums of the Moment')); ?> <table class="tabledata"> @@ -31,7 +31,7 @@ $web_path = conf('web_path'); ?> <td> <a href="<?php echo $web_path; ?>/albums.php?action=show&album=<?php echo $album_id; ?>"> - <?php if (conf('show_album_art')) { ?> + <?php if (Config::get('show_album_art')) { ?> <img src="<?php echo $web_path; ?>/image.php?thumb=3&id=<?php echo $album_id; ?>" width="80" height="80" border="0" alt="<?php echo $name; ?>" title="<?php echo $name; ?>" /> <?php } else { ?> <?php echo '[' . $album->f_artist . '] ' . $album->f_name; ?> diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php index f4df01b6..dc32d644 100644 --- a/templates/show_recently_played.inc.php +++ b/templates/show_recently_played.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -46,11 +46,11 @@ $time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days a $time_string = $final . ' ' . $time_unit[$time_place]; - $song->format_song(); + $song->format(); ?> <tr> <td> - <a href="<?php echo conf('web_path'); ?>/stats.php?action=user_stats&user_id=<?php echo scrub_out($row_user->id); ?>"> + <a href="<?php echo Config::get('web_path'); ?>/stats.php?action=user_stats&user_id=<?php echo scrub_out($row_user->id); ?>"> <?php echo scrub_out($row_user->fullname); ?> </a> </td> diff --git a/templates/show_test.inc b/templates/show_test.inc index f455021c..2ae2d10e 100644 --- a/templates/show_test.inc +++ b/templates/show_test.inc @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All Rights Reserved this program is free software; you can redistribute it and/or @@ -19,17 +19,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -$row_classes = array('even','odd'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html lang="en-US"> <head> -<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Ampache -- Debug Page</title> </head> <body bgcolor="#f0f0f0"> -<?php require_once('templates/install.css'); ?> +<link rel="stylesheet" href="templates/install.css" type="text/css" media="screen" /> <div id="header"> <h1><?php echo _('Ampache Debug'); ?></h1> <p><?php echo _('You\'ve reached this page because a configuration error has occured. Debug Information below'); ?></p> @@ -155,12 +153,10 @@ $row_classes = array('even','odd'); <td valign="top"><?php echo _('Ampache.cfg.php Exists'); ?></td> <td valign="top">[ <?php - if (!read_config_file($configfile)) { - $status['read_config'] = 'false'; + if (!is_readable($configfile)) { echo " <font color=\"red\">ERROR</font> "; } else { - $status['read_config'] = 'true'; echo " <font color=\"green\"> OK   </font> "; } ?> @@ -177,70 +173,25 @@ $row_classes = array('even','odd'); </td> <td valign="top">[ <?php - $results = read_config($configfile, 0, 0); + $results = @parse_ini_file($configfile); if (!check_config_values($results)) { - $status['parse_config'] = 'false'; echo " <font color=\"red\">ERROR</font> "; } else { - $status['parse_config'] = 'true'; echo " <font color=\"green\"> OK </font> "; } ?> ] </td> <td> - <?php echo _("This test makes sure that you have set all of the required configuration variables and that we are able to - completely parse your config file"); - echo " <font color=\"red\">"; - $error->print_error('log_path'); - echo " </font> "; - ?> - </td> -</tr> -<tr> - <td valign="top"> - <?php echo _("Ampache.cfg.php Up to Date?"); ?> - </td> - <td valign="top">[ - <?php - $difference = debug_compare_configs($configfile,$configfile . ".dist"); - if (count($difference)) { - $status['check_config_uptodate'] = 'false'; - echo " <font color=\"red\">ERROR</font> "; - } - else { - $status['check_config_uptodate'] = 'true'; - echo " <font color=\"green\"> OK </font> "; - } - ?> - ] - </td> - <td> - <?php if (count($difference)) { - echo _('Ampache.cfg.php is missing the following:'); - echo "<br /><dl style=\"text-align:left;\">\n"; - foreach ($difference as $key=>$value) { - if (is_array($value)) { - foreach ($value as $element) { - echo "\t<dd>$key = \"$element\"</dd>\n"; - } - } - else { - echo "\t<dd>$key = \"$value\"</dd>\n"; - } - } - echo "</dl><br />\n"; - } else { ?> - - <?php } ?> + <?php echo _("This test makes sure that you have set all of the required configuration variables and that we are able to completely parse your config file"); ?> </td> </tr> <tr> <td valign="top"><?php echo _("DB Connection"); ?></td> <td valign="top">[ <?php - $db = check_database($results['local_host'], $results['local_username'], $results['local_pass'],$results['local_db']); + $db = check_database($results['database_hostname'], $results['database_username'], $results['database_password'],$results['database_name']); if (!$db) { $status['check_db'] = 'false'; echo " <font color=\"red\">ERROR</font> "; diff --git a/templates/show_user_stats.inc.php b/templates/show_user_stats.inc.php index ab962874..2e9e4f84 100644 --- a/templates/show_user_stats.inc.php +++ b/templates/show_user_stats.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -26,7 +26,9 @@ <?php if (count($favorite_artists)) { $items = $working_user->format_favorites($favorite_artists); - show_info_box(_('Favorite Artists'),'artist',$items); + $title = '<a href="' . Config::get('web_path') . '/stats.php?action=play_favorite&type=artists">' . + get_user_icon('all') . '</a> ' . _('Favorite Artists'); + show_info_box($title,'artist',$items); } else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; @@ -37,7 +39,9 @@ <?php if (count($favorite_albums)) { $items = $working_user->format_favorites($favorite_albums); - show_info_box(_('Favorite Albums'),'album',$items); + $title = '<a href="' . Config::get('web_path') . '/stats.php?action=play_favorite&type=albums">' . + get_user_icon('all') . '</a> ' . _('Favorite Albums'); + show_info_box($title,'album',$items); } else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; @@ -48,7 +52,9 @@ <?php if (count($favorite_songs)) { $items = $working_user->format_favorites($favorite_songs); - show_info_box(_('Favorite Songs'),'your_song',$items); + $title = '<a href="' . Config::get('web_path') . '/stats.php?action=play_favorite&type=songs">' . + get_user_icon('all') . '</a> ' . _('Favorite Songs'); + show_info_box($title,'your_song',$items); } else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index 6f55def1..f219945b 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -22,7 +22,7 @@ /** * This is kind of the wrong place to do this, but let's define the different submenu's that could possibly be * displayed on this page, this calls the show_submenu($items); function which takes an array of items - * that have ['title'] ['url'] ['active'] and ['cssclass'] url assumes no conf('web_path') + * that have ['title'] ['url'] ['active'] and ['cssclass'] url assumes no Config::get('web_path') */ $admin_items[] = array('title'=>_('Users'),'url'=>'admin/users.php','active'=>$location['page'], 'cssclass'=>'sidebar_admin_users'); @@ -36,7 +36,7 @@ $browse_items[] = array('title'=>_("Artists"),'url'=>'artists.php','active'=>$lo $browse_items[] = array('title'=>_("Genre"),'url'=>'browse.php?action=genre','active'=>$location['page'], 'cssclass'=>'sidebar_browse_genre'); $browse_items[] = array('title'=>_('Song Title'),'url'=>'browse.php?action=song_title','active'=>$location['page'], 'cssclass'=>'sidebar_browse_song_title'); -$web_path = conf('web_path'); +$web_path = Config::get('web_path'); ?> <h3> </h3> @@ -163,29 +163,29 @@ $web_path = conf('web_path'); </form> </li> <?php } // end if ($GLOBALS['theme']['orientation'] != 'horizontal') ?> -<?php if ($GLOBALS['user']->prefs['localplay_level'] > 0 AND conf('allow_localplay_playback')) { ?> +<?php if ($GLOBALS['user']->prefs['localplay_level'] > 0 AND Config::get('allow_localplay_playback')) { ?> <li id="sidebar_localplay"> <a href="<?php echo $web_path; ?>/localplay.php"><?php echo _('Localplay'); ?></a> </li> <?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?> <li id="sidebar_localplay_ctrl"> - <?php require_once(conf('prefix') . '/templates/show_localplay_control.inc.php'); ?> + <?php require_once(Config::get('prefix') . '/templates/show_localplay_control.inc.php'); ?> </li> <?php } // if horizontal orientation ?> <?php } // if localplay access ?> <li> <?php - $required_info = conf('ajax_info'); - $ajax_url = conf('ajax_url'); + $required_info = Config::get('ajax_info'); + $ajax_url = Config::get('ajax_url'); ?> - <?php require_once(conf('prefix') . '/templates/show_playtype_switch.inc.php'); ?> + <?php require_once(Config::get('prefix') . '/templates/show_playtype_switch.inc.php'); ?> </li> -<?php if (conf('allow_democratic_playback')) { ?> +<?php if (Config::get('allow_democratic_playback')) { ?> <li> <a href="<?php echo $web_path; ?>/tv.php"><?php echo _('Democratic View'); ?></a> </li> <?php } // if democratic play ?> -<?php if (conf('use_auth')) { ?> +<?php if (Config::get('use_auth')) { ?> <li id="sidebar_logout"><a href="<?php echo $web_path; ?>/logout.php"><?php echo _('Logout'); ?></a></li> -<?php } // end (conf('use_auth'))?> +<?php } // end (Config::get('use_auth'))?> </ul> diff --git a/templates/subnavbar.inc.php b/templates/subnavbar.inc.php index d1ef38f1..8c960fae 100644 --- a/templates/subnavbar.inc.php +++ b/templates/subnavbar.inc.php @@ -1,7 +1,7 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + Copyright (c) 2001 - 2007 Ampache.org All rights reserved. This program is free software; you can redistribute it and/or @@ -34,6 +34,6 @@ } $li_id = "id=\"" . $item['cssclass'] . "\""; ?> - <li <?php echo $li_class; echo $li_id; ?>><a href="<?php echo conf('web_path') . "/" . $item['url']; ?>"><?php echo $item['title']; ?></a></li> + <li <?php echo $li_class; echo $li_id; ?>><a href="<?php echo Config::get('web_path') . "/" . $item['url']; ?>"><?php echo $item['title']; ?></a></li> <?php unset($li_id); } // END foreach ($items as $item) ?> </ul> |