diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_album.inc | 7 | ||||
-rw-r--r-- | templates/show_albums.inc | 2 | ||||
-rw-r--r-- | templates/show_recently_played.inc.php | 46 | ||||
-rw-r--r-- | templates/show_songs.inc | 24 |
4 files changed, 68 insertions, 11 deletions
diff --git a/templates/show_album.inc b/templates/show_album.inc index 2768cc3b..d1251407 100644 --- a/templates/show_album.inc +++ b/templates/show_album.inc @@ -5,9 +5,8 @@ All rights reserved. This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + 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 @@ -63,7 +62,7 @@ $title = scrub_out($album->name) . ' -- ' . $album->f_artist; <a href="<?php echo $web_path; ?>/albums.php?action=update_from_tags&album_id=<?php echo $album->id; ; ?>"><?php echo _("Update from tags"); ?></a><br /> <?php } ?> <?php if (batch_ok()) { ?> - <a href="<?php echo $web_path; ?>/batch.php?action=alb&id=<?php echo $album->id; ; ?>"><img src="<?php echo $web_path; ?>/images/icon_download.gif" border="0" /> <?php echo _('Download'); ?></a><br /> + <a href="<?php echo $web_path; ?>/batch.php?action=alb&id=<?php echo $album->id; ; ?>"><?php echo _('Download'); ?></a><br /> <?php } ?> </div> <?php require (conf('prefix') . '/templates/show_box_bottom.inc.php'); ?> diff --git a/templates/show_albums.inc b/templates/show_albums.inc index e9fb597d..e76d2b1a 100644 --- a/templates/show_albums.inc +++ b/templates/show_albums.inc @@ -61,7 +61,7 @@ foreach ($albums as $album) { <a href="<?php echo $web_path; ?>/song.php?action=album&album_id=<?php echo $album->id; ?>"><?php echo _("All"); ?></a> | <a href="<?php echo $web_path; ?>/song.php?action=album_random&album_id=<?php echo $album->id; ?>"><?php echo _("Random"); ?></a> <?php if (batch_ok()) { ?> - | <a href="<?php echo $web_path; ?>/batch.php?action=alb&id=<?php echo $album->id; ?>"><img src="<?php echo $web_path; ?>/images/icon_download.gif" border="0" alt="<?php echo _('Download'); ?>" /></a> + | <a href="<?php echo $web_path; ?>/batch.php?action=alb&id=<?php echo $album->id; ?>"><?php echo _('Download'); ?></a> <?php } ?> </td> </tr> diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php new file mode 100644 index 00000000..eeae6186 --- /dev/null +++ b/templates/show_recently_played.inc.php @@ -0,0 +1,46 @@ +<?php +/* + + Copyright (c) 2001 - 2006 Ampache.org + All rights reserved. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License 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 + 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. + +*/ +?> +<?php show_box_top(_('Recently Played')); ?> +<table> +<tr class="table-header"> + <td><?php echo _('Username'); ?></td> + <td><?php echo _('Song'); ?></td> + <td><?php echo _('Date'); ?></td> +</tr> +<?php foreach ($data as $row) { + $row_user = new User($row['user']); + $song = new Song($row['object_id']); + $song->format_song(); + /* Prepare the variables */ + $title = scrub_out(truncate_with_ellipse($song->title,'25')); + $album = scrub_out(truncate_with_ellipse($song->f_album_full,'25')); + $artist = scrub_out(truncate_with_ellipse($song->f_artist_full,'25')); + $song_name = $title . ' - ' . $album . '/' . $artist; +?> +<tr> + <td><?php echo scrub_out($row_user->fullname); ?></td> + <td><?php echo $song_name; ?></td> + <td><?php echo date("d/m/Y H:i:s",$row['date']); ?></td> +</tr> +<?php } ?> +</table> +<?php show_box_bottom(); ?> diff --git a/templates/show_songs.inc b/templates/show_songs.inc index 300749ef..0aca4c17 100644 --- a/templates/show_songs.inc +++ b/templates/show_songs.inc @@ -130,20 +130,32 @@ foreach ($song_ids as $song_id) { </a> </td> <td> - <a href="<?php echo $web_path; ?>/flag.php?action=show_flag&type=song&id=<?php echo $song->id; ?>"><img src="<?php echo $web_path; ?>/images/icon_flag.gif" "border="0" alt="<?php echo _('Flag'); ?>" title="<?php echo _('Flag'); ?>"/></a> + <a href="<?php echo $web_path; ?>/flag.php?action=show_flag&type=song&id=<?php echo $song->id; ?>"> + <?php echo get_user_icon('flag'); ?> + </a> <?php if ($GLOBALS['user']->has_access('100')) { ?> - | <a href="<?php echo $web_path; ?>/admin/flag.php?action=show_edit_song&song=<?php echo $song->id; ?>"><img src="<?php echo $web_path; ?>/images/icon_edit.gif" "border="0" alt="<?php echo _('Edit'); ?>" title="<?php echo _('Edit'); ?> "/></a> | + | <a href="<?php echo $web_path; ?>/admin/flag.php?action=show_edit_song&song=<?php echo $song->id; ?>"> + <?php echo get_user_icon('edit'); ?> + </a> | <?php if ($song->enabled) { ?> - <a href="<?php echo $web_path; ?>/admin/flag.php?action=disable&song_ids=<?php echo $song->id; ?>"><img src="<?php echo $web_path; ?>/images/icon_disable.gif" "border="0" alt="<?php echo _('Disable'); ?>" title="<?php echo _('Disable'); ?>" /></a> + <a href="<?php echo $web_path; ?>/admin/flag.php?action=disable&song_ids=<?php echo $song->id; ?>"> + <?php echo get_user_icon('disable'); ?> + </a> <?php } else { ?> - <a href="<?php echo $web_path; ?>/admin/flag.php?action=enabled&song_ids=<?php echo $song->id; ?>"><img src="<?php echo $web_path; ?>/images/icon_enable.gif" "border="0" alt="<?php echo _('Enable'); ?>" title="<?php echo _('Enable'); ?>" /></a> + <a href="<?php echo $web_path; ?>/admin/flag.php?action=enabled&song_ids=<?php echo $song->id; ?>"> + <?php echo get_user_icon('enable'); ?> + </a> <?php } //status ?> <?php } //access ?> <?php if ($GLOBALS['user']->prefs['download']) { ?> - | <a href="<?php echo $web_path; ?>/download/index.php?action=download&song_id=<?php echo $song->id; ?>&sid=<?php echo scrub_out(session_id()); ?>&fn=<?php echo rawurlencode($song->f_artist_full . " - " . $song->title . "." . $song->type); ?>"><img src="<?php echo $web_path; ?>/images/icon_download.gif" "border="0" alt="<?php echo _('Download'); ?>" title="<?php echo _('Download'); ?>" /></a> + | <a href="<?php echo $web_path; ?>/download/index.php?action=download&song_id=<?php echo $song->id; ?>&sid=<?php echo scrub_out(session_id()); ?>&fn=<?php echo rawurlencode($song->f_artist_full . " - " . $song->title . "." . $song->type); ?>"> + <?php echo get_user_icon('download'); ?> + </a> <?php } ?> <?php if ($GLOBALS['user']->prefs['direct_link']) { ?> - | <a href="<?php echo scrub_out($song->get_url()); ?>"><img src="<?php echo $web_path; ?>/images/icon_link.gif" "border="0" alt="<?php echo _('Direct Link'); ?>" title="<?php echo _('Direct Link'); ?>" /></a> + | <a href="<?php echo scrub_out($song->get_url()); ?>"> + <?php echo get_user_icon('link'); ?> + </a> <?php } ?> </td> <?php if(conf('ratings')) { ?> |