summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-17 08:41:21 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2006-12-17 08:41:21 +0000
commit7c661ba685287efd21512f9f0203641200bffed2 (patch)
treeb99371285778815b3faabbaae6b9e8d7bf3e19e1 /templates
parentce1a8672d4b2d78b8301527311a410af893c4943 (diff)
downloadampache-7c661ba685287efd21512f9f0203641200bffed2.tar.gz
ampache-7c661ba685287efd21512f9f0203641200bffed2.tar.bz2
ampache-7c661ba685287efd21512f9f0203641200bffed2.zip
* Added Recommendations based on matching ratings between users
* Integrated LastFM plugin (defaults to disabled still) * Fixed a view issue with the Admin Localplay Level preference * removed some old MPD pages that were not being usedwq
Diffstat (limited to 'templates')
-rw-r--r--templates/show_mpd_pl_box.inc.php29
-rw-r--r--templates/show_mpdpl.inc179
-rw-r--r--templates/show_mpdplay.inc174
-rw-r--r--templates/show_user_recommendations.inc.php60
-rw-r--r--templates/show_user_stats.inc.php60
-rw-r--r--templates/show_users.inc6
6 files changed, 123 insertions, 385 deletions
diff --git a/templates/show_mpd_pl_box.inc.php b/templates/show_mpd_pl_box.inc.php
deleted file mode 100644
index 429a2866..00000000
--- a/templates/show_mpd_pl_box.inc.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/*
-
- Copyright (c) 2001 - 2005 Ampache.org
- All rights reserved.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-?>
-<table border="0" cellpadding="0" cellspacing="1" class="text-box">
-<tr align="center">
- <td >
- <?php show_playlist_dropdown($GLOBALS['playlist_id']); ?>
- </td>
-</tr>
-</table>
diff --git a/templates/show_mpdpl.inc b/templates/show_mpdpl.inc
deleted file mode 100644
index 50da3349..00000000
--- a/templates/show_mpdpl.inc
+++ /dev/null
@@ -1,179 +0,0 @@
-<?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
- 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 = conf('web_path');
-/*
-
-TTD:
-- It would be nice if flagged songs showed up in a flagged color (e.g. red).
-- Accept one or more parameters by which the caller specify which columns are displayed.
-- What is the best way to deal with the play pointer when stopped. MPD doesn't report a "position" but stop restarts at the song
- that was playing before the stop.
-
-*/
-
-
-$nopad = "style='padding: 0px 0px 0px 0px'";
-
-$myMpd = init_mpd();
-?>
-
-<form name="songs" action="<?php echo $web_path."/amp-mpd.php"; ?>" method="post" enctype="multipart/form-data">
-<table id= "mpdpl" border="0" cellpadding="0" cellspacing="1" class="tabledata">
-<tr>
- <td style="text-align:center" class="table-header">
- <b><?php echo _("MPD Server Playlist"); ?></b>
- </td>
-</tr>
-<tr>
- <td <?php echo $nopad ?>>
- <table cellspacing="0" cellpadding="0" border="0" width="100%">
- <tr class="table-header">
- <th><a href="#" onclick="check_songs(); return false;">Select</a>/<br /><a href="#" onclick="invert_songs(); return false;">Invert</a></th>
- <th align="left"><?php echo _("Song title"); ?></th>
- <th align="left"><?php echo _("Artist"); ?></th>
- <th align="left"><?php echo _("Album"); ?></th>
- <th align="right"><?php echo _("Track"); ?></th>
- <th align="right"><?php echo _("Time"); ?></th>
- <th><?php echo _("Genre"); ?></th>
- <th><?php echo _("Action"); ?></th>
- </tr>
- <?php
- $pl = $myMpd->playlist;
- if (is_null($pl)) { echo "ERROR: ".$myMpd->errStr."\n"; }
- else {
- $maxlen = strlen (count($pl));
- $condPL = conf('condPL');
- if ($condPL) {
- echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
- }
- else {
- echo "<tr><td>&nbsp;</td></tr>";
- }
-
- foreach ($pl as $id=>$entry) {
- if ( ($condPL) and (($id < $myMpd->current_track_id-1) or ($id > $myMpd->current_track_id + 10)) ) {
- continue;
- }
-
- unset($text_class);
- $track = $id+1;
- $len=strlen($track);
-
- while ($len < $maxlen) {
- $track = "0".$track;
- $len++;
- }
-
- $flip = flip_class();
- echo '<tr id="mpd_row'.$id .'" class ="'.
- ($id==$myMpd->current_track_id ? 'npsong': $flip). '">';
-
- $mpddir = conf('mpd_dir')."/";
-
- if (strtolower(conf('mpd_method')) == 'file') {
- $sql = "SELECT genre.name, song.genre, song.id, song.album, song.artist FROM song, genre WHERE file = \"".$mpddir.$entry['file']."\" AND song.genre=genre.id";
- $db_results = @mysql_query($sql,dbh());
- $r = @mysql_fetch_object ($db_results);
- $entry['genre'] = $r->name;
- }
- else {
- list($tmp, $id, $tmp) = preg_split("/(song=|&)/", $entry['file']);
- $r = new Song($id);
- $entry['Title'] = $r->title;
- $entry['Artist'] = $r->get_artist_name();
- $entry['Album'] = $r->get_album_name();
- $entry['genre'] = $r->get_genre_name();
- $entry['Time'] = $r->time;
- $entry['Track'] = $r->track;
- }
-
- $totaltime += $entry['Time'];
- ?>
- <td align="center"> <input type="checkbox" name="song[]" value="<?php echo $entry['Pos']?>" id="song_<?php echo $entry['Pos']; ?>"></input></td>
- <td align="left"> <?php echo $track.". ";?><a href="<?php echo $web_path; ?>/amp-mpd.php?action=skipto&amp;val=<?php echo $entry['Pos']; ?>" title=" <?php echo htmlspecialchars($entry['Title']); ?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Title']); ?> </a></td>
- <td align="left"> <a href="<?php echo $web_path; ?>/artists.php?action=show&amp;artist=<?php echo htmlspecialchars($r->artist); ?>" title="More from <?php echo htmlspecialchars($entry['Artist']);?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Artist']);?> </a></td>
- <td align="left"> <a href="<?php echo $web_path; ?>/albums.php?action=show&amp;album=<?php echo htmlspecialchars($r->album); ?>" title="More on <?php echo htmlspecialchars($entry['Album']); ?>"<?php echo $text_class; ?>><?php echo htmlspecialchars($entry['Album']); ?> </a></td>
- <td align="right"> <?php echo $entry['Track']; ?>&nbsp;&nbsp;</td>
- <td align="right"> <?php echo sprintf ("%d:%02d",$entry['Time']/60,$entry['Time']%60); ?>&nbsp;</td>
- <td align="left"> &nbsp;<?php echo $entry['genre']; ?></td>
- <td>
- <a href="<?php echo $web_path;?>/flag.php?song=<?php echo $r->id;?>&amp;action=flag" title="Flag '<?php echo htmlspecialchars($entry['file']);?>' by <?php echo htmlspecialchars($entry['Artist']);?>"<?php echo $text_class;?>>f</a>&nbsp;
- <a href="<?php echo $web_path;?>/amp-mpd.php?action=movenext&amp;val=<?php echo $entry['Pos'];?>" title="Move '<?php echo htmlspecialchars($entry['Title']);?>' to play next "<?php echo $text_class;?>>n</a>&nbsp;
- <a href="<?php echo $web_path;?>/amp-mpd.php?action=rem&amp;id=<?php echo $entry['Pos'];?>" title="Remove '<?php echo htmlspecialchars($entry['Title']);?>' from playlist "<?php echo $text_class;?>>x</a>
- </td>
- </tr>
- <?php
- }// foreach loop
- if (($condPL) && ($myMpd->current_track_id+10 <= $myMpd->playlistcount)) {
- echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
- }
- } //else
-
- $time = floor($totaltime/60) . ":" . sprintf("%02d", ($totaltime%60) );
- $num = count($pl);
- if ($condPL) {
- echo "<tr class=\"".flip_class()."\"><td colspan=\"8\" align=\"center\" style=\"padding: 3px 0px 3px 0px\">... Condensed Playlist ...</td></tr>";
- }
- else {
- echo "<tr><td>&nbsp;</td></tr>";
- }
- ?>
- <tr class="table-header" valign="middle">
- <td>
- <input type="hidden" name="action" value="plact" /> <button name="submit" value="submit" type="submit" style = "font-family: <?php echo conf('font')?>; font-size: <?php echo conf('font_size')?>px" title="Take Action on the checked songs">Do</button>
- </td>
- <td valign="middle">
- <select name="todo" style = "font-family: <?php echo conf('font')?>; font-size: <?php echo conf('font_size')?>px" size="1">
- <option>Add to Playlist</option>
- <option>Delete</option>
- <!--<option>Move Next</option> This isn't working yet -->
- </select>
- </td>
- <td valign="middle"><?php show_playlist_dropdown($GLOBALS['playlist_id']); ?></td>
- <td valign="middle"><?php echo $num; ?> song(s)</td>
- <td>&nbsp;</td>
- <td valign="middle" align="right" nowrap="nowrap"><?php echo $time; ?></td>
- <td>&nbsp;</td>
- <td>&nbsp;</td>
- </tr>
- </table>
- </td>
-</tr>
-<tr>
- <td align="center" valign="bottom" class="table-header">
- <i>
- [<a title="<?php echo _("Refresh the Playlist Window"); ?>" href="<?php echo $_SERVER['PHP_SELF']; ?>">refresh</a>]
- <?php if($myMpd->playlist_count > 0 ) {$un = (conf('condPL')) ? "un" : ""; ?>
- [<a title="<?php echo _("Click to shuffle (randomize) the playlist");?>" href="<?php echo $web_path; ?>/amp-mpd.php?action=shuffle"><?php echo _("shuffle")?></a>]
- [<a title="<?php echo _("Click to the clear the playlist");?>" href="<?php echo $web_path; ?>/amp-mpd.php?action=clear">clear</a>]
- <?php if($myMpd->playlist_count > 10) { ?>
- [<a title="<?php echo 'Click to '.$un.'condense playlist';?>" href="<?php echo $web_path; ?>/amp-mpd.php?action=condPL"><?php echo $un?>condense</a>]
- <?php } ?>
- [<a title="<?php echo _("Click to the remove all except the Now Playing");?>" href="<?php echo $web_path; ?>/amp-mpd.php?action=crop">crop</a>]
- <?php } ?>
- </i>
- </td>
-</tr>
-</table>
-<br />
-</form>
-
diff --git a/templates/show_mpdplay.inc b/templates/show_mpdplay.inc
deleted file mode 100644
index fd9c942d..00000000
--- a/templates/show_mpdplay.inc
+++ /dev/null
@@ -1,174 +0,0 @@
-<?php
-/*
-
- Copyright (c) 2001 - 2005 Ampache.org
- All rights reserved.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-*/
-
-/*!
- @header Show mpd controls, this doesn't
- include the playlist, status and what have you.
- this looks a goodbit like local_play
-*/
-$web_path = conf('web_path');
-global $condPL;
-?>
-
-<div align="center"><!-- Is this div neccesary??? or is the below table not needed???-->
-<table border="0" cellpadding="3" cellspacing="0"><!-- MPD Control table -->
-<tr>
-<td>
- <table id="mpd_control" border="0" cellpadding="0" cellspacing="0" class="even" align="center">
- <th class="table-header"><?php echo _("MPD Play Control"); ?></th>
- <tr>
- <td>
- <?php ${$myMpd->state} = "class='selected_button'";
- if (true) /* rigged to do AJAX for now; change to conf('AJAX') later*/ { ?>
- <!-- for testing <input type="button" value="times" onclick="timestuff();"/> -->
- <input type="button" value="|&lt; " onclick="startRequest('action=Prev');"/>
- <input type="button" <?php echo $stop ?> id="stop_button" value=" X " onclick="startRequest('action=stop');"/>
- <input type="button" <?php echo $play ?> id="play_button" value=" &gt; " onclick="startRequest('action=play');"/>
- <input type="button" <?php echo $pause ?> id="pause_button" value=" | | " onclick="startRequest('action=pause');"/>
- <input type="button" value=" &gt;|" onclick="startRequest('action=Next');"/>
- <?php
- }
- else { ?>
- <form action="<?php echo $web_path; ?>/amp-mpd.php" method="post" name="playcontrol" style="display:inline; white-space: nowrap">
- <!-- these used to have class="button" -->
- <input type="submit" title="<?php echo _("Prev"); ?>" name="action" value="|&lt; " />
- <input type="submit" title="<?php echo _("Stop"); ?>" name="action" value=" X " <?php echo $stop; ?> />
- <input type="submit" title="<?php echo _("Play"); ?>" name="action" value=" &gt; " <?php echo $play; ?> />
- <input type="submit" title="<?php echo _("Pause"); ?>" name="action" value=" | | " <?php echo $pause; ?> />
- <input type="submit" title="<?php echo _("Next"); ?>" name="action" value= " &gt;|" />
- </form>
- <?php } ?>
- </td>
- </tr>
- <tr>
- <td class="content"> Volume: <b><span id='volume'><?php echo $myMpd->volume ?></span>%</b></td>
- </tr>
- <tr>
- <td class="content">
- <?php
- if (true) /* rigged to do AJAX for now; change to conf('AJAX') later */ { ?>
- <input type="button" value="0" onclick="startRequest('action=setvol&amp;param1=0');"/>
- <input type="button" value="-25" onclick="startRequest('action=adjvol&amp;param1=-25');"/>
- <input type="button" value="-10" onclick="startRequest('action=adjvol&amp;param1=-10');"/>
- <input type="button" value="+10" onclick="startRequest('action=adjvol&amp;param1=10');"/>
- <input type="button" value="+25" onclick="startRequest('action=adjvol&amp;param1=25');"/>
- <?php
- }
- else { ?>
- [<a href="<?php echo $web_path; ?>/amp-mpd.php?action=setvol&amp;val=0">mute</a>
- <a href="<?php echo $web_path; ?>/amp-mpd.php?action=adjvol&amp;val=-25">-25</a>
- <a href="<?php echo $web_path; ?>/amp-mpd.php?action=adjvol&amp;val=-10">-10</a>
- <a href="<?php echo $web_path; ?>/amp-mpd.php?action=adjvol&amp;val=+10">+10</a>
- <a href="<?php echo $web_path; ?>/amp-mpd.php?action=adjvol&amp;val=+25">+25</a>] ';
- <?php } ?>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo _("Loop"); ?>:
- <form action="<?php echo $web_path; ?>/amp-mpd.php?action=loop" method="post" name="repeatcontrol" style="display:inline;">
- <?php
- $repeat_name = "repeat_" . intval($myMpd->repeat);
- ${$repeat_name} = "style=\"background-color: black;color:white;\"";
- ?>
- &nbsp;&nbsp;&nbsp;&nbsp;
- <input class="button" type="submit" title="<?php echo _("On"); ?>" name="val" value="On" <?php echo $repeat_1; ?> />
- <input class="button" type="submit" title="<?php echo _("Off"); ?>" name="val" value="Off" <?php echo $repeat_0; ?> />
- </form>
- </td>
- </tr>
- <tr>
- <td>
- <?php echo _("Random"); ?>:
- <form action="<?php echo $web_path; ?>/amp-mpd.php?action=random" method="post" name="randomcontrol" style="display:inline;">
- <?php
- $random_name = "random_" . intval($myMpd->random);
- ${$random_name} = "style=\"background-color: black;color:white;\""; ?>
- <input class="button" type="submit" title="<?php echo _("On"); ?>" name="val" value="On" <?php echo $random_1; ?> />
- <input class="button" type="submit" title="<?php echo _("Off"); ?>" name="val" value="Off" <?php echo $random_0; ?> />
- </form>
- </td>
- </tr>
- <tr>
- <td class="content">&nbsp;</td>
- </tr>
- </table>
-</td>
-</tr>
-<tr>
-<td>
- <table id="mpd_np" <?php if (($myMpd->state == "stop") or ($myMpd->state == "pause")) { echo 'class="nodisplay"'; } ?> border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="npsong"><b><?php echo _("Now Playing :")?></b></td>
- </tr>
- <tr>
- <td align="center" class="npsong"><?php
- if (!$myMpd->playlist[($myMpd->current_track_id)]['Title']) {
- list($tmp, $id, $tmp) = preg_split("/(song=|&)/", $myMpd->playlist[($myMpd->current_track_id)]['file']);
- $r = new Song($id);
- $myMpd->playlist[($myMpd->current_track_id)]['Title'] = $r->title;
- $myMpd->playlist[($myMpd->current_track_id)]['Artist'] = $r->get_artist_name();
- $myMpd->playlist[($myMpd->current_track_id)]['Album'] = $r->get_album_name();
- }
- echo "<span id='mpd_npinfo'>";
- echo ($myMpd->current_track_id+1).
- ". ".$myMpd->playlist[$myMpd->current_track_id]['Artist'].
- " - ".$myMpd->playlist[$myMpd->current_track_id]['Title'].
- " - ".$myMpd->playlist[$myMpd->current_track_id]['Album'].
- " - ".format_time($myMpd->playlist[$myMpd->current_track_id]['Time']);
- echo "</span>"; ?>
- </td>
- </tr>
- <tr>
- <td align="center" class="npsong">
- <span id="mpd_cur_track_pos"><?php echo format_time($myMpd->current_track_position)?></span>
- (<span id="mpd_pctplayed"><?php echo (round(($myMpd->current_track_position/$myMpd->current_track_length),2)*100)."</span>%) played" ?>
- </td>
- </tr>
- <tr>
- <td>
- <b><?php echo _("On Deck ")?><?php echo _("(in ").
- "<span id = 'mpd_on_deck_in'>".format_time($myMpd->current_track_length - $myMpd->current_track_position)."</span>)"?>
- </b>
- </td>
- </tr>
- <tr>
- <td align="center"><?php
- if (!$myMpd->playlist[($myMpd->current_track_id+1)]['Title']) {
- list($tmp, $id, $tmp) = preg_split("/(song=|&)/", $myMpd->playlist[($myMpd->current_track_id+1)]['file']);
- $r = new Song($id);
- $myMpd->playlist[($myMpd->current_track_id+1)]['Title'] = $r->title;
- $myMpd->playlist[($myMpd->current_track_id+1)]['Artist'] = $r->get_artist_name();
- $myMpd->playlist[($myMpd->current_track_id+1)]['Album'] = $r->get_album_name();
- }
- echo ($myMpd->current_track_id+2).
- ". ".$myMpd->playlist[($myMpd->current_track_id+1)]['Artist'].
- " - ".$myMpd->playlist[($myMpd->current_track_id+1)]['Title'].
- " - ".$myMpd->playlist[($myMpd->current_track_id+1)]['Album'].
- " - ".format_time($myMpd->playlist[($myMpd->current_track_id+1)]['Time']);?>
- </td>
- </tr>
- </table>
-</td>
-</tr>
-</table>
-</div>
diff --git a/templates/show_user_recommendations.inc.php b/templates/show_user_recommendations.inc.php
new file mode 100644
index 00000000..a89be09e
--- /dev/null
+++ b/templates/show_user_recommendations.inc.php
@@ -0,0 +1,60 @@
+<?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($working_user->fullname . ' ' . _('Recommendations')); ?>
+<table class="tabledata">
+<tr>
+ <td valign="top">
+ <?php
+ if (count($recommended_artists)) {
+ $items = $working_user->format_recommendations($recommended_artists,'artist');
+ show_info_box(_('Recommended Aritsts'),'artist',$items);
+ }
+ else {
+ echo "<span class=\"error\">" . _('Not Enough Data') . "</span>";
+ }
+ ?>
+ </td>
+ <td valign="top">
+ <?php
+ if (count($recommended_albums)) {
+ $items = $working_user->format_recommendations($recommended_albums,'album');
+ show_info_box(_('Recommended Albums'),'album',$items);
+ }
+ else {
+ echo "<span class=\"error\">" . _('Not Enough Data') . "</span>";
+ }
+ ?>
+ </td>
+ <td valign="top">
+ <?php
+ if (count($recommended_songs)) {
+ $items = $working_user->format_recommendations($recommended_songs,'song');
+ show_info_box(_('Recommended Songs'),'song',$items);
+ }
+ else {
+ echo "<span class=\"error\">" . _('Not Enough Data') . "</span>";
+ }
+ ?>
+ </td>
+</tr>
+</table>
+<?php show_box_bottom(); ?>
diff --git a/templates/show_user_stats.inc.php b/templates/show_user_stats.inc.php
new file mode 100644
index 00000000..ab962874
--- /dev/null
+++ b/templates/show_user_stats.inc.php
@@ -0,0 +1,60 @@
+<?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($working_user->fullname . ' ' . _('Favorites')); ?>
+<table class="tabledata">
+<tr>
+ <td valign="top">
+ <?php
+ if (count($favorite_artists)) {
+ $items = $working_user->format_favorites($favorite_artists);
+ show_info_box(_('Favorite Artists'),'artist',$items);
+ }
+ else {
+ echo "<span class=\"error\">" . _('Not Enough Data') . "</span>";
+ }
+ ?>
+ </td>
+ <td valign="top">
+ <?php
+ if (count($favorite_albums)) {
+ $items = $working_user->format_favorites($favorite_albums);
+ show_info_box(_('Favorite Albums'),'album',$items);
+ }
+ 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);
+ show_info_box(_('Favorite Songs'),'your_song',$items);
+ }
+ else {
+ echo "<span class=\"error\">" . _('Not Enough Data') . "</span>";
+ }
+ ?>
+ </td>
+</tr>
+</table>
+<?php show_box_bottom(); ?>
diff --git a/templates/show_users.inc b/templates/show_users.inc
index f0c4997c..6b7d3e14 100644
--- a/templates/show_users.inc
+++ b/templates/show_users.inc
@@ -99,17 +99,17 @@ while ($results = mysql_fetch_object($db_result)) {
<td>
- <a href="<?php echo $web_path; ?>/admin/users.php?action=edit&amp;user=<?php echo $user->username; ?>">
+ <a href="<?php echo $web_path; ?>/admin/users.php?action=edit&amp;user=<?php echo $user->id; ?>">
<?php echo get_user_icon('edit'); ?>
</a>
</td>
<td>
- <a href="<?php echo $web_path; ?>/admin/preferences.php?action=user&amp;user_id=<?php echo $user->username; ?>">
+ <a href="<?php echo $web_path; ?>/admin/preferences.php?action=user&amp;user_id=<?php echo $user->id; ?>">
<?php echo get_user_icon('preferences'); ?>
</a>
</td>
<td>
- <a href="<?php echo $web_path; ?>/stats.php?user_id=<?php echo $user->username; ?>">
+ <a href="<?php echo $web_path; ?>/stats.php?action=user_stats&amp;user_id=<?php echo $user->id; ?>">
<?php echo get_user_icon('statistics'); ?>
</a>
</td>