diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-09 20:58:04 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2007-12-09 20:58:04 +0000 |
commit | 17a4516e29e9ce9d2583d8b06431dfcdf5722c11 (patch) | |
tree | 4dcf79a137336f12d38476c12b26128d4098eda5 /templates | |
parent | 883adcd52b1f4cb4afe4ff5062d1bb83218840ff (diff) | |
download | ampache-17a4516e29e9ce9d2583d8b06431dfcdf5722c11.tar.gz ampache-17a4516e29e9ce9d2583d8b06431dfcdf5722c11.tar.bz2 ampache-17a4516e29e9ce9d2583d8b06431dfcdf5722c11.zip |
added the controls to the mpd playlist does not refresh correctly, but does work
Diffstat (limited to 'templates')
-rw-r--r-- | templates/show_localplay_status.inc.php | 55 |
1 files changed, 15 insertions, 40 deletions
diff --git a/templates/show_localplay_status.inc.php b/templates/show_localplay_status.inc.php index 7a172a6d..058b6f98 100644 --- a/templates/show_localplay_status.inc.php +++ b/templates/show_localplay_status.inc.php @@ -1,13 +1,13 @@ <?php /* - Copyright (c) 2001 - 2006 Ampache.org + 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 - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. + as published by the Free Software Foundation; version 2 + of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -19,47 +19,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -$web_path = conf('web_path'); -$localplay = init_localplay(); - -$required_info = "&user_id=" . $GLOBALS['user']->id . "&sessid=" . session_id(); -$ajax_url = $web_path . '/server/ajax.server.php'; -$status = $localplay->status(); - +$status = $localplay->status(); ?> -<span style="font-weight:bold;" id="lp_state"><?php echo $localplay->get_user_state($status['state']) ?></span><br /> - <span id="lp_playing"><?php echo $localplay->get_user_playing(); ?></span> -<div class="lp_box_ctrl"><?php require (conf('prefix') . '/templates/show_localplay_control.inc.php'); ?></div> -<div class="lp_box_vol"> - <?php if ($localplay->has_function('volume_up')) { ?> - <span class="up_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_up<?php echo $required_info; ?>','lp_v');return true;"> - <?php echo get_user_icon('volumeup'); ?> - </span> - <?php } ?> - <?php if ($localplay->has_function('volume_down')) { ?> - <span class="down_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_down<?php echo $required_info; ?>','lp_v');return true;"> - <?php echo get_user_icon('volumedn'); ?> - </span> - <?php } ?> - <?php if ($localplay->has_function('volume_mute')) { ?> - <span class="mute_button" onclick="ajaxPut('<?php echo $ajax_url; ?>?action=localplay&cmd=volume_mute<?php echo $required_info; ?>','lp_v');return true;"> - <?php echo get_user_icon('volumemute'); ?> - </span> - <?php } ?> +<?php show_box_top(_('Localplay Control')); ?> +<span id="lp_state"><?php echo $localplay->get_user_state($status['state']) ?></span><br /> +<div id="lp_box_vol"> + <?php echo Ajax::button('?page=localplay&action=command&command=volume_up','volumeup',_('Increase Volume'),'localplay_volume_up'); ?> + <?php echo Ajax::button('?page=localplay&action=command&command=volume_down','volumedn',_('Decrease Volume'),'localplay_volume_dn'); ?> + <?php echo Ajax::button('?page=localplay&action=command&command=volume_mute','volumemute',_('Mute'),'localplay_mute'); ?> <?php echo _('Volume'); ?>:<span id="lp_volume"><?php echo $status['volume']; ?></span> </div> <br /> -<?php if ($localplay->has_function('repeat')) { ?> <?php echo _('Repeat') . ":" . print_boolean($status['repeat']); ?> | - <a href="<?php echo $web_path; ?>/localplay.php?action=repeat&value=<?php echo invert_boolean($status['repeat']); ?>"> - <?php echo print_boolean(invert_boolean($status['repeat'])); ?> - </a><br /> - <?php } ?> -<?php if ($localplay->has_function('random')) { ?> + <?php echo Ajax::text('?page=localplay&action=repeat&value=' . invert_boolean($status['repeat']),print_boolean(invert_boolean($status['repeat'])),'localplay_repeat'); ?> + <br /> <?php echo _('Random') . ":" . print_boolean($status['random']); ?> | - <a href="<?php echo $web_path; ?>/localplay.php?action=random&value=<?php echo invert_boolean($status['random']); ?>"> - <?php echo print_boolean(invert_boolean($status['random'])); ?> - </a><br /> -<?php } ?> + <?php echo Ajax::text('?page=localplay&action=random&value=' . invert_boolean($status['random']),print_boolean(invert_boolean($status['random'])),'localplay_random'); ?> + <br /> +<?php show_box_bottom(); ?> |