1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

fix and new preference for footer menu

This commit is contained in:
Karl 'vollmerk' Vollmer 2005-06-10 04:28:39 +00:00
parent cde6ad2720
commit ab8c8b63c6
19 changed files with 60 additions and 65 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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>

View file

@ -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']);
?>

View file

@ -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>

View file

@ -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>

View file

@ -118,9 +118,5 @@ switch($action) {
}
echo "<br /><br />";
show_menu_items('Artists');
show_page_footer ('Artists', '',$user->prefs['display_menu']);
?>
</body>
</html>

View file

@ -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)
--------------------------------------------------------------------------

View file

@ -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']); ?>

View file

@ -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':

View file

@ -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 />";
}
?>

View file

@ -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
?>

View file

@ -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';

View file

@ -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 */

View file

@ -65,6 +65,5 @@ require (conf('prefix') . "/templates/show_preferences.inc");
// FOOTER
show_menu_items('Preferences');
show_page_footer ('Preferences', '',$user->prefs['display_menu']);
?>

View file

@ -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>

View file

@ -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']);?>

View file

@ -81,5 +81,5 @@ switch ($action) {
break;
} // end action switch
show_menu_items('Profile');
show_page_footer ('Profile', '',$user->prefs['display_menu']);
?>