diff options
author | xgizzmo <xgizzmo@ampache> | 2006-01-11 02:59:17 +0000 |
---|---|---|
committer | xgizzmo <xgizzmo@ampache> | 2006-01-11 02:59:17 +0000 |
commit | 603f145952f39164b961ac94a46b8a459e7adac0 (patch) | |
tree | 90fb10a0f1a1ea8396af8a41e629b1e63bac30d2 /templates/show_object_rating.inc.php | |
parent | 67d76f09c28d0c6abae6d966f4cc00a5428bdc74 (diff) | |
download | ampache-603f145952f39164b961ac94a46b8a459e7adac0.tar.gz ampache-603f145952f39164b961ac94a46b8a459e7adac0.tar.bz2 ampache-603f145952f39164b961ac94a46b8a459e7adac0.zip |
More code clean up this should about cover /templates
Diffstat (limited to 'templates/show_object_rating.inc.php')
-rw-r--r-- | templates/show_object_rating.inc.php | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/templates/show_object_rating.inc.php b/templates/show_object_rating.inc.php index 16dff78e..831b6b40 100644 --- a/templates/show_object_rating.inc.php +++ b/templates/show_object_rating.inc.php @@ -1,6 +1,5 @@ <?php /* - Copyright 2001 - 2006 Ampache.org All Rights Reserved @@ -19,45 +18,43 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - - if ($type != 'song') { echo "<strong>" . _("Rating") . ":</strong>"; } /* Create some variables we are going to need */ -$base_url = conf('web_path') . '/ratings.php?action=set_rating&mode=' . conf('flash') . '&rating_type=' . $rating->type . '&object_id=' . $rating->id . '&username=' . $GLOBALS['user']->username; -$score = '0'; - +$web_path = conf('web_path'); +$base_url = $web_path . '/ratings.php?action=set_rating&mode=' . conf('flash') . '&rating_type=' . $rating->type . '&object_id=' . $rating->id . '&username=' . $GLOBALS['user']->username; +$score = '0'; /* count up to 6 */ while ($score < 6) { /* Handle the "Not rated" possibility */ if ($score == '0' AND $rating->rating == '-1') { - echo "<img src=\"" . conf('web_path') . "/images/ratings/x.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; + echo "<img src=\"" . $web_path . "/images/ratings/x.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; $found_on = true; } elseif ($score == '0' AND $rating->rating == '0') { - echo "<img src=\"" . conf('web_path') . "/images/ratings/x_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; + echo "<img src=\"" . $web_path . "/images/ratings/x_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; $found_on = true; } elseif ($score == '0') { echo "<a href=\"" . $base_url . "&rating=$score\">\n\t"; - echo "<img src=\"" . conf('web_path') . "/images/ratings/x_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; + echo "<img src=\"" . $web_path . "/images/ratings/x_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; echo "</a>"; } elseif ($score == $rating->rating) { - echo "<img src=\"" . conf('web_path') . "/images/ratings/star.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; + echo "<img src=\"" . $web_path . "/images/ratings/star.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n"; $found_on = true; } elseif (!$found_on) { - echo "<a href=\"" . $base_url . "&rating=$score\">\n\t<img src=\"" . conf('web_path') . "/images/ratings/star.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n</a>\n"; + echo "<a href=\"" . $base_url . "&rating=$score\">\n\t<img src=\"" . $web_path . "/images/ratings/star.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n</a>\n"; } else { - echo "<a href=\"" . $base_url . "&rating=$score\">\n\t<img src=\"" . conf('web_path') . "/images/ratings/star_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n</a>\n"; + echo "<a href=\"" . $base_url . "&rating=$score\">\n\t<img src=\"" . $web_path . "/images/ratings/star_off.gif\" border=\"0\" alt=\"" . get_rating_name($score) . "\" />\n</a>\n"; } /* Next! */ $score++; } // end while - ?> + |