mirror of
https://github.com/Yetangitu/ampache
synced 2025-10-03 17:59:21 +02:00
fix and new preference for footer menu
This commit is contained in:
parent
cde6ad2720
commit
ab8c8b63c6
19 changed files with 60 additions and 65 deletions
|
@ -75,11 +75,5 @@ else {
|
||||||
}
|
}
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
|
|
||||||
show_admin_menu('Access Lists');
|
show_page_footer ('Admin', 'Access Lists',$user->prefs['display_menu']);
|
||||||
show_menu_items('Admin');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -273,10 +273,5 @@ switch ($_REQUEST['action']) {
|
||||||
|
|
||||||
} // end switch
|
} // end switch
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
show_admin_menu('Catalog');
|
show_page_footer ('Admin', 'Catalog',$user->prefs['display_menu']);
|
||||||
show_menu_items('Admin');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -88,9 +88,5 @@ else {
|
||||||
} // if they didn't pick anything
|
} // if they didn't pick anything
|
||||||
|
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
show_admin_menu('');
|
show_page_footer ('Admin', '',$user->prefs['display_menu']);
|
||||||
show_menu_items('Admin');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -131,9 +131,5 @@ show_clear();
|
||||||
</form>
|
</form>
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<?php
|
<?php
|
||||||
show_admin_menu('Mail Users');
|
show_page_footer ('Admin', 'Mail Users',$user->prefs['display_menu']);
|
||||||
show_menu_items('Admin');
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -86,7 +86,5 @@ require (conf('prefix') . "/templates/show_preferences.inc");
|
||||||
|
|
||||||
|
|
||||||
// FOOTER
|
// FOOTER
|
||||||
show_admin_menu('Admin Preferences');
|
show_page_footer ('Admin', 'Admin Preferences',$user->prefs['display_menu']);
|
||||||
show_menu_items('Admin');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -172,10 +172,5 @@ switch ($action) {
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
show_admin_menu('Users');
|
show_page_footer ('Admin', 'Users',$user->prefs['display_menu']);
|
||||||
show_menu_items('Admin');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -174,8 +174,5 @@ else {
|
||||||
} // else no album
|
} // else no album
|
||||||
|
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
show_menu_items('Albums');
|
show_page_footer ('Albums', '',$user->prefs['display_menu']);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -118,9 +118,5 @@ switch($action) {
|
||||||
|
|
||||||
}
|
}
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
show_menu_items('Artists');
|
show_page_footer ('Artists', '',$user->prefs['display_menu']);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
(Thx hongyi_gao)
|
(Thx hongyi_gao)
|
||||||
- Fixed refresh javascript for main page.
|
- Fixed refresh javascript for main page.
|
||||||
- Fixed <html lang=> tag so that it validates (Thx XGizzmo)
|
- 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>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php show_menu_items('Home'); ?>
|
<?php show_page_footer ('Home', '', $user->prefs['display_menu']); ?>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ function create_preference_input($name,$value) {
|
||||||
} // if we don't have access to it
|
} // if we don't have access to it
|
||||||
|
|
||||||
switch($name) {
|
switch($name) {
|
||||||
|
case 'display_menu':
|
||||||
case 'download':
|
case 'download':
|
||||||
case 'quarantine':
|
case 'quarantine':
|
||||||
case 'upload':
|
case 'upload':
|
||||||
|
|
19
lib/ui.php
19
lib/ui.php
|
@ -434,4 +434,23 @@ function show_clear() {
|
||||||
|
|
||||||
} // 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 />";
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -217,6 +217,9 @@ class Update {
|
||||||
|
|
||||||
$version[] = array('version' => '331001', 'description' => $update_string);
|
$version[] = array('version' => '331001', 'description' => $update_string);
|
||||||
|
|
||||||
|
$update_string = "- Added Show bottom menu option.<br />";
|
||||||
|
$version[] = array('version' => '331002', 'description' => $update_string);
|
||||||
|
|
||||||
|
|
||||||
return $version;
|
return $version;
|
||||||
|
|
||||||
|
@ -875,6 +878,26 @@ class Update {
|
||||||
|
|
||||||
} // update_331001
|
} // 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
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -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']['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['conf']['catalog_file_pattern']= 'mp3|mpc|m4p|m4a|mp4|aac|ogg|rm|wma|asf|flac|spx';
|
||||||
$results['libglue']['local_table'] = 'session';
|
$results['libglue']['local_table'] = 'session';
|
||||||
$results['libglue']['local_sid'] = 'id';
|
$results['libglue']['local_sid'] = 'id';
|
||||||
|
|
|
@ -231,14 +231,7 @@ switch($action) {
|
||||||
} //switch($action)
|
} //switch($action)
|
||||||
|
|
||||||
echo "<br /><br />";
|
echo "<br /><br />";
|
||||||
show_menu_items('Playlists');
|
show_page_footer ('Playlists', '',$user->prefs['display_menu']);
|
||||||
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
/* Function definitions for this file */
|
/* Function definitions for this file */
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,5 @@ require (conf('prefix') . "/templates/show_preferences.inc");
|
||||||
|
|
||||||
|
|
||||||
// FOOTER
|
// 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']);
|
run_search($_REQUEST['search_string'], $_REQUEST['search_field'], $_REQUEST['search_type']);
|
||||||
}
|
}
|
||||||
echo "<br /><br />";
|
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>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<?php show_menu_items('Stats'); ?>
|
<?php show_page_footer ('Stats', '',$user->prefs['display_menu']);?>
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
2
user.php
2
user.php
|
@ -81,5 +81,5 @@ switch ($action) {
|
||||||
break;
|
break;
|
||||||
} // end action switch
|
} // end action switch
|
||||||
|
|
||||||
show_menu_items('Profile');
|
show_page_footer ('Profile', '',$user->prefs['display_menu']);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue