has_access(25) || conf('demo_mode') || ($GLOBALS['user']->id != $user_id && !$GLOBALS['user']->has_access(100))) { show_access_denied(); exit(); } /* Go ahead and update normal stuff */ $this_user = new User($user_id); $this_user->update_fullname($_REQUEST['fullname']); $this_user->update_email($_REQUEST['email']); $this_user->update_offset($_REQUEST['offset_limit']); /* Check for password change */ if ($_REQUEST['password1'] !== $_REQUEST['password2'] && !empty($_REQUEST['password1'])) { $GLOBALS['error']->add_error('password',_('Error: Password Does Not Match or Empty')); break; } elseif (!empty($_REQUEST['password1'])) { /* We're good change the mofo! */ $this_user->update_password($_REQUEST['password1']); /* Haha I'm fired... it's not an error but screw it */ $GLOBALS['error']->add_error('password',_('Password Updated')); } /* Check for stats */ if ($_REQUEST['clear_stats'] == '1') { $this_user->delete_stats(); } break; case 'update_preferences': /* Do the work */ update_preferences($user_id); /* Reload the Preferences */ $GLOBALS['user']->set_preferences(); /* Reset the conf values */ init_preferences(); /* Reset the Theme */ set_theme(); default: if (!$user_id) { $user_id = $GLOBALS['user']->id; } $preferences = $GLOBALS['user']->get_preferences(0,$_REQUEST['tab']); break; } // End Switch Action if (!$GLOBALS['user']->fullname) { $fullname = "Site"; } else { $fullname = $GLOBALS['user']->fullname; } // HEADER show_template('header'); // HEADER // Set Target $target = "/preferences.php"; // Show the default preferences page require (conf('prefix') . "/templates/show_preferences.inc"); // FOOTER show_footer(); ?> 95ab4e2d91402771e87cd39b5d1ccb'>show_localplay.inc.php
blob: 2cac12bdad561f81f9eddbd1c9a92917b4ed52ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
/*

 Copyright (c) 2001 - 2006 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.

*/

$web_path = conf('web_path'); 
$localplay = init_localplay();
?>
<?php show_box_top(ucfirst($localplay->type) . ' ' . _('Localplay')); ?>
<table>
<tr>
	<td valign="top">
		<strong><?php echo _('Actions'); ?>:</strong><br />
		<?php if ($localplay->has_function('delete_all')) { ?>
			<div class="text-action"><a href="<?php echo $web_path; ?>/localplay.php?action=delete_all"><?php echo _('Clear Playlist'); ?></a></div>
		<?php } ?>
	</td><td>
		<?php $add_info = "&amp;return=1"; ?>
		<?php require_once(conf('prefix') . '/templates/show_localplay_status.inc.php'); ?>
	</td>
</tr>
</table>
<?php show_box_bottom(); ?>


<?php show_box_top(_('Current Playlist')); ?>
<div id="lp_playlist">
<?php require_once(conf('prefix') . '/templates/show_localplay_playlist.inc.php'); ?>
</div>
<?php show_box_bottom(); ?>