summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-27 08:40:23 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2005-06-27 08:40:23 +0000
commit65663a24f14bf544c8391c169239d0811eed4ffb (patch)
treeaceffe4d5ffc0e11b9488ce404f57f4369c0df5e
parent4d64e9219f3dce5ccdb283e777132c503dd355d6 (diff)
downloadampache-65663a24f14bf544c8391c169239d0811eed4ffb.tar.gz
ampache-65663a24f14bf544c8391c169239d0811eed4ffb.tar.bz2
ampache-65663a24f14bf544c8391c169239d0811eed4ffb.zip
move and break, move and break
-rw-r--r--batch.php25
-rw-r--r--browse.php1
-rwxr-xr-xdocs/CHANGELOG3
-rw-r--r--lib/album.lib.php (renamed from lib/album.php)0
-rw-r--r--lib/archive.lib.php (renamed from lib/archive.php)0
-rw-r--r--lib/artist.lib.php (renamed from lib/artist.php)0
-rw-r--r--lib/batch.lib.php (renamed from lib/batch.php)33
-rw-r--r--lib/class/access.php (renamed from modules/class/access.php)0
-rw-r--r--lib/class/album.php (renamed from modules/class/album.php)0
-rw-r--r--lib/class/artist.php (renamed from modules/class/artist.php)0
-rw-r--r--lib/class/catalog.php (renamed from modules/class/catalog.php)0
-rw-r--r--lib/class/error.php (renamed from modules/class/error.php)0
-rw-r--r--lib/class/genre.class.php (renamed from modules/class/genre.class.php)0
-rw-r--r--lib/class/playlist.php (renamed from modules/class/playlist.php)0
-rw-r--r--lib/class/song.php (renamed from modules/class/song.php)0
-rw-r--r--lib/class/stream.php (renamed from modules/class/stream.php)0
-rw-r--r--lib/class/update.php (renamed from modules/class/update.php)0
-rw-r--r--lib/class/user.php (renamed from modules/class/user.php)0
-rw-r--r--lib/class/view.php (renamed from modules/class/view.php)0
-rw-r--r--lib/general.lib.php (renamed from lib/general.php)0
-rw-r--r--lib/ui.lib.php254
-rw-r--r--login.php2
-rw-r--r--modules/init.php32
-rw-r--r--templates/admin_menu.inc18
-rw-r--r--templates/show_browse_menu.inc55
25 files changed, 262 insertions, 161 deletions
diff --git a/batch.php b/batch.php
index 5cd94f42..752176c9 100644
--- a/batch.php
+++ b/batch.php
@@ -19,21 +19,20 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*
-
- creates and sends a zip of an album or playlist
- zip is just a container w/ no compression
-
- uses archive.php from
- http://phpclasses.mirrors.nyphp.org/browse/file/3191.html
- can modify to allow user to select tar, gzip, or bzip2
-
- I believe archive.php requires zlib support to be eanbled
- in your PHP build.
-*/
+/**
+ *
+ * creates and sends a zip of an album or playlist
+ * zip is just a container w/ no compression
+ *
+ * uses archive.php from
+ * http://phpclasses.mirrors.nyphp.org/browse/file/3191.html
+ * can modify to allow user to select tar, gzip, or bzip2
+ *
+ * I believe archive.php requires zlib support to be eanbled
+ * in your PHP build.
+ */
require_once('modules/init.php');
- require_once(conf('prefix') . "/lib/batch.php");
//test that batch download is permitted (user or system?)
/* Drop the normal Time limit constraints, this can take a while */
diff --git a/browse.php b/browse.php
index 874cd319..9aecd9d3 100644
--- a/browse.php
+++ b/browse.php
@@ -41,6 +41,7 @@ $action = scrub_in($_REQUEST['action']);
/* Display the headers and menus */
show_template('header');
show_menu_items('Browse');
+show_browse_menu($_REQUEST['action']);
show_clear();
switch($action) {
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 75f807e5..44477125 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -9,6 +9,9 @@
- More HTML cleanup (Thx Xgizzmo)
- Added inital Browse Pages and Supporting Functions
- Added Genre Stats Tracking
+ - Moved files into more logical areas, added .lib and .class
+ suffix to library and class files, also started using
+ phpdoc style documentation
--------------------------------------------------------------------------
v.3.3.1 06/21/2005:
diff --git a/lib/album.php b/lib/album.lib.php
index 7d518ff8..7d518ff8 100644
--- a/lib/album.php
+++ b/lib/album.lib.php
diff --git a/lib/archive.php b/lib/archive.lib.php
index 1a605f10..1a605f10 100644
--- a/lib/archive.php
+++ b/lib/archive.lib.php
diff --git a/lib/artist.php b/lib/artist.lib.php
index 38a93c75..38a93c75 100644
--- a/lib/artist.php
+++ b/lib/artist.lib.php
diff --git a/lib/batch.php b/lib/batch.lib.php
index 508564c1..f30f6f16 100644
--- a/lib/batch.php
+++ b/lib/batch.lib.php
@@ -18,12 +18,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-/*
- @function get_song_files
- @discussion tmakes array of song ids and returns
- array of path to actual files
- @param $song_ids an array of song ids whose filenames you need
-*/
+/**
+ * get_song_files
+ * tmakes array of song ids and returns
+ * array of path to actual files
+ * @param $song_ids an array of song ids whose filenames you need
+ */
function get_song_files( $song_ids ) {
global $user;
$song_files = array();
@@ -40,15 +40,17 @@ function get_song_files( $song_ids ) {
} //get_song_files
-/*!
- @function send_zip
- @discussion takes array of full paths to songs
- zips them and sends them
- @param $song_files array of full paths to songs to zip
- create w/ call to get_song_files
-*/
+/**
+ * send_zip
+ * takes array of full paths to songs
+ * zips them and sends them
+ * @param $name name of the zip file to be created
+ * @param $song_files array of full paths to songs to zip create w/ call to get_song_files
+ */
function send_zip( $name, $song_files ) {
- require_once(conf('prefix') . '/lib/archive.php' );
+
+ /* Require needed library */
+ require_once(conf('prefix') . '/lib/archive.lib.php' );
$arc = new zip_file( $name . ".zip" );
$options = array(
'inmemory' => 1, // create archive in memory
@@ -59,5 +61,6 @@ function send_zip( $name, $song_files ) {
$arc->add_files( $song_files );
$arc->create_archive();
$arc->download_file();
-}
+
+} // send_zip
?>
diff --git a/modules/class/access.php b/lib/class/access.php
index 6e6afbf2..6e6afbf2 100644
--- a/modules/class/access.php
+++ b/lib/class/access.php
diff --git a/modules/class/album.php b/lib/class/album.php
index 17befbd9..17befbd9 100644
--- a/modules/class/album.php
+++ b/lib/class/album.php
diff --git a/modules/class/artist.php b/lib/class/artist.php
index 2a6e3308..2a6e3308 100644
--- a/modules/class/artist.php
+++ b/lib/class/artist.php
diff --git a/modules/class/catalog.php b/lib/class/catalog.php
index 9affc95a..9affc95a 100644
--- a/modules/class/catalog.php
+++ b/lib/class/catalog.php
diff --git a/modules/class/error.php b/lib/class/error.php
index 9283e29d..9283e29d 100644
--- a/modules/class/error.php
+++ b/lib/class/error.php
diff --git a/modules/class/genre.class.php b/lib/class/genre.class.php
index 9d5e4d4e..9d5e4d4e 100644
--- a/modules/class/genre.class.php
+++ b/lib/class/genre.class.php
diff --git a/modules/class/playlist.php b/lib/class/playlist.php
index 130537af..130537af 100644
--- a/modules/class/playlist.php
+++ b/lib/class/playlist.php
diff --git a/modules/class/song.php b/lib/class/song.php
index 47600ee5..47600ee5 100644
--- a/modules/class/song.php
+++ b/lib/class/song.php
diff --git a/modules/class/stream.php b/lib/class/stream.php
index 999dcbca..999dcbca 100644
--- a/modules/class/stream.php
+++ b/lib/class/stream.php
diff --git a/modules/class/update.php b/lib/class/update.php
index b006b8e7..b006b8e7 100644
--- a/modules/class/update.php
+++ b/lib/class/update.php
diff --git a/modules/class/user.php b/lib/class/user.php
index 8f45cfed..8f45cfed 100644
--- a/modules/class/user.php
+++ b/lib/class/user.php
diff --git a/modules/class/view.php b/lib/class/view.php
index f9de4ee6..f9de4ee6 100644
--- a/modules/class/view.php
+++ b/lib/class/view.php
diff --git a/lib/general.php b/lib/general.lib.php
index 83bf2bfc..83bf2bfc 100644
--- a/lib/general.php
+++ b/lib/general.lib.php
diff --git a/lib/ui.lib.php b/lib/ui.lib.php
index 6faa0897..ddbdbcd5 100644
--- a/lib/ui.lib.php
+++ b/lib/ui.lib.php
@@ -29,12 +29,12 @@
*/
/**
- @function show_confirmation
- @discussion shows a confirmation of an action
- @param $next_url Where to go next
- @param $title The Title of the message
- @param $text The details of the message
-*/
+ * show_confirmation
+ * shows a confirmation of an action
+ * @param $next_url Where to go next
+ * @param $title The Title of the message
+ * @param $text The details of the message
+ */
function show_confirmation($title,$text,$next_url) {
if (substr_count($next_url,conf('web_path'))) {
@@ -49,10 +49,11 @@ function show_confirmation($title,$text,$next_url) {
} // show_confirmation
/**
- @function set_preferences
- @discussion legacy function...
- //FIXME: Remove References
-*/
+ * set_preferences
+ * legacy function...
+ * @todo Remove References
+ * @deprecated
+ */
function set_preferences() {
get_preferences();
@@ -61,9 +62,9 @@ function set_preferences() {
} // set_preferences
/**
- @function get_preferences
- @discussion reads this users preferences
-*/
+ * get_preferences
+ * reads this users preferences
+ */
function get_preferences($username=0) {
/* Get System Preferences first */
@@ -98,11 +99,11 @@ function get_preferences($username=0) {
} // get_preferences
/**
- @function flip_class
- @discussion takes an array of 2 class names
- and flips them back and forth and
- then echo's out [0]
-*/
+ * flip_class
+ * takes an array of 2 class names
+ * and flips them back and forth and
+ * then echo's out [0]
+ */
function flip_class($array=0) {
static $classes = array();
@@ -118,10 +119,10 @@ function flip_class($array=0) {
} // flip_class
/**
- @function clear_now_playing
- @discussion Clears the now playing information incase something has
- gotten stuck in there
-*/
+ * clear_now_playing
+ * Clears the now playing information incase something has
+ * gotten stuck in there
+ */
function clear_now_playing() {
$sql = "DELETE FROM now_playing";
@@ -132,9 +133,9 @@ function clear_now_playing() {
} // clear_now_playing
/**
- @function show_tool_box
- @discussion shows the toolbox
-*/
+ * show_tool_box
+ * shows the toolbox
+ */
function show_tool_box ($title, $items) {
include(conf('prefix') . "/templates/tool_box.inc");
@@ -142,9 +143,9 @@ function show_tool_box ($title, $items) {
}// show_tool_box
/**
- @function show_box
- @discussion shows a generic box
-*/
+ * show_box
+ * shows a generic box
+ */
function show_box($title,$items) {
include(conf('prefix') . "/templates/show_box.inc");
@@ -152,20 +153,33 @@ function show_box($title,$items) {
} // show_box
/**
- @function show_menu_items
- @discussion shows menu items
-*/
+ * show_menu_items
+ * shows menu items
+ */
function show_menu_items ($high) {
include(conf('prefix') . "/templates/menu.inc");
} // show_menu_items
+/**
+ * Show Browse Menu
+ * Shows the menu used by the browse page
+ * @package Web Interface
+ * @cataogry Menu
+ * @author Karl Vollmer
+ */
+function show_browse_menu($highlight) {
+
+ include(conf('prefix'). "/templates/show_browse_menu.inc");
+
+} // show_browse_menu
+
/**
- @function _
- @discussion checks to see if the alias _ is defined
- if it isn't it defines it as a simple return
-*/
+ * _
+ * checks to see if the alias _ is defined
+ * if it isn't it defines it as a simple return
+ */
if (!function_exists('_')) {
function _($string) {
@@ -175,9 +189,9 @@ if (!function_exists('_')) {
} // if _ isn't defined
/**
- @function show_playlist_menu
- @discussion playlist functions
-*/
+ * show_playlist_menu
+ * playlist functions
+ */
function show_playlist_menu () {
echo "<br /><span class=\"header2\">" . _("Playlist Actions") . ": <a href=\"" . conf('web_path') . "/playlist.php?action=new\">" . _("New") ."</a> | ";
@@ -188,18 +202,18 @@ function show_playlist_menu () {
} // show_playlist_menu
/**
- @function show_admin_menu
- @discussion shows the admin menu
-*/
+ * show_admin_menu
+ * shows the admin menu
+ */
function show_admin_menu ($admin_highlight) {
include(conf('prefix') . "/templates/admin_menu.inc");
} // show_admin_menu
/**
- @function access_denied
- @discussion throws an error if they try to do something
- that they aren't allowed to
-*/
+ * access_denied
+ * throws an error if they try to do something
+ * that they aren't allowed to
+ */
function access_denied() {
show_template('style');
@@ -212,9 +226,9 @@ function access_denied() {
} // access_denied
/**
- @function show_users
- @discussion shows all users (admin function)
-*/
+ * show_users
+ * shows all users (admin function)
+ */
function show_users () {
$dbh = dbh();
@@ -244,11 +258,11 @@ function show_users () {
/**
- @function return_referer
- @discussion returns the script part of the
- referer address passed by the web browser
- this is not %100 accurate
-*/
+ * return_referer
+ * returns the script part of the
+ * referer address passed by the web browser
+ * this is not %100 accurate
+ */
function return_referer() {
$web_path = substr(conf('web_path'),0,strlen(conf('web_path'))-1-strlen($_SERVER['SERVER_PORT'])) . "/";
@@ -265,10 +279,10 @@ function return_referer() {
} // return_referer
/**
- @function show_alphabet_list
- @discussion shows the A-Z,0-9 lists for
- albums and artist pages
-*/
+ * show_alphabet_list
+ * shows the A-Z,0-9 lists for
+ * albums and artist pages
+ */
function show_alphabet_list ($type,$script="artist.php",$selected="false") {
$list = array(A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,1,2,3,4,5,6,7,8,9,"0");
@@ -293,10 +307,10 @@ function show_alphabet_list ($type,$script="artist.php",$selected="false") {
} // show_alphabet_list
/**
- @function show_local_control
- @discussion shows the controls
- for localplay
-*/
+ * show_local_control
+ * shows the controls
+ * for localplay
+ */
function show_local_control () {
require_once(conf('prefix') . "/templates/show_localplay.inc");
@@ -304,46 +318,66 @@ function show_local_control () {
} // show_local_control
/**
- @function truncate_with_ellipse
- @discussion truncates a text file to specified length by adding
- thre dots (ellipse) to the end
- (Thx Nedko Arnaudov)
-*/
+ * truncate_with_ellipse
+ * truncates a text file to specified length by adding
+ * thre dots (ellipse) to the end
+ * (Thx Nedko Arnaudov)
+ * @todo Fix Spelling!
+ * @depreciated
+ */
function truncate_with_ellipse($text, $max=27) {
- /* If we want it to be shorter than three, just throw it back */
- if ($max > 3) {
- /* Make sure the functions exist before doing the iconv mojo */
- if (function_exists('iconv') && function_exists('iconv_substr') && function_exists('iconv_strlen')) {
- if (iconv_strlen($text, conf('site_charset')) > $max) {
- $text = iconv_substr($text, 0, $max-3, conf('site_charset'));
- $text .= iconv("ISO-8859-1", conf('site_charset'), "...");
- }
+ /* Run the function with the correct spelling */
+ return truncate_with_ellipsis($text,$max);
+
+} // truncate_with_ellipse
+
+/**
+ * truncate_with_ellipsis
+ * Correct Spelling function that truncates text to a specific lenght
+ * and appends three dots, or an ellipsis to the end
+ * @package Web Interface
+ * @catagory General
+ * @author Nedko Arnaudov
+ */
+function truncate_with_ellipsis($text, $max=27) {
+
+ /* If we want it to be shorter than three, just throw it back */
+ if ($max > 3) {
+
+ /* Make sure the functions exist before doing the iconv mojo */
+ if (function_exists('iconv') && function_exists('iconv_substr') && function_exists('iconv_strlen')) {
+ if (iconv_strlen($text, conf('site_charset')) > $max) {
+ $text = iconv_substr($text, 0, $max-3, conf('site_charset'));
+ $text .= iconv("ISO-8859-1", conf('site_charset'), "...");
+ }
}
- /* Do normal substr if we don't have iconv */
+
+ /* Do normal substr if we don't have iconv */
else {
if (strlen($text) > $max) {
$text = substr($text,0,$max-3)."...";
}
} // else no iconv
} // else greater than 3
-
+
return $text;
-} // truncate_with_ellipse
+
+} // truncate_with_ellipsis
/**
- @function show_footer
- @discussion shows the footer of the page
-*/
+ * show_footer
+ * shows the footer of the page
+ */
function show_footer() {
$class = "table-header";
echo "<br /><br /><br /><div class=\"$class\" style=\"border: solid thin black;\">&nbsp;</div>";
} // show_footer
/**
- @function show_now_playing
- @discussion shows the now playing template
-*/
+ * show_now_playing
+ * shows the now playing template
+ */
function show_now_playing() {
$dbh = dbh();
@@ -354,13 +388,12 @@ function show_now_playing() {
} // show_now_playing
/**
- @function show_user_registration
- @discussion this function is called for a new user
- registration
- @author Terry
-*/
-//function show_user_registration ($id, $username, $fullname, $email, $access, $type, $error) {
-//FIXME: See above
+ * show_user_registration
+ * this function is called for a new user
+ * registration
+ * @author Terry
+ * @todo Fix so that it recieves an array of values for the user reg rather than seperate
+ */
function show_user_registration ($values=array()) {
require (conf('prefix') . "/templates/show_user_registration.inc.php");
@@ -368,9 +401,11 @@ function show_user_registration ($values=array()) {
} // show_user_registration
/**
- @function show_edit_profile
- @discussion shows a single user profile for editing
-*/
+ * show_edit_profile
+ * shows a single user profile for editing
+ * @package Web Interface
+ * @catagory Display
+ */
function show_edit_profile($username) {
$this_user = new User($username);
@@ -380,9 +415,9 @@ function show_edit_profile($username) {
} // show_edit_profile
/**
- @function show_playlist
- @discussion this shows the current playlist
-*/
+ * show_playlist
+ * this shows the current playlist
+ */
function show_playlist($playlist_id) {
/* Create the Playlist */
@@ -399,10 +434,10 @@ function show_playlist($playlist_id) {
} // show_playlist
/**
- @function show_play_selected
- @discussion this shows the playselected/add to playlist
- box, which includes a little javascript
-*/
+ * 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");
@@ -410,9 +445,11 @@ function show_play_selected() {
} // show_play_selected
/**
- @function get_now_playing
- @discussion gets the now playing information
-*/
+ * get_now_playing
+ * gets the now playing information
+ * @package Web Interface
+ * @catagory Get
+ */
function get_now_playing() {
$sql = "SELECT song_id,user_id FROM now_playing ORDER BY start_time DESC";
@@ -428,12 +465,15 @@ function get_now_playing() {
} // get_now_playing
/**
- @function show_clear
- @discussion this is a hack because of the float mojo
-*/
+ * show_clear
+ * this is a hack because of the float mojo it clears the floats
+ * @package Web Interface
+ * @catagory Hack-o-Rama
+ * @author Karl Vollmer
+ */
function show_clear() {
- echo "\n<div style=\"clear:both;\">&nbsp;</div>\n";
+ echo "\n<br style=\"clear:both;\" />\n";
} // show_clear
diff --git a/login.php b/login.php
index fa476d55..54113ed0 100644
--- a/login.php
+++ b/login.php
@@ -84,7 +84,7 @@ $htmllang = str_replace("_","-",conf('lang'));
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
<head>
-<meta http-equiv="Content-Style-Type" content="text/html" charset="<?php echo conf('site_charset'); ?>" />
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo conf('site_charset'); ?>" />
<link rel="shortcut icon" href="<?php echo conf('web_path'); ?>/favicon.ico" />
<title> <?php echo conf('site_title'); ?> </title>
diff --git a/modules/init.php b/modules/init.php
index a2b5503b..41c83670 100644
--- a/modules/init.php
+++ b/modules/init.php
@@ -35,7 +35,7 @@ error_reporting(E_ALL ^ E_NOTICE);
$ampache_path = dirname(__FILE__);
$prefix = realpath($ampache_path . "/../");
$configfile = "$prefix/config/ampache.cfg.php";
-require_once($prefix . "/lib/general.php");
+require_once($prefix . "/lib/general.lib.php");
/*********************STOP EDITING*********************************/
@@ -151,8 +151,8 @@ require_once(libglue_param('libglue_path') . "/session.php");
require_once(libglue_param('libglue_path') . "/dbh.php");
// Librarys
-require_once(conf('prefix') . "/lib/album.php");
-require_once(conf('prefix') . "/lib/artist.php");
+require_once(conf('prefix') . "/lib/album.lib.php");
+require_once(conf('prefix') . "/lib/artist.lib.php");
require_once(conf('prefix') . "/lib/song.php");
require_once(conf('prefix') . "/lib/search.php");
require_once(conf('prefix') . "/lib/preferences.php");
@@ -160,7 +160,7 @@ require_once(conf('prefix') . "/lib/rss.php");
require_once(conf('prefix') . "/lib/log.lib.php");
require_once(conf('prefix') . "/lib/ui.lib.php");
require_once(conf('prefix') . "/lib/gettext.php");
-require_once(conf('prefix') . "/lib/batch.php");
+require_once(conf('prefix') . "/lib/batch.lib.php");
require_once(conf('prefix') . "/lib/themes.php");
require_once(conf('prefix') . "/modules/lib.php");
require_once(conf('prefix') . "/modules/admin.php");
@@ -186,18 +186,18 @@ if (conf('allow_mpd_playback')) {
}
// Classes
-require_once(conf('prefix') . "/modules/class/catalog.php");
-require_once(conf('prefix') . "/modules/class/stream.php");
-require_once(conf('prefix') . "/modules/class/playlist.php");
-require_once(conf('prefix') . "/modules/class/song.php");
-require_once(conf('prefix') . "/modules/class/view.php");
-require_once(conf('prefix') . "/modules/class/update.php");
-require_once(conf('prefix') . "/modules/class/user.php");
-require_once(conf('prefix') . "/modules/class/album.php");
-require_once(conf('prefix') . "/modules/class/artist.php");
-require_once(conf('prefix') . "/modules/class/access.php");
-require_once(conf('prefix') . "/modules/class/error.php");
-require_once(conf('prefix') . "/modules/class/genre.class.php");
+require_once(conf('prefix') . "/lib/class/catalog.class.php");
+require_once(conf('prefix') . "/lib/class/stream.class.php");
+require_once(conf('prefix') . "/lib/class/playlist.class.php");
+require_once(conf('prefix') . "/lib/class/song.class.php");
+require_once(conf('prefix') . "/lib/class/view.class.php");
+require_once(conf('prefix') . "/lib/class/update.class.php");
+require_once(conf('prefix') . "/lib/class/user.class.php");
+require_once(conf('prefix') . "/lib/class/album.class.php");
+require_once(conf('prefix') . "/lib/class/artist.class.php");
+require_once(conf('prefix') . "/lib/class/access.class.php");
+require_once(conf('prefix') . "/lib/class/error.class.php");
+require_once(conf('prefix') . "/lib/class/genre.class.php");
/* Some Libglue Hacks */
$array['dbh_name'] = 'stupid_pos';
diff --git a/templates/admin_menu.inc b/templates/admin_menu.inc
index 5d459bd8..f87d85eb 100644
--- a/templates/admin_menu.inc
+++ b/templates/admin_menu.inc
@@ -30,11 +30,11 @@
$web_path = conf('web_path');
$items = array(
- "Users" => "$web_path/admin/users.php",
- "Mail Users" => "$web_path/admin/mail.php",
- "Catalog" => "$web_path/admin/catalog.php",
- "Admin Preferences" => "$web_path/admin/preferences.php",
- "Access Lists" => "$web_path/admin/access.php"
+ _("Users") => "$web_path/admin/users.php",
+ _("Mail Users") => "$web_path/admin/mail.php",
+ _("Catalog") => "$web_path/admin/catalog.php",
+ _("Admin Preferences") => "$web_path/admin/preferences.php",
+ _("Access Lists") => "$web_path/admin/access.php"
);
?>
@@ -42,14 +42,14 @@ $items = array(
<?php
foreach ( array_keys($items) as $item ) {
- if ( $admin_highlight == $item ) {
- echo "<li class=\"active\"><a class=\"active\" href=\"$items[$item]\">" . _($item) . "</a></li>\n";
+ if ( _($admin_highlight) == $item ) {
+ echo "<li class=\"active\"><a class=\"active\" href=\"$items[$item]\">" . $item . "</a></li>\n";
}
else {
- echo "<li><a href=\"$items[$item]\">" . _($item) . "</a></li>\n";
+ echo "<li><a href=\"$items[$item]\">" . $item . "</a></li>\n";
}
}
?>
</ul>
-<br /> \ No newline at end of file
+<br />
diff --git a/templates/show_browse_menu.inc b/templates/show_browse_menu.inc
new file mode 100644
index 00000000..a36b24e7
--- /dev/null
+++ b/templates/show_browse_menu.inc
@@ -0,0 +1,55 @@
+<?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.
+
+*/
+
+/**
+ * Browse Menu
+ * This menu has all the different ways you can browse your ampache music collection
+ * This calls different options of the browse.php file
+ * @package Web Interface
+ * @catagory Browse
+ * @author Karl Vollmer
+ */
+
+$web_path = conf('web_path');
+
+$items = array(
+ _("Artist") => "$web_path/browse.php?action=artist",
+ _("Albums") => "$web_path/browse.php?action=albums",
+ _("Genre") => "$web_path/browse.php?action=genre",
+ );
+
+?>
+<ul id="adminmenu">
+
+ <?php
+ foreach ( array_keys($items) as $item ) {
+ if ( $admin_highlight == $item ) {
+ echo "<li class=\"active\"><a class=\"active\" href=\"$items[$item]\">" . $item . "</a></li>\n";
+ }
+ else {
+ echo "<li><a href=\"$items[$item]\">" . $item . "</a></li>\n";
+ }
+ }
+
+ ?>
+</ul>
+<br />