summaryrefslogtreecommitdiffstats
path: root/templates/show_localplay_status.inc.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-09 20:58:04 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2007-12-09 20:58:04 +0000
commit17a4516e29e9ce9d2583d8b06431dfcdf5722c11 (patch)
tree4dcf79a137336f12d38476c12b26128d4098eda5 /templates/show_localplay_status.inc.php
parent883adcd52b1f4cb4afe4ff5062d1bb83218840ff (diff)
downloadampache-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/show_localplay_status.inc.php')
-rw-r--r--templates/show_localplay_status.inc.php55
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 = "&amp;user_id=" . $GLOBALS['user']->id . "&amp;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 />
-&nbsp;&nbsp;<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&amp;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&amp;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&amp;cmd=volume_mute<?php echo $required_info; ?>','lp_v');return true;">
- <?php echo get_user_icon('volumemute'); ?>
- </span>
- <?php } ?>&nbsp;
+<?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&amp;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&amp;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(); ?>