diff options
author | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-03-14 20:14:52 +0000 |
---|---|---|
committer | Paul 'flowerysong' Arthur <flowerysong00@yahoo.com> | 2010-03-14 20:14:52 +0000 |
commit | 1cb0983ed04c65e06d502ae2ac9ed6d5e31d70dc (patch) | |
tree | 54655ff3e692a71a17f1d37cd97374b263557ca1 /templates | |
parent | ef48bf3fbdca2a4d25f5d025f4c6ad23905e5369 (diff) | |
download | ampache-1cb0983ed04c65e06d502ae2ac9ed6d5e31d70dc.tar.gz ampache-1cb0983ed04c65e06d502ae2ac9ed6d5e31d70dc.tar.bz2 ampache-1cb0983ed04c65e06d502ae2ac9ed6d5e31d70dc.zip |
Cosmetics: remove trailing whitespace
Diffstat (limited to 'templates')
102 files changed, 565 insertions, 565 deletions
diff --git a/templates/footer.inc.php b/templates/footer.inc.php index 4d63a1e3..8a0ac738 100644 --- a/templates/footer.inc.php +++ b/templates/footer.inc.php @@ -29,7 +29,7 @@ </div> <!-- end id="maincontainer"--> <div id="footer"> <a href="http://www.ampache.org/index.php">Ampache v.<?php echo Config::get('version'); ?></a><br /> - Copyright (c) 2001 - 2010 Ampache.org + Copyright (c) 2001 - 2010 Ampache.org <?php echo _('Queries:'); ?><?php echo Dba::$stats['query']; ?> <?php echo _('Cache Hits:'); ?><?php echo database_object::$cache_hit; ?> </div> </body> diff --git a/templates/header.inc.php b/templates/header.inc.php index 7cda0e5f..41df950c 100644 --- a/templates/header.inc.php +++ b/templates/header.inc.php @@ -48,7 +48,7 @@ if (Config::get('use_rss')) { ?> <script src="<?php echo $web_path; ?>/lib/javascript-base.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/kajax/ajax.js" language="javascript" type="text/javascript"></script> <script src="<?php echo $web_path; ?>/modules/prototype/prototype.js" language="javascript" type="text/javascript"></script> -<!-- rfc3514 implementation --> +<!-- rfc3514 implementation --> <div id="rfc3514" style="display:none;">0x0</div> <div id="maincontainer"> <div id="header"><!-- This is the header --> @@ -71,7 +71,7 @@ if (Config::get('use_rss')) { ?> <div id="rightbar"><!-- This is the rightbar --> <?php require_once Config::get('prefix') . '/templates/rightbar.inc.php'; ?> </div><!-- End rightbar --> -<!-- Tiny little iframe, used to cheat the system --> +<!-- Tiny little iframe, used to cheat the system --> <div id="ajax-loading">Loading . . .</div> <iframe name="util_iframe" id="util_iframe" style="display:none;" src="<?php echo Config::get('web_path'); ?>/util.php"></iframe> <div id="content"> diff --git a/templates/list_header.inc.php b/templates/list_header.inc.php index 202dd8c2..f9ddb842 100644 --- a/templates/list_header.inc.php +++ b/templates/list_header.inc.php @@ -28,22 +28,22 @@ */ // Pull these variables out to allow shorthand (easier for lazy programmers) -$limit = Config::get('offset_limit') ? Config::get('offset_limit') : '25'; -$start = Browse::get_start(); -$total = Browse::$total_objects; -$uid = Config::get('list_header_uid'); +$limit = Config::get('offset_limit') ? Config::get('offset_limit') : '25'; +$start = Browse::get_start(); +$total = Browse::$total_objects; +$uid = Config::get('list_header_uid'); $sides = 5; // ++ the uid -Config::set('list_header_uid',$uid+1,1); +Config::set('list_header_uid',$uid+1,1); // Next $next_offset = $start + $limit; if ($next_offset > $total) { $next_offset = $start; } // Prev -$prev_offset = $start - $limit; -if ($prev_offset < 0) { $prev_offset = '0'; } +$prev_offset = $start - $limit; +if ($prev_offset < 0) { $prev_offset = '0'; } /* Calculate how many pages total exist */ $pages = ceil($total/$limit); @@ -52,10 +52,10 @@ $pages = ceil($total/$limit); $page_data = array('up'=>array(),'down'=>array()); // Can't Divide by 0 -if ($start> 0) { +if ($start> 0) { $current_page = floor($start/$limit); } -else { +else { $current_page = 0; } @@ -64,20 +64,20 @@ else { $page = $current_page; $i = 0; /* While we have pages left */ -while ($page > 0) { - if ($i == $sides) { $page_data['down'][1] = '...'; $page_data['down'][0] = '0'; break; } +while ($page > 0) { + if ($i == $sides) { $page_data['down'][1] = '...'; $page_data['down'][0] = '0'; break; } $i++; $page = $page - 1; $page_data['down'][$page] = $page * $limit; } // while page > 0 // Up Next -$page = $current_page+1; +$page = $current_page+1; $i = 0; /* While we have pages left */ -while ($page <= $pages) { +while ($page <= $pages) { if ($page * $limit > $total) { break; } - if ($i == $sides) { + if ($i == $sides) { $key = $pages - 1; if (!$page_data['up'][$key]) { $page_data['up'][$key] = '...'; } $page_data['up'][$pages] = ($pages-1) * $limit; @@ -91,7 +91,7 @@ while ($page <= $pages) { // Sort These Arrays of Hotness ksort($page_data['up']); ksort($page_data['down']); -$browse_type = Browse::get_type(); +$browse_type = Browse::get_type(); // are there enough items to even need this view? if ($pages > 1) { @@ -100,14 +100,14 @@ if ($pages > 1) { <?php echo Ajax::text('?page=browse&action=page&type=' . $browse_type . '&start=' . $prev_offset,_('Prev'),'browse_' . $uid . 'prev','','prev'); ?> <?php echo Ajax::text('?page=browse&action=page&type=' . $browse_type . '&start=' . $next_offset,_('Next'),'browse_' . $uid . 'next','','next'); ?> - <?php + <?php /* Echo Everything below us */ - foreach ($page_data['down'] as $page => $offset) { - if ($offset === '...') { echo '... '; } - else { + foreach ($page_data['down'] as $page => $offset) { + if ($offset === '...') { echo '... '; } + else { // Hack Alert $page++; - echo Ajax::text('?page=browse&action=page&type=' . $browse_type .'&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','page-nb'); + echo Ajax::text('?page=browse&action=page&type=' . $browse_type .'&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','page-nb'); } } // end foreach down @@ -118,10 +118,10 @@ if ($pages > 1) { <?php /* Echo Out Everything Above Us */ - foreach ($page_data['up'] as $page=>$offset) { - if ($offset === '...') { echo '... '; } - else { - echo Ajax::text('?page=browse&action=page&type=' . $browse_type . '&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','page-nb'); + foreach ($page_data['up'] as $page=>$offset) { + if ($offset === '...') { echo '... '; } + else { + echo Ajax::text('?page=browse&action=page&type=' . $browse_type . '&start=' . $offset,$page,'browse_' . $uid . 'page_' . $page,'','page-nb'); } // end else } // end foreach up ?> diff --git a/templates/rightbar.inc.php b/templates/rightbar.inc.php index ecb686c6..7e931fee 100644 --- a/templates/rightbar.inc.php +++ b/templates/rightbar.inc.php @@ -31,12 +31,12 @@ <li> <?php echo Ajax::text('?page=playlist&action=create',_('Add to New Playlist'),'rb_create_playlist'); ?> </li> - <?php - $playlists = Playlist::get_users($GLOBALS['user']->id); - Playlist::build_cache($playlists); - foreach ($playlists as $playlist_id) { + <?php + $playlists = Playlist::get_users($GLOBALS['user']->id); + Playlist::build_cache($playlists); + foreach ($playlists as $playlist_id) { $playlist = new Playlist($playlist_id); - $playlist->format(); + $playlist->format(); ?> <li> <?php echo Ajax::text('?page=playlist&action=append&playlist_id=' . $playlist->id,$playlist->f_name,'rb_append_playlist_' . $playlist->id); ?> @@ -72,34 +72,34 @@ </ul> </li> </ul> -<?php if (Config::get('play_type') == 'localplay') { require_once Config::get('prefix') . '/templates/show_localplay_control.inc.php'; } ?> +<?php if (Config::get('play_type') == 'localplay') { require_once Config::get('prefix') . '/templates/show_localplay_control.inc.php'; } ?> <ul id="rb_current_playlist"> -<?php +<?php - $objects = array(); + $objects = array(); //FIXME :: this is kludgy - if (NO_SONGS != '1') { - $objects = $GLOBALS['user']->playlist->get_items(); - } + if (NO_SONGS != '1') { + $objects = $GLOBALS['user']->playlist->get_items(); + } // Limit the number of objects we show here - if (count($objects) > 100) { - $truncated = (count($objects) - 100); - $objects = array_slice($objects,0,100); - } + if (count($objects) > 100) { + $truncated = (count($objects) - 100); + $objects = array_slice($objects,0,100); + } - $normal_array = array('radio','song','video','random'); + $normal_array = array('radio','song','video','random'); - foreach ($objects as $uid=>$object_data) { + foreach ($objects as $uid=>$object_data) { $type = array_shift($object_data); - if (in_array($type,$normal_array)) { - $object = new $type(array_shift($object_data)); - $object->format(); - } - if ($type == 'random') { - $object->f_link = Random::get_type_name($type); - } + if (in_array($type,$normal_array)) { + $object = new $type(array_shift($object_data)); + $object->format(); + } + if ($type == 'random') { + $object->f_link = Random::get_type_name($type); + } ?> <li class="<?php echo flip_class(); ?>" > <?php echo $object->f_link; ?> @@ -116,12 +116,12 @@ </ul> -<?php +<?php // We do a little magic here to force a iframe reload depending on preference // We do this last because we want it to load, and we want to know if there is anything // to even pass -if (count($objects)) { - Stream::run_playlist_method(); -} +if (count($objects)) { + Stream::run_playlist_method(); +} ?> diff --git a/templates/show_access_list.inc.php b/templates/show_access_list.inc.php index 66e1e84b..8417889e 100644 --- a/templates/show_access_list.inc.php +++ b/templates/show_access_list.inc.php @@ -61,11 +61,11 @@ <th><?php echo _('Type'); ?></th> <th><?php echo _('Action'); ?></th> </tr> -<?php +<?php /* Start foreach List Item */ - foreach ($list as $access_id) { - $access = new Access($access_id); - $access->format(); + foreach ($list as $access_id) { + $access = new Access($access_id); + $access->format(); ?> <tr class="<?php echo flip_class(); ?>"> <td><?php echo scrub_out($access->name); ?></td> diff --git a/templates/show_adds_catalog.inc.php b/templates/show_adds_catalog.inc.php index 10d96102..fe145026 100644 --- a/templates/show_adds_catalog.inc.php +++ b/templates/show_adds_catalog.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,9 +22,9 @@ show_box_top(); /* HINT: Catalog Name */ -printf(_('Starting New Song Search on %s catalog'), "<strong>[$this->name]</strong>"); +printf(_('Starting New Song Search on %s catalog'), "<strong>[$this->name]</strong>"); echo "<br />\n"; echo _('Found') . ": <span id=\"add_count_" . $this->id ."\">" . _('None') . "</span><br />\n"; echo _('Reading') . ":<span id=\"add_dir_" . $this->id . "\"></span><br />"; -show_box_bottom(); +show_box_bottom(); ?> diff --git a/templates/show_album_art.inc.php b/templates/show_album_art.inc.php index e585748a..a279a93a 100644 --- a/templates/show_album_art.inc.php +++ b/templates/show_album_art.inc.php @@ -28,29 +28,29 @@ $i = 0; <?php show_box_top(); ?> <table class="table-data"> <tr> -<?php -while ($i <= $rows) { +<?php +while ($i <= $rows) { $j=0; - while ($j < 4) { + while ($j < 4) { $key = $i*4+$j; - $image_url = Config::get('web_path') . '/image.php?type=session&image_index=' . $key; - $dimensions = Core::image_dimensions(Album::get_image_from_source($_SESSION['form']['images'][$key])); - if (!isset($images[$key])) { echo "<td> </td>\n"; } - else { + $image_url = Config::get('web_path') . '/image.php?type=session&image_index=' . $key; + $dimensions = Core::image_dimensions(Album::get_image_from_source($_SESSION['form']['images'][$key])); + if (!isset($images[$key])) { echo "<td> </td>\n"; } + else { ?> <td align="center"> <a href="<?php echo $image_url; ?>" target="_blank"><img src="<?php echo $image_url; ?>" alt="<?php echo _('Album Art'); ?>" border="0" height="175" width="175" /></a> <br /> <p align="center"> <?php if (is_array($dimensions)) { ?> - [<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>] + [<?php echo intval($dimensions['width']); ?>x<?php echo intval($dimensions['height']); ?>] <?php } else { ?> <span class="error"><?php echo _('Invalid'); ?></span> <?php } ?> [<a href="<?php echo Config::get('web_path'); ?>/albums.php?action=select_art&image=<?php echo $key; ?>&album_id=<?php echo intval($_REQUEST['album_id']); ?>"><?php echo _('Select'); ?></a>] </p> </td> -<?php +<?php } // end else $j++; } // end while cells diff --git a/templates/show_album_row.inc.php b/templates/show_album_row.inc.php index bcaaa4d5..fe395342 100644 --- a/templates/show_album_row.inc.php +++ b/templates/show_album_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -25,7 +25,7 @@ <?php echo Ajax::button('?action=basket&type=album_random&id=' . $album->id,'random',_('Random'),'random_album_' . $album->id); ?> </td> <?php -if (Browse::is_enabled('show_art')) { +if (Browse::is_enabled('show_art')) { $name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name); ?> <td class="cel_cover"> diff --git a/templates/show_albums.inc.php b/templates/show_albums.inc.php index f854080c..2496c11e 100644 --- a/templates/show_albums.inc.php +++ b/templates/show_albums.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,7 +20,7 @@ */ $web_path = Config::get('web_path'); -$ajax_url = Config::get('ajax_url'); +$ajax_url = Config::get('ajax_url'); ?> <?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?> <table class="tabledata" cellpadding="0" cellspacing="0"> @@ -50,17 +50,17 @@ $ajax_url = Config::get('ajax_url'); <th class="col_rating"><?php echo _('Rating'); ?></th> <th class="cel_action"><?php echo _('Actions'); ?></th> </tr> -<?php - if (Config::get('ratings')) { - Rating::build_cache('album',$object_ids); - } +<?php + if (Config::get('ratings')) { + Rating::build_cache('album',$object_ids); + } /* Foreach through the albums */ - foreach ($object_ids as $album_id) { - $album = new Album($album_id); - $album->format(); + foreach ($object_ids as $album_id) { + $album = new Album($album_id); + $album->format(); ?> <tr id="album_<?php echo $album->id; ?>" class="<?php echo flip_class(); ?>"> - <?php require Config::get('prefix') . '/templates/show_album_row.inc.php'; ?> + <?php require Config::get('prefix') . '/templates/show_album_row.inc.php'; ?> </tr> <?php } //end foreach ($albums as $album) ?> <?php if (!count($object_ids)) { ?> diff --git a/templates/show_all_popular.inc.php b/templates/show_all_popular.inc.php index e4edbd14..ba19e8ac 100644 --- a/templates/show_all_popular.inc.php +++ b/templates/show_all_popular.inc.php @@ -1,14 +1,14 @@ <?php /* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ /* - + Copyright (c) 2001 - 2006 Ampache.org - All rights reserved. + 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 v2 as published by the Free Software Foundation. - + 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 @@ -17,7 +17,7 @@ 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. - + */ ?> diff --git a/templates/show_alphabet_form.inc.php b/templates/show_alphabet_form.inc.php index 28fcbd26..65e38350 100644 --- a/templates/show_alphabet_form.inc.php +++ b/templates/show_alphabet_form.inc.php @@ -22,7 +22,7 @@ */ ?> <form style="display:inline;" name="f" method="get" action="<?php echo conf('web_path') . "/$action"; ?>" enctype="multipart/form-data"> - <label for="match" accesskey="S"><?php echo $text; ?></label> + <label for="match" accesskey="S"><?php echo $text; ?></label> <input type="text" size="5" id="match" name="match" value="<?php echo $match; ?>" /> <input type="hidden" name="action" value="<?php echo scrub_out($_REQUEST['action']); ?>"> </form> diff --git a/templates/show_artist_row.inc.php b/templates/show_artist_row.inc.php index 23fa0256..c02b27cf 100644 --- a/templates/show_artist_row.inc.php +++ b/templates/show_artist_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_artists.inc.php b/templates/show_artists.inc.php index 45cefb03..85c079b8 100644 --- a/templates/show_artists.inc.php +++ b/templates/show_artists.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -43,14 +43,14 @@ $web_path = Config::get('web_path'); <th class="cel_rating"> <?php echo _('Rating'); ?> </th> <th class="cel_action"> <?php echo _('Action'); ?> </th> </tr> -<?php +<?php // Cache the ratings we are going to use -if (Config::get('ratings')) { Rating::build_cache('artist',$object_ids); } +if (Config::get('ratings')) { Rating::build_cache('artist',$object_ids); } /* Foreach through every artist that has been passed to us */ -foreach ($object_ids as $artist_id) { - $artist = new Artist($artist_id); - $artist->format(); +foreach ($object_ids as $artist_id) { + $artist = new Artist($artist_id); + $artist->format(); ?> <tr id="artist_<?php echo $artist->id; ?>" class="<?php echo flip_class(); ?>"> <?php require Config::get('prefix') . '/templates/show_artist_row.inc.php'; ?> diff --git a/templates/show_box_top.inc.php b/templates/show_box_top.inc.php index bf19987b..45332a8b 100644 --- a/templates/show_box_top.inc.php +++ b/templates/show_box_top.inc.php @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$class = $class ? $class : 'box'; +$class = $class ? $class : 'box'; ?> <div class="<?php echo $class; ?>"> diff --git a/templates/show_catalog_row.inc.php b/templates/show_catalog_row.inc.php index 4b4adff4..f61987bb 100644 --- a/templates/show_catalog_row.inc.php +++ b/templates/show_catalog_row.inc.php @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = Config::get('web_path'); +$web_path = Config::get('web_path'); ?> <td class="cel_catalog"><?php echo $catalog->f_name_link; ?></td> <td class="cel_path"><?php echo scrub_out($catalog->f_path); ?></td> diff --git a/templates/show_catalogs.inc.php b/templates/show_catalogs.inc.php index fb1f355a..49fe3201 100644 --- a/templates/show_catalogs.inc.php +++ b/templates/show_catalogs.inc.php @@ -38,10 +38,10 @@ <th class="cel_lastclean"><?php echo _('Last Clean'); ?></th> <th class="cel_action"><?php echo _('Actions'); ?></th> </tr> -<?php - foreach ($object_ids as $catalog_id) { - $catalog = new Catalog($catalog_id); - $catalog->format(); +<?php + foreach ($object_ids as $catalog_id) { + $catalog = new Catalog($catalog_id); + $catalog->format(); ?> <tr class="<?php echo flip_class(); ?>" id="catalog_<?php echo $catalog->id; ?>"> <?php require Config::get('prefix') . '/templates/show_catalog_row.inc.php'; ?> diff --git a/templates/show_clean_catalog.inc.php b/templates/show_clean_catalog.inc.php index 86332d39..60a13c81 100644 --- a/templates/show_clean_catalog.inc.php +++ b/templates/show_clean_catalog.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -23,8 +23,8 @@ show_box_top(); /* HINT: Catalog Name */ printf(_('Cleaning the %s Catalog'), "<strong>[" . $this->name . "]</strong>"); -echo "...<br />"; +echo "...<br />"; echo _('Checking') . ": <span id=\"clean_count_" . $this->id . "\"></span>\n<br />"; echo _('Reading') . ":<span id=\"clean_dir_" . $this->id . "\"></span><br />"; -show_box_bottom(); +show_box_bottom(); ?> diff --git a/templates/show_confirmation.inc.php b/templates/show_confirmation.inc.php index bccf51a6..e183c90e 100644 --- a/templates/show_confirmation.inc.php +++ b/templates/show_confirmation.inc.php @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$confirmation = Core::form_register($form_name); +$confirmation = Core::form_register($form_name); ?> <?php show_box_top(scrub_out($title)); ?> <?php echo $text; ?> diff --git a/templates/show_create_democratic.inc.php b/templates/show_create_democratic.inc.php index ab29dfec..42b7d807 100644 --- a/templates/show_create_democratic.inc.php +++ b/templates/show_create_democratic.inc.php @@ -32,7 +32,7 @@ show_box_top(_('Configure Democratic Playlist')); ?> <td><?php show_playlist_select('democratic',$democratic->base_playlist); ?></td> </tr> <tr> - <td><?php echo _('Cooldown Time'); ?></td> + <td><?php echo _('Cooldown Time'); ?></td> <td><input type="text" size="4" maxlength="6" name="cooldown" value="<?php echo $democratic->cooldown; ?>" /><?php echo _('minutes'); ?></td> </tr> <!-- diff --git a/templates/show_debug.inc.php b/templates/show_debug.inc.php index aa762f73..f575850f 100644 --- a/templates/show_debug.inc.php +++ b/templates/show_debug.inc.php @@ -94,18 +94,18 @@ <th class="cel_configuration"><?php echo _('Preference'); ?></th> <th class="cel_value"><?php echo _('Value'); ?></th> </tr> -<?php foreach ($configuration as $key=>$value) { - if ($key == 'database_password' || $key == 'mysql_password') { $value = '*********'; } - if (is_array($value)) { - $string = ''; - foreach ($value as $setting) { - $string .= $setting . '<br />'; - } - $value = $string; - } - if (Preference::is_boolean($key)) { - $value = print_boolean($value); - } +<?php foreach ($configuration as $key=>$value) { + if ($key == 'database_password' || $key == 'mysql_password') { $value = '*********'; } + if (is_array($value)) { + $string = ''; + foreach ($value as $setting) { + $string .= $setting . '<br />'; + } + $value = $string; + } + if (Preference::is_boolean($key)) { + $value = print_boolean($value); + } ?> <tr class="<?php echo flip_class(); ?>"> <td valign="top"><strong><?php echo $key; ?></strong></td> diff --git a/templates/show_democratic.inc.php b/templates/show_democratic.inc.php index ea3410d3..c0f36d5e 100644 --- a/templates/show_democratic.inc.php +++ b/templates/show_democratic.inc.php @@ -20,8 +20,8 @@ */ /* HINT: Democratic Name */ -$string = $democratic->is_enabled() ? sprintf(_('%s Playlist') ,$democratic->name) : _('Democratic Playlist'); -show_box_top($string); +$string = $democratic->is_enabled() ? sprintf(_('%s Playlist') ,$democratic->name) : _('Democratic Playlist'); +show_box_top($string); ?> <div id="information_actions"> <ul> diff --git a/templates/show_democratic_playlist.inc.php b/templates/show_democratic_playlist.inc.php index 0ca19025..aa7da903 100644 --- a/templates/show_democratic_playlist.inc.php +++ b/templates/show_democratic_playlist.inc.php @@ -35,12 +35,12 @@ $web_path = Config::get('web_path'); <?php } ?> </colgroup> <?php -if (!count($object_ids)) { +if (!count($object_ids)) { $playlist = new Playlist($democratic->base_playlist); ?> <tr> <td> - <?php echo _('Playing from base Playlist'); ?>: + <?php echo _('Playing from base Playlist'); ?>: <a href="<?php echo $web_path; ?>/playlist.php?action=show_playlist&playlist_id=<?php echo $playlist->id; ?>"> <?php echo scrub_out($playlist->name); ?> </a> @@ -62,10 +62,10 @@ else { <th class="cel_admin"><?php echo _('Admin'); ?></th> <?php } ?> </tr> -<?php -$democratic = Democratic::get_current_playlist(); -$democratic->set_parent(); -foreach($object_ids as $row_id=>$data) { +<?php +$democratic = Democratic::get_current_playlist(); +$democratic->set_parent(); +foreach($object_ids as $row_id=>$data) { $media = new $data['object_type']($data['object_id']); $media->format(); ?> @@ -88,9 +88,9 @@ foreach($object_ids as $row_id=>$data) { </td> <?php } ?> </tr> -<?php +<?php } // end foreach -?> +?> <tr class="th-bottom"> <th class="cel_action"><?php echo _('Action'); ?></th> <th class="cel_votes"><?php echo _('Votes'); ?></th> diff --git a/templates/show_disabled_songs.inc.php b/templates/show_disabled_songs.inc.php index e9607de7..9e51c0ad 100644 --- a/templates/show_disabled_songs.inc.php +++ b/templates/show_disabled_songs.inc.php @@ -46,7 +46,7 @@ <td class="cel_artist"><?php echo $song->get_artist_name($song->album); ?></td> <td class="cel_filename"><?php echo $song->file; ?></td> <td class="cel_additiontime"><?php echo date("h:i:s, m/d/y",$song->addition_time); ?></td> - + </tr> <?php } if (!count($songs)) { ?> <tr class="<?php echo flip_class(); ?>"> diff --git a/templates/show_duplicate.inc.php b/templates/show_duplicate.inc.php index 8dea3fc1..cbdfdae1 100644 --- a/templates/show_duplicate.inc.php +++ b/templates/show_duplicate.inc.php @@ -8,7 +8,7 @@ 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; version 2 - of the License. + of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,7 +27,7 @@ <tr> <td valign="top"><strong><?php echo _('Search Type'); ?>:</strong></td> <td> - <?php + <?php $name = 'check_' . scrub_in($_REQUEST['search_type']); ${$name} = ' checked="checked" '; ?> diff --git a/templates/show_duplicates.inc.php b/templates/show_duplicates.inc.php index acc5c209..d22552a6 100644 --- a/templates/show_duplicates.inc.php +++ b/templates/show_duplicates.inc.php @@ -32,7 +32,7 @@ <col id="col_bitrate" /> <col id="col_size" /> <col id="col_filename" /> -</colgroup> +</colgroup> <tr class="th-top"> <th class="cel_disable"><?php echo _('Disable'); ?></th> <th class="cel_song"><?php echo _('Song'); ?></th> @@ -43,18 +43,18 @@ <th class="cel_size"><?php echo _('Size'); ?></th> <th class="cel_filename"><?php echo _('Filename'); ?></th> </tr> -<?php +<?php foreach ($duplicates as $item) { // Gather the duplicates $songs = Catalog::get_duplicate_info($item,$search_type); foreach ($songs as $key=>$song_id) { - $song = new Song($song_id); - $song->format(); + $song = new Song($song_id); + $song->format(); $row_key = 'duplicate_' . $song_id; $button_flip_state_id = 'button_flip_state_' . $song_id; - $current_class = ($key == '0') ? 'row-highlight' : flip_class(); - $button = $song->enabled ? 'disable' : 'enable'; + $current_class = ($key == '0') ? 'row-highlight' : flip_class(); + $button = $song->enabled ? 'disable' : 'enable'; ?> <tr id="<?php echo $row_key; ?>" class="<?php echo $current_class; ?>"> <td class="cel_disable" id="<?php echo($button_flip_state_id); ?>"> @@ -68,8 +68,8 @@ <td class="cel_size"><?php echo $song->f_size; ?>MB</td> <td class="cel_filename"><?php echo scrub_out($song->file); ?></td> </tr> -<?php - } // end foreach ($dinfolist as $dinfo) +<?php + } // end foreach ($dinfolist as $dinfo) } // end foreach ($flags as $flag) ?> <tr class="th-bottom"> diff --git a/templates/show_edit_album_row.inc.php b/templates/show_edit_album_row.inc.php index 8ccbdecd..0f4d5324 100644 --- a/templates/show_edit_album_row.inc.php +++ b/templates/show_edit_album_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -28,17 +28,17 @@ <input type="text" name="name" value="<?php echo scrub_out($album->full_name); ?>" /> </td> <td> - <?php - if ($album->artist_count == '1') { - show_artist_select('artist',$album->artist_id); - } - else { - echo _('Various'); - } + <?php + if ($album->artist_count == '1') { + show_artist_select('artist',$album->artist_id); + } + else { + echo _('Various'); + } ?> </td> <td> - <input type="text" name="year" value="<?php echo scrub_out($album->year); ?>" /> + <input type="text" name="year" value="<?php echo scrub_out($album->year); ?>" /> </td> <td> <input type="text" name="disk" value="<?php echo scrub_out($album->disk); ?>" /> diff --git a/templates/show_edit_artist_row.inc.php b/templates/show_edit_artist_row.inc.php index 25b5d2f3..341f4b9e 100644 --- a/templates/show_edit_artist_row.inc.php +++ b/templates/show_edit_artist_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_edit_catalog.inc.php b/templates/show_edit_catalog.inc.php index 2615ee55..56c8de13 100644 --- a/templates/show_edit_catalog.inc.php +++ b/templates/show_edit_catalog.inc.php @@ -34,7 +34,7 @@ %T = <?php echo _('track number (padded with leading 0)'); ?><br /> %t = <?php echo _('song title'); ?><br /> %y = <?php echo _('year'); ?><br /> - %o = <?php echo _('other'); ?><br /> + %o = <?php echo _('other'); ?><br /> </td> </tr> <tr> diff --git a/templates/show_edit_live_stream_row.inc.php b/templates/show_edit_live_stream_row.inc.php index 5d92a032..cf5b903e 100644 --- a/templates/show_edit_live_stream_row.inc.php +++ b/templates/show_edit_live_stream_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_edit_playlist_row.inc.php b/templates/show_edit_playlist_row.inc.php index 2f9c87b8..3bb3cd5a 100644 --- a/templates/show_edit_playlist_row.inc.php +++ b/templates/show_edit_playlist_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -27,8 +27,8 @@ <td> <input type="text" name="name" size="9" value="<?php echo scrub_out($playlist->name); ?>" /> </td> - <td> - <?php $name = 'select_' . $playlist->type; ${$name} = ' selected="selected"'; ?> + <td> + <?php $name = 'select_' . $playlist->type; ${$name} = ' selected="selected"'; ?> <select name="pl_type"> <option value="public"<?php echo $select_public; ?>><?php echo _('Public'); ?></option> <option value="private"<?php echo $select_private; ?>><?php echo _('Private'); ?></option> @@ -39,7 +39,7 @@ <?php echo Ajax::button('?action=edit_object&id=' . $playlist->id . '&type=playlist','download',_('Save Changes'),'save_playlist_' . $playlist->id,'edit_playlist_' . $playlist->id); ?> </td> </tr> -</table> +</table> </form> </td> diff --git a/templates/show_edit_playlist_song_row.inc.php b/templates/show_edit_playlist_song_row.inc.php index 6a07be07..3db69d78 100644 --- a/templates/show_edit_playlist_song_row.inc.php +++ b/templates/show_edit_playlist_song_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_edit_song_row.inc.php b/templates/show_edit_song_row.inc.php index db57fe56..40c8e57f 100644 --- a/templates/show_edit_song_row.inc.php +++ b/templates/show_edit_song_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_export.inc.php b/templates/show_export.inc.php index 74f753aa..3ad6fb8a 100644 --- a/templates/show_export.inc.php +++ b/templates/show_export.inc.php @@ -8,7 +8,7 @@ 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; version 2 - of the License. + of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -21,10 +21,10 @@ */ -$name = 'export_' . $_REQUEST['export_format']; +$name = 'export_' . $_REQUEST['export_format']; +${$name} = ' selected="selected"'; +$name = 'catalog_' . $_REQUEST['export_catalog']; ${$name} = ' selected="selected"'; -$name = 'catalog_' . $_REQUEST['export_catalog']; -${$name} = ' selected="selected"'; show_box_top(_('Export Catalog')); ?> <form name="duplicates" action="<?php echo Config::get('web_path'); ?>/admin/export.php?action=export" method="post" enctype="multipart/form-data" > @@ -35,11 +35,11 @@ show_box_top(_('Export Catalog')); ?> <select id="export_catalog" name="export_catalog"> <option value=""><?php echo _('All'); ?></option> <?php - $catalog_ids = Catalog::get_catalogs(); + $catalog_ids = Catalog::get_catalogs(); foreach ($catalog_ids as $catalog_id) { $catalog = new Catalog($catalog_id); - $current_name = 'catalog_' . $catalog->id; - + $current_name = 'catalog_' . $catalog->id; + ?> <option value="<?php echo $catalog->id; ?>"<?php echo ${$current_name}; ?>><?php echo scrub_out($catalog->name); ?></option> <?php diff --git a/templates/show_flagged.inc.php b/templates/show_flagged.inc.php index e6adb385..29cadf9e 100644 --- a/templates/show_flagged.inc.php +++ b/templates/show_flagged.inc.php @@ -39,11 +39,11 @@ $web_path = Config::get('web_path'); <th class="cel_status"><?php echo _('Status'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php -foreach ($object_ids as $flag_id) { - $flag = new Flag($flag_id); - $flag->format(); - require Config::get('prefix') . '/templates/show_flag_row.inc.php'; +<?php +foreach ($object_ids as $flag_id) { + $flag = new Flag($flag_id); + $flag->format(); + require Config::get('prefix') . '/templates/show_flag_row.inc.php'; ?> <?php } if (!count($object_ids)) { ?> <tr class="<?php echo flip_class(); ?>"> diff --git a/templates/show_gather_art.inc.php b/templates/show_gather_art.inc.php index 7fa701ca..59697657 100644 --- a/templates/show_gather_art.inc.php +++ b/templates/show_gather_art.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,5 +24,5 @@ show_box_top(); echo "<strong>" . _('Starting Album Art Search') . ". . .</strong><br />\n"; echo _('Searched') . ": <span id=\"count_art_" . $catalog_id . "\">" . _('None') . "</span><br />"; echo _('Reading') . ":<span id=\"read_art_$catalog_id\"></span><br />"; -show_box_bottom(); +show_box_bottom(); ?> diff --git a/templates/show_genre.inc.php b/templates/show_genre.inc.php index b480d6c7..bf637244 100644 --- a/templates/show_genre.inc.php +++ b/templates/show_genre.inc.php @@ -29,7 +29,7 @@ $web_path = Config::get('web_path'); ?> <?php /* HINT: Genre Name */ ?> <?php show_box_top(sprintf(_('Viewing %s Genre'), $genre->name)); ?> - [<?php echo $genre->get_album_count(); ?>] + [<?php echo $genre->get_album_count(); ?>] <a href="<?php echo $web_path; ?>/genre.php?action=show_albums&genre_id=<?php echo $genre->id; ?>"> <?php echo _('Albums'); ?></a><br /> [<?php echo $genre->get_artist_count(); ?>] diff --git a/templates/show_genres.inc.php b/templates/show_genres.inc.php index fd7a6af7..9195098f 100644 --- a/templates/show_genres.inc.php +++ b/templates/show_genres.inc.php @@ -39,9 +39,9 @@ <th class="cel_songs"><?php echo _('Songs'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php -foreach ($object_ids as $genre_id) { - $genre = new Genre($genre_id); +<?php +foreach ($object_ids as $genre_id) { + $genre = new Genre($genre_id); $genre->format(); ?> <tr class="<?php echo flip_class(); ?>"> diff --git a/templates/show_import_playlist.inc.php b/templates/show_import_playlist.inc.php index 21d60379..12e6ccca 100644 --- a/templates/show_import_playlist.inc.php +++ b/templates/show_import_playlist.inc.php @@ -28,7 +28,7 @@ <td> <?php echo _('Filename'); ?>: </td> - <td><input type="file" name="filename" value="<?php echo scrub_out($_REQUEST['filename']); ?>" size="45" /></td> + <td><input type="file" name="filename" value="<?php echo scrub_out($_REQUEST['filename']); ?>" size="45" /></td> </tr> <tr> <td> diff --git a/templates/show_index.inc.php b/templates/show_index.inc.php index ea00693a..dce60143 100644 --- a/templates/show_index.inc.php +++ b/templates/show_index.inc.php @@ -23,31 +23,31 @@ <div id="now_playing"> <?php show_now_playing(); ?> </div> <!-- Close Now Playing Div --> -<!-- Randomly selected albums of the moment --> -<?php -if (Browse::is_enabled('show_art')) { - echo Ajax::observe('window','load',Ajax::action('?page=index&action=random_albums','random_albums')); +<!-- Randomly selected albums of the moment --> +<?php +if (Browse::is_enabled('show_art')) { + echo Ajax::observe('window','load',Ajax::action('?page=index&action=random_albums','random_albums')); ?> <div id="random_selection"> <?php show_box_top(_('Albums of the Moment')); echo _('Loading...'); show_box_bottom(); ?> -</div> +</div> <?php } ?> <!-- Recently Played --> <div id="recently_played"> <?php $data = Song::get_recently_played(); - Song::build_cache(array_keys($data)); - require_once Config::get('prefix') . '/templates/show_recently_played.inc.php'; + Song::build_cache(array_keys($data)); + require_once Config::get('prefix') . '/templates/show_recently_played.inc.php'; ?> </div> -<!-- Shoutbox Objects, if shoutbox is enabled --> +<!-- Shoutbox Objects, if shoutbox is enabled --> <?php if (Config::get('sociable')) { ?> <div id="shout_objects"> - <?php - $shouts = shoutBox::get_top('5'); - if (count($shouts)) { - require_once Config::get('prefix') . '/templates/show_shoutbox.inc.php'; - } + <?php + $shouts = shoutBox::get_top('5'); + if (count($shouts)) { + require_once Config::get('prefix') . '/templates/show_shoutbox.inc.php'; + } ?> </div> <?php } ?> diff --git a/templates/show_install.inc.php b/templates/show_install.inc.php index d3421f74..250219f3 100644 --- a/templates/show_install.inc.php +++ b/templates/show_install.inc.php @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -if (INSTALL != '1') { exit; } +if (INSTALL != '1') { exit; } $prefix = realpath(dirname(__FILE__). "/../"); $dir = is_rtl($htmllang) ? 'rtl' : 'ltr'; ?> @@ -32,7 +32,7 @@ $dir = is_rtl($htmllang) ? 'rtl' : 'ltr'; </head> <body> <script src="lib/javascript-base.js" language="javascript" type="text/javascript"></script> -<div id="header"> +<div id="header"> <h1><?php echo _("Ampache Installation"); ?></h1> <p>Pour l'Amour de la Musique</p> </div> @@ -51,7 +51,7 @@ $dir = is_rtl($htmllang) ? 'rtl' : 'ltr'; <?php echo sprintf(_('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 %s'),$prefix . '/config/ampache.cfg.php'); ?> </p> </div> - + <div class="content"> <strong><?php echo _("Step 1 - Creating and Inserting the Ampache Database"); ?></strong><br /> <dl> @@ -106,7 +106,7 @@ $dir = is_rtl($htmllang) ? 'rtl' : 'ltr'; <td><input type="submit" value="<?php echo _("Insert Database"); ?>" /></td> </tr> </table> -</form> +</form> </div> <div id="bottom"> <p><strong>Ampache Installation.</strong><br /> diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php index 15eb76f7..ef1a9676 100644 --- a/templates/show_install_account.inc.php +++ b/templates/show_install_account.inc.php @@ -31,7 +31,7 @@ $prefix = realpath(dirname(__FILE__). "/../"); <meta http-equiv="Content-Type" content="text/html; Charset=<?php echo $charset; ?>" /> </head> <body> -<div id="header"> +<div id="header"> <h1><?php echo _("Ampache Installation"); ?></h1> <p>For the love of Music</p> </div> diff --git a/templates/show_install_check.inc.php b/templates/show_install_check.inc.php index 16aee4cd..db67fdc2 100644 --- a/templates/show_install_check.inc.php +++ b/templates/show_install_check.inc.php @@ -26,12 +26,12 @@ <tr> <td><?php echo sprintf(_("%s is readable"),"ampache.cfg.php.dist"); ?></td> <td> -<?php - if (!is_readable($prefix . '/config/ampache.cfg.php.dist')) { +<?php + if (!is_readable($prefix . '/config/ampache.cfg.php.dist')) { echo debug_result('',false); - Error::add('install',sprintf(_("%s is readable"),"ampache.cfg.php.dist")); + Error::add('install',sprintf(_("%s is readable"),"ampache.cfg.php.dist")); } - else { + else { echo debug_result('',true); } ?> @@ -43,18 +43,18 @@ <?php if(!check_php_ver()) { if (function_exists('hash_algos')) { $algos = hash_algos(); } - if (strtoupper(substr(PHP_OS,0,3)) == 'WIN') { + if (strtoupper(substr(PHP_OS,0,3)) == 'WIN') { $version_string = phpversion() . " < PHP 5.3 "; - } - else { - $version_string = phpversion() . " "; - } + } + else { + $version_string = phpversion() . " "; + } $string = $version_string . _('Hash Function Exists') . " " . print_boolean(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_boolean(in_array('sha256',$algos)); - echo debug_result($string,false); - Error::add('install',_('PHP Version')); - } - else { - echo debug_result(phpversion(),true); + echo debug_result($string,false); + Error::add('install',_('PHP Version')); + } + else { + echo debug_result(phpversion(),true); } ?> </td> @@ -63,11 +63,11 @@ <td> <?php if (!check_php_mysql()) { - echo debug_result('',false); - Error::add('install',_('Mysql for PHP')); - } + echo debug_result('',false); + Error::add('install',_('Mysql for PHP')); + } else { - echo debug_result(mysql_get_client_info(),true); + echo debug_result(mysql_get_client_info(),true); } ?> </td> @@ -76,11 +76,11 @@ <td> <?php if (!check_php_session()) { - echo debug_result('',false); - Error::add('install',_('PHP Session Support')); - } + echo debug_result('',false); + Error::add('install',_('PHP Session Support')); + } else { - echo debug_result('',true); + echo debug_result('',true); } ?> </td> @@ -89,11 +89,11 @@ <td> <?php if (!check_php_iconv()) { - echo debug_result('',false); - Error::add('install',_('PHP ICONV Support')); - } + echo debug_result('',false); + Error::add('install',_('PHP ICONV Support')); + } else { - echo debug_result('',true); + echo debug_result('',true); } ?> </td> @@ -102,11 +102,11 @@ <td> <?php if (!check_php_pcre()) { - echo debug_result('',false); - Error::add('install',_('PHP PCRE Support')); - } + echo debug_result('',false); + Error::add('install',_('PHP PCRE Support')); + } else { - echo debug_result('',true); + echo debug_result('',true); } ?> </td> @@ -115,11 +115,11 @@ <td> <?php if (!check_putenv()) { - echo debug_result('',false); - Error::add('install',_('PHP PutENV Support')); - } + echo debug_result('',false); + Error::add('install',_('PHP PutENV Support')); + } else { - echo debug_result('',true); + echo debug_result('',true); } ?> </td> @@ -129,11 +129,11 @@ <td><?php echo _('Gettext Support'); ?>:</td> <td> <?php - if (!check_gettext()) { - echo debug_result(_('Gettext Emulator will be used'),false); - } + if (!check_gettext()) { + echo debug_result(_('Gettext Emulator will be used'),false); + } else { - echo debug_result('',true); + echo debug_result('',true); } ?> </td> @@ -141,24 +141,24 @@ <td><?php echo _('Mbstring Support'); ?>:</td> <td> <?php - if (!check_mbstring()) { - echo debug_result(_('Multibyte Character may not detect correct'),false); - } + if (!check_mbstring()) { + echo debug_result(_('Multibyte Character may not detect correct'),false); + } else { - echo debug_result('',true); + echo debug_result('',true); } ?> </td> </tr><tr> <td><?php echo _('PHP Memory Limit'); ?>:</td> <td> -<?php - if (!check_php_memory()) { - echo debug_result(_('Memory Limit less then recommended size') . ' ' . ini_get('memory_limit'),false); - } - else { - echo debug_result(ini_get('memory_limit'),true); - } +<?php + if (!check_php_memory()) { + echo debug_result(_('Memory Limit less then recommended size') . ' ' . ini_get('memory_limit'),false); + } + else { + echo debug_result(ini_get('memory_limit'),true); + } ?> </td> @@ -166,12 +166,12 @@ <td><?php echo _('PHP Execution timelimit'); ?>:</td> <td> <?php - if (!check_php_timelimit()) { - echo debug_result(_('Execution timelimit less the recommended') . ' ' . ini_get('max_execution_time'),false); + if (!check_php_timelimit()) { + echo debug_result(_('Execution timelimit less the recommended') . ' ' . ini_get('max_execution_time'),false); + } + else { + echo debug_result(ini_get('max_execution_time') . ' ' . _('seconds'),true); } - else { - echo debug_result(ini_get('max_execution_time') . ' ' . _('seconds'),true); - } ?> </td> </tr> diff --git a/templates/show_install_config.inc.php b/templates/show_install_config.inc.php index cbfc7cfd..4ab55bda 100644 --- a/templates/show_install_config.inc.php +++ b/templates/show_install_config.inc.php @@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -if (INSTALL != '1') { exit; } +if (INSTALL != '1') { exit; } $prefix = realpath(dirname(__FILE__). "/../"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> @@ -31,7 +31,7 @@ $prefix = realpath(dirname(__FILE__). "/../"); <meta http-equiv="Content-Type" content="text/html; Charset=<?php echo $charset; ?>" /> </head> <body> -<div id="header"> +<div id="header"> <h1><?php echo _('Ampache Installation'); ?></h1> <p>Pour l'Amour de la Musique</p> </div> @@ -92,13 +92,13 @@ $prefix = realpath(dirname(__FILE__). "/../"); <table> <tr> <td class="align"><?php echo _('Ampache.cfg.php Exists'); ?></td> - <td>[ + <td>[ <?php if (!is_readable($configfile)) { - echo debug_result('',false); + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] @@ -108,14 +108,14 @@ $prefix = realpath(dirname(__FILE__). "/../"); <td class="align"> <?php echo _('Ampache.cfg.php Configured?'); ?> </td> - <td>[ + <td>[ <?php $results = @parse_ini_file($configfile); - if (!check_config_values($results)) { - echo debug_result('',false); + if (!check_config_values($results)) { + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] diff --git a/templates/show_install_lang.inc.php b/templates/show_install_lang.inc.php index 9fd10abc..581af634 100644 --- a/templates/show_install_lang.inc.php +++ b/templates/show_install_lang.inc.php @@ -32,7 +32,7 @@ $prefix = realpath(dirname(__FILE__). "/../"); </head> <body> <script src="lib/javascript-base.js" language="javascript" type="text/javascript"></script> -<div id="header"> +<div id="header"> <h1><?php echo _('Ampache Installation'); ?></h1> <p>For the love of Music</p> </div> diff --git a/templates/show_ip_history.inc.php b/templates/show_ip_history.inc.php index 922884d9..8a3abfe7 100644 --- a/templates/show_ip_history.inc.php +++ b/templates/show_ip_history.inc.php @@ -25,7 +25,7 @@ <div id="information_actions"> <ul> <li> -<?php if (isset($_REQUEST['all'])){ ?> +<?php if (isset($_REQUEST['all'])){ ?> <a href="<?php echo Config::get('web_path')?>/admin/users.php?action=show_ip_history&user_id=<?php echo $working_user->id?>"><?php echo get_user_icon('disable'); ?></a> <?php echo _('Show Unique'); ?> <?php }else{ ?> diff --git a/templates/show_live_stream_row.inc.php b/templates/show_live_stream_row.inc.php index df6ec43c..c73d0176 100644 --- a/templates/show_live_stream_row.inc.php +++ b/templates/show_live_stream_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_live_streams.inc.php b/templates/show_live_streams.inc.php index 16cdecf8..5fe8e6d3 100644 --- a/templates/show_live_streams.inc.php +++ b/templates/show_live_streams.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -37,13 +37,13 @@ $web_path = Config::get('web_path'); <th class="cel_streamname"><?php echo Ajax::text('?page=browse&action=set_sort&sort=name',_('Name'),'live_stream_sort_name'); ?></th> <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign',_('Callsign'),'live_stream_call_sign'); ?></th> <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&sort=frequency',_('Frequency'),'live_stream_frequency'); ?></th> - <th class="cel_genre"><?php echo _('Tag'); ?></th> + <th class="cel_genre"><?php echo _('Tag'); ?></th> <th class="cel_action"><?php echo _('Action'); ?> </th> </tr> -<?php -foreach ($object_ids as $radio_id) { - $radio = new Radio($radio_id); - $radio->format(); +<?php +foreach ($object_ids as $radio_id) { + $radio = new Radio($radio_id); + $radio->format(); ?> <tr id="live_stream_<?php echo $radio->id; ?>" class="<?php echo flip_class(); ?>"> <?php require Config::get('prefix') . '/templates/show_live_stream_row.inc.php'; ?> @@ -59,7 +59,7 @@ foreach ($object_ids as $radio_id) { <th class="cel_streamname"><?php echo Ajax::text('?page=browse&action=set_sort&sort=name',_('Name'),'live_stream_sort_name_bottom'); ?></th> <th class="cel_callsign"><?php echo Ajax::text('?page=browse&action=set_sort&sort=call_sign',_('Callsign'),'live_stream_call_sign_bottom'); ?></th> <th class="cel_frequency"><?php echo Ajax::text('?page=browse&action=set_sort&sort=frequency',_('Frequency'),'live_stream_frequency_bottom'); ?></th> - <th class="cel_genre"><?php echo _('Tag'); ?></th> + <th class="cel_genre"><?php echo _('Tag'); ?></th> <th class="cel_action"><?php echo _('Action'); ?> </th> </tr> </table> diff --git a/templates/show_localplay_controllers.inc.php b/templates/show_localplay_controllers.inc.php index dd4b90c4..8df25762 100644 --- a/templates/show_localplay_controllers.inc.php +++ b/templates/show_localplay_controllers.inc.php @@ -19,9 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = Config::get('web_path'); +$web_path = Config::get('web_path'); ?> -<!-- Plugin we've found --> +<!-- Plugin we've found --> <table class="tabledata" cellpadding="0" cellspacing="0"> <colgroup> <col id="col_name" /> @@ -35,19 +35,19 @@ $web_path = Config::get('web_path'); <th class="cel_version"><?php echo _('Version'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php -foreach ($controllers as $controller) { - $localplay = new Localplay($controller); - if (!$localplay->player_loaded()) { continue; } - $localplay->format(); - if (Localplay::is_enabled($controller)) { - $action = 'confirm_uninstall_localplay'; - $action_txt = _('Disable'); - } - else { +<?php +foreach ($controllers as $controller) { + $localplay = new Localplay($controller); + if (!$localplay->player_loaded()) { continue; } + $localplay->format(); + if (Localplay::is_enabled($controller)) { + $action = 'confirm_uninstall_localplay'; + $action_txt = _('Disable'); + } + else { $action = 'install_localplay'; $action_txt = _('Activate'); - } + } ?> <tr class="<?php echo flip_class(); ?>"> <td class="cel_name"><?php echo scrub_out($localplay->f_name); ?></td> diff --git a/templates/show_localplay_instances.inc.php b/templates/show_localplay_instances.inc.php index 2a9831a2..a3471c1d 100644 --- a/templates/show_localplay_instances.inc.php +++ b/templates/show_localplay_instances.inc.php @@ -26,10 +26,10 @@ <tr> <?php foreach ($fields as $key=>$field) { ?> <th><?php echo $field['description']; ?></th> - <?php } ?> + <?php } ?> <th><?php echo _('Action'); ?></th> </tr> -<?php foreach ($instances as $uid=>$name) { +<?php foreach ($instances as $uid=>$name) { $instance = $localplay->get_instance($uid); ?> <tr class="<?php echo flip_class(); ?>" id="localplay_instance_<?php echo $uid; ?>"> diff --git a/templates/show_localplay_playlist.inc.php b/templates/show_localplay_playlist.inc.php index 9459af3d..4331256f 100644 --- a/templates/show_localplay_playlist.inc.php +++ b/templates/show_localplay_playlist.inc.php @@ -20,8 +20,8 @@ */ $localplay = new Localplay(Config::get('localplay_controller')); -$localplay->connect(); -$status = $localplay->status(); +$localplay->connect(); +$status = $localplay->status(); ?> <?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?> <table class="tabledata" cellpadding="0" cellspacing="0"> @@ -35,10 +35,10 @@ $status = $localplay->status(); <th class="cel_name"><?php echo _('Name'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php -foreach ($object_ids as $object) { +<?php +foreach ($object_ids as $object) { $class = ' class="cel_name"'; - if ($status['track'] == $object['track']) { $class=' class="cel_name lp_current"'; } + if ($status['track'] == $object['track']) { $class=' class="cel_name lp_current"'; } ?> <tr class="<?php echo flip_class(); ?>" id="localplay_playlist_<?php echo $object['id']; ?>"> <td class="cel_track"> diff --git a/templates/show_localplay_status.inc.php b/templates/show_localplay_status.inc.php index bb140602..3117efc1 100644 --- a/templates/show_localplay_status.inc.php +++ b/templates/show_localplay_status.inc.php @@ -20,8 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$status = $localplay->status(); -$now_playing = $status['track_title'] ? $status['track_title'] . ' - ' . $status['track_album'] . ' - ' . $status['track_artist'] : ''; +$status = $localplay->status(); +$now_playing = $status['track_title'] ? $status['track_title'] . ' - ' . $status['track_album'] . ' - ' . $status['track_artist'] : ''; ?> <?php Ajax::start_container('localplay_status'); ?> <?php show_box_top(_('Localplay Control') . ' - '. strtoupper($localplay->type)); ?> @@ -35,12 +35,12 @@ $now_playing = $status['track_title'] ? $status['track_title'] . ' - ' . $status <?php echo _('Volume'); ?>:<?php echo $status['volume']; ?>% </li> <li> - <?php echo print_boolean($status['repeat']); ?> | + <?php echo print_boolean($status['repeat']); ?> | <?php echo Ajax::text('?page=localplay&action=repeat&value=' . invert_boolean($status['repeat']),print_boolean(invert_boolean($status['repeat'])),'localplay_repeat'); ?> <?php echo _('Repeat'); ?> </li> <li> - <?php echo print_boolean($status['random']); ?> | + <?php echo print_boolean($status['random']); ?> | <?php echo Ajax::text('?page=localplay&action=random&value=' . invert_boolean($status['random']),print_boolean(invert_boolean($status['random'])),'localplay_random'); ?> <?php echo _('Random'); ?> </li> diff --git a/templates/show_login_form.inc.php b/templates/show_login_form.inc.php index b38cce8a..dbf0f0ad 100644 --- a/templates/show_login_form.inc.php +++ b/templates/show_login_form.inc.php @@ -20,9 +20,9 @@ */ /* Check and see if their remember me is the same or lower then local - * if so disable the checkbox + * if so disable the checkbox */ -if (Config::get('session_length') >= Config::get('remember_length')) { +if (Config::get('session_length') >= Config::get('remember_length')) { $remember_disabled = 'disabled="disabled"'; } $htmllang = str_replace("_","-",Config::get('lang')); @@ -56,11 +56,11 @@ function focus(){ document.login.username.focus(); } <form name="login" method="post" enctype="multipart/form-data" action="<?php echo Config::get('web_path'); ?>/login.php"> <div class="loginfield" id="usernamefield"> - <label for="username"><?php echo _('Username'); ?>:</label> + <label for="username"><?php echo _('Username'); ?>:</label> <input class="text_input" type="text" id="username" name="username" value="<?php echo $_REQUEST['username']; ; ?>" /> </div> <div class="loginfield" id="passwordfield"> - <label for="password"><?php echo _('Password'); ?>:</label> + <label for="password"><?php echo _('Password'); ?>:</label> <input class="text_input" type="password" id="password" name="password" value="" /> </div> <div class="loginfield" id="remembermefield"><label for="rememberme"> @@ -75,12 +75,12 @@ function focus(){ document.login.username.focus(); } <input class="button" id="loginbutton" type="submit" value="<?php echo _('Login'); ?>" /> <input type="hidden" name="referrer" value="<?php echo scrub_out($_SERVER['HTTP_REFERRER']); ?>" /> <input type="hidden" name="action" value="login" /> - + <?php if (Config::get('allow_public_registration')) { ?> <a class="button" id="registerbutton" href="<?php echo Config::get('web_path'); ?>/register.php"><?php echo _('Register'); ?></a> <?php } // end if (conf('allow_public_registration')) ?> </div> - + </form> </div> </div> diff --git a/templates/show_mail_users.inc.php b/templates/show_mail_users.inc.php index b656ce06..5a328b5d 100644 --- a/templates/show_mail_users.inc.php +++ b/templates/show_mail_users.inc.php @@ -37,7 +37,7 @@ </tr> <!-- <tr> - <td colspan="2"> + <td colspan="2"> <table> <tr> <td><?php echo _('Catalog Statistics'); ?>:</td> @@ -60,7 +60,7 @@ <input type="checkbox" name="pop_artists" value="yes" /> </td> </tr> - + <tr> <td><?php echo _('Latest Album Additions'); ?>:</td> <td> diff --git a/templates/show_manage_catalogs.inc.php b/templates/show_manage_catalogs.inc.php index b3850e72..8ea5f460 100644 --- a/templates/show_manage_catalogs.inc.php +++ b/templates/show_manage_catalogs.inc.php @@ -47,7 +47,7 @@ </table> </div> <?php show_box_bottom(); ?> -<?php +<?php $catalog_ids = Catalog::get_catalogs(); Browse::set_type('catalog'); Browse::set_static_content(1); diff --git a/templates/show_manage_democratic.inc.php b/templates/show_manage_democratic.inc.php index b556d333..70e84d4a 100644 --- a/templates/show_manage_democratic.inc.php +++ b/templates/show_manage_democratic.inc.php @@ -41,11 +41,11 @@ show_box_top(_('Manage Democratic Playlists')); ?> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> <?php - foreach ($playlists as $democratic_id) { - $democratic = new Democratic($democratic_id); - $democratic->format(); - $playlist = new Playlist($democratic->base_playlist); - $playlist->format(); + foreach ($playlists as $democratic_id) { + $democratic = new Democratic($democratic_id); + $democratic->format(); + $playlist = new Playlist($democratic->base_playlist); + $playlist->format(); ?> <tr class="<?php echo flip_class(); ?>"> <td><?php echo scrub_out($democratic->name); ?></td> diff --git a/templates/show_manage_shoutbox.inc.php b/templates/show_manage_shoutbox.inc.php index 178c02a9..c4f38c96 100644 --- a/templates/show_manage_shoutbox.inc.php +++ b/templates/show_manage_shoutbox.inc.php @@ -39,16 +39,16 @@ $web_path = Config::get('web_path'); <th class="cel_date"><?php echo _('Date Added'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php -foreach ($object_ids as $shout_id) { - $shout = new shoutBox($shout_id); +<?php +foreach ($object_ids as $shout_id) { + $shout = new shoutBox($shout_id); $shout->format(); $object = shoutBox::get_object($shout->object_type,$shout->object_id); $object->format(); $client = new User($shout->user); $client->format(); - require Config::get('prefix') . '/templates/show_shout_row.inc.php'; + require Config::get('prefix') . '/templates/show_shout_row.inc.php'; ?> <?php } if (!count($object_ids)) { ?> <tr class="<?php echo flip_class(); ?>"> diff --git a/templates/show_now_playing.inc.php b/templates/show_now_playing.inc.php index 6b06221d..05b3f828 100644 --- a/templates/show_now_playing.inc.php +++ b/templates/show_now_playing.inc.php @@ -29,10 +29,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ if (count($results)) { -$link = Config::get('use_rss') ? ' ' . AmpacheRSS::get_display('nowplaying') : ''; +$link = Config::get('use_rss') ? ' ' . AmpacheRSS::get_display('nowplaying') : ''; ?> <?php show_box_top(_('Now Playing') . $link); ?> -<?php +<?php foreach ($results as $item) { $media = $item['media']; $np_user = $item['client']; diff --git a/templates/show_object_rating.inc.php b/templates/show_object_rating.inc.php index 9d1ba585..cc917a12 100644 --- a/templates/show_object_rating.inc.php +++ b/templates/show_object_rating.inc.php @@ -30,14 +30,14 @@ $base_url = '?action=set_rating&rating_type=' . $rating->type . '&object_id=' . // decide width of rating (5 stars -> 20% per star) $width = $rating->preciserating*20; if ($width < 0) $width = 0; - - //set the current rating background + + //set the current rating background echo "<li class=\"current-rating\" style=\"width:${width}%\" >" . _('Current rating: '); if ($rating->rating <= 0) { echo _('not rated yet') . "</li>\n"; } else printf(_('%s of 5'), $rating->preciserating); echo "</li>\n"; - + for ($i=1; $i<6; $i++) { ?> diff --git a/templates/show_object_rating_static.inc.php b/templates/show_object_rating_static.inc.php index 3c2eb640..c45b3ac5 100644 --- a/templates/show_object_rating_static.inc.php +++ b/templates/show_object_rating_static.inc.php @@ -30,14 +30,14 @@ $base_url = Config::get('ajax_url') . '?action=set_rating&rating_type=' . $r // decide width of rating (5 stars -> 20% per star) $width = $rating->preciserating*20; if ($width < 0) $width = 0; - + //set the current rating background echo "<li class=\"current-rating\" style=\"width:${width}%\" >" . _('Current rating: '); if ($rating->rating <= 0) { echo _('not rated yet') . "</li>\n"; } else printf(_('%s of 5') ,$rating->preciserating); echo "</li>\n"; - + for ($i=1; $i<6; $i++) { ?> diff --git a/templates/show_object_row.inc.php b/templates/show_object_row.inc.php index 66f2f4c0..b5f4eac4 100644 --- a/templates/show_object_row.inc.php +++ b/templates/show_object_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,7 +20,7 @@ */ /** - * Completely variable row does have UID for Ajax ($object->uid) + * Completely variable row does have UID for Ajax ($object->uid) * build TD's from $headers $key=>$header */ diff --git a/templates/show_objects.inc.php b/templates/show_objects.inc.php index ac65bc1c..5ee54f33 100644 --- a/templates/show_objects.inc.php +++ b/templates/show_objects.inc.php @@ -20,7 +20,7 @@ */ -/* +/* * Variable/Non-DB object display takes headers & objects */ @@ -31,9 +31,9 @@ <th class="th-top"><?php echo $header; ?></th> <?php } ?> </tr> -<?php - foreach ($objects as $object) { - $object->format(); +<?php + foreach ($objects as $object) { + $object->format(); ?> <tr id="object_row_<?php echo $object->id; ?>" class="<?php echo flip_class(); ?>"> <?php require Config::get('prefix') . '/templates/show_object_row.inc.php'; ?> diff --git a/templates/show_playlist.inc.php b/templates/show_playlist.inc.php index a4e0eb8e..225b1e70 100644 --- a/templates/show_playlist.inc.php +++ b/templates/show_playlist.inc.php @@ -21,7 +21,7 @@ /** * Playlist Box * This box is used for actions on the main screen and on a specific playlist page - * It changes depending on where it is + * It changes depending on where it is */ ?> <?php /* HINT: Playlist Type, Playlist Name */ show_box_top(sprintf(_('%s %s Playlist'), $playlist->f_type, $playlist->name)); ?> @@ -48,9 +48,9 @@ </ul> </div> <?php show_box_bottom(); ?> -<?php - Browse::set_type('playlist_song'); - Browse::add_supplemental_object('playlist',$playlist->id); +<?php + Browse::set_type('playlist_song'); + Browse::add_supplemental_object('playlist',$playlist->id); Browse::set_static_content(1); - Browse::show_objects($object_ids); + Browse::show_objects($object_ids); ?> diff --git a/templates/show_playlist_row.inc.php b/templates/show_playlist_row.inc.php index befe0e41..e4ac5cd4 100644 --- a/templates/show_playlist_row.inc.php +++ b/templates/show_playlist_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_playlist_songs.inc.php b/templates/show_playlist_songs.inc.php index 97e15ac3..09764238 100644 --- a/templates/show_playlist_songs.inc.php +++ b/templates/show_playlist_songs.inc.php @@ -21,8 +21,8 @@ */ // First let's setup some vars we're going to use a lot -$web_path = Config::get('web_path'); -$ajax_url = Config::get('ajax_url'); +$web_path = Config::get('web_path'); +$ajax_url = Config::get('ajax_url'); ?> <?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?> <table class="tabledata" cellpadding="0" cellspacing="0"> @@ -54,14 +54,14 @@ $ajax_url = Config::get('ajax_url'); <?php } ?> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php - foreach ($object_ids as $object) { - $song = new Song($object['object_id']); - $song->format(); +<?php + foreach ($object_ids as $object) { + $song = new Song($object['object_id']); + $song->format(); $playlist_track = $object['track']; ?> <tr class="<?php echo flip_class(); ?>" id="track_<?php echo $object['track_id']; ?>"> - <?php require Config::get('prefix') . '/templates/show_playlist_song_row.inc.php'; ?> + <?php require Config::get('prefix') . '/templates/show_playlist_song_row.inc.php'; ?> </tr> <?php } ?> <tr class="th-bottom"> diff --git a/templates/show_playlists.inc.php b/templates/show_playlists.inc.php index 047f09fd..1fbb29ee 100644 --- a/templates/show_playlists.inc.php +++ b/templates/show_playlists.inc.php @@ -39,14 +39,14 @@ <th class="cel_owner"><?php echo Ajax::text('?page=browse&action=set_sort&type=playlist&sort=user',_('Owner'),'playlist_sort_owner'); ?></th> <th class="cel_action"><?php echo _('Actions'); ?></th> </tr> -<?php -foreach ($object_ids as $playlist_id) { - $playlist = new Playlist($playlist_id); - $playlist->format(); - $count = $playlist->get_song_count(); +<?php +foreach ($object_ids as $playlist_id) { + $playlist = new Playlist($playlist_id); + $playlist->format(); + $count = $playlist->get_song_count(); ?> <tr class="<?php echo flip_class(); ?>" id="playlist_row_<?php echo $playlist->id; ?>"> - <?php require Config::get('prefix') . '/templates/show_playlist_row.inc.php'; ?> + <?php require Config::get('prefix') . '/templates/show_playlist_row.inc.php'; ?> </tr> <?php } // end foreach ($playlists as $playlist) ?> <?php if (!count($object_ids)) { ?> diff --git a/templates/show_playtype_switch.inc.php b/templates/show_playtype_switch.inc.php index 66a50303..893b23c0 100644 --- a/templates/show_playtype_switch.inc.php +++ b/templates/show_playtype_switch.inc.php @@ -21,14 +21,14 @@ */ ?> <div id="play_type_switch"> -<?php +<?php $name = "is_" . Config::get('play_type'); ${$name} = 'selected="selected" '; if (Preference::has_access('play_type')) { ?> <form method="post" id="play_type_form" action="javascript.void(0);"> -<select id="play_type_select" name="type"> +<select id="play_type_select" name="type"> <?php if (Config::get('allow_stream_playback')) { ?> <option value="stream" <?php echo $is_stream; ?>><?php echo _('Stream'); ?></option> <?php } if (Config::get('allow_localplay_playback')) { ?> diff --git a/templates/show_plugins.inc.php b/templates/show_plugins.inc.php index 7f3dec66..7606808e 100644 --- a/templates/show_plugins.inc.php +++ b/templates/show_plugins.inc.php @@ -19,9 +19,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = Config::get('web_path'); +$web_path = Config::get('web_path'); ?> -<!-- Plugin we've found --> +<!-- Plugin we've found --> <table class="tabledata" cellpadding="0" cellspacing="0"> <colgroup> <col id="col_name" /> @@ -35,9 +35,9 @@ $web_path = Config::get('web_path'); <th class="cel_version"><?php echo _('Version'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php -foreach ($plugins as $plugin_name) { - $plugin = new Plugin($plugin_name); +<?php +foreach ($plugins as $plugin_name) { + $plugin = new Plugin($plugin_name); if (!Plugin::is_installed($plugin->_plugin->name)) { $action = "<a href=\"" . $web_path . "/admin/modules.php?action=install_plugin&plugin=" . scrub_out($plugin_name) . "\">" . _('Activate') . "</a>"; diff --git a/templates/show_preference_admin.inc.php b/templates/show_preference_admin.inc.php index 2142188e..55cfdc81 100644 --- a/templates/show_preference_admin.inc.php +++ b/templates/show_preference_admin.inc.php @@ -31,13 +31,13 @@ <th class="cel_preference"><?php echo _('Preference'); ?></th> <th class="cel_level"><?php echo _('Level'); ?></th> </tr> -<?php foreach ($preferences as $preference) { +<?php foreach ($preferences as $preference) { unset($is_25,$is_5,$is_100); ?> <tr class="<?php echo flip_class(); ?>"> <td class="cel_preference"><?php echo scrub_out(_($preference['description'])); ?></td> <td class="cel_level"> - <?php $level_name = "is_" . $preference['level']; ${$level_name} = 'selected="selected"'; ?> + <?php $level_name = "is_" . $preference['level']; ${$level_name} = 'selected="selected"'; ?> <select name="prefs[<?php echo scrub_out($preference['name']); ?>]"> <option value="5" <?php echo $is_5; ?>><?php echo _('Guest'); ?></option> <option value="25" <?php echo $is_25; ?>><?php echo _('User'); ?></option> diff --git a/templates/show_preference_box.inc.php b/templates/show_preference_box.inc.php index 3237d927..8d5973c6 100644 --- a/templates/show_preference_box.inc.php +++ b/templates/show_preference_box.inc.php @@ -21,10 +21,10 @@ */ /* I'm cheating a little here, check to see if we want to show the - * Apply to All button on this page + * Apply to All button on this page */ -if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST['action'] == 'admin') { - $is_admin = true; +if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST['action'] == 'admin') { + $is_admin = true; } ?> <h4><?php echo _($preferences['title']); ?></h4> @@ -54,14 +54,14 @@ if ((Access::check('interface','100') OR !Config::get('use_auth')) AND $_REQUEST <?php if ($is_admin) { ?> <td class="cel_applytoall"><input type="checkbox" name="check_<?php echo $pref['name']; ?>" value="1" /></td> <td class="cel_level"> - <?php $name = 'on_' . $pref['level']; ${$name} = 'selected="selected"'; ?> + <?php $name = 'on_' . $pref['level']; ${$name} = 'selected="selected"'; ?> <select name="level_<?php echo $pref['name']; ?>"> - <option value="5" <?php echo $on_5; ?>><?php echo _('Guest'); ?></option> + <option value="5" <?php echo $on_5; ?>><?php echo _('Guest'); ?></option> <option value="25" <?php echo $on_25; ?>><?php echo _('User'); ?></option> <option value="50" <?php echo $on_50; ?>><?php echo _('Content Manager'); ?></option> <option value="75" <?php echo $on_75; ?>><?php echo _('Catalog Manager'); ?></option> <option value="100" <?php echo $on_100; ?>><?php echo _('Admin'); ?></option> - </select> + </select> <?php unset(${$name}); ?> </td> <?php } ?> diff --git a/templates/show_preferences.inc.php b/templates/show_preferences.inc.php index 4e75dadc..fc4b853f 100644 --- a/templates/show_preferences.inc.php +++ b/templates/show_preferences.inc.php @@ -21,8 +21,8 @@ */ /** - * This page has a few tabs, as such we need to figure out which tab we are on - * and display the information accordingly + * This page has a few tabs, as such we need to figure out which tab we are on + * and display the information accordingly */ ?> @@ -42,8 +42,8 @@ </div> <?php } // end if not account -if ($_REQUEST['tab'] == 'account') { - $client = $GLOBALS['user']; +if ($_REQUEST['tab'] == 'account') { + $client = $GLOBALS['user']; require Config::get('prefix') . '/templates/show_account.inc.php'; } ?> diff --git a/templates/show_random.inc.php b/templates/show_random.inc.php index 9f733d4f..e1a73b21 100644 --- a/templates/show_random.inc.php +++ b/templates/show_random.inc.php @@ -100,12 +100,12 @@ <?php show_box_bottom(); ?> <div id="browse"> <?php - if (is_array($object_ids)) { - Browse::reset_filters(); + if (is_array($object_ids)) { + Browse::reset_filters(); Browse::set_type('song'); - Browse::save_objects($object_ids); - Browse::show_objects(); + Browse::save_objects($object_ids); + Browse::show_objects(); echo Ajax::observe('window','load',Ajax::action('?action=refresh_rightbar','playlist_refresh_load')); - } -?> + } +?> </div> diff --git a/templates/show_random_albums.inc.php b/templates/show_random_albums.inc.php index e0dc3bac..7aee5d48 100644 --- a/templates/show_random_albums.inc.php +++ b/templates/show_random_albums.inc.php @@ -19,16 +19,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -$web_path = Config::get('web_path'); -$button = Ajax::button('?page=index&action=random_albums','random',_('Refresh'),'random_refresh'); +$web_path = Config::get('web_path'); +$button = Ajax::button('?page=index&action=random_albums','random',_('Refresh'),'random_refresh'); ?> <?php show_box_top(_('Albums of the Moment') . ' ' . $button); ?> - <?php + <?php if ($albums) { - foreach ($albums as $album_id) { - $album = new Album($album_id); - $album->format(); + foreach ($albums as $album_id) { + $album = new Album($album_id); + $album->format(); $name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name); ?> <div class="random_album"> @@ -48,7 +48,7 @@ $button = Ajax::button('?page=index&action=random_albums','random',_('Refresh'), ?> <span class="play_album"><?php echo Ajax::button('?action=basket&type=album&id=' . $album->id,'add',_('Play Album'),'play_full_' . $album->id); ?></span> </div> - + <?php } // end foreach ?> <?php } // end if albums ?> diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php index d1d59d68..d29d9fc0 100644 --- a/templates/show_recently_played.inc.php +++ b/templates/show_recently_played.inc.php @@ -21,7 +21,7 @@ */ /* Define the time places starting at 0 */ -$time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days ago'),_('weeks ago'),_('months ago'),_('years ago')); +$time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days ago'),_('weeks ago'),_('months ago'),_('years ago')); $link = Config::get('use_rss') ? ' ' . AmpacheRSS::get_display('recently_played') : ''; show_box_top(_('Recently Played') . $link); ?> @@ -42,15 +42,15 @@ show_box_top(_('Recently Played') . $link); <th class="cel_username"><?php echo _('Username'); ?></th> <th class="cel_lastplayed"><?php echo _('Last Played'); ?></th> </tr> -<?php foreach ($data as $row) { +<?php foreach ($data as $row) { $row_user = new User($row['user']); - $song = new Song($row['object_id']); - $amount = intval(time() - $row['date']+2); + $song = new Song($row['object_id']); + $amount = intval(time() - $row['date']+2); $time_place = '0'; - while ($amount >= 1) { - $final = $amount; - $time_place++; + while ($amount >= 1) { + $final = $amount; + $time_place++; if ($time_place <= 2) { $amount = floor($amount/60); } @@ -66,15 +66,15 @@ show_box_top(_('Recently Played') . $link); if ($time_place == '6') { $amount = floor ($amount/12); } - if ($time_place > '6') { - $final = $amount . '+'; - break; - } + if ($time_place > '6') { + $final = $amount . '+'; + break; + } } $time_string = $final . ' ' . $time_unit[$time_place]; - $song->format(); + $song->format(); ?> <tr class="<?php echo flip_class(); ?>"> <td class="cel_add"> diff --git a/templates/show_registration_confirmation.inc.php b/templates/show_registration_confirmation.inc.php index ce060678..a0f826b7 100644 --- a/templates/show_registration_confirmation.inc.php +++ b/templates/show_registration_confirmation.inc.php @@ -21,7 +21,7 @@ */ $htmllang = str_replace("_","-",Config::get('lang')); -$web_path = Config::get('web_path'); +$web_path = Config::get('web_path'); ?> <!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; ?>"> diff --git a/templates/show_run_add_catalog.inc.php b/templates/show_run_add_catalog.inc.php index 494dcfbb..1e5fd50a 100644 --- a/templates/show_run_add_catalog.inc.php +++ b/templates/show_run_add_catalog.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_search.inc.php b/templates/show_search.inc.php index 4dfe3fcc..1cba5861 100644 --- a/templates/show_search.inc.php +++ b/templates/show_search.inc.php @@ -100,7 +100,7 @@ <?php } ?> </select> </td> -</tr> +</tr> <tr class="<?php echo flip_class(); ?>"> <td><?php echo _('Rating'); ?></td> <td> diff --git a/templates/show_shoutbox.inc.php b/templates/show_shoutbox.inc.php index 85014e51..0c991cec 100644 --- a/templates/show_shoutbox.inc.php +++ b/templates/show_shoutbox.inc.php @@ -22,13 +22,13 @@ ?> <?php show_box_top(_('Shoutbox')); ?> <div id="shoutbox"> -<?php - foreach ($shouts as $shout_id) { - $shout = new shoutBox($shout_id); - $object = shoutBox::get_object($shout->object_type,$shout->object_id); - $object->format(); - $client = new User($shout->user); - $client->format(); +<?php + foreach ($shouts as $shout_id) { + $shout = new shoutBox($shout_id); + $object = shoutBox::get_object($shout->object_type,$shout->object_id); + $object->format(); + $client = new User($shout->user); + $client->format(); ?> <div class="shout <?php echo flip_class(); ?>"> <?php echo $shout->get_image(); ?> diff --git a/templates/show_song_row.inc.php b/templates/show_song_row.inc.php index 34074e95..ca4ca4e4 100644 --- a/templates/show_song_row.inc.php +++ b/templates/show_song_row.inc.php @@ -50,6 +50,6 @@ <?php $button_flip_state_id = 'button_flip_state_' . $song_id; ?> <span id="<?php echo($button_flip_state_id); ?>"> <?php echo Ajax::button('?page=song&action=flip_state&song_id=' . $song->id,$icon,_(ucfirst($icon)),'flip_song_' . $song->id); ?> - </span> + </span> <?php } ?> </td> diff --git a/templates/show_songs.inc.php b/templates/show_songs.inc.php index 371b862b..0a40b8ad 100644 --- a/templates/show_songs.inc.php +++ b/templates/show_songs.inc.php @@ -21,8 +21,8 @@ */ // First let's setup some vars we're going to use a lot -$web_path = Config::get('web_path'); -$ajax_url = Config::get('ajax_url'); +$web_path = Config::get('web_path'); +$ajax_url = Config::get('ajax_url'); ?> <?php require Config::get('prefix') . '/templates/list_header.inc.php'; ?> <table class="tabledata" cellpadding="0" cellspacing="0"> @@ -52,12 +52,12 @@ $ajax_url = Config::get('ajax_url'); <th class="cel_action"><?php echo _('Action'); ?></th> </tr> <?php - foreach ($object_ids as $song_id) { - $song = new Song($song_id); - $song->format(); + foreach ($object_ids as $song_id) { + $song = new Song($song_id); + $song->format(); ?> <tr class="<?php echo flip_class(); ?>" id="song_<?php echo $song->id; ?>"> - <?php require Config::get('prefix') . '/templates/show_song_row.inc.php'; ?> + <?php require Config::get('prefix') . '/templates/show_song_row.inc.php'; ?> </tr> <?php } ?> <?php if (!count($object_ids)) { ?> diff --git a/templates/show_stats.inc.php b/templates/show_stats.inc.php index f64febcb..142ebcf6 100644 --- a/templates/show_stats.inc.php +++ b/templates/show_stats.inc.php @@ -20,7 +20,7 @@ */ $stats = Catalog::get_stats(); -$catalogs = Catalog::get_catalogs(); +$catalogs = Catalog::get_catalogs(); ?> <?php show_box_top(_('Statistics')); ?> <em><?php echo _('Catalogs'); ?></em> @@ -70,10 +70,10 @@ $catalogs = Catalog::get_catalogs(); <th class="cel_video"><?php echo _('Video'); ?></th> <th class="cel_total"><?php echo _('Catalog Size'); ?></th> </tr> -<?php foreach ($catalogs as $catalog_id) { - $catalog = new Catalog($catalog_id); - $catalog->format(); - $stats = Catalog::get_stats($catalog_id); +<?php foreach ($catalogs as $catalog_id) { + $catalog = new Catalog($catalog_id); + $catalog->format(); + $stats = Catalog::get_stats($catalog_id); ?> <tr> <td class="cel_catalog"><?php echo $catalog->name; ?></td> diff --git a/templates/show_stats_popular.inc.php b/templates/show_stats_popular.inc.php index 14c2a30d..63d21927 100644 --- a/templates/show_stats_popular.inc.php +++ b/templates/show_stats_popular.inc.php @@ -22,17 +22,17 @@ ?> <div> <?php - $objects = Stats::get_top('album'); - $headers = array('f_link'=>_('Most Popular Albums')); - show_box_top('','info-box box_popular_albums'); - require Config::get('prefix') . '/templates/show_objects.inc.php'; - show_box_bottom(); + $objects = Stats::get_top('album'); + $headers = array('f_link'=>_('Most Popular Albums')); + show_box_top('','info-box box_popular_albums'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); - $objects = Stats::get_top('artist'); - $headers = array('f_name_link'=>_('Most Popular Artists')); - show_box_top('','info-box box_popular_artists'); - require Config::get('prefix') . '/templates/show_objects.inc.php'; - show_box_bottom(); + $objects = Stats::get_top('artist'); + $headers = array('f_name_link'=>_('Most Popular Artists')); + show_box_top('','info-box box_popular_artists'); + require Config::get('prefix') . '/templates/show_objects.inc.php'; + show_box_bottom(); ?> </div> diff --git a/templates/show_tagcloud.inc.php b/templates/show_tagcloud.inc.php index 25aabddf..a241b65a 100644 --- a/templates/show_tagcloud.inc.php +++ b/templates/show_tagcloud.inc.php @@ -9,25 +9,25 @@ 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. -*/ -$web_path = Config::get('web_path'); +*/ +$web_path = Config::get('web_path'); ?> <?php Ajax::start_container('tag_filter'); ?> -<?php foreach ($object_ids as $data) { - $tag = new Tag($data['id']); - $tag->format(); +<?php foreach ($object_ids as $data) { + $tag = new Tag($data['id']); + $tag->format(); ?> -<span id="click_<?php echo intval($tag->id); ?>" class="<?php echo $tag->f_class; ?>"><?php echo $tag->name; ?></span> +<span id="click_<?php echo intval($tag->id); ?>" class="<?php echo $tag->f_class; ?>"><?php echo $tag->name; ?></span> <?php echo Ajax::observe('click_' . intval($tag->id),'click',Ajax::action('?page=tag&action=add_filter&tag_id=' . intval($tag->id),'')); ?> <?php } ?> <?php if (!count($object_ids)) { ?> diff --git a/templates/show_test.inc.php b/templates/show_test.inc.php index 17572e5d..20fe97c5 100644 --- a/templates/show_test.inc.php +++ b/templates/show_test.inc.php @@ -38,7 +38,7 @@ <tr> <td><font size="+1"><?php echo _('CHECK'); ?></font></td> <td> - <font size="+1"><?php echo _('STATUS'); ?></font> + <font size="+1"><?php echo _('STATUS'); ?></font> </td> <td><font size="+1"><?php echo _('DESCRIPTION'); ?></font></td> </tr> @@ -46,13 +46,13 @@ <td valign="top"><?php echo _('PHP Version'); ?></td> <td valign="top">[ <?php - if (!check_php_ver()) { + if (!check_php_ver()) { echo debug_result('',false); - if (function_exists('hash_algos')) { $algos = hash_algos(); } - $string = "<strong>" . phpversion() . " " . _('Hash Function Exists') . " " . print_boolean(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_boolean(in_array('sha256',$algos)) . "</strong>"; + if (function_exists('hash_algos')) { $algos = hash_algos(); } + $string = "<strong>" . phpversion() . " " . _('Hash Function Exists') . " " . print_boolean(function_exists('hash_algos')) . " " . _('SHA256 Support') . " " . print_boolean(in_array('sha256',$algos)) . "</strong>"; } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] @@ -67,10 +67,10 @@ <td valign="top">[ <?php if (!check_php_mysql()) { - echo debug_result('',false); + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] @@ -83,11 +83,11 @@ <td valign="top"><?php echo _('PHP Session Support'); ?></td> <td valign="top">[ <?php - if (!check_php_session()) { - echo debug_result('',false); + if (!check_php_session()) { + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] @@ -100,11 +100,11 @@ <td valign="top"><?php echo _('PHP ICONV Support'); ?></td> <td valign="top">[ <?php - if (!check_php_iconv()) { - echo debug_result('',false); + if (!check_php_iconv()) { + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?>] </td> @@ -116,11 +116,11 @@ <td valign="top"><?php echo _('PHP PCRE Support'); ?></td> <td valign="top">[ <?php - if (!check_php_pcre()) { - echo debug_result('',false); + if (!check_php_pcre()) { + echo debug_result('',false); } - else { - echo debug_result('',true); + else { + echo debug_result('',true); } ?>] </td> @@ -132,27 +132,27 @@ <td valign="top"><?php echo _('PHP PutENV Support'); ?></td> <td valign="top">[ <?php - if (!check_putenv()) { - echo debug_result('',false); + if (!check_putenv()) { + echo debug_result('',false); + } + else { + echo debug_result('',true); } - else { - echo debug_result('',true); - } ?>] </td> <td> <?php echo _('This test makes sure that PHP isn\'t running in SafeMode and that we are able to modify the memory limits. While not required, without these abilities some features of ampache may not work correctly'); ?> </td> -</tr> +</tr> <tr> <td valign="top"><?php echo sprintf(_("%s is readable"),"ampache.cfg.php"); ?></td> - <td valign="top">[ + <td valign="top">[ <?php - if (!is_readable($configfile)) { - echo debug_result('',false); + if (!is_readable($configfile)) { + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] @@ -166,15 +166,15 @@ <td valign="top"> <?php echo _('Ampache.cfg.php Configured?'); ?> </td> - <td valign="top">[ + <td valign="top">[ <?php $results = @parse_ini_file($configfile); Config::set_by_array($results); - if (!check_config_values($results)) { - echo debug_result('',false); + if (!check_config_values($results)) { + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] @@ -188,12 +188,12 @@ <td valign="top">[ <?php $db = check_database($results['database_hostname'], $results['database_username'], $results['database_password'],$results['database_name']); - if (!$db) { - echo debug_result('',false); + if (!$db) { + echo debug_result('',false); } else { - echo debug_result('',true); - } + echo debug_result('',true); + } ?> ] </td> @@ -206,11 +206,11 @@ <td valign="top">[ <?php $db_inserted = check_database_inserted($db,$results['local_db']); - if (!$db_inserted) { - echo debug_result('',false); + if (!$db_inserted) { + echo debug_result('',false); } else { - echo debug_result('',true); + echo debug_result('',true); } ?> ] @@ -227,18 +227,18 @@ /* Check to see if this is Http or https */ - if ($_SERVER['HTTPS'] == 'on') { + if ($_SERVER['HTTPS'] == 'on') { $http_type = "https://"; } - else { + else { $http_type = "http://"; } $results['web_path'] = $http_type . $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . Config::get('web_path'); - if (check_config_values($results)) { + if (check_config_values($results)) { echo " <img src=\"" . $results['web_path'] ."/images/icon_enable.png\" /> "; } else { - echo debug_result('',false); + echo debug_result('',false); } ?> diff --git a/templates/show_test_config.inc.php b/templates/show_test_config.inc.php index 1843f4eb..9a736c1c 100644 --- a/templates/show_test_config.inc.php +++ b/templates/show_test_config.inc.php @@ -28,12 +28,12 @@ <title>Ampache -- Config Debug Page</title> <link rel="stylesheet" href="templates/install.css" type="text/css" media="screen" /> <style type="text/css"> -body { - text-align:left; -} -#content { - padding-left: 10px; -} +body { + text-align:left; +} +#content { + padding-left: 10px; +} </style> </head> <body bgcolor="#f0f0f0"> @@ -43,7 +43,7 @@ body { </div> <div id="content"> <h3 style="color:red;">Ampache.cfg.php Parse Error</h3> -<p>You've been redirected to this page because your <strong>/config/ampache.cfg.php</strong> was not parsable. +<p>You've been redirected to this page because your <strong>/config/ampache.cfg.php</strong> was not parsable. If you are upgrading from 3.3.x please see the directions below.</p> <h3>Migrating from 3.3.x to 3.4.x</h3> @@ -59,7 +59,7 @@ This defines which auth methods vauth will attempt to use and in which order, if The user must exist locally as well<br /> <br /> <strong>tag_order</strong> (<i>id3v2,id3v1,vorbiscomment,quicktime,ape,asf</i>)<br /> -This determines the tag order for all cataloged music. If none of the listed tags are found then ampache will default to +This determines the tag order for all cataloged music. If none of the listed tags are found then ampache will default to the first tag format that was found. <br /> <br /> <strong>album_art_order</strong> (<i>db,id3,folder,lastfm,amazon</i>)<br /> diff --git a/templates/show_update_items.inc.php b/templates/show_update_items.inc.php index e2cefa10..ecc63e0c 100644 --- a/templates/show_update_items.inc.php +++ b/templates/show_update_items.inc.php @@ -20,8 +20,8 @@ */ -show_box_top(_('Starting Update from Tags')); -Catalog::update_single_item($type,$object_id); +show_box_top(_('Starting Update from Tags')); +Catalog::update_single_item($type,$object_id); ?> <br /> <strong><?php echo _('Update from Tags Complete'); ?></strong> diff --git a/templates/show_user.inc.php b/templates/show_user.inc.php index b126d6bd..062b37eb 100644 --- a/templates/show_user.inc.php +++ b/templates/show_user.inc.php @@ -22,7 +22,7 @@ */ $last_seen = $client->last_seen ? date("m\/d\/y - H:i",$client->last_seen) : _('Never'); $create_date = $client->create_date ? date("m\/d\/y - H:i",$client->create_date) : _('Unknown'); -$client->format(); +$client->format(); ?> <?php show_box_top($client->fullname); ?> <table cellspacing="0"> @@ -37,18 +37,18 @@ $client->format(); <?php } else { ?> <i style="color:red;"><?php echo _('User is Offline Now'); ?></i> <?php } ?> - + </td> <td valign="top"> <h2><?php echo _('Active Playlist'); ?></h2> <div style="padding-left:10px;"> - <?php - $tmp_playlist = new tmpPlaylist(tmpPlaylist::get_from_userid($client->id)); - $object_ids = $tmp_playlist->get_items(); - foreach ($object_ids as $object_data) { - $type = array_shift($object_data); - $object = new $type(array_shift($object_data)); - $object->format(); + <?php + $tmp_playlist = new tmpPlaylist(tmpPlaylist::get_from_userid($client->id)); + $object_ids = $tmp_playlist->get_items(); + foreach ($object_ids as $object_data) { + $type = array_shift($object_data); + $object = new $type(array_shift($object_data)); + $object->format(); ?> <?php echo $object->f_link; ?><br /> <?php } ?> @@ -57,8 +57,8 @@ $client->format(); </tr> </table> <?php show_box_bottom(); ?> -<?php - $data = Song::get_recently_played($client->id); - require Config::get('prefix') . '/templates/show_recently_played.inc.php'; +<?php + $data = Song::get_recently_played($client->id); + require Config::get('prefix') . '/templates/show_recently_played.inc.php'; ?> diff --git a/templates/show_user_activate.inc.php b/templates/show_user_activate.inc.php index 184e363b..d9e9c356 100644 --- a/templates/show_user_activate.inc.php +++ b/templates/show_user_activate.inc.php @@ -21,7 +21,7 @@ */ $htmllang = str_replace("_","-",Config::get('lang')); -$web_path = Config::get('web_path'); +$web_path = Config::get('web_path'); ?> <!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; ?>"> @@ -42,8 +42,8 @@ $web_path = Config::get('web_path'); <script src="<?php echo $web_path; ?>/modules/prototype/prototype.js" language="javascript" type="text/javascript"></script> <div id="maincontainer"> -<?php - if ($validation == User::get_validation($username) AND strlen($validation)) { +<?php + if ($validation == User::get_validation($username) AND strlen($validation)) { User::activate_user($username); ?> <h3><?php echo _('User Activated'); ?></h3> diff --git a/templates/show_user_preferences.inc.php b/templates/show_user_preferences.inc.php index 3efca35b..4cfe4a28 100644 --- a/templates/show_user_preferences.inc.php +++ b/templates/show_user_preferences.inc.php @@ -21,8 +21,8 @@ */ /** - * This page has a few tabs, as such we need to figure out which tab we are on - * and display the information accordingly + * This page has a few tabs, as such we need to figure out which tab we are on + * and display the information accordingly */ ?> @@ -49,7 +49,7 @@ <td> <div class="formValidation"> <input class="button" type="submit" value="<?php echo _('Update Preferences'); ?>" /> - <?php echo Core::form_register('update_preference'); ?> + <?php echo Core::form_register('update_preference'); ?> <input type="hidden" name="user_id" value="<?php echo scrub_out($_REQUEST['user_id']); ?>" /> </div> </td> diff --git a/templates/show_user_recommendations.inc.php b/templates/show_user_recommendations.inc.php index 1d7531f1..2ae908a6 100644 --- a/templates/show_user_recommendations.inc.php +++ b/templates/show_user_recommendations.inc.php @@ -24,34 +24,34 @@ <table class="tabledata"> <tr> <td valign="top"> - <?php - if (count($recommended_artists)) { - $items = $working_user->format_recommendations($recommended_artists,'artist'); - show_info_box(_('Recommended Artists'),'artist',$items); + <?php + if (count($recommended_artists)) { + $items = $working_user->format_recommendations($recommended_artists,'artist'); + show_info_box(_('Recommended Artists'),'artist',$items); } - else { + else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; } ?> </td> <td valign="top"> <?php - if (count($recommended_albums)) { + if (count($recommended_albums)) { $items = $working_user->format_recommendations($recommended_albums,'album'); show_info_box(_('Recommended Albums'),'album',$items); } - else { + else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; } ?> </td> <td valign="top"> <?php - if (count($recommended_songs)) { + if (count($recommended_songs)) { $items = $working_user->format_recommendations($recommended_songs,'song'); show_info_box(_('Recommended Songs'),'song',$items); } - else { + else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; } ?> diff --git a/templates/show_user_registration.inc.php b/templates/show_user_registration.inc.php index 0e2b7769..5cf20676 100644 --- a/templates/show_user_registration.inc.php +++ b/templates/show_user_registration.inc.php @@ -21,7 +21,7 @@ */ $htmllang = str_replace("_","-",Config::get('lang')); -$web_path = Config::get('web_path'); +$web_path = Config::get('web_path'); ?> <!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; ?>"> diff --git a/templates/show_user_row.inc.php b/templates/show_user_row.inc.php index a1f6d2a5..a9612a75 100644 --- a/templates/show_user_row.inc.php +++ b/templates/show_user_row.inc.php @@ -40,7 +40,7 @@ <a href="<?php echo $web_path; ?>/admin/users.php?action=show_preferences&user_id=<?php echo $client->id; ?>"><?php echo get_user_icon('preferences', _('Preferences')); ?></a> <?php //FIXME: Fix this for the extra permission levels - if ($client->disabled == '1') { + if ($client->disabled == '1') { echo "<a href=\"".$web_path."/admin/users.php?action=enable&user_id=$client->id\">" . get_user_icon('enable', _('Enable')) . "</a>"; } else { @@ -57,4 +57,4 @@ } else { echo "<td class=\"cel_online user_offline\"> </td>"; } -?> +?> diff --git a/templates/show_user_stats.inc.php b/templates/show_user_stats.inc.php index 5b5996c0..05f0f198 100644 --- a/templates/show_user_stats.inc.php +++ b/templates/show_user_stats.inc.php @@ -24,40 +24,40 @@ <table class="tabledata"> <tr> <td valign="top"> - <?php - if (count($favorite_artists)) { - $items = $working_user->format_favorites($favorite_artists); - $title = '<a href="' . Config::get('web_path') . '/stream.php?action=play_favorite&type=artist">' . + <?php + if (count($favorite_artists)) { + $items = $working_user->format_favorites($favorite_artists); + $title = '<a href="' . Config::get('web_path') . '/stream.php?action=play_favorite&type=artist">' . get_user_icon('all', _('Favorite Artists')) . '</a> ' . _('Favorite Artists'); - show_info_box($title,'artist',$items); + show_info_box($title,'artist',$items); } - else { + else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; } ?> </td> <td valign="top"> <?php - if (count($favorite_albums)) { + if (count($favorite_albums)) { $items = $working_user->format_favorites($favorite_albums); - $title = '<a href="' . Config::get('web_path') . '/stream.php?action=play_favorite&type=album">' . + $title = '<a href="' . Config::get('web_path') . '/stream.php?action=play_favorite&type=album">' . get_user_icon('all', _('Favorite Albums')) . '</a> ' . _('Favorite Albums'); show_info_box($title,'album',$items); } - else { + else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; } ?> </td> <td valign="top"> <?php - if (count($favorite_songs)) { - $items = $working_user->format_favorites($favorite_songs); - $title = '<a href="' . Config::get('web_path') . '/stream.php?action=play_favorite&type=song">' . + if (count($favorite_songs)) { + $items = $working_user->format_favorites($favorite_songs); + $title = '<a href="' . Config::get('web_path') . '/stream.php?action=play_favorite&type=song">' . get_user_icon('all', _('Favorite Songs')) . '</a> ' . _('Favorite Songs'); - show_info_box($title,'your_song',$items); + show_info_box($title,'your_song',$items); } - else { + else { echo "<span class=\"error\">" . _('Not Enough Data') . "</span>"; } ?> diff --git a/templates/show_users.inc.php b/templates/show_users.inc.php index 4685277a..1181a8a8 100644 --- a/templates/show_users.inc.php +++ b/templates/show_users.inc.php @@ -48,9 +48,9 @@ $web_path = Config::get('web_path'); <th class="cel_online"><?php echo _('On-line'); ?></th> </tr> <?php -foreach ($object_ids as $user_id) { - $client = new User($user_id); - $client->format(); +foreach ($object_ids as $user_id) { + $client = new User($user_id); + $client->format(); $last_seen = $client->last_seen ? date("m\/d\/Y - H:i",$client->last_seen) : _('Never'); $create_date = $client->create_date ? date("m\/d\/Y - H:i",$client->create_date) : _('Unknown'); ?> diff --git a/templates/show_verify_catalog.inc.php b/templates/show_verify_catalog.inc.php index 111cea97..7395a757 100644 --- a/templates/show_verify_catalog.inc.php +++ b/templates/show_verify_catalog.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -26,7 +26,7 @@ printf(_('Updating the %s catalog'), "<strong>[ $catalog->name ]</strong>"); echo "<br />\n"; printf(ngettext('%d item found checking tag information', '%d items found checking tag information', $number), $number); echo "<br />\n\n"; -echo _('Verifed') . ":<span id=\"verify_count_$catalog_id\">$catalog_verify_found</span><br />"; +echo _('Verifed') . ":<span id=\"verify_count_$catalog_id\">$catalog_verify_found</span><br />"; echo _('Reading') . ":<span id=\"verify_dir_$catalog_id\">$catalog_verify_directory</span><br />"; -show_box_bottom(); +show_box_bottom(); ?> diff --git a/templates/show_video_row.inc.php b/templates/show_video_row.inc.php index 463e2e48..9fdb3f43 100644 --- a/templates/show_video_row.inc.php +++ b/templates/show_video_row.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/templates/show_videos.inc.php b/templates/show_videos.inc.php index e1d1e6da..685cf2cc 100644 --- a/templates/show_videos.inc.php +++ b/templates/show_videos.inc.php @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 - as published by the Free Software Foundation. + as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -42,11 +42,11 @@ $web_path = Config::get('web_path'); <th class="cel_tags"><?php echo _('Tags'); ?></th> <th class="cel_action"><?php echo _('Action'); ?></th> </tr> -<?php +<?php /* Foreach through every artist that has been passed to us */ -foreach ($object_ids as $video_id) { - $video = new Video($video_id); - $video->format(); +foreach ($object_ids as $video_id) { + $video = new Video($video_id); + $video->format(); ?> <tr id="video_<?php echo $video->id; ?>" class="<?php echo flip_class(); ?>"> <?php require Config::get('prefix') . '/templates/show_video_row.inc.php'; ?> diff --git a/templates/show_xspf_player.inc.php b/templates/show_xspf_player.inc.php index 95043247..5bfc5ef9 100644 --- a/templates/show_xspf_player.inc.php +++ b/templates/show_xspf_player.inc.php @@ -50,11 +50,11 @@ //} //document.oncontextmenu=new Function("return false") -// --> +// --> </script> <div id="mp3player"> -<?php -$player_url = sprintf("%s/modules/flash/xspf_jukebox.swf?autoplay=true&repeat_playlist=true&crossFade=false&shuffle=false&skin_url=%s/modules/flash/Original/&playlist_url=%s",Config::get('web_path'),Config::get('web_path'),$play_url); +<?php +$player_url = sprintf("%s/modules/flash/xspf_jukebox.swf?autoplay=true&repeat_playlist=true&crossFade=false&shuffle=false&skin_url=%s/modules/flash/Original/&playlist_url=%s",Config::get('web_path'),Config::get('web_path'),$play_url); ?> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="400" height="170" id="xspf_player" align="middle"> <param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" /> @@ -65,7 +65,7 @@ $player_url = sprintf("%s/modules/flash/xspf_jukebox.swf?autoplay=true&repeat_pl <param name="type" value="application/x-shockwave-flash" /> <param name="width" value="400" /> <param name="height" value="170" /> - <param name="name" value="xspf_player" /> + <param name="name" value="xspf_player" /> <param name="align" value="middle" /> <embed src="<?php echo $player_url; ?>" quality="high" bgcolor="#ffffff" width="400" height="170" name="xspf_player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php index a78c7e49..6f87eee3 100644 --- a/templates/sidebar.inc.php +++ b/templates/sidebar.inc.php @@ -20,7 +20,7 @@ */ -if (!$_SESSION['state']['sidebar_tab']) { $_SESSION['state']['sidebar_tab'] = 'home'; } +if (!$_SESSION['state']['sidebar_tab']) { $_SESSION['state']['sidebar_tab'] = 'home'; } $class_name = 'sidebar_' . $_SESSION['state']['sidebar_tab']; ${$class_name} = ' active'; @@ -28,24 +28,24 @@ ${$class_name} = ' active'; $sidebar_items[] = array('id'=>'home', 'title'=>_('Home'), 'icon'=>'home', 'access'=>5); $sidebar_items[] = array('id'=>'localplay', 'title'=>_('Localplay'), 'icon'=>'volumeup', 'access'=>5); $sidebar_items[] = array('id'=>'preferences', 'title'=>_('Preferences'), 'icon'=>'edit', 'access'=>5); -$sidebar_items[] = array('id'=>'modules','title'=>_('Modules'),'icon'=>'plugin','access'=>100); +$sidebar_items[] = array('id'=>'modules','title'=>_('Modules'),'icon'=>'plugin','access'=>100); $sidebar_items[] = array('id'=>'admin', 'title'=>_('Admin'), 'icon'=>'admin', 'access'=>100); $web_path = Config::get('web_path'); -$ajax_url = Config::get('ajax_url'); +$ajax_url = Config::get('ajax_url'); ?> <ul id="sidebar-tabs"> -<?php - foreach ($sidebar_items as $item) { +<?php + foreach ($sidebar_items as $item) { if (Access::check('interface',$item['access'])) { $li_params = "id='sb_tab_" . $item['id'] . "' class='sb1" . ${'sidebar_'.$item['id'] } . "'"; ?><li <?php echo $li_params; ?>> - <?php + <?php // Button echo Ajax::button("?page=index&action=sidebar&button=".$item['id'],$item['icon'],$item['title'],'sidebar_'.$item['id']); - + // Include subnav if it's the selected one // so that it's generated inside its parent li if ($item['id']==$_SESSION['state']['sidebar_tab']) { diff --git a/templates/sidebar_localplay.inc.php b/templates/sidebar_localplay.inc.php index 9dc499c6..74e37775 100644 --- a/templates/sidebar_localplay.inc.php +++ b/templates/sidebar_localplay.inc.php @@ -25,8 +25,8 @@ <?php if ($server_allow = Config::get('allow_localplay_playback') AND $controller = Config::get('localplay_controller') AND $access_check = Access::check('localplay','5')) { ?> <?php // Little bit of work to be done here - $localplay = new Localplay(Config::get('localplay_controller')); - $current_instance = $localplay->current_instance(); + $localplay = new Localplay(Config::get('localplay_controller')); + $current_instance = $localplay->current_instance(); $class = $current_instance ? '' : ' class="active_instance"'; ?> <?php if (Access::check('localplay','25')) { ?> @@ -43,15 +43,15 @@ <li><h4><?php echo _('Active Instance'); ?></h4> <ul class="sb3" id="sb_localplay_instances"> <li id="sb_localplay_instances_none"<?php echo $class; ?>><?php echo Ajax::text('?page=localplay&action=set_instance&instance=0',_('None'),'localplay_instance_none'); ?></li> - <?php + <?php // Requires a little work.. :( - $instances = $localplay->get_instances(); - foreach ($instances as $uid=>$name) { - $name = scrub_out($name); + $instances = $localplay->get_instances(); + foreach ($instances as $uid=>$name) { + $name = scrub_out($name); $class = ''; - if ($uid == $current_instance) { - $class = ' class="active_instance"'; - } + if ($uid == $current_instance) { + $class = ' class="active_instance"'; + } ?> <li id="sb_localplay_instances_<?php echo $uid; ?>"<?php echo $class; ?>><?php echo Ajax::text('?page=localplay&action=set_instance&instance=' . $uid,$name,'localplay_instance_' . $uid); ?></li> <?php } ?> diff --git a/templates/sidebar_modules.inc.php b/templates/sidebar_modules.inc.php index ede8d1ce..8f14b196 100644 --- a/templates/sidebar_modules.inc.php +++ b/templates/sidebar_modules.inc.php @@ -1,4 +1,4 @@ -<?php +<?php /* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ /* @@ -20,7 +20,7 @@ */ -$ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); +$ajax_info = Config::get('ajax_url'); $web_path = Config::get('web_path'); ?> <ul class="sb2" id="sb_modules"> <li><h4><?php echo _('Modules'); ?></h4> diff --git a/templates/sidebar_preferences.inc.php b/templates/sidebar_preferences.inc.php index 16abe728..0dc6cc3a 100644 --- a/templates/sidebar_preferences.inc.php +++ b/templates/sidebar_preferences.inc.php @@ -1,4 +1,4 @@ -<?php +<?php /* vim:set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab: */ /* @@ -24,15 +24,15 @@ * they can have their own preference sections so we need to build the * links based on that, always ignore 'internal' though */ -$catagories = Preference::get_catagories(); +$catagories = Preference::get_catagories(); ?> <ul class="sb2" id="sb_preferences"> <li><h4><?php echo _('Preferences'); ?></h4> <ul class="sb3" id="sb_preferences_sections"> -<?php - foreach ($catagories as $name) { - if ($name == 'system') { continue; } - $f_name = ucfirst($name); +<?php + foreach ($catagories as $name) { + if ($name == 'system') { continue; } + $f_name = ucfirst($name); ?> <li id="sb_preferences_sections_<?php echo $f_name; ?>"><a href="<?php echo $web_path; ?>/preferences.php?tab=<?php echo $name; ?>"><?php echo _($f_name); ?></a></li> <?php } ?> diff --git a/templates/subnavbar.inc.php b/templates/subnavbar.inc.php index 3618ef9c..5c9b8473 100644 --- a/templates/subnavbar.inc.php +++ b/templates/subnavbar.inc.php @@ -28,11 +28,11 @@ ?> <ul class="subnavside"> -<?php - foreach ($items as $item) { - if ($item['url'] == $item['active']) { +<?php + foreach ($items as $item) { + if ($item['url'] == $item['active']) { $li_class = "class=\"activesubmenu\""; - } + } $li_id = "id=\"" . $item['cssclass'] . "\""; ?> <li <?php echo $li_class; echo $li_id; ?>><a href="<?php echo Config::get('web_path') . "/" . $item['url']; ?>"><?php echo $item['title']; ?></a></li> |