diff options
-rw-r--r-- | admin/access.php | 8 | ||||
-rw-r--r-- | admin/catalog.php | 7 | ||||
-rw-r--r-- | admin/index.php | 6 | ||||
-rw-r--r-- | admin/mail.php | 6 | ||||
-rw-r--r-- | admin/preferences.php | 4 | ||||
-rw-r--r-- | admin/users.php | 7 | ||||
-rw-r--r-- | albums.php | 5 | ||||
-rw-r--r-- | artists.php | 6 | ||||
-rwxr-xr-x | docs/CHANGELOG | 1 | ||||
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | lib/preferences.php | 2 | ||||
-rw-r--r-- | lib/ui.php | 19 | ||||
-rw-r--r-- | modules/class/update.php | 25 | ||||
-rw-r--r-- | modules/init.php | 2 | ||||
-rw-r--r-- | playlist.php | 9 | ||||
-rw-r--r-- | preferences.php | 3 | ||||
-rw-r--r-- | search.php | 5 | ||||
-rw-r--r-- | stats.php | 4 | ||||
-rw-r--r-- | user.php | 2 |
19 files changed, 60 insertions, 65 deletions
diff --git a/admin/access.php b/admin/access.php index 31793907..ec27d1d9 100644 --- a/admin/access.php +++ b/admin/access.php @@ -75,11 +75,5 @@ else { } echo "<br /><br />"; -show_admin_menu('Access Lists'); -show_menu_items('Admin'); - +show_page_footer ('Admin', 'Access Lists',$user->prefs['display_menu']); ?> - - -</body> -</html> diff --git a/admin/catalog.php b/admin/catalog.php index d3c4bc6d..bc2787c1 100644 --- a/admin/catalog.php +++ b/admin/catalog.php @@ -273,10 +273,5 @@ switch ($_REQUEST['action']) { } // end switch echo "<br /><br />"; -show_admin_menu('Catalog'); -show_menu_items('Admin'); - +show_page_footer ('Admin', 'Catalog',$user->prefs['display_menu']); ?> - -</body> -</html> diff --git a/admin/index.php b/admin/index.php index a830897a..e01e00eb 100644 --- a/admin/index.php +++ b/admin/index.php @@ -88,9 +88,5 @@ else { } // if they didn't pick anything echo "<br /><br />"; -show_admin_menu(''); -show_menu_items('Admin'); +show_page_footer ('Admin', '',$user->prefs['display_menu']); ?> - -</body> -</html> diff --git a/admin/mail.php b/admin/mail.php index d5aef413..8c656896 100644 --- a/admin/mail.php +++ b/admin/mail.php @@ -131,9 +131,5 @@ show_clear(); </form> <br /><br /> <?php - show_admin_menu('Mail Users'); - show_menu_items('Admin'); +show_page_footer ('Admin', 'Mail Users',$user->prefs['display_menu']); ?> - -</body> -</html> diff --git a/admin/preferences.php b/admin/preferences.php index 2fa729eb..ba381f44 100644 --- a/admin/preferences.php +++ b/admin/preferences.php @@ -86,7 +86,5 @@ require (conf('prefix') . "/templates/show_preferences.inc"); // FOOTER -show_admin_menu('Admin Preferences'); -show_menu_items('Admin'); - +show_page_footer ('Admin', 'Admin Preferences',$user->prefs['display_menu']); ?> diff --git a/admin/users.php b/admin/users.php index 350d1289..fddf5333 100644 --- a/admin/users.php +++ b/admin/users.php @@ -172,10 +172,5 @@ switch ($action) { } echo "<br /><br />"; -show_admin_menu('Users'); -show_menu_items('Admin'); - +show_page_footer ('Admin', 'Users',$user->prefs['display_menu']); ?> - -</body> -</html> @@ -174,8 +174,5 @@ else { } // else no album echo "<br /><br />"; -show_menu_items('Albums'); +show_page_footer ('Albums', '',$user->prefs['display_menu']); ?> - -</body> -</html> diff --git a/artists.php b/artists.php index 3cb127d0..b4978412 100644 --- a/artists.php +++ b/artists.php @@ -118,9 +118,5 @@ switch($action) { } echo "<br /><br />"; -show_menu_items('Artists'); +show_page_footer ('Artists', '',$user->prefs['display_menu']); ?> - - -</body> -</html> diff --git a/docs/CHANGELOG b/docs/CHANGELOG index e0c00ac6..99641656 100755 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -8,6 +8,7 @@ (Thx hongyi_gao) - Fixed refresh javascript for main page. - Fixed <html lang=> tag so that it validates (Thx XGizzmo) + - Added show_footer_menu() funciton and preference (Thx XGizzmo) -------------------------------------------------------------------------- @@ -134,6 +134,4 @@ if (conf('refresh_limit') > 0) { show_template('javascript_refresh'); } </tr> </table> -<?php show_menu_items('Home'); ?> -</body> -</html> +<?php show_page_footer ('Home', '', $user->prefs['display_menu']); ?> diff --git a/lib/preferences.php b/lib/preferences.php index b6c6e0c9..e5584d0c 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -191,7 +191,7 @@ function create_preference_input($name,$value) { } // if we don't have access to it switch($name) { - + case 'display_menu': case 'download': case 'quarantine': case 'upload': @@ -434,4 +434,23 @@ function show_clear() { } // show_clear +/*! + @function show_page_footer + @discussion 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) +*/ +function show_page_footer ($menu="Home", $admin_menu='', $display_menu=0) { + if ($display_menu){ + if($menu =="Admin"){ + show_admin_menu($admin_menu); + } + + show_menu_items($menu); + + } + echo "</body>"; + echo "</html><br /><br />"; +} ?> diff --git a/modules/class/update.php b/modules/class/update.php index bd776e70..5b0578c2 100644 --- a/modules/class/update.php +++ b/modules/class/update.php @@ -217,6 +217,9 @@ class Update { $version[] = array('version' => '331001', 'description' => $update_string); + $update_string = "- Added Show bottom menu option.<br />"; + $version[] = array('version' => '331002', 'description' => $update_string); + return $version; @@ -875,6 +878,26 @@ class Update { } // update_331001 -} // end update class + function update_331002() { + + /* Add new preference */ + $sql = "INSERT INTO `preferences` (`id`,`name`,`value`,`description`,`level`,`type`,`locked`) VALUES ('','display_menu','1','Show Bottom Menu','0','user','0')"; + $db_results = mysql_query($sql, dbh()); + /* Fix existing preferecnes */ + $sql = "SELECT DISTINCT(user) FROM user_preference"; + $db_results = mysql_query($sql, dbh()); + + $user = new User(0); + + while ($results = mysql_fetch_array($db_results)) { + $user->fix_preferences($results[0]); + } + + /* Update Version */ + $this->set_version('db_version','331002'); + + } // update_331002 + +} // end update class ?> diff --git a/modules/init.php b/modules/init.php index 537beb6e..70db9299 100644 --- a/modules/init.php +++ b/modules/init.php @@ -83,7 +83,7 @@ if (!$results['conf']['allow_stream_playback']) { } $results['conf']['web_path'] = $http_type . $_SERVER['HTTP_HOST'] . $results['conf']['web_path']; -$results['conf']['version'] = '3.3.1-Beta2'; +$results['conf']['version'] = '3.3.1-rc Build (001)'; $results['conf']['catalog_file_pattern']= 'mp3|mpc|m4p|m4a|mp4|aac|ogg|rm|wma|asf|flac|spx'; $results['libglue']['local_table'] = 'session'; $results['libglue']['local_sid'] = 'id'; diff --git a/playlist.php b/playlist.php index c92cdb0e..081ff572 100644 --- a/playlist.php +++ b/playlist.php @@ -231,14 +231,7 @@ switch($action) { } //switch($action) echo "<br /><br />"; -show_menu_items('Playlists'); - -?> -</body> -</html> - - -<?php +show_page_footer ('Playlists', '',$user->prefs['display_menu']); /* Function definitions for this file */ diff --git a/preferences.php b/preferences.php index 065f4512..4c69743c 100644 --- a/preferences.php +++ b/preferences.php @@ -65,6 +65,5 @@ require (conf('prefix') . "/templates/show_preferences.inc"); // FOOTER -show_menu_items('Preferences'); - +show_page_footer ('Preferences', '',$user->prefs['display_menu']); ?> @@ -36,8 +36,5 @@ if ($_REQUEST['action'] === 'search') { run_search($_REQUEST['search_string'], $_REQUEST['search_field'], $_REQUEST['search_type']); } echo "<br /><br />"; -show_menu_items('Search'); +show_page_footer ('Search', '',$user->prefs['display_menu']); ?> - -</body> -</html> @@ -78,6 +78,4 @@ by <a href="<?php echo conf('web_path'); ?>/user.php?action=show_edit_profile">e </table> <br /> -<?php show_menu_items('Stats'); ?> -</body> -</html> +<?php show_page_footer ('Stats', '',$user->prefs['display_menu']);?> @@ -81,5 +81,5 @@ switch ($action) { break; } // end action switch -show_menu_items('Profile'); +show_page_footer ('Profile', '',$user->prefs['display_menu']); ?> |