<?php
##
## [PHP/mp3stream]
## for default template parsing
##

if(file_exists(__TMPLPATH__.'/config.php'))
{ require_once 
__TMPLPATH__.'/config.php'; }

## get userconfig override
##
$TMPL array_merge($TMPL,str2array($_userconf['info'])); // it's override
$TMPL['copyright'] = tag_a($TMPL['copyright'],'http://linuxchannel.net/','_blank');
$TMPL['pointer'] = ($browser['br']=='MSIE')&&($browser['vr']<=5.5)?'hand':'pointer';
$TMPL['player_link'] = '<A HREF="'.$player['link'].'" TARGET="_blank">['.$player['str'].']</A>';

## start of templates parsing
##
$tmpl = new tmpl(__DEBUG__);

$TMPL['menu_hotmusic'] = '&nbsp;<P><CENTER><B>YET !!!!!!!!!!</B></CENTER>';

/**********
## get blocks
##
$block = $tmpl->get_file(__TMPLPATH__.'/block/list.html.tmpl');
$block = str_replace('$STR','del',$block);

## get list link
##
$from = array('$TYPE','$VALUE','$LINK','$TITLE','$LAME',
    '$ACTLIST','$MODE','$BITRATE','$FREQUENCY','$LENGTH','$SIZE');

## cookie my playlist
##
for($i=0; $i<sizeof($playlist['link']); $i++)
{
  $to = array(
    $playlist['tail'][$i],
    $playlist['idx'][$i],
    $playlist['link'][$i],
    $playlist['str'][$i],
    ($lame=$playlist['lame'][$i]) ? "<A HREF='$lame'>mono</A>" : '-',
    $playlist['dellist'][$i],
    $playlist['mode'][$i],
    $playlist['bitrate'][$i],
    $playlist['frequency'][$i],
    $playlist['length'][$i],
    $playlist['filesize'][$i],
    );
  $mlist .= str_replace($from,$to,$block);
}

if($TMPL['playlist'] = $tmpl->parse($mlist,$TMPL))
{
  $menu_playlist = $tmpl->get_file(__TMPLPATH__.'/menu/playlist.html.tmpl');
  $TMPL['menu_playlist'] = $tmpl->parse($menu_playlist,$TMPL);
}
*********/

## TMPL parsing
##
//$header = $tmpl->get_file(__TMPLPATH__.'/header.html.tmpl');
$contents $tmpl->get_file(__TMPLPATH__.'/hotmusic.html.tmpl');
//$footer = $tmpl->get_file(__TMPLPATH__.'/footer.html.tmpl');

## printing
##
//echo $tmpl->parse($header,$TMPL);
echo $tmpl->parse($contents,$TMPL);
//echo $tmpl->parse($footer,$TMPL);

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

?>