summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/catalog.php4
-rwxr-xr-xdocs/CHANGELOG6
-rw-r--r--install.php99
-rw-r--r--lib/class/catalog.class.php49
-rw-r--r--lib/class/localplay.class.php21
-rw-r--r--lib/general.lib.php17
-rw-r--r--localplay.php10
-rw-r--r--modules/localplay/mpd.controller.php14
-rw-r--r--play/index.php6
-rw-r--r--templates/show_install.inc4
-rw-r--r--templates/show_install_account.inc.php2
-rw-r--r--templates/show_install_config.inc9
-rw-r--r--templates/show_install_lang.inc.php60
-rw-r--r--templates/show_localplay.inc.php10
-rw-r--r--templates/show_modules.inc.php2
-rw-r--r--templates/sidebar.inc.php4
16 files changed, 278 insertions, 39 deletions
diff --git a/admin/catalog.php b/admin/catalog.php
index 20a2b0cb..c3c3799e 100644
--- a/admin/catalog.php
+++ b/admin/catalog.php
@@ -122,6 +122,10 @@ switch ($_REQUEST['action']) {
$catalog->add_to_catalog();
echo "</div>";
}
+ $url = conf('web_path') . '/admin/index.php';
+ $title = _('Catalog Updated');
+ $body = '';
+ show_confirmation($title,$body,$url);
break;
case 'delete_catalog':
/* Make sure they aren't in demo mode */
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index 49742d94..31375a7f 100755
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -4,6 +4,8 @@
--------------------------------------------------------------------------
v.3.3.2-Beta3
+ - Added Clear Playlist Functionality to Localplay
+ - Added Language selection to Installer (Thx Ros)
- Added xbmc controller (Thx Infamy)
- Fixed a problem where if require_session was disabled it would
still pass the sid with the urls
@@ -11,9 +13,9 @@
- New Install and Update screen styles (Thx Ros)
- Fixed a glitch that was causing m3u's to be built on every
catalog add, rather then just on creation
- - Full re-write of Localplay, MPD controller added
- Tweaked Preferences once more
- - Added Modules Page
+ - Added Modules Page, used for enabling/disabling localplay
+ types
- Fixed a missing web_path reference on playlist edit page
- Added Localplay API, check the wiki for more information
https://ampache.bountysource.com/wiki/Localplay
diff --git a/install.php b/install.php
index ca733957..44c4d17d 100644
--- a/install.php
+++ b/install.php
@@ -31,6 +31,7 @@ require_once('modules/lib.php');
require_once('lib/debug.php');
require_once('lib/class/user.class.php');
require_once('lib/class/error.class.php');
+require_once('lib/gettext.php');
require_once('modules/vauth/dbh.lib.php');
require_once('modules/vauth/init.php');
@@ -75,8 +76,12 @@ switch ($action) {
require_once('templates/show_install.inc.php');
break;
}
+
+ /* Get the variables for the language */
+ $htmllang = $_REQUEST['htmllang'];
+ $charset = $_REQUEST['charset'];
- header ("Location: " . $php_self . "?action=show_create_config&local_db=$database&local_host=$hostname");
+ header ("Location: " . $php_self . "?action=show_create_config&local_db=$database&local_host=$hostname&htmllang=$htmllang&charset=$charset");
break;
case 'create_config':
@@ -89,7 +94,33 @@ switch ($action) {
/* Attempt to Guess the Web_path */
$web_path = dirname($_SERVER['PHP_SELF']);
$web_path = rtrim($web_path,"\/");
-
+
+ /* Get the variables for the language */
+ $htmllang = $_REQUEST['htmllang'];
+ $charset = $_REQUEST['charset'];
+
+ // Set the lang in the conf array
+ conf(array('lang'=>$htmllang));
+
+ // We need the charset for the different languages
+ $charsets = array('de_DE' => 'ISO-8859-15',
+ 'en_US' => 'iso-8859-1',
+ 'en_GB' => 'UTF-8',
+ 'es_ES' => 'iso-8859-1',
+ 'fr_FR' => 'iso-8859-1',
+ 'it_IT' => 'UTF-8',
+ 'nl_NL' => 'ISO-8859-15',
+ 'tr_TR' => 'iso-8859-9',
+ 'zh_CN' => 'GBK');
+ $charset = $charsets[$_REQUEST['htmllang']];
+
+ // Set the site_charset in the conf array
+ conf(array('site_charset'=>$charsets[$_REQUEST['htmllang']]));
+
+ /* load_gettext mojo */
+ load_gettext();
+ header ("Content-Type: text/html; charset=" . conf('site_charset'));
+
require_once('templates/show_install_config.inc');
break;
case 'create_account':
@@ -130,11 +161,73 @@ switch ($action) {
break;
}
+
+ /* Get the variables for the language */
+ $htmllang = $_REQUEST['htmllang'];
+ $charset = $_REQUEST['charset'];
+
+
+ // Set the lang in the conf array
+ conf(array('lang'=>$htmllang));
+
+ // We need the charset for the different languages
+ $charsets = array('de_DE' => 'ISO-8859-15',
+ 'en_US' => 'iso-8859-1',
+ 'en_GB' => 'UTF-8',
+ 'es_ES' => 'iso-8859-1',
+ 'fr_FR' => 'iso-8859-1',
+ 'it_IT' => 'UTF-8',
+ 'nl_NL' => 'ISO-8859-15',
+ 'tr_TR' => 'iso-8859-9',
+ 'zh_CN' => 'GBK');
+ $charset = $charsets[$_REQUEST['htmllang']];
+
+ // Set the site_charset in the conf array
+ conf(array('site_charset'=>$charsets[$_REQUEST['htmllang']]));
+
+ /* load_gettext mojo */
+ load_gettext();
+ header ("Content-Type: text/html; charset=" . conf('site_charset'));
+
require_once('templates/show_install_account.inc.php');
break;
- default:
+
+ case 'init':
+ /* First step of installation */
+ // Get the language
+ $htmllang = $_REQUEST['htmllang'];
+
+ // Set the lang in the conf array
+ conf(array('lang'=>$htmllang));
+
+ // We need the charset for the different languages
+ $charsets = array('de_DE' => 'ISO-8859-15',
+ 'en_US' => 'iso-8859-1',
+ 'en_GB' => 'UTF-8',
+ 'es_ES' => 'iso-8859-1',
+ 'fr_FR' => 'iso-8859-1',
+ 'it_IT' => 'UTF-8',
+ 'nl_NL' => 'ISO-8859-15',
+ 'tr_TR' => 'iso-8859-9',
+ 'zh_CN' => 'GBK');
+ $charset = $charsets[$_REQUEST['htmllang']];
+
+ // Set the site_charset in the conf array
+ conf(array('site_charset'=>$charsets[$_REQUEST['htmllang']]));
+
+ // Now we make voodoo with the Load gettext mojo
+ load_gettext();
+
+ // Page ready :)
+ header ("Content-Type: text/html; charset=" . conf('site_charset'));
require_once('templates/show_install.inc');
break;
+
+ default:
+ /* Show the language options first */
+ require_once('templates/show_install_lang.inc.php');
+ break;
+
} // end action switch
diff --git a/lib/class/catalog.class.php b/lib/class/catalog.class.php
index 57186865..35ac600e 100644
--- a/lib/class/catalog.class.php
+++ b/lib/class/catalog.class.php
@@ -493,7 +493,7 @@ class Catalog {
echo "</script>\n";
flush();
} //echos song count
-
+
// Prevent the script from timing out
set_time_limit(0);
@@ -501,8 +501,7 @@ class Catalog {
unset($found);
} // foreach albums
-
- echo "$art_found album's with art. . .<br />\n";
+ echo "<br />$art_found " . _('album\'s with art') . ". . .<br />\n";
flush();
} // get_album_art
@@ -649,7 +648,7 @@ class Catalog {
// Get all of the albums in this catalog
$albums = $this->get_catalog_albums($catalog_id);
- echo "<br /><b>" . _("Starting Dump Album Art") . ". . .</b><br /><br />\n";
+ echo "<br /><b>" . _('Starting Dump Album Art') . ". . .</b><br /><br />\n";
// Run through them an get the art!
foreach ($albums as $album) {
@@ -789,6 +788,12 @@ class Catalog {
/* Get the songs and then insert them into the db */
$this->add_files($this->path,$type,$parse_m3u);
+ echo "<script language=\"JavaScript\">";
+ echo "update_txt('" . $this->count . "','count_add_" . $this->id ."');";
+ echo "</script>\n";
+ flush();
+
+
foreach ($this->_playlists as $full_file) {
if ($this->import_m3u($full_file)) {
$file = basename($full_file);
@@ -799,7 +804,7 @@ class Catalog {
/* Now Adding Album Art? */
if ($gather_art) {
- echo "<br />\n<b>" . _("Starting Album Art Search") . ". . .</b><br />\n";
+ echo "<br />\n<b>" . _('Starting Album Art Search') . ". . .</b><br />\n";
echo _('Searched') . ": <span id=\"count_art_" . $this->id . "\">" . _('None') . "</span>";
flush();
$this->get_album_art(0,$art);
@@ -952,6 +957,11 @@ class Catalog {
/* Get the songs and then insert them into the db */
$this->add_files($this->path,$type,1,$verbose);
+ echo "<script language=\"JavaScript\">";
+ echo "update_txt('" . $this->count . "','count_add_" . $this->id ."');";
+ echo "</script>\n";
+ flush();
+
foreach ($this->_playlists as $full_file) {
if ($this->import_m3u($full_file)) {
$file = basename($full_file);
@@ -1212,12 +1222,25 @@ class Catalog {
flush();
}
- $sql = "DELETE FROM song WHERE id='" . $results->id . "'";
- $db_results = mysql_query($sql, dbh());
-
+ /* Add this file to the list for removal from the db */
+ $dead_files[] = $results;
} //if error
} //while gettings songs
+
+ /* Unfortuantly it has to be done this way
+ * you can't delete a row at the same time you're
+ * doing a select on said table
+ */
+ if (count($dead_files)) {
+ foreach ($dead_files as $data) {
+
+ $sql = "DELETE FROM song WHERE id='$data->id'";
+ $db_results = mysql_query($sql, dbh());
+
+ } //end foreach
+
+ } // end if dead files
/* Step two find orphaned Arists/Albums
* This finds artists and albums that no
@@ -1232,6 +1255,9 @@ class Catalog {
/* Return dead files, so they can be listed */
if ($verbose) {
+ echo "<script language=\"JavaScript\">";
+ echo "update_txt('" . $this->count ."','count_clean_" . $this->id . "');";
+ echo "</script>\n";
echo "<b>" . _("Catalog Clean Done") . " [" . count($dead_files) . "] " . _("files removed") . "</b><br />\n";
flush();
}
@@ -1659,6 +1685,13 @@ class Catalog {
// Update the last_update
$this->update_last_update();
+ if ($verbose) {
+ echo "<script language=\"JavaScript\">";
+ echo "update_txt('" . $this->count . "','count_verify_" . $this->id . "');";
+ echo "</script>\n";
+ flush();
+ }
+
echo _('Update Finished.') . _('Checked') . " $this->count. $total_updated " . _('songs updated.') . "<br /><br />";
$this->count = 0;
diff --git a/lib/class/localplay.class.php b/lib/class/localplay.class.php
index 1cc9eccb..a3492ff3 100644
--- a/lib/class/localplay.class.php
+++ b/lib/class/localplay.class.php
@@ -23,7 +23,7 @@
class Localplay {
/* Base Variables */
-
+ var $type;
@@ -327,6 +327,25 @@ class Localplay {
} // delete
+ /**
+ * delete_all
+ * This removes every song from the players playlist as defined by the delete_all function
+ * map
+ */
+ function delete_all() {
+
+
+ $function = $this->_function_map['delete_all'];
+
+ if (!$this->_player->$function($songs)) {
+ debug_event('localplay','Error: Unable to delete entire playlist, check ' . $this->type . ' controller','1');
+ return false;
+ }
+
+ return true;
+
+ } // delete_all
+
} //end localplay class
?>
diff --git a/lib/general.lib.php b/lib/general.lib.php
index a1a83c95..cd7757c4 100644
--- a/lib/general.lib.php
+++ b/lib/general.lib.php
@@ -877,9 +877,7 @@ function get_languages() {
$handle = @opendir(conf('prefix') . '/locale');
if (!is_resource($handle)) {
- if (conf('debug')) {
- log_event($GLOBALS['user']->username,'language',"Error unable to open locale directory");
- }
+ debug_event('language','Error unable to open locale directory','1');
}
$results = array();
@@ -895,15 +893,16 @@ function get_languages() {
if (is_dir($full_file) AND substr($file,0,1) != '.' AND $file != 'base') {
switch($file) {
- case 'de_DE'; $name = _('German'); break;
+ case 'de_DE'; $name = 'Deutsch'; break;
case 'en_US'; $name = _('English'); break;
case 'en_GB'; $name = _('British English'); break;
- case 'es_ES'; $name = _('Spanish'); break;
- case 'fr_FR'; $name = _('French'); break;
- case 'it_IT'; $name = _('Italian'); break;
- case 'nl_NL'; $name = _('Dutch'); break;
+ case 'es_ES'; $name = 'Espa&ntilde;ol'; break;
+ case 'fr_FR'; $name = 'Fran&ccedil;ais'; break;
+ case 'it_IT'; $name = 'Italiano'; break;
+ case 'nl_NL'; $name = 'Nederlands'; break;
case 'tr_TR'; $name = _('Turkish'); break;
- case 'zh_CN'; $name = _('Simplified Chinese'); break;
+ case 'zh_CN'; $name = _('Simplified Chinese') . " (&#x7b80;&#x4f53;&#x4e2d;&#x6587;)"; break;
+ case 'ru_RU'; $name = 'Russian (&#x0420;&#x0443;&#x0441;&#x0441;&#x043a;&#x0438;&#x0439;)'; break;
default: $name = _('Unknown'); break;
} // end switch
diff --git a/localplay.php b/localplay.php
index ba5a5f7d..be5e2fe0 100644
--- a/localplay.php
+++ b/localplay.php
@@ -48,7 +48,15 @@ switch ($action) {
$localplay = init_localplay();
$localplay->delete($songs);
$url = $web_path . '/localplay.php';
- $title = _('Song Removed from Playlist');
+ $title = _('Song(s) Removed from Playlist');
+ $body = '';
+ show_confirmation($title,$body,$url);
+ break;
+ case 'delete_all':
+ $localplay = init_localplay();
+ $localplay->delete_all();
+ $url = $web_path . '/localplay.php';
+ $title = _('Song(s) Remove from Playlist');
$body = '';
show_confirmation($title,$body,$url);
break;
diff --git a/modules/localplay/mpd.controller.php b/modules/localplay/mpd.controller.php
index b7b461ed..cd2f686c 100644
--- a/modules/localplay/mpd.controller.php
+++ b/modules/localplay/mpd.controller.php
@@ -75,7 +75,7 @@ class AmpacheMpd {
/* Optional Functions */
$map['move'] = 'move';
- //$map['delete_all'] = 'clear_playlist';
+ $map['delete_all'] = 'clear_playlist';
return $map;
@@ -151,6 +151,18 @@ class AmpacheMpd {
/**
+ * clear_playlist
+ * This deletes the entire MPD playlist... nuff said
+ */
+ function clear_playlist() {
+
+ if (is_null($this->_mpd->PLClear())) { return false; }
+
+ return true;
+
+ } // clear_playlist
+
+ /**
* play
* This just tells MPD to start playing, it does not
* take any arguments
diff --git a/play/index.php b/play/index.php
index d13c447f..23581638 100644
--- a/play/index.php
+++ b/play/index.php
@@ -118,6 +118,9 @@ $catalog = new Catalog($song->catalog);
/* Update the users last seen information */
$GLOBALS['user']->update_last_seen();
+/* Run Garbage Collection on Now Playing */
+gc_now_playing();
+
/* Check to see if this is a 'remote' catalog */
if ($catalog->catalog_type == 'remote') {
// redirect to the remote host's play path
@@ -133,9 +136,6 @@ if ($catalog->catalog_type == 'remote') {
} // end if remote catalog
-/* Run Garbage Collection on Now Playing */
-gc_now_playing();
-
// If we are running in Legalize mode, don't play songs already playing
if (conf('lock_songs')) {
if (!check_lock_songs($song->id)) { exit(); }
diff --git a/templates/show_install.inc b/templates/show_install.inc
index 3db12278..a1f0c574 100644
--- a/templates/show_install.inc
+++ b/templates/show_install.inc
@@ -1,4 +1,4 @@
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
<head>
<title>Ampache :: For The Love Of Music - Install</title>
</head>
@@ -34,7 +34,7 @@
<br /><br />
<span class="header2">Insert Ampache Database</span>
<?php echo $GLOBALS['error']->print_error('general'); ?>
- <form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?action=create_db"; ?>" enctype="multipart/form-data" >
+ <form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?action=create_db&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data" >
<table>
<tr>
<td class="align"><?php echo _("Desired Database Name"); ?></td>
diff --git a/templates/show_install_account.inc.php b/templates/show_install_account.inc.php
index 71ce402c..b2e580b1 100644
--- a/templates/show_install_account.inc.php
+++ b/templates/show_install_account.inc.php
@@ -25,7 +25,7 @@
*/
?>
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
<head>
<title>Ampache :: For The Love Of Music - Install</title>
</head>
diff --git a/templates/show_install_config.inc b/templates/show_install_config.inc
index 82ba6679..28296c84 100644
--- a/templates/show_install_config.inc
+++ b/templates/show_install_config.inc
@@ -6,7 +6,7 @@
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
+1 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,
@@ -25,7 +25,7 @@
*/
?>
-<html>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $htmllang; ?>" lang="<?php echo $htmllang; ?>">
<head>
<title>Ampache :: For The Love Of Music - Install</title>
</head>
@@ -125,12 +125,13 @@
<tr>
<td>&nbsp;</td>
<td>
- <a href="<?php echo $GLOBALS['php_self']; ?>?action=show_create_config&local_db=<?php echo $_REQUEST['local_db']; ?>&local_host=<?php echo $_REQUEST['local_host']; ?>">[<?php echo _("Check for Config"); ?>]</a>
+ <?php $check_url = $GLOBALS['php_self'] . "?action=show_create_config&amp;htmllang=$htmllang&amp;charset=$charset&amp;local_db=" . $_REQUEST['local_db'] . "&amp;local_host=" . $_REQUEST['local_host']; ?>
+ <a href="<?php echo $check_url; ?>">[<?php echo _('Check for Config'); ?>]</a>
</td>
</tr>
</table>
<br />
- <form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=show_create_account"; ?>" enctype="multipart/form-data">
+ <form method="post" action="<?php echo $GLOBALS['php_self'] . "?action=show_create_account&htmllang=$htmllang&charset=$charset"; ?>" enctype="multipart/form-data">
<input type="Submit" value="Continue to Step 3" />
</form>
</div>
diff --git a/templates/show_install_lang.inc.php b/templates/show_install_lang.inc.php
new file mode 100644
index 00000000..e4ccfbf9
--- /dev/null
+++ b/templates/show_install_lang.inc.php
@@ -0,0 +1,60 @@
+<html>
+<head>
+<title>Ampache :: For The Love Of Music - Install</title>
+</head>
+<body>
+<script src="lib/general.js" language="javascript" type="text/javascript"></script>
+<?php require_once(conf('prefix') . "/templates/install.css"); ?>
+<div id="header">
+<h1><?php echo _('Ampache Installation'); ?></h1>
+<p>For the love of Music</p>
+</div>
+<div id="text-box">
+ <div class="notify">
+ <b><?php echo _("Requirements"); ?></b>
+ <p>
+ <?php echo _('This Page handles the installation of the Ampache database and the creation of the ampache.cfg.php file. Before you continue please make sure that you have the following pre-requisites'); ?>
+ <br />
+ <ul>
+ <li><?php echo _('A MySQL Server with a username and password that can create/modify databases'); ?></li>
+ <li><?php echo _('Your webserver has read access to the /sql/ampache.sql file and the /config/ampache.cfg.php.dist file'); ?></li>
+ </ul>
+<?php echo _("Once you have ensured that you have the above requirements please fill out the information below. You will only be asked for the required config values. If you would like to make changes to your ampache install at a later date simply edit /config/ampache.cfg.php"); ?>
+ </p>
+ </div>
+
+ <div class="content">
+ <b>Choose installation language.</b>
+ <p>
+ <?php echo $GLOBALS['error']->print_error('general'); ?>
+
+<form method="post" action="<?php echo $http_type . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?action=init"; ?>" enctype="multipart/form-data" >
+
+<?
+$languages = get_languages();
+$var_name = $value . "_lang";
+${$var_name} = "selected=\"selected\"";
+
+echo "<select name=\"htmllang\">\n";
+
+foreach ($languages as $lang=>$name) {
+ $var_name = $lang . "_lang";
+
+ echo "\t<option value=\"$lang\" " . ${$var_name} . ">$name</option>\n";
+} // end foreach
+echo "</select>\n";
+?>
+
+<input type="submit" value="<?php echo _('Start configuration'); ?>">
+
+ </form>
+ </p>
+ </div>
+ <div id="bottom">
+ <p><b>Ampache Installation.</b><br />
+ For the love of Music.</p>
+ </div>
+</div>
+
+</body>
+</html>
diff --git a/templates/show_localplay.inc.php b/templates/show_localplay.inc.php
index b9d126b9..e73a15cc 100644
--- a/templates/show_localplay.inc.php
+++ b/templates/show_localplay.inc.php
@@ -26,8 +26,12 @@ $songs = $localplay->get();
?>
<div class="text-box">
-<span class="header2"><?php echo _('Localplay'); ?></span>
-<!-- Yea I don't know what to put here... yet.. -->
+<span class="header2"><?php echo ucfirst($localplay->type); ?> <?php echo _('Localplay'); ?></span>
+<ul class="text-action">
+<?php if ($localplay->has_function('delete_all')) { ?>
+ <li><a href="<?php echo $web_path; ?>/localplay.php?action=delete_all"><?php echo _('Clear Playlist'); ?></a></li>
+<?php } ?>
+</ul>
</div>
<br />
<div class="text-box">
@@ -51,7 +55,7 @@ $songs = $localplay->get();
</tr>
<?php } if (!count($songs)) { ?>
<tr class="<?php echo flip_class(); ?>">
- <td colspan="2"><span class="error"><?php echo _('No Records Found'); ?></span></td>
+ <td colspan="3"><span class="error"><?php echo _('No Records Found'); ?></span></td>
</tr>
<?php } ?>
</table>
diff --git a/templates/show_modules.inc.php b/templates/show_modules.inc.php
index 8b0b139f..0fc80bfb 100644
--- a/templates/show_modules.inc.php
+++ b/templates/show_modules.inc.php
@@ -30,7 +30,7 @@
$localplay_modules = get_localplay_controllers();
$web_path = conf('web_path');
?>
-<span class="header2"><?php echo _('Modules'); ?></span>
+<span class="header1"><?php echo _('Modules'); ?></span>
<table class="border" border="0" cellspacing="0">
<tr class="table-header">
<th><?php echo _('Module Name'); ?></th>
diff --git a/templates/sidebar.inc.php b/templates/sidebar.inc.php
index 99916072..83ff2c54 100644
--- a/templates/sidebar.inc.php
+++ b/templates/sidebar.inc.php
@@ -186,6 +186,10 @@ $web_path = conf('web_path');
<?php require_once(conf('prefix') . '/templates/show_localplay_control.inc.php'); ?>
<br />
<?php $type = conf('play_type'); ${$type} = 'id="pt_active"'; ?>
+ <?php
+ $required_info = "&amp;user_id=" . $GLOBALS['user']->id . "&amp;sessid=" . session_id();
+ $ajax_url = $web_path . '/server/ajax.server.php';
+ ?>
<span class="text-action" style="cursor:pointer;" id="play_type">
<span <?php echo $stream; ?> onclick="ajaxPut('<?php echo $ajax_url; ?>','action=change_play_type&amp;type=stream<?php echo $required_info; ?>','play_type');return true;">
<?php echo _('Stream') ?>