summaryrefslogtreecommitdiffstats
path: root/browse.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-06 22:19:37 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-05-06 22:19:37 +0000
commit0dcbad80cde204cfda078b5fc16a92c41d74c87d (patch)
treec4ed21ecdd134638c184b31fe38e863c5c0e9a5b /browse.php
parent691c838e90e759a7461cec657d95a4f1af9f46c6 (diff)
downloadampache-0dcbad80cde204cfda078b5fc16a92c41d74c87d.tar.gz
ampache-0dcbad80cde204cfda078b5fc16a92c41d74c87d.tar.bz2
ampache-0dcbad80cde204cfda078b5fc16a92c41d74c87d.zip
added in basic browse by song functionality with filtering of unplayed
Diffstat (limited to 'browse.php')
-rw-r--r--browse.php36
1 files changed, 5 insertions, 31 deletions
diff --git a/browse.php b/browse.php
index 220a0f9b..69454c2e 100644
--- a/browse.php
+++ b/browse.php
@@ -37,6 +37,7 @@ require_once 'lib/init.php';
/* Display the headers and menus */
require_once Config::get('prefix') . '/templates/header.inc.php';
+echo '<div id="browse_content">';
switch($_REQUEST['action']) {
case 'file':
@@ -104,37 +105,8 @@ switch($_REQUEST['action']) {
break;
case 'song':
Browse::set_type('song');
-
- /* Setup the View Object */
- $view = new View();
- $view->import_session_view();
-
- $match = scrub_in($_REQUEST['match']);
-
- require (conf('prefix') . '/templates/show_box_top.inc.php');
- show_alphabet_list('song_title','browse.php',$match,'song_title');
- /* Detect if it's Browse, and if so don't fill it in */
- if ($match == 'Browse') { $match = ''; }
- show_alphabet_form($match,_('Show Titles Starting With'),"browse.php");
- require (conf('prefix') . '/templates/show_box_bottom.inc.php');
-
- $sql = $song->get_sql_from_match($_REQUEST['match']);
-
- if ($_REQUEST['keep_view']) {
- $view->initialize();
- }
- else {
- $db_results = mysql_query($sql, dbh());
- $total_items = mysql_num_rows($db_results);
- $offset_limit = 999999;
- if ($match != 'Show All') { $offset_limit = $user->prefs['offset_limit']; }
- $view = new View($sql, 'browse.php?action=song_title','title',$total_items,$offset_limit);
- }
-
- if ($view->base_sql) {
- $songs = $song->get_songs($view->sql);
- show_songs($songs,0,0);
- }
+ $song_ids = Browse::get_objects();
+ Browse::show_objects($song_ids);
break;
case 'catalog':
@@ -146,6 +118,8 @@ switch($_REQUEST['action']) {
break;
} // end Switch $action
+echo '</div>';
+
/* Show the Footer */
show_footer();
?>