summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-ximages/localplay/next.gifbin1005 -> 1057 bytes
-rwxr-xr-ximages/localplay/pause.gifbin1006 -> 1063 bytes
-rwxr-xr-ximages/localplay/play.gifbin989 -> 652 bytes
-rwxr-xr-ximages/localplay/prev.gifbin1014 -> 1062 bytes
-rwxr-xr-ximages/localplay/stop.gifbin1005 -> 1050 bytes
-rw-r--r--server/ajax.server.php18
-rw-r--r--templates/basestyle.inc.php7
-rw-r--r--templates/show_localplay_control.inc.php19
-rw-r--r--templates/sidebar.inc.php20
9 files changed, 39 insertions, 25 deletions
diff --git a/images/localplay/next.gif b/images/localplay/next.gif
index e7e6664f..98ba533a 100755
--- a/images/localplay/next.gif
+++ b/images/localplay/next.gif
Binary files differ
diff --git a/images/localplay/pause.gif b/images/localplay/pause.gif
index 7f49b71f..f052cba0 100755
--- a/images/localplay/pause.gif
+++ b/images/localplay/pause.gif
Binary files differ
diff --git a/images/localplay/play.gif b/images/localplay/play.gif
index a416b0d9..053ef744 100755
--- a/images/localplay/play.gif
+++ b/images/localplay/play.gif
Binary files differ
diff --git a/images/localplay/prev.gif b/images/localplay/prev.gif
index 575e4692..c9ffcb00 100755
--- a/images/localplay/prev.gif
+++ b/images/localplay/prev.gif
Binary files differ
diff --git a/images/localplay/stop.gif b/images/localplay/stop.gif
index 428c3279..e4454b45 100755
--- a/images/localplay/stop.gif
+++ b/images/localplay/stop.gif
Binary files differ
diff --git a/server/ajax.server.php b/server/ajax.server.php
index 394d4ce4..b40b0446 100644
--- a/server/ajax.server.php
+++ b/server/ajax.server.php
@@ -53,15 +53,15 @@ switch ($action) {
/* Now Replace the text as you should */
$ajax_url = conf('web_path') . '/server/ajax.server.php';
$required_info = "&user_id=" . $GLOBALS['user']->id . "&sessid=" . session_id();
- if ($_GET['type'] == 'localplay') { ?>
- <span style="text-decoration:underline;cursor:pointer;" onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=<?php echo $_SESSION['data']['old_play_type'] . $required_info; ?>','play_type');return true;">
- <?php echo ucfirst($_SESSION['data']['old_play_type']) . ' ' . _('Mode'); ?>
- </span>
- <?php } else { ?>
- <span style="text-decoration:underline;cursor:pointer;" onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=localplay<?php echo $required_info; ?>','play_type');return true;">
- <?php echo _('Localplay Mode'); ?>
- </span>
- <?php }
+ ${$_GET['type']} = 'id="pt_active"';
+ ?>
+ <span <?php echo $stream; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=stream<?php echo $required_info; ?>','play_type');return true;">
+ <?php echo _('Stream') ?>
+ </span>&nbsp;&nbsp;
+ <span <?php echo $localplay; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=localplay<?php echo $required_info; ?>','play_type');return true;">
+ <?php echo _('Localplay'); ?>
+ </span>
+ <?php
break;
default:
echo "Default Action";
diff --git a/templates/basestyle.inc.php b/templates/basestyle.inc.php
index 8e2f49e1..f9c1a88d 100644
--- a/templates/basestyle.inc.php
+++ b/templates/basestyle.inc.php
@@ -266,12 +266,17 @@
margin-bottom:5px;
padding-left:0px;
}
- .text-action a {
+ .text-action a, .text-action span {
background: <?php echo conf('base_color2'); ?>;
border:1px solid <?php echo conf('bg_color2'); ?>;
padding-left:2px;
padding-right:2px;
text-decoration: none;
}
+ .text-action #pt_active {
+ background: <?php echo conf('bg_color2'); ?>;
+ color: <?php echo conf('font_color3'); ?>;
+ border:1px solid <?php echo conf('base_color2'); ?>;
+ }
-->
</style>
diff --git a/templates/show_localplay_control.inc.php b/templates/show_localplay_control.inc.php
index b40fcc77..da37a005 100644
--- a/templates/show_localplay_control.inc.php
+++ b/templates/show_localplay_control.inc.php
@@ -21,12 +21,13 @@
*/
$web_path = conf('web_path');
-$data = $localplay->status();
+$localplay = init_localplay();
$required_info = "&amp;user_id=" . $GLOBALS['user']->id . "&amp;sessid=" . session_id();
$ajax_url = $web_path . '/server/ajax.server.php';
?>
+<div style="background:white;display:table-cell;cursor:pointer;border:1px solid black;padding-top:2px;padding-left:5px;padding-right:5px;">
<?php if ($localplay->has_function('prev')) { ?>
<span id="prev_button" onclick="ajaxPut('<?php echo $ajax_url; ?>','action=localplay&amp;cmd=prev<?php echo $required_info; ?>','localplay_state');return true;">
<img src="<?php echo $web_path; ?>/images/localplay/prev.gif" alt="prev" />
@@ -37,7 +38,7 @@ $ajax_url = $web_path . '/server/ajax.server.php';
</span>
<?php if ($localplay->has_function('pause')) { ?>
<span id="pause_button" onclick="ajaxPut('<?php echo $ajax_url; ?>','action=localplay&amp;cmd=pause<?php echo $requird_info; ?>','localplay_state');return true;">
- <img src="<?Php echo $web_path; ?>/images/localplay/pause.gif" alt="pause" />
+ <img src="<?php echo $web_path; ?>/images/localplay/pause.gif" alt="pause" />
</span>
<?php } ?>
<span id="play_button" onclick="ajaxPut('<?php echo $ajax_url; ?>','action=localplay&amp;cmd=play<?php echo $required_info; ?>','localplay_state');return true;">
@@ -48,16 +49,4 @@ $ajax_url = $web_path . '/server/ajax.server.php';
<img src="<?php echo $web_path; ?>/images/localplay/next.gif" alt="next" />
</span>
<?php } ?>
-<br />
-Current State:<span id="localplay_state"><?php echo $data['state']; ?></span><br />
-<span id="play_type">
-<?php if (conf('play_type') == 'localplay' AND strlen($_SESSION['data']['old_play_type'])) { ?>
-<span style="text-decoration:underline;cursor:pointer;" onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&amp;type=<?php echo $_SESSION['data']['old_play_type'] . $required_info; ?>','play_type');return true;">
- <?php echo ucfirst($_SESSION['data']['old_play_type']) . ' ' . _('Mode'); ?>
-</span>
-<?php } else { ?>
-<span style="text-decoration:underline;cursor:pointer;" onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&amp;type=localplay<?php echo $required_info; ?>','play_type');return true;">
- <?php echo _('Localplay Mode'); ?>
-</span>
-<?php } ?>
-</span><br />
+</div>
diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php
index 4d17dd31..36c90ec7 100644
--- a/templates/sidebar.inc.php
+++ b/templates/sidebar.inc.php
@@ -177,6 +177,26 @@ $web_path = conf('web_path');
</form>
</li>
<?php } // end if ($GLOBALS['theme']['orientation'] != 'horizontal') ?>
+<?php if ($GLOBALS['user']->prefs['localplay_level'] > 0) { ?>
+ <li>
+ <a href="<?php echo $web_path; ?>/localplay.php"><?php echo _('Localplay'); ?></a>
+ </li>
+<?php if ($GLOBALS['theme']['orientation'] != 'horizontal') { ?>
+ <li>
+ <?php require_once(conf('prefix') . '/templates/show_localplay_control.inc.php'); ?>
+ <br />
+ <?php $type = conf('play_type'); ${$type} = 'id="pt_active"'; ?>
+ <span class="text-action" style="cursor:pointer;" id="play_type">
+ <span <?php echo $stream; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=stream<?php echo $required_info; ?>','play_type');return true;">
+ <?php echo _('Stream') ?>
+ </span>&nbsp;&nbsp;
+ <span <?php echo $localplay; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&type=localplay<?php echo $required_info; ?>','play_type');return true;">
+ <?php echo _('Localplay'); ?>
+ </span>
+ </span>
+ </li>
+<?php } // if horizontal orientation ?>
+<?php } // if localplay access ?>
<?php if (conf('use_auth')) { ?>
<li><a href="<?php echo $web_path; ?>/logout.php"><?php echo _("Logout"); ?></a></li>
<?php } // end (conf('use_auth'))?>