summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpb1dft <pb1dft@ampache>2006-10-11 20:59:54 +0000
committerpb1dft <pb1dft@ampache>2006-10-11 20:59:54 +0000
commit4ae5f5c7f57ad94653616d11dc2a69ad0a990d19 (patch)
tree2e00b21f37838145b8a3469f2712fa354f35e0ec
parent59aa296e9ba0717f11e73802b8d4b01ea77cf94c (diff)
downloadampache-4ae5f5c7f57ad94653616d11dc2a69ad0a990d19.tar.gz
ampache-4ae5f5c7f57ad94653616d11dc2a69ad0a990d19.tar.bz2
ampache-4ae5f5c7f57ad94653616d11dc2a69ad0a990d19.zip
fixed delay error in XSPF playlist, added activity column to admin/users
-rw-r--r--lib/class/stream.class.php49
-rw-r--r--templates/show_users.inc10
2 files changed, 35 insertions, 24 deletions
diff --git a/lib/class/stream.class.php b/lib/class/stream.class.php
index 25f3707f..56e701d8 100644
--- a/lib/class/stream.class.php
+++ b/lib/class/stream.class.php
@@ -182,36 +182,37 @@ class Stream {
*/
function create_xspf() {
- header("Cache-control: public");
- header("Content-Disposition: filename=playlist.xspf");
- header("Content-Type: application/xspf+xml;");
- echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
- echo "<playlist version = \"1\" \n xmlns=\"http://xspf.org/ns/0/\">\n";
- echo " <title>Ampache XSPF Playlist</title>\n";
- echo " <creator>" . conf('site_title') . "</creator>\n";
- echo " <annotation>" . conf('site_title') . "</annotation>\n";
- echo " <info>". conf('web_path') ."</info>\n";
- echo " <trackList>\n\n\n\n";
-
+ $playlist = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>
+ <playlist version = \"1\" xmlns=\"http://xspf.org/ns/0/\">
+ <title>Ampache XSPF Playlist</title>
+ <creator>" . conf('site_title') . "</creator>
+ <annotation>" . conf('site_title') . "</annotation>
+ <info>". conf('web_path') ."</info>
+ <trackList>\n\n\n\n";
+
foreach ($this->songs as $song_id) {
$song = new Song($song_id);
$song->format_song();
$url = $song->get_url();
$song_name = $song->f_artist_full . " - " . $song->title . "." . $song->type;
- echo " <track>\n";
- echo " <location>$url</location>\n";
- echo " <identifier>$url</identifier>\n";
- echo " <title>" . $song->title . "</title>\n";
- echo " <creator>" . $song->f_artist_full . "</creator>\n";
- echo " <annotation></annotation>\n";
- echo " <info>" . conf('web_path') . "/albums.php?action=show&album=" . $song->album . "</info>\n";
- echo " <image>" . conf('web_path') . "/albumart.php?id=" . $song->album . "&thumb=2" . "</image>\n";
- echo " <album>" . $song->f_album_full . "</album>\n";
- echo " <duration>" . $song->time . "</duration>\n";
- echo " </track>\n\n\n";
+ $playlist .= " <track>\n";
+ $playlist .= " <location>$url</location>\n";
+ $playlist .= " <identifier>$url</identifier>\n";
+ $playlist .= " <title>" . $song->title . "</title>\n";
+ $playlist .= " <creator>" . $song->f_artist_full . "</creator>\n";
+ $playlist .= " <annotation></annotation>\n";
+ $playlist .= " <info>" . conf('web_path') . "/albums.php?action=show&album=" . $song->album . "</info>\n";
+ $playlist .= " <image>" . conf('web_path') . "/albumart.php?id=" . $song->album . "&thumb=2" . "</image>\n";
+ $playlist .= " <album>" . $song->f_album_full . "</album>\n";
+ $playlist .= " <duration>" . $song->time . "</duration>\n";
+ $playlist .= " </track>\n\n\n";
} // end foreach
- echo " </trackList>\n";
- echo "</playlist>\n";
+ $playlist .= " </trackList>\n";
+ $playlist .= "</playlist>\n";
+ header("Cache-control: public");
+ header("Content-Disposition: filename=playlist.xspf");
+ header("Content-Type: application/xspf+xml;");
+ echo $playlist;
} // create_xspf
diff --git a/templates/show_users.inc b/templates/show_users.inc
index dd0d7b0a..3c0931e3 100644
--- a/templates/show_users.inc
+++ b/templates/show_users.inc
@@ -54,6 +54,10 @@ $admin_menu = "admin/";
<b><?php echo _("Registration Date"); ?></b>
</a>
</td>
+ <td align="center">
+ <b><?php echo _("Activity"); ?></b>
+ </td>
+
<td colspan="5">&nbsp;</td>
<!--
<td align="center">
@@ -82,6 +86,7 @@ while ($results = mysql_fetch_object($db_result)) {
$last_seen = date("m\/d\/Y - H:i",$user->last_seen);
if (!$user->last_seen) { $last_seen = "Never"; }
$create_date = date("m\/d\/Y - H:i",$user->create_date);
+ $user->format_user();
if (!$user->create_date) { $create_date = "Unknown"; }
?>
@@ -99,6 +104,11 @@ while ($results = mysql_fetch_object($db_result)) {
</td>
<td>
+ <?php echo $user->f_useage; ?>
+ </td>
+
+
+ <td>
<a href="<?php echo $web_path; ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>">
<?php echo get_user_icon('edit'); ?>
</a>