summaryrefslogtreecommitdiffstats
path: root/lib/ui.lib.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-27 19:16:01 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-01-27 19:16:01 +0000
commit21871e8d17385885961c9b0319757f259bdb6f74 (patch)
treed526236b4ff7b97bc78d666281537bf8b8b337f1 /lib/ui.lib.php
parentf9831bdcd090dbf67ab7262f1e0fcef58ec1e880 (diff)
downloadampache-21871e8d17385885961c9b0319757f259bdb6f74.tar.gz
ampache-21871e8d17385885961c9b0319757f259bdb6f74.tar.bz2
ampache-21871e8d17385885961c9b0319757f259bdb6f74.zip
added in the rating images from greengeek, removed some useless functions, tweaked working on update to correctly reflect limitations
Diffstat (limited to 'lib/ui.lib.php')
-rw-r--r--lib/ui.lib.php147
1 files changed, 0 insertions, 147 deletions
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index ed208f34..68092b71 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -201,143 +201,6 @@ function show_footer() {
} // show_footer
/**
- * show_play_selected
- * this shows the playselected/add to playlist
- * box, which includes a little javascript
- */
-function show_play_selected() {
-
- require (conf('prefix') . "/templates/show_play_selected.inc.php");
-
-} // show_play_selected
-
-/*
- * Artist Ratings - Implemented by SoundOfEmotion
- *
- * set_artist_rating()
- *
- * check to see if the ratings exist
- * if they do: update them
- * if they don't: insert them
- *
- */
-function set_artist_rating ($artist_id, $rate_user, $rating) {
- $artist_id = sql_escape($artist_id);
-
- $sql = "SELECT * FROM ratings WHERE user='$rate_user' AND object_type='artist' AND object_id='$artist_id'";
- $db_result = mysql_query( $sql, dbh() );
- $r = mysql_fetch_row( $db_result );
-
- if($r[0]) {
- $sql2 = "UPDATE ratings SET user_rating='$rating' WHERE object_id='$artist_id' AND user='$rate_user' AND object_type='artist'";
- $db_result2 = mysql_query( $sql2, dbh() );
- $r = mysql_fetch_row( $db_result2 );
- return mysql_insert_id( dbh() );
- }
- else if(!$r[0]) {
- $sql2 = "INSERT INTO ratings (id,user,object_type,object_id,user_rating) ".
- "VALUES ('','$rate_user','artist','$artist_id','$rating')";
- $db_result2 = mysql_query( $sql2, dbh() );
- return mysql_insert_id(dbh() );
- }
- else{
- return "NA";
- }
-} // set_artist_rating()
-
-/*
- * Album Ratings - Implemented by SoundOfEmotion
- *
- * set_album_rating()
- *
- * check to see if the ratings exist
- * if they do: update them
- * if they don't: insert them
- *
- */
-
-function set_album_rating($album_id, $rate_user, $rating) {
- $album_id = sql_escape($album_id);
-
- $sql = "SELECT * FROM ratings WHERE user='$rate_user' AND object_type='album' AND object_id='$album_id'";
- $db_result = mysql_query( $sql, dbh() );
- $r = mysql_fetch_row( $db_result );
-
- if($r[0]) {
- $sql2 = "UPDATE ratings SET user_rating='$rating' WHERE object_id='$album_id' AND user='$rate_user' AND object_type='album'";
- $db_result2 = mysql_query( $sql2, dbh() );
- return mysql_insert_id( dbh() );
- }
- else if(!$r[0]) {
- $sql2 = "INSERT INTO ratings (id,user,object_type,object_id,user_rating) ".
- "VALUES ('','$rate_user','album','$album_id','$rating')";
- $db_result2 = mysql_query( $sql2, dbh() );
- return mysql_insert_id( dbh() );
- }
- else{
- return "NA";
- }
-} // set_album_rating()
-
-/*
- * Song Ratings - Implemented by SoundOfEmotion
- *
- * set_song_rating()
- *
- * check to see if the ratings exist
- * if they do: update them
- * if they don't: insert them
- *
- */
-
-function set_song_rating($song_id, $rate_user, $rating) {
- $song_id = sql_escape($song_id);
-
- $sql = "SELECT * FROM ratings WHERE user='$rate_user' AND object_type='song' AND object_id='$song_id'";
- $db_result = mysql_query( $sql, dbh() );
- $r = mysql_fetch_row( $db_result );
-
- if($r[0]){
- $sql2 = "UPDATE ratings SET user_rating='$rating' WHERE object_id='$song_id' AND user='$rate_user' AND object_type='song'";
- $db_result2 = mysql_query( $sql2, dbh() );
- return mysql_insert_id( dbh() );
- }
- else if(!$r[0]){
- $sql2 = "INSERT INTO ratings (id,user,object_type,object_id,user_rating) ".
- "VALUES ('','$rate_user','song','$song_id','$rating')";
- $db_result2 = mysql_query( $sql2, dbh() );
- return mysql_insert_id( dbh() );
- }
- else{
- return "NA";
- }
-} // set_song_rating()
-
-/**
- * show_page_footer
- * adds page footer including html and body end tags
- * @param $menu menu item to highlight
- * @param $admin_menu admin menu item to highlight
- * @param $display_menu display menu or not (1 on 0 off)
- * @package Web Interface
- * @catagory Display
- */
-function show_page_footer($menu="Home", $admin_menu='', $display_menu=0) {
-
- if ($display_menu){
- if($menu == 'Admin'){
- show_admin_menu($admin_menu);
- } // end if admin
-
- show_menu_items($menu);
-
- } // end if
-
- show_template('footer');
-
-} // show_page_footer
-
-/**
* img_resize
* this automaticly resizes the image for thumbnail viewing
* only works on gif/jpg/png this function also checks to make
@@ -599,16 +462,6 @@ function good_email($email) {
} //good_email
/**
- * show_playlist_import
- * This shows the playlist import templates
- */
-function show_playlist_import() {
-
- require (conf('prefix') . '/templates/show_import_playlist.inc.php');
-
-} // show_playlist_import
-
-/**
* show_album_select
* This displays a select of every album that we've got in Ampache, (it can be hella long) it's used
* by the Edit page, it takes a $name and a $album_id