summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php155
1 files changed, 76 insertions, 79 deletions
diff --git a/index.php b/index.php
index e8288bcf..581799cd 100644
--- a/index.php
+++ b/index.php
@@ -25,6 +25,7 @@
@discussion Do most of the dirty work of displaying the mp3 catalog
*/
+
require_once("modules/init.php");
/* We need to attempt to init the mpd object */
@@ -32,7 +33,6 @@ $myMpd = init_mpd();
show_template('header');
-
if (conf('refresh_limit') > 0) { show_template('javascript_refresh'); }
$action = scrub_in($_REQUEST['action']);
?>
@@ -46,89 +46,86 @@ $action = scrub_in($_REQUEST['action']);
</tr>
<tr>
<td valign="top">
- <!-- Left table -->
- <table border="0">
- <tr>
- <td valign="top" align="right">
- <?php show_local_catalog_info(); ?>
- </td>
- <td valign="top" align="left">
- <?php
- if ($user->prefs['play_type'] == 'mpd' && !conf('localplay_menu')) {
- show_mpd_control();
- } else {
- if ( $items = get_global_popular('album') ) {
- show_info_box(_("Most Popular Albums"), 'album',$items);
+ <table border="0"><!-- Left table -->
+ <tr>
+ <td valign="top" align="right">
+ <?php show_local_catalog_info(); ?>
+ </td>
+ <td valign="top" align="left">
+ <?php
+ if ($user->prefs['play_type'] == 'mpd' && !conf('localplay_menu')) {
+ show_mpd_control();
}
- }
+ else {
+ if ($items = get_global_popular('album')) {
+ show_info_box(_("Most Popular Albums"), 'album',$items);
+ }
+ }
+ ?>
+ </td>
+ </tr>
+ <tr><td colspan="2">&nbsp;</td></tr>
+ <?php
+ if ($user->prefs['play_type'] == 'mpd' && !conf('localplay_menu')) {
+ echo '<tr><td colspan="2" valign="top">';
+ show_mpd_pl();
+ echo '</td></tr>';
+ }
?>
- </td>
- </tr>
- <tr><td colspan="2">&nbsp;</td></tr>
-
- <?php
- if ($user->prefs['play_type'] == 'mpd' && !conf('localplay_menu')) {
- echo '<tr><td colspan="2" valign="top">';
- show_mpd_pl();
- echo '</td></tr>';
- }
- ?>
-
- <tr><td colspan="2">&nbsp;</td></tr>
- <tr>
- <td valign="top" align="right">
- <?php
- if ( $items = get_global_popular('artist') ) {
- show_info_box(_("Most Popular Artists"), 'artist', $items);
- }
- ?>
- </td>
- <td valign="top" align="left">
- <?php
- if ( $items = get_global_popular('song') ) {
- show_info_box(_("Most Popular Songs"), 'song', $items);
- }
- ?>
- </td>
- </tr>
- <tr><td colspan="2">&nbsp;</td></tr>
- <tr>
- <td valign="top" align="right">
- <?php
- if ( $items = get_newest('artist') ) {
- show_info_box(_("Newest Artist Additions"), '', $items);
- }
- ?>
- </td>
- <td valign="top" align="left">
- <?php
- if ( $items = get_newest('album') ) {
- show_info_box(_("Newest Album Additions"), '', $items);
- }
- ?>
- </td>
- </tr>
- </table>
+
+ <tr><td colspan="2">&nbsp;</td></tr>
+ <tr>
+ <td valign="top" align="right">
+ <?php
+ if ($items = get_global_popular('artist')) {
+ show_info_box(_("Most Popular Artists"), 'artist', $items);
+ }
+ ?>
+ </td>
+ <td valign="top" align="left">
+ <?php
+ if ($items = get_global_popular('song')) {
+ show_info_box(_("Most Popular Songs"), 'song', $items);
+ }
+ ?>
+ </td>
+ </tr>
+ <tr><td colspan="2">&nbsp;</td></tr>
+ <tr>
+ <td valign="top" align="right">
+ <?php
+ if ($items = get_newest('artist')) {
+ show_info_box(_("Newest Artist Additions"), '', $items);
+ }
+ ?>
+ </td>
+ <td valign="top" align="left">
+ <?php
+ if ($items = get_newest('album')) {
+ show_info_box(_("Newest Album Additions"), '', $items);
+ }
+ ?>
+ </td>
+ </tr>
+ </table><!-- End Left table -->
</td>
- <?php
- if($user->prefs['play_type'] == 'local_play') {
- ?>
+<?php
+if ($user->prefs['play_type'] == 'local_play') {
+?>
<td valign="top">
- <!-- Right table -->
- <table border="0">
- <tr>
- <td valign="top" rowspan="7">
- <?php show_local_control(); ?>
- echo "<br />";
- </td>
- </tr>
- </table>'
+ <table border="0"> <!-- Right table -->
+ <tr>
+ <td valign="top" rowspan="7">
+ <?php show_local_control(); ?>
+ echo "<br />";
+ </td>
+ </tr>
+ </table> <!-- End Right Table -->
</td>
- <!-- End Right Table -->
- <?php
- }
- ?>
+<?php
+}
+?>
</tr>
</table>
-
+<!-- End Big Daddy Table -->
<?php show_footer(); ?>