<?php
##
#######################################################
## configuration
#######################################################

ini_set('include_path','.:'.dirname(__FILE__).':'.ini_get('include_path')); 
require_once 
'_lib/all.php';
require_once 
'_conf/config.php';

$_SERVER['PHP_SELF'] = preg_replace('/\?.*$/','',$_SERVER['REQUEST_URI']);

$TMPL['opener_refresh'] = $_GET['opener'];

$mp3 = new id3();
$ogg = new ogg();

$playlist get_cookie_userlist($_pstream,$TMPL,$mp3,$ogg);

## check and change play mode
##
if($_pstream['playmode'])
{
  
## change paly mode
  ##
  
$playlist array_change($playlist,'lame','link');

  if(
$_pstream['lame'])
  { 
$TMPL['playmode_mono'] = 'CHECKED'; }
}

if(!
$_pstream['lame']) $TMPL['playmode_mono'] = 'DISABLED';
if(!
$_pstream['allowwmp']) $TMPL['playmode_wmp'] = 'DISABLED';
if(!
$_pstream['download']) unset($playlist['download']);

$TMPL['mymaxlife'] = $_maxlifes["$_userconf[maxlife]"][2].
  
'('.sizeof($playlist['link']).')';

## agent infomation
##
$browser get_agent();

if(
$browser['os'] == 'WIN' || $browser['os'] == 'NT')
$player $_player['win']; }
else
{
  
$player $_player['others'];
  
$TMPL['playmode_wmp'] = 'DISABLED'// force to NULL
}

include_once 
__IPATH__.'/playlist.php';

//if($_GET[debug]) _debug(1);

$not $_not 1;

exit;
?>