diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 20:33:57 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-04-23 20:33:57 +0000 |
commit | 13dd43450a56bd72067b6f2350f5d188c5c7e254 (patch) | |
tree | b2bc0d26b1f7f904a15322413a044035aeca0d0f /templates/show_preferences.inc.php | |
parent | a12f1083e30ae16ded9dc7aa464015ad07413632 (diff) | |
download | ampache-13dd43450a56bd72067b6f2350f5d188c5c7e254.tar.gz ampache-13dd43450a56bd72067b6f2350f5d188c5c7e254.tar.bz2 ampache-13dd43450a56bd72067b6f2350f5d188c5c7e254.zip |
fixed up part of single album view, show songs is all gone, working on replacement browse method
Diffstat (limited to 'templates/show_preferences.inc.php')
-rw-r--r-- | templates/show_preferences.inc.php | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/templates/show_preferences.inc.php b/templates/show_preferences.inc.php new file mode 100644 index 00000000..22843bfb --- /dev/null +++ b/templates/show_preferences.inc.php @@ -0,0 +1,96 @@ +<?php +/* + + Copyright (c) 2001 - 2007 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 v2 + as published by the Free Software Foundation. + + 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. + +*/ + +/** + * This page has a few tabs, as such we need to figure out which tab we are on + * and display the information accordingly + */ +$current_tab = scrub_in($_REQUEST['tab']); +if (!$current_tab) { $current_tab = 'interface'; } +// HORRIBLE HACK! +if ($_REQUEST['action'] == 'user') { $action_txt = '&action=user'; } +$link = Config::get('web_path') . $target; + +/* CSS construction bs */ +$link_active = "a_" . $current_tab; +${$link_active} = "id=\"current\""; +$tab_active = "tab_" .$current_tab; +${$tab_active} = "id=\"tabactive\""; +?> +<?php show_box_top(); ?> +<span class="header1"> +<?php echo _('Editing'); ?> <?php echo $fullname; ?> <?php echo _('preferences'); ?> +<?php if ($GLOBALS['user']->has_access(100)) { ?> +[<a href="<?php echo Config::get('web_path'); ?>/admin/preferences.php?action=fix_preferences&user_id=<?php echo $user_id; ?>"><?php echo _('Rebuild Preferences'); ?></a>] +<?php } ?> +</span> + +<div id="tabcontainer"> +<ul id="tablist"> +<li <?php echo $tab_interface; ?>> + <a href="<?php echo $link; ?>?tab=interface&user_id=<?php echo $user_id . $action_txt; ?>" <?php echo $a_interface; ?>><?php echo _('Interface'); ?></a> +</li> +<li <?php echo $tab_streaming; ?>> + <a href="<?php echo $link; ?>?tab=streaming&user_id=<?php echo $user_id . $action_txt; ?>" <?php echo $a_streaming; ?>><?php echo _('Streaming'); ?></a> +</li> +<li <?php echo $tab_options; ?>> + <a href="<?php echo $link; ?>?tab=options&user_id=<?php echo $user_id . $action_txt; ?>" <?php echo $a_options; ?>><?php echo _('Options'); ?></a> +</li> +<?php if ($user_id != '-1' && $_SESSION['userdata']['type'] == 'mysql') { ?> +<li <?php echo $tab_account; ?>> + <a href="<?php echo $link; ?>?tab=account&user_id=<?php echo $user_id . $action_txt; ?>" <?php echo $a_account; ?>><?php echo _('Account'); ?></a> +</li> +<?php } elseif ($_SESSION['userdata']['type'] == 'mysql' || $user_id == '-1') { ?> +<li <?php echo $tab_system; ?>> + <a href="<?php echo $link; ?>?tab=system&user_id=<?php echo $user_id; ?>" <?php echo $a_system; ?>><?php echo _('System'); ?></a> +</li> +<li <?php echo $tab_modules; ?>> + <a href="<?php echo $link; ?>?tab=modules&user_id=<?php echo $user_id; ?>" <?php echo $a_modules; ?>><?php echo _('Modules'); ?></a> +</li> + +<?php } ?> +</ul> +</div> +<div class="text-box" style="width:45em;"> +<form method="post" name="preferences" action="<?php echo Config::get('web_path'); ?><?php echo $target; ?>" enctype="multipart/form-data"> +<?php +if ($current_tab != 'account' && $current_tab != 'modules') { + show_preference_box($preferences[$current_tab]); + +?> + <input class="button" type="submit" value="<?php echo _('Update Preferences'); ?>" /> + <input type="hidden" name="action" value="update_preferences" /> + <input type="hidden" name="user_id" value="<?php echo $user_id; ?>" /> + <input type="hidden" name="tab" value="<?php echo scrub_out($current_tab); ?>" /> + <input class="button" type="submit" name="action" value="<?php echo _("Cancel"); ?>" /> +<?php + } +if ($current_tab == 'modules') { + require (conf('prefix') . '/templates/show_modules.inc.php'); +} +if ($current_tab == 'account') { + $this_user = new User($user_id); + require (conf('prefix') . '/templates/show_user.inc.php'); + } +?> +</form> +</div> +<?php show_box_bottom(); ?> |