diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-25 10:04:27 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2005-12-25 10:04:27 +0000 |
commit | 27158141ee1a14b7d23ae8997d2c41b49fc904d9 (patch) | |
tree | 2180fff67d21ffdbab32f2105cff3c7275b6b511 /templates/show_songs.inc | |
parent | 5415c2e847032896907946c98d68a254399e4416 (diff) | |
download | ampache-27158141ee1a14b7d23ae8997d2c41b49fc904d9.tar.gz ampache-27158141ee1a14b7d23ae8997d2c41b49fc904d9.tar.bz2 ampache-27158141ee1a14b7d23ae8997d2c41b49fc904d9.zip |
initial ratings mojo, some stylesheet fixes, changed user preferences again and a db update
Diffstat (limited to 'templates/show_songs.inc')
-rw-r--r-- | templates/show_songs.inc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/templates/show_songs.inc b/templates/show_songs.inc index 2f006009..5dd22f10 100644 --- a/templates/show_songs.inc +++ b/templates/show_songs.inc @@ -22,6 +22,10 @@ $web_path = conf('web_path'); show_clear(); + +// Need to set the username for the song ratings. +$username=$GLOBALS['user']->username; + ?> <form name="songs" method="post" enctype="multipart/form-data" action="#"> <table border="0"> @@ -40,6 +44,9 @@ show_clear(); <th><?php echo _("Genre"); ?></th> <th><?php echo _("Flag"); ?></th> <th><?php echo _("Action"); ?></th> + <?php if (conf('ratings') || conf('ratings')=="false") { ?> + <th><?php echo _("Rating"); ?></th> + <? } ?> </tr> <?php /* FIXME: don't even get me started with how many things are wrong with this code */ @@ -57,7 +64,8 @@ show_clear(); // Still needed crap $totalsize += $song->size; $totaltime += $song->time; - if ($song->status == "disabled") { $text_class = "class=\"disabled\""; } + if ($song->status == "disabled") { $text_class = "class=\"disabled\""; } + include("get_song_ratings.inc"); ?> <tr class="<?php echo flip_class(); ?>"> <td align="center"> @@ -119,6 +127,11 @@ show_clear(); | <a href="<?php echo $web_path; ?>/play/index.php?song=<?php echo $song->id; ?>&uid=<?php echo $user->username . "&sid=" . session_id(); ?>&fn=<?php echo rawurlencode($song->f_artist_full . " - " . $song->title . "." . $song->type); ?>"><?php echo _("Direct Link"); ?></a> <?php } ?> </td> + <?php if(conf('ratings')) { ?> + <td> + <?php show_rating($song->id,'song'); ?> + </td> + <? } ?> </tr> <?php }// foreach loop |