2012-12-01 17:27:04 +01:00
< ?
// $RCSfile: lmbrowse.php,v $
2015-12-04 17:07:30 +01:00
// $Revision: 1.17 $
2012-12-01 17:27:04 +01:00
// $Name: $
2015-12-04 17:07:30 +01:00
// $Date: 2015/12/04 16:07:30 $
2012-12-01 17:27:04 +01:00
// $Author: agibert $
/*
* LMBrowse - Langueur Monotone Browser
2015-01-11 18:04:44 +01:00
* Copyright ( C ) 2012 - 2015 Arnaud G . GIBERT
2012-12-01 17:27:04 +01:00
* mailto : arnaud @ rx3 . net
* http :// www . rx3 . org / dvp / lmbrowse
*
* 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 any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
* Foundation , Inc . , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
*/
function microtime_float ()
{
list ( $usec , $sec ) = explode ( " " , microtime ());
2013-01-18 00:05:06 +01:00
return ( ( float ) $usec + ( float ) $sec );
2012-12-01 17:27:04 +01:00
}
2013-01-18 00:05:06 +01:00
2012-12-01 17:27:04 +01:00
$time_start = microtime_float ();
2015-08-07 01:43:15 +02:00
//include "/var/httpd/www.langueurmonotone.com/html/lmbrowse_config.inc";
include " lmbrowse_config.inc " ;
2012-12-01 17:27:04 +01:00
$lmb_myname = " LMBrowse " ;
2013-08-20 18:32:00 +02:00
$lmb_tag_tab = explode ( " " , " \$ Name: $ " );
2012-12-01 17:27:04 +01:00
$lmb_tag_tab = explode ( " - " , $lmb_tag_tab [ 1 ]);
$lmb_myver = strtr ( " $lmb_tag_tab[1] - $lmb_tag_tab[2] " , " _ " , " . " );
2013-12-30 17:47:19 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Sort Multy Array */
/*--------------------------------------------------------------------------------------------------------------------*/
/* Thanks http://stackoverflow.com/users/50079/jon ! */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_make_comparer () {
// Normalize criteria up front so that the comparer finds everything tidy
$criteria = func_get_args ();
foreach ( $criteria as $index => $criterion ) {
$criteria [ $index ] = is_array ( $criterion )
? array_pad ( $criterion , 3 , null )
: array ( $criterion , SORT_ASC , null );
}
return function ( $first , $second ) use ( & $criteria ) {
foreach ( $criteria as $criterion ) {
// How will we compare this round?
list ( $column , $sortOrder , $projection ) = $criterion ;
$sortOrder = $sortOrder === SORT_DESC ? - 1 : 1 ;
// If a projection was defined project the values now
if ( $projection ) {
$lhs = call_user_func ( $projection , $first [ $column ]);
$rhs = call_user_func ( $projection , $second [ $column ]);
}
else {
$lhs = $first [ $column ];
$rhs = $second [ $column ];
}
// Do the actual comparison; do not return if equal
if ( $lhs < $rhs ) {
return - 1 * $sortOrder ;
}
else if ( $lhs > $rhs ) {
return 1 * $sortOrder ;
}
}
return 0 ; // tiebreakers exhausted, so $first == $second
};
}
function lmb_sort_multi_array ( $array , $key )
{
$keys = array ();
for ( $i = 1 ; $i < func_num_args (); $i ++ ) {
$keys [ $i - 1 ] = func_get_arg ( $i );
}
// create a custom search function to pass to usort
$func = function ( $a , $b ) use ( $keys ) {
for ( $i = 0 ; $i < count ( $keys ); $i ++ ) {
if ( $a [ $keys [ $i ]] != $b [ $keys [ $i ]]) {
return ( $a [ $keys [ $i ]] < $b [ $keys [ $i ]]) ? - 1 : 1 ;
}
}
return 0 ;
};
usort ( $array , $func );
return $array ;
}
2013-01-18 00:05:06 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Cookies Set */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_cookie_set ( $cookie_id , $cookie_value , $cookie_time )
{
global $lmb_cookie_tab ;
setcookie ( $cookie_id , $cookie_value , time () + $cookie_time );
$lmb_cookie_tab [ " $cookie_id " ] = $cookie_value ;
// echo "set ($cookie_value) into ($cookie_id)";
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Cookie Load */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_cookie_load ( $cookie_id , $cookie_defvalue )
{
global $lmb_cookie_tab ;
2013-08-20 18:32:00 +02:00
if ( array_key_exists ( $cookie_id , $_COOKIE ))
{
$cookie_value = $_COOKIE [ $cookie_id ];
// echo "load val ($cookie_value) for ($cookie_id)";
}
2013-01-18 00:05:06 +01:00
if ( ! isset ( $cookie_value ))
{
2013-08-20 18:32:00 +02:00
$cookie_value = $cookie_defvalue ;
// echo "set def val ($cookie_defvalue) for ($cookie_id)";
2013-01-18 00:05:06 +01:00
}
$lmb_cookie_tab [ $cookie_id ] = $cookie_value ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Cookies Load */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_cookies_load ()
{
global $lmb_cookie_tab ;
lmb_cookie_load ( " jpsolution " , " html, flash " );
lmb_cookie_load ( " admin " , " " );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Cookie Update */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_cookie_update ( $get_array )
{
2013-08-20 18:32:00 +02:00
if ( array_key_exists ( " cookie_id " , $get_array ))
{
$cookie_id = $get_array [ " cookie_id " ];
}
else
{
$cookie_id = " " ;
}
2013-01-18 00:05:06 +01:00
if ( $cookie_id != " " )
{
$cookie_value = $get_array [ " cookie_value " ];
lmb_cookie_set ( $cookie_id , $cookie_value , 31536000 );
}
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
2012-12-19 00:49:57 +01:00
/* Admin Is */
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
2012-12-19 00:49:57 +01:00
function lmb_admin_is ()
2012-12-01 17:27:04 +01:00
{
2012-12-19 00:49:57 +01:00
global $lmb_password ;
global $lmb_cookie_tab ;
2012-12-01 17:27:04 +01:00
2012-12-19 00:49:57 +01:00
$admin = $lmb_cookie_tab [ " admin " ];
2012-12-01 17:27:04 +01:00
2012-12-19 00:49:57 +01:00
if ( $admin == $lmb_password )
{
return ( true );
2012-12-01 17:27:04 +01:00
}
2012-12-19 00:49:57 +01:00
else
2012-12-01 17:27:04 +01:00
{
2012-12-19 00:49:57 +01:00
return ( false );
2012-12-01 17:27:04 +01:00
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
2012-12-19 00:49:57 +01:00
/* Admin Update */
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
2012-12-19 00:49:57 +01:00
function lmb_admin_update ()
2012-12-01 17:27:04 +01:00
{
2012-12-19 00:49:57 +01:00
global $lmb_password ;
global $lmb_cookie_tab ;
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
if ( array_key_exists ( " password " , $_POST ))
{
$passwd = $_POST [ " password " ];
}
else
{
$passwd = " " ;
}
2012-12-01 17:27:04 +01:00
2012-12-19 00:49:57 +01:00
if ( $passwd != " " )
2012-12-01 17:27:04 +01:00
{
2012-12-19 00:49:57 +01:00
if ( $passwd == $lmb_password )
{
lmb_cookie_set ( " admin " , $lmb_password , 360000 );
}
else
{
lmb_cookie_set ( " admin " , " " , 360000 );
}
2012-12-01 17:27:04 +01:00
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Size Convert */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_size_convert ( $size )
{
$unit_tab = array ( " b " , " Kb " , " Mb " );
for ( $i = 0 ; $size > 1024 ; $i ++ )
{
$size = intval ( $size / 1024 );
}
$size_tab [ " size " ] = $size ;
$size_tab [ " unit " ] = $unit_tab [ $i ];
return ( $size_tab );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* HTML Text Format */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_html_text_format ( $input_text )
{
$search_tab = array (
2013-01-02 22:31:56 +01:00
" & " ,
2013-01-18 00:05:06 +01:00
" \n " ,
2013-01-02 22:31:56 +01:00
" < > " ,
" <B> " ,
" </B> " ,
" <I> " ,
" </I> " ,
2013-01-18 00:05:06 +01:00
" <U> " ,
" </U> " ,
2013-01-02 22:31:56 +01:00
" <H> " ,
2013-01-18 00:05:06 +01:00
" </H> " ,
" <LM> " ,
" </LM> " ,
" <G+1/> " ,
" <G+B/> " ,
" <F+1/> " ,
" <MSF/> "
2012-12-01 17:27:04 +01:00
);
$replace_tab = array (
2013-01-02 22:31:56 +01:00
" & " ,
2013-01-18 00:05:06 +01:00
" <br/> \n " ,
" " ,
2013-01-02 22:31:56 +01:00
" <span style= \" font-weight:bold; \" > " ,
" </span> " ,
" <span style= \" font-style:italic; \" > " ,
" </span> " ,
2013-01-18 00:05:06 +01:00
" <span style= \" text-decoration:underline; \" > " ,
" </span> " ,
2013-01-02 22:31:56 +01:00
" <span style= \" font-weight:bold; font-style:italic; \" > " ,
2013-01-18 00:05:06 +01:00
" </span> " ,
" <span style= \" font-family:CustomFont; font-weight:normal; \" > " ,
" </span> " ,
"
< script type = \ " text/javascript \" src= \" https://apis.google.com/js/plusone.js \" ></script>
< div class = \ " g-plusone \" style= \" font-size: 0px; \" data-href= \" http://plus.google.com/117621568322370019205 \" data-size= \" medium \" data-annotation= \" inline \" data-align= \" right \" ></div> " ,
"
< div style = \ " text-align: right; \" > <div id= \" gplus-div \" ></div></div>
< script type = \ " text/javascript \" >
function getElementByIdUniversal ( id )
{
return ( document . getElementById ) ? document . getElementById ( id ) : document . all [ id ];
}
function plusoneready ()
{
gapi . plus . render ( 'gplus-div' , { 'href' : 'http://plus.google.com/117621568322370019205' , 'theme' : 'dark' , 'height' : '69' , 'width' : '400' } );
}
( function ()
{
var gp = document . createElement ( 'script' );
gp . type = 'text/javascript' ;
gp . async = true ;
gp . src = 'https://apis.google.com/js/plusone.js' ;
gp . onload = plusoneready ;
// Only for IE 6 and 7
gp . onreadystatechange = function ()
{
if ( this . readyState == 'complete' )
{
plusoneready ();
}
}
var div = getElementByIdUniversal ( 'gplus-div' );
div . parentNode . insertBefore ( gp , div );
}
)();
</ script > " ,
"
< div class = \ " fb-like \" style= \" font-size: 0px; \" data-href= \" http://www.facebook.com/langueur.monotone \" data-send= \" false \" data-layout= \" button_count \" data-width= \" 90 \" data-show-faces= \" true \" data-colorscheme= \" dark \" ></div>
< div id = \ " fb-root \" ></div>
< script type = \ " text/javascript \" >
( function ( d , s , id )
{
var js , fjs = d . getElementsByTagName ( s )[ 0 ];
if ( d . getElementById ( id )) return ;
js = d . createElement ( s ); js . id = id ;
js . src = \ " //connect.facebook.net/fr_FR/all.js#xfbml=1 \" ;
fjs . parentNode . insertBefore ( js , fjs );
}( document , 'script' , 'facebook-jssdk' ));
</ script > " ,
"
< form method = \ " post \" action= \" http://www.myspace.com/my/friends/addtofriends/langueur-monotone \" >
< input type = \ " submit \" value= \" myspace Friend \" >
< style type = \ " text/css \" >input { background-color: 000000; border-width:1px; border-style:groove; border-color: 444444; color: FFFFFF; font-family:;}
</ style >
</ form >
"
2012-12-01 17:27:04 +01:00
);
return ( str_replace ( $search_tab , $replace_tab , $input_text ));
}
2013-08-20 18:32:00 +02:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* XML Text Format */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_xml_text_format ( $input_text )
{
$search_tab = array (
" & " ,
" \n " ,
" < > " ,
" <br/> " ,
" <B> " ,
" </B> " ,
" <I> " ,
" </I> " ,
" <U> " ,
" </U> " ,
" <H> " ,
" </H> " ,
" <LM> " ,
" </LM> " ,
" <G+1/> " ,
" <G+B/> " ,
" <F+1/> " ,
" <MSF/> "
);
$replace_tab = array (
" & " ,
" \n " ,
" " ,
" \n " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" " ,
" "
);
return ( str_replace ( $search_tab , $replace_tab , $input_text ));
}
2015-08-07 01:43:15 +02:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* PlayType Path Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_playtype_path_get ( $play_type )
{
return ( " discography/ { $play_type } " );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Path Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_play_path_get ( $play_type , $play_id , $play_priority )
{
return ( lmb_playtype_path_get ( $play_type ) . " / { $play_priority } - { $play_id } " );
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Make Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_make_tab ( $tab_id , $css_id , $tab_side , $logo_path , $data , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-09-07 21:23:56 +02:00
$tab_class = " sprite-tab- { $tab_id } - { $tab_side } " ;
2012-12-01 17:27:04 +01:00
if ( " $tab_side " == " l " )
{
$logo_side = " r " ;
}
else
{
$logo_side = " l " ;
}
2015-09-07 21:23:56 +02:00
$tab_tag = " <td class= \" { $css_id } 0 \" ><div class= \" { $tab_class } \" ></div></td> " ;
if ( $logo_path [ 0 ] == " / " )
{
$logo_tag = " <td class= \" logo- { $logo_side } \" style= \" width: 20%; \" ><img src= \" { $logo_path } \" alt= \" \" /></td> " ;
}
else
{
$logo_tag = " <td class= \" logo- { $logo_side } \" style= \" width: 20%; \" ><div class= \" { $logo_path } \" ></div></td> " ;
}
2012-12-01 17:27:04 +01:00
if ( " $tab_side " == " l " )
{
$l_tag = " { $tab_tag } " ;
$r_tag = " { $logo_tag } " ;
}
else
{
$l_tag = " $logo_tag " ;
$r_tag = " $tab_tag " ;
}
echo " <tr>
< td colspan = \ " 3 \" rowspan= \" 1 \" style= \" vertical-align: middle; \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
< tbody >
< tr >
{ $l_tag }
< td class = \ " { $css_id } 00 \" > </td>
< td >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
< tbody >
" ;
echo $data ;
echo " </tbody>
</ table >
</ td >
< td class = \ " { $css_id } 00 \" > </td>
{ $r_tag }
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Spacer */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_spacer ( $size )
{
echo " <tr><td> " ;
for ( $i = 0 ; $i < $size ; $i ++ )
{
2013-01-18 00:05:06 +01:00
echo " <br/> " ;
2012-12-01 17:27:04 +01:00
}
echo " </td></tr>
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Menu */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_menu ( $menu_id , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
for ( $i = 0 ; $i < 3 ; $i ++ )
{
if ( $i == $menu_id )
{
$mode = " off " ;
}
else
{
$mode = " on " ;
}
switch ( $i )
{
case 0 :
{
if ( $i == $menu_id )
{
2015-09-07 21:23:56 +02:00
echo " <td class= \" menu-item \" style= \" width: 128px; \" ><div class= \" sprite-menu-home_page-off \" ></div></td>
2012-12-01 17:27:04 +01:00
" ;
}
else
{
2015-09-07 21:23:56 +02:00
echo " <td class= \" menu-item \" style= \" width: 128px; \" ><a class= \" button-item \" href= \" { $lmb_url_post } \" ><div class= \" sprite-menu-home_page-on \" ></div></a></td>
2012-12-01 17:27:04 +01:00
" ;
}
break ;
}
case 1 :
{
if ( $i == $menu_id )
{
2015-09-07 21:23:56 +02:00
echo " <td class= \" menu-item \" style= \" width: 128px; \" ><div class= \" sprite-menu-about-off \" ></div></td>
2012-12-01 17:27:04 +01:00
" ;
}
else
{
2015-09-07 21:23:56 +02:00
echo " <td class= \" menu-item \" style= \" width: 128px; \" ><a class= \" button-item \" href= \" { $lmb_url_post } ?page=about \" ><div class= \" sprite-menu-about-on \" ></div></a></td>
2012-12-01 17:27:04 +01:00
" ;
}
break ;
}
case 2 :
{
if ( $i == $menu_id )
{
2015-09-07 21:23:56 +02:00
echo " <td class= \" menu-item \" style= \" width: 128px; \" ><div class= \" sprite-menu-discography-off \" ></div></td>
2012-12-01 17:27:04 +01:00
" ;
}
else
{
2015-09-07 21:23:56 +02:00
echo " <td class= \" menu-item \" style= \" width: 128px; \" ><a class= \" button-item \" href= \" { $lmb_url_post } ?page=discography \" ><div class= \" sprite-menu-discography-on \" ></div></a></td>
2012-12-01 17:27:04 +01:00
" ;
}
break ;
}
default :
{
break ;
}
}
if ( $i < 2 )
{
2015-09-07 21:23:56 +02:00
echo " <td class= \" sprite-menu-bg \" style= \" width: 20px; \" ></td>
2012-12-01 17:27:04 +01:00
" ;
}
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Header */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_header ( $page_id , $page_name , $page_title , $description , $keywords , $min_width , $skin_path )
2012-12-01 17:27:04 +01:00
{
global $lmb_keywords ;
2015-08-07 01:43:15 +02:00
global $lmb_ga_enable ;
2012-12-01 17:27:04 +01:00
2015-12-04 11:40:41 +01:00
header ( 'Content-type: text/html; charset=utf-8' );
2013-01-18 00:05:06 +01:00
2012-12-01 17:27:04 +01:00
$keywords = " $lmb_keywords , $keywords " ;
if ( $min_width != 0 )
{
$mw_tag = " min-width: { $min_width } px; " ;
}
else
{
$mw_tag = " " ;
}
2013-01-18 00:05:06 +01:00
// echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">";
// echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
echo " <!DOCTYPE html PUBLIC \" -//W3C//DTD XHTML 1.0 Strict//EN \" \" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd \" > " ;
// echo "<html lang=\"en-US\">";
echo " <html xmlns= \" http://www.w3.org/1999/xhtml \" xml:lang= \" en \" lang= \" en \" >
" ;
echo " <head>
2015-12-04 17:07:30 +01:00
< meta http - equiv = \ " Content-Type \" content= \" text/html; charset=utf-8 \" />
2013-01-18 00:05:06 +01:00
< meta name = \ " Description \" content= \" $description\ " />
< meta name = \ " keywords \" content= \" $keywords\ " />
2015-08-07 01:43:15 +02:00
< link rel = \ " shortcut icon \" type= \" image/x-icon \" href= \" { $skin_path } /images/favicon.ico \" />
< link rel = \ " stylesheet \" type= \" text/css \" href= \" { $skin_path } /default.css \" />
< link rel = \ " stylesheet \" type= \" text/css \" href= \" /jplayer/skin/pink.flag/css/jplayer.pink.flag.css \" />
2012-12-19 00:49:57 +01:00
< title > $page_name </ title >
2013-01-18 00:05:06 +01:00
</ head >
2012-12-19 00:49:57 +01:00
" ;
2012-12-01 17:27:04 +01:00
2013-01-18 00:05:06 +01:00
echo " <body style= \" background-image:url(''); background-repeat:repeat; \" >
" ;
2015-08-07 01:43:15 +02:00
if ( $lmb_ga_enable == true )
{
echo " <script>
2015-02-16 18:07:27 +01:00
( function ( i , s , o , g , r , a , m ){ i [ 'GoogleAnalyticsObject' ] = r ; i [ r ] = i [ r ] || function (){
( i [ r ] . q = i [ r ] . q || []) . push ( arguments )}, i [ r ] . l = 1 * new Date (); a = s . createElement ( o ),
m = s . getElementsByTagName ( o )[ 0 ]; a . async = 1 ; a . src = g ; m . parentNode . insertBefore ( a , m )
})( window , document , 'script' , '//www.google-analytics.com/analytics.js' , 'ga' );
2013-01-18 00:05:06 +01:00
2015-02-16 18:07:27 +01:00
ga ( 'create' , 'UA-37642754-1' , 'auto' );
ga ( 'send' , 'pageview' );
2013-01-18 00:05:06 +01:00
</ script >
" ;
2015-08-07 01:43:15 +02:00
}
2013-01-18 00:05:06 +01:00
echo " <table border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" { $mw_tag } \" >
2012-12-01 17:27:04 +01:00
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " border \" colspan= \" 2 \" ><div class= \" sprite-border-top-left \" ></div></td>
2012-12-01 17:27:04 +01:00
< td ></ td >
2015-09-07 21:23:56 +02:00
< td class = \ " border sprite-title_line-l \" ></td>
2013-01-18 00:05:06 +01:00
" ;
2015-09-07 21:23:56 +02:00
echo " <td class= \" sprite-title_line-m \" style= \" width: 580px; \" ><h1 class= \" lm \" >Langueur Monotone</h1></td>
2013-01-18 00:05:06 +01:00
" ;
2015-09-07 21:23:56 +02:00
echo " <td class= \" border sprite-title_line-r \" ></td>
2012-12-01 17:27:04 +01:00
< td ></ td >
2015-09-07 21:23:56 +02:00
< td class = \ " border \" colspan= \" 2 \" ><div class= \" sprite-border-top-right \" ></div></td>
2012-12-01 17:27:04 +01:00
</ tr >
< tr >
< td colspan = \ " 2 \" ></td>
" ;
2015-08-07 01:43:15 +02:00
echo " <td colspan= \" 5 \" class= \" subtitle \" style= \" height: 70px; \" ><h2 class= \" lm \" > $page_title </h2></td>
2012-12-01 17:27:04 +01:00
" ;
2013-01-18 00:05:06 +01:00
echo " <td colspan= \" 2 \" ></td>
2012-12-01 17:27:04 +01:00
</ tr >
< tr >
2015-09-07 21:23:56 +02:00
< td colspan = \ " 1 \" rowspan= \" 4 \" style= \" vertical-align: middle; height: 16px; \" ><div class= \" sprite-border-left \" ></div></td>
< td colspan = \ " 7 \" style= \" height: 16px; \" ></td>
< td colspan = \ " 1 \" rowspan= \" 4 \" style= \" vertical-align: middle; height: 16px; \" ><div class= \" sprite-border-right \" ></div></td>
2012-12-01 17:27:04 +01:00
</ tr >
< tr >
2015-09-07 21:23:56 +02:00
< td style = \ " vertical-align: top; height: 20px; text-align: center; \" rowspan= \" 1 \" colspan= \" 7 \" >
2012-12-01 17:27:04 +01:00
< table border = \ " 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " menu-left \" style= \" width: 16px; vertical-align: top; \" ><div class= \" sprite-menu-begin \" ></div></td>
2012-12-01 17:27:04 +01:00
2015-09-07 21:23:56 +02:00
< td class = \ " sprite-menu-bg \" style= \" width: 50%; \" ></td>
2012-12-01 17:27:04 +01:00
" ;
2015-08-07 01:43:15 +02:00
lmb_menu ( $page_id , $skin_path );
2012-12-01 17:27:04 +01:00
2015-09-07 21:23:56 +02:00
echo " <td class= \" sprite-menu-bg \" style= \" width: 50%; \" ></td>
< td class = \ " menu-item \" style= \" width: 16px; vertical-align: top; \" ><div class= \" sprite-menu-end \" ></div></td>
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
2015-09-07 21:23:56 +02:00
< tr >
< td colspan = \ " 7 \" style= \" height: 10px; \" ></td>
</ tr >
2012-12-01 17:27:04 +01:00
< tr >
< td colspan = \ " 7 \" rowspan= \" 1 \" style= \" vertical-align: top; \" >
< table style = \ " text-align: left; width: 100%; height: 100%; \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr >
< td style = \ " vertical-align: top; width: 16px; \" ></td>
< td style = \ " vertical-align: top; \" >
< table style = \ " text-align: left; width: 100%; height: 100%; table-layout: fixed; \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Footer */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_footer ( $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_pre ;
global $lmb_url_post ;
2013-08-20 18:32:00 +02:00
global $lmb_myname ;
global $lmb_myver ;
global $lmb_body_footer ;
global $lmb_page_footer ;
global $time_start ;
2012-12-01 17:27:04 +01:00
echo " </tbody>
</ table >
</ td >
< td style = \ " vertical-align: top; width: 16px; \" ></td>
</ tr >
" ;
echo " </tbody>
</ table >
</ td >
</ tr >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " sprite-bottom_line-l \" style= \" vertical-align: top; height: 20px; \" colspan= \" 2 \" ></td>
2012-12-01 17:27:04 +01:00
2015-09-07 21:23:56 +02:00
< td class = \ " sprite-bottom_line-m \" colspan= \" 5 \" ></td>
2012-12-01 17:27:04 +01:00
2015-09-07 21:23:56 +02:00
< td class = \ " sprite-bottom_line-r \" style= \" vertical-align: top; height: 20px; text-align: left; \" colspan= \" 2 \" ></td>
2012-12-01 17:27:04 +01:00
</ tr >
< tr class = \ " border \" style= \" height: 35px; \" >
2015-09-07 21:23:56 +02:00
< td colspan = \ " 2 \" rowspan= \" 2 \" ><div class= \" sprite-border-bottom-left \" ></div></td>
2012-12-01 17:27:04 +01:00
< td colspan = \ " 5 \" >
< table style = \ " text-align: left; width: 100%; height: auto; \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td >
< table style = \ " width: 100%; height: auto; \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
2012-12-01 17:27:04 +01:00
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a rel= \" nofollow \" class= \" button-item \" href= \" http:// { $lmb_url_pre } /?page=rss \" title= \" Langueur Monotone RSS feed \" ><div class= \" sprite-button-rss-on \" style= \" \" ></div></a></td>
2013-08-20 18:32:00 +02:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 96px; \" ><a rel= \" \" class= \" button-item \" href= \" http://www.rx3.net/ \" title= \" Rx3.Net \" ><div class= \" sprite-button-rx3-on \" ></div></a></td>
2012-12-01 17:27:04 +01:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a rel= \" nofollow \" class= \" button-item \" href= \" http://www.safecreative.org/ \" title= \" SafeCreative \" ><div class= \" sprite-button-safe_creative-on \" ></div></a></td>
2012-12-01 17:27:04 +01:00
< td ></ td >
</ tr >
</ tbody >
</ table >
</ td >
2015-09-07 21:23:56 +02:00
< td style = \ " width: 338px; \" >
2012-12-19 00:49:57 +01:00
< table style = \ " width: 100%; height: auto; text-align: left; \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr >
2012-12-01 17:27:04 +01:00
" ;
2012-12-19 00:49:57 +01:00
if ( lmb_admin_is ())
{
2015-09-07 21:23:56 +02:00
echo " <td style= \" width: 13px; \" ></td>
< td class = \ " button-item \" style= \" width: 32px; \" ><a rel= \" nofollow \" class= \" button-item \" href= \" http://validator.w3.org/check?uri=referer \" title= \" W3C HTML Validator \" ><div class= \" sprite-button-w3c-html-on \" ></div></a></td>
2013-01-18 00:05:06 +01:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a rel= \" nofollow \" class= \" button-item \" href= \" http://jigsaw.w3.org/css-validator/check/referer \" title= \" W3C CSS Validator \" ><div class= \" sprite-button-w3c-css-on \" ></div></a></td>
2013-01-18 00:05:06 +01:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a rel= \" nofollow \" class= \" button-item \" href= \" http://feed1.w3.org/check.cgi?url=http%3A// { $lmb_url_pre } /%3Fpage%3Drss \" title= \" W3C RSS Validator \" ><div class= \" sprite-button-w3c-rss-on \" ></div></a></td>
2013-08-20 18:32:00 +02:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a class= \" button-item \" href= \" /www-stats/ \" title= \" Rx3 Statistics \" ><div class= \" sprite-button-stats-on \" ></div></a></td>
2013-01-18 00:05:06 +01:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a class= \" button-item \" href= \" https://www.google.com/analytics/web/?hl=en&pli=1#dashboard//a37642754w66067134p67926512 \" title= \" Google Analytics \" ><div class= \" sprite-button-stats-on \" ></div></a></td>
2013-01-18 00:05:06 +01:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a class= \" button-item \" href= \" https://www.google.com/webmasters/tools/dashboard?hl=fr&siteUrl=http%3A%2F%2F { $lmb_url_pre } %2F \" title= \" Google Webmaster Tools \" ><div class= \" sprite-button-stats-on \" ></div></a></td>
2012-12-19 00:49:57 +01:00
< td style = \ " width: 8px; \" > </td>
2015-09-07 21:23:56 +02:00
< td class = \ " button-item \" style= \" width: 32px; \" ><a rel= \" nofollow \" class= \" button-item \" href= \" http:// { $lmb_url_pre } /?page=sitemap \" title= \" SiteMap \" ><div class= \" sprite-button-rss-on \" ></div></a></td>
2013-08-27 18:36:46 +02:00
< td style = \ " width: 8px; \" > </td>
2012-12-19 00:49:57 +01:00
< td class = \ " button-item \" style= \" width: 32px; \" >
2015-08-07 01:43:15 +02:00
< form action = \ " { $lmb_url_post } \" method= \" post \" >
2013-01-02 22:31:56 +01:00
< div >
2013-01-18 00:05:06 +01:00
< input type = \ " hidden \" name= \" password \" value= \" XXX \" />
2015-09-07 21:23:56 +02:00
< div class = \ " sprite-button-login-on \" style= \" display:inline-block; vertical-align: middle \" ><input class= \" logout \" type= \" submit \" value= \" \" title= \" Logout \" /></div>
2013-01-02 22:31:56 +01:00
</ div >
2012-12-19 00:49:57 +01:00
</ form >
</ td >
2015-09-07 21:23:56 +02:00
< td style = \ " width: 13px; \" ></td>
2012-12-19 00:49:57 +01:00
" ;
}
else
{
echo " <td class= \" button-item \" style= \" \" >
2015-08-07 01:43:15 +02:00
< form action = \ " { $lmb_url_post } \" method= \" post \" >
2013-01-02 22:31:56 +01:00
< div >
2015-09-07 21:23:56 +02:00
< div style = \ " display: inline-block; vertical-align: middle; \" ><input class= \" password \" type= \" password \" name= \" password \" size= \" 8 \" title= \" Password \" /></div>
< div class = \ " sprite-button-login-on \" style= \" display:inline-block; vertical-align: middle \" ><input class= \" login \" type= \" submit \" value= \" \" title= \" Login \" /></div>
2013-01-02 22:31:56 +01:00
</ div >
</ form >
2012-12-19 00:49:57 +01:00
</ td >
" ;
}
2012-12-01 17:27:04 +01:00
$time_stop = microtime_float ();
$time_elaps = intval ( ( $time_stop - $time_start ) * 1000 ) / 1000 ;
2012-12-19 00:49:57 +01:00
echo " </tr>
</ tbody >
</ table >
</ td >
2015-09-07 21:23:56 +02:00
< td class = \ " bottext \" >Page generated in $time_elaps seconds by <div class= \" link-item \" ><a href= \" http://www.rx3.org/dvp/?dvp= " . strtolower ( $lmb_myname ) . " \" > { $lmb_myname } </a></div> V { $lmb_myver } </td>
2012-12-01 17:27:04 +01:00
" ;
echo " </tr>
</ tbody >
</ table >
</ td >
2015-09-07 21:23:56 +02:00
< td class = \ " border \" colspan= \" 2 \" rowspan= \" 2 \" ><div class= \" sprite-border-bottom-right \" ></div></td>
2012-12-01 17:27:04 +01:00
</ tr >
< tr >
< td style = \ " vertical-align: top; \" ></td>
2015-09-07 21:23:56 +02:00
< td class = \ " border \" colspan= \" 3 \" rowspan= \" 1 \" style= \" height: 15px; vertical-align: top; text-align: center; \" ><div class= \" sprite-border-bottom \" style= \" background-color: transparent; \" ></div></td>
2012-12-01 17:27:04 +01:00
< td style = \ " vertical-align: top; \" ></td>
</ tr >
</ tbody >
</ table >
</ body >
</ html >
" ;
}
2013-01-18 00:05:06 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Welcome Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_welcome_tab ( $skin_path )
2013-01-18 00:05:06 +01:00
{
$welcome_file = " welcome.txt " ;
$welcome_string = file_get_contents ( " { $welcome_file } " );
ob_start ();
echo "
< tr class = \ " welcome1 \" >
< td class = \ " welcome01 \" ></td>
< td class = \ " welcome1 \" >
" .lmb_html_text_format( " { $welcome_string } " ). "
</ td >
< td class = \ " welcome01 \" ></td>
</ tr >
" ;
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
lmb_make_tab ( " welcome " , " welcome " , " l " , " { $skin_path } /images/lm-logo1-border-220.png " , $data , $skin_path );
// lmb_make_tab( "welcome", "welcome", "l", "sprite-lm-logo1-border-220", $data, $skin_path);
2013-01-18 00:05:06 +01:00
}
2013-08-20 18:32:00 +02:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* News Tab Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_news_tab_get ( )
{
2015-08-07 01:43:15 +02:00
global $lmb_url_pre ;
global $lmb_url_post ;
2013-08-20 18:32:00 +02:00
$news_file = " news.txt " ;
$line = array ();
$cmd = " sed -e 's/ \t * \t / \t /g' ${ news_file } " ;
exec ( $cmd , $line );
for ( $i = 0 ; $i < count ( $line ); $i ++ )
{
$tab = explode ( " \t " , $line [ $i ]);
$css_row = ( $i + 1 ) % 2 + 1 ;
if ( count ( $tab ) > 3 )
{
$play_name = $tab [ 3 ];
$play_type = $tab [ 4 ];
$play_id = $tab [ 5 ];
$play_priority = $tab [ 6 ];
$news_tab [ $i ][ " name " ] = " { $play_name } " ;
2015-08-07 01:43:15 +02:00
$news_tab [ $i ][ " rlink " ] = " { $lmb_url_post } ?page=play&type= { $play_type } &id= { $play_id } &priority= { $play_priority } " ;
$news_tab [ $i ][ " alink " ] = " http:// { $lmb_url_pre } { $news_tab [ $i ][ " rlink " ] } " ;
$news_tab [ $i ][ " rimg " ] = lmb_play_path_get ( $play_type , $play_id , $play_priority ) . " /covers/ { $play_id } -cover-1-icon.png " ;
$news_tab [ $i ][ " aimg " ] = " http:// { $lmb_url_pre } { $news_tab [ $i ][ " rimg " ] } " ;
2013-08-20 18:32:00 +02:00
}
else
{
$news_tab [ $i ][ " name " ] = " " ;
}
$news_tab [ $i ][ " date " ] = $tab [ 0 ];
$news_tab [ $i ][ " title " ] = $tab [ 1 ];
if ( $tab [ 2 ] != " . " )
{
$news_tab [ $i ][ " news " ] = $tab [ 2 ];
}
else
{
$news_tab [ $i ][ " news " ] = " " ;
}
}
2015-08-07 01:43:15 +02:00
return ( $news_tab );
2013-08-20 18:32:00 +02:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* News Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_news_tab ( $skin_path )
2013-08-20 18:32:00 +02:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2013-08-20 18:32:00 +02:00
$news_tab = lmb_news_tab_get ();
ob_start ();
for ( $i = 0 ; $i < count ( $news_tab ); $i ++ )
{
$css_row = ( $i + 1 ) % 2 + 1 ;
if ( " { $news_tab [ $i ][ " name " ] } " != " " )
{
$height = 110 ;
2015-09-07 21:23:56 +02:00
$link1_tag = " <div class= \" link-item \" ><a href= \" { $news_tab [ $i ][ " rlink " ] } \" > " ;
$link2_tag = " <a href= \" { $news_tab [ $i ][ " rlink " ] } \" > " ;
$img_tag = " <img class= \" button-item \" src= \" { $news_tab [ $i ][ " rimg " ] } \" alt= \" \" /> " ;
$play_tag = " <td class= \" news3 \" > { $link1_tag } { $news_tab [ $i ][ " name " ] } </a></div></td>
< td class = \ " news4 \" style= \" height: { $height } px; width: 96px; \" > { $link2_tag } { $img_tag } </a></td> " ;
2013-08-20 18:32:00 +02:00
$colspan_tag = " " ;
}
else
{
$play_tag = " " ;
$cover_tag = " " ;
$colspan_tag = " colspan= \" 3 \" " ;
}
if ( $news_tab [ $i ][ " news " ] != " " )
{
$news = " <br/> { $news_tab [ $i ][ " title " ] } <br/><br/> { $news_tab [ $i ][ " news " ] } <br/><br/> " ;
}
else
{
$news = " <br/> { $news_tab [ $i ][ " title " ] } <br/><br/> " ;
}
echo " <tr class= \" news { $css_row } \" >
< td class = \ " news01 \" ></td>
< td class = \ " news1 \" > { $news_tab [ $i ][ " date " ] } </td>
< td class = \ " news2 \" { $colspan_tag } > " . lmb_html_text_format ( " { $news } " ) . " </td>
{ $play_tag } < td class = \ " news01 \" ></td>
</ tr >
" ;
}
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "news", "news", "r", "{$skin_path}/images/lm_logo2-border-220.png", $data, $skin_path);
lmb_make_tab ( " news " , " news " , " r " , " sprite-lm-logo2-border-220 " , $data , $skin_path );
2014-12-15 17:57:40 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
/* Twitter Tab */
2014-12-15 17:57:40 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_twitter_tab ( $skin_path )
2014-12-15 17:57:40 +01:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2014-12-15 17:57:40 +01:00
ob_start ();
echo " <tr class= \" twitter1 \" >
< td class = \ " twitter01 \" ></td>
< td class = \ " twitter0 \" ></td>
< td class = \ " twitter01 \" ></td>
</ tr >
< tr class = \ " twitter1 \" >
< td class = \ " twitter01 \" > </td>
< td class = \ " twitter0 \" >
2015-09-07 21:23:56 +02:00
< div class = \ " button-item \" style= \" display: inline-block; border-radius: 5px; \" ><a class= \" twitter-timeline \" href= \" https://twitter.com/langueurmon \" data-widget-id= \" 544258336741670912 \" >Tweets by @langueurmon</a></div>
2014-12-15 17:57:40 +01:00
< script >! function ( d , s , id ){ var js , fjs = d . getElementsByTagName ( s )[ 0 ], p =/^ http :/. test ( d . location ) ? 'http' : 'https' ; if ( ! d . getElementById ( id )){ js = d . createElement ( s ); js . id = id ; js . src = p + \ " ://platform.twitter.com/widgets.js \" ;fjs.parentNode.insertBefore(js,fjs);}}(document, \" script \" , \" twitter-wjs \" );</script>
</ td >
< td class = \ " twitter01 \" > </td>
</ tr >
< tr class = \ " twitter1 \" >
< td class = \ " twitter01 \" ></td>
< td class = \ " twitter0 \" ></td>
< td class = \ " twitter01 \" ></td>
</ tr >
" ;
/*
echo " <tr class= \" twitter1 \" >
< td class = \ " twitter01 \" ></td>
< td class = \ " twitter1 \" >AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</td>
< td class = \ " twitter01 \" ></td>
</ tr >
" ;
*/
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "twitter", "twitter", "l", "{$skin_path}/images/lm_logo1-border-220.png", $data, $skin_path);
lmb_make_tab ( " twitter " , " twitter " , " l " , " sprite-lm-logo1-border-220 " , $data , $skin_path );
2013-08-20 18:32:00 +02:00
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Main Body */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_main_body ( $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
lmb_welcome_tab ( $skin_path );
2013-01-18 00:05:06 +01:00
lmb_spacer ( 4 );
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
lmb_news_tab ( $skin_path );
2014-12-15 17:57:40 +01:00
lmb_spacer ( 4 );
2015-08-07 01:43:15 +02:00
lmb_twitter_tab ( $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Main Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_main_page ()
{
global $lmb_tab ;
2015-08-07 01:43:15 +02:00
$skin_path = " /skin " ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
lmb_header ( 0 , " Langueur Monotone - Home Page " , " Home Page " , " Langueur Monotone home page, entry point to information, news and links " , " home page " , 0 , " { $skin_path } " );
lmb_main_body ( $skin_path );
lmb_footer ( $skin_path );
2012-12-01 17:27:04 +01:00
}
2013-08-27 18:36:46 +02:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* SiteMap Item */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_sitemap_item ( $item_type , $page_url , $img_tab )
{
2015-08-07 01:43:15 +02:00
global $lmb_url_pre ;
global $lmb_url_post ;
2013-08-27 18:36:46 +02:00
echo " <url>
" ;
2015-08-07 01:43:15 +02:00
echo " <loc>http:// { $lmb_url_pre } { $lmb_url_post } ${ page_url } </loc>
2013-08-27 18:36:46 +02:00
< lastmod > 2013 - 08 - 20 </ lastmod >
< changefreq > weekly </ changefreq >
< priority > 0.5 </ priority >
" ;
if ( isset ( $img_tab ))
{
foreach ( $img_tab as $img )
{
echo " <image:image>
2015-08-07 01:43:15 +02:00
< image : loc > http :// { $lmb_url_pre } / { $img [ " url " ]} </ image : loc >
2013-08-27 18:36:46 +02:00
< image : title > { $img [ " title " ]} </ image : title >
</ image : image >
" ;
}
}
echo " </url>
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* SiteMap Track */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_sitemap_track ( $play_type , $play_id , $play_priority , $track_id )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2013-08-27 18:36:46 +02:00
$url = " ?page=track&type= { $play_type } &id= { $play_id } &priority= { $play_priority } &tid= { $track_id } " ;
$img_tab = array ();
$size = 1024 ;
lmb_sitemap_item ( " track " , " { $url } " , $img_tab );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* SiteMap Play */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_sitemap_play ( $play_type , $play_id , $play_priority )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2013-08-27 18:36:46 +02:00
$cover_path = " { $play_path } /covers " ;
$extra_path = " { $play_path } /extras " ;
$play_info = lmb_play_info_get ( $play_type , $play_id , $play_priority );
$url = " ?page=play&type= { $play_type } &id= { $play_id } &priority= { $play_priority } " ;
$img_tab = array ();
$img_idx = 0 ;
$play_title = lmb_play_title_get ( $play_type , $play_id , $play_priority );
$img_tab [ $img_idx ][ " url " ] = " { $play_path } /logos/ { $play_id } -logo-1-128.png " ;
$img_tab [ $img_idx ++ ][ " title " ] = " Langueur Monotone - { $play_title } - Logo 1 " ;
$img_tab [ $img_idx ][ " url " ] = " { $play_path } /logos/ { $play_id } -logo-2-128.png " ;
$img_tab [ $img_idx ++ ][ " title " ] = " Langueur Monotone - { $play_title } - Logo 2 " ;
/* Cover Dump */
$cmd = " ls { $cover_path } / { $play_id } -cover-*.png | sed -e 's/.* { $play_id } -//' | grep -v icon.png | sort " ;
exec ( $cmd , $cover_tab );
for ( $i = 0 , $j = 1 ; $i < count ( $cover_tab ); $i ++ , $j ++ )
{
$cover_info_tab = explode ( " - " , $cover_tab [ $i ]);
$nb = $cover_info_tab [ 1 ];
$size = str_replace ( " .png " , " " , $cover_info_tab [ 2 ]);
2013-12-30 17:47:19 +01:00
$img_tab [ $img_idx ][ " url " ] = " { $cover_path } / { $play_id } - { $cover_tab [ $i ] } " ;
2013-08-27 18:36:46 +02:00
$img_tab [ $img_idx ++ ][ " title " ] = " Langueur Monotone - { $play_title } - Cover { $nb } ( { $size } ) " ;
}
/* Extra Dump */
if ( ! file_exists ( " { $extra_path } /.hide " ))
{
$cmd = " ls { $extra_path } / { $play_id } -*.png | sed -e 's/.* { $play_id } -//' | grep -v icon.png | sort " ;
exec ( $cmd , $extra_tab );
for ( $i = 0 , $j = 1 ; $i < count ( $extra_tab ); $i ++ , $j ++ )
{
$extra_info_tab = explode ( " - " , $extra_tab [ $i ]);
$type = ucfirst ( $extra_info_tab [ 0 ]);
$nb = $extra_info_tab [ 1 ];
$format = str_replace ( " _ " , " / " , $extra_info_tab [ 2 ]);
$size = str_replace ( " .png " , " " , $extra_info_tab [ 3 ]);
$img_tab [ $img_idx ][ " url " ] = " { $extra_path } / { $play_id } - { $extra_tab [ $i ] } " ;
$img_tab [ $img_idx ++ ][ " title " ] = " Langueur Monotone - { $play_title } - Extra - { $type } { $nb } ( { $format } - { $size } ) " ;
}
}
lmb_sitemap_item ( " play " , " { $url } " , $img_tab );
$track_list_info = lmb_tracklist_info_get ( $play_type , $play_id , $play_priority );
foreach ( $track_list_info as $track_info )
{
lmb_sitemap_track ( $play_type , $play_id , $play_priority , str_pad ( " { $track_info [ " id " ] } " , 2 , '0' , STR_PAD_LEFT ));
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* SiteMap Play Type */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_sitemap_play_type ( $play_type )
{
2015-08-07 01:43:15 +02:00
$path = lmb_playtype_path_get ( $play_type );
2013-08-27 18:36:46 +02:00
$line = array ();
$cmd = " ls -d { $path } /??-* | sed -e 's/.* \ ///' " ;
exec ( $cmd , $line );
for ( $i = 0 ; $i < count ( $line ); $i ++ )
{
$play_tab = explode ( " - " , $line [ $i ]);
$play_priority = $play_tab [ 0 ];
$play_id = $play_tab [ 1 ];
if ( ! file_exists ( " { $path } / { $play_priority } - { $play_id } /.hide " ))
{
lmb_sitemap_play ( $play_type , $play_id , $play_priority );
}
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* SiteMap Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_sitemap_page ()
{
global $lmb_myname ;
global $lmb_myver ;
global $time_start ;
header ( 'Content-Type: application/xml' );
echo " <?xml version= \" 1.0 \" encoding= \" UTF-8 \" ?>
< urlset xmlns = \ " http://www.sitemaps.org/schemas/sitemap/0.9 \" xmlns:xsi= \" http://www.w3.org/2001/XMLSchema-instance \" xsi:schemaLocation= \" http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd \" xmlns:image= \" http://www.google.com/schemas/sitemap-image/1.1 \" >
" ;
$img_tab = array ();
$size = 220 ;
2015-08-07 01:43:15 +02:00
$img_tab [ 0 ][ " url " ] = " { $play_path } /images/lm_logo1-border- { $size } .png " ;
$img_tab [ 0 ][ " title " ] = " Langueur Monotone - Logo 1 ( { $size } ) " ;
2013-08-27 18:36:46 +02:00
lmb_sitemap_item ( " top " , " " , $img_tab );
// $img_tab = array();
// lmb_sitemap_item( "page", "?page=rss", $img_tab);
$img_tab = array ();
$size = 220 ;
2015-08-07 01:43:15 +02:00
$img_tab [ 0 ][ " url " ] = " { $play_path } /images/lm_logo2-border- { $size } .png " ;
$img_tab [ 0 ][ " title " ] = " Langueur Monotone - Logo 2 ( { $size } ) " ;
2013-08-27 18:36:46 +02:00
lmb_sitemap_item ( " page " , " ?page=about " , $img_tab );
$img_tab = array ();
lmb_sitemap_item ( " page " , " ?page=discography " , $img_tab );
lmb_sitemap_play_type ( " ep " , $img_tab );
lmb_sitemap_play_type ( " lp " , $img_tab );
lmb_sitemap_play_type ( " oldies " , $img_tab );
$time_stop = microtime_float ();
$time_elaps = intval ( ( $time_stop - $time_start ) * 1000 ) / 1000 ;
echo " </urlset>
<!-- Page generated in $time_elaps seconds by { $lmb_myname } ( http :// www . rx3 . org / dvp / ? dvp = " .strtolower( $lmb_myname ). " ) V { $lmb_myver } -->
" ;
}
2013-08-20 18:32:00 +02:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* RSS Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_rss_page ()
{
2015-08-07 01:43:15 +02:00
global $lmb_url_pre ;
2013-08-27 18:36:46 +02:00
global $lmb_myname ;
global $lmb_myver ;
global $time_start ;
header ( 'Content-Type: application/rss+xml' );
2013-08-20 18:32:00 +02:00
2015-12-04 17:07:30 +01:00
echo " <?xml version= \" 1.0 \" encoding= \" utf-8 \" ?>
2013-08-20 18:32:00 +02:00
< rss version = \ " 2.0 \"
xmlns : atom = \ " http://www.w3.org/2005/Atom \"
xmlns : dc = \ " http://purl.org/dc/elements/1.1/ \"
>
< channel >
< title > Langueur Monotone News Page </ title >
2015-08-07 01:43:15 +02:00
< link > http :// { $lmb_url_pre } / ? page = rss </ link >
< atom : link href = \ " http:// { $lmb_url_pre } /?page=rss \" rel= \" self \" type= \" application/rss+xml \" />
2013-08-20 18:32:00 +02:00
< description > Langueur Monotone project news RSS feed </ description >
< image >
2015-08-07 01:43:15 +02:00
< url > http :// { $lmb_url_pre } / images / lm_logo2 - border - 220. png </ url >
2013-08-20 18:32:00 +02:00
< title > Langueur Monotone News Page </ title >
2015-08-07 01:43:15 +02:00
< link > http :// { $lmb_url_pre } / ? page = rss </ link >
2013-08-20 18:32:00 +02:00
</ image >
" ;
$news_tab = lmb_news_tab_get ();
for ( $i = 0 ; $i < count ( $news_tab ); $i ++ )
{
$news = lmb_xml_text_format ( $news_tab [ $i ][ " news " ]);
$pubdate = date ( " r " , strtotime ( $news_tab [ $i ][ " date " ]));
echo " <item>
" ;
if ( " { $news_tab [ $i ][ " name " ] } " != " " )
{
echo " <title> { $news_tab [ $i ][ " title " ] } : { $news_tab [ $i ][ " name " ] } </title>
" ;
}
else
{
echo " <title> { $news_tab [ $i ][ " title " ] } </title>
" ;
}
echo " <pubDate> { $pubdate } </pubDate>
< dc : creator > Langueur Monotone </ dc : creator >
2015-08-07 01:43:15 +02:00
< guid > http :// { $lmb_url_pre } / #$i</guid>
2013-08-20 18:32:00 +02:00
" ;
if ( " { $news_tab [ $i ][ " name " ] } " != " " )
{
echo " <enclosure url= \" { $news_tab [ $i ][ " aimg " ] } \" length= \" " . filesize ( " . { $news_tab [ $i ][ " rimg " ] } " ) . " \" type= \" picture/png \" />
< link > { $news_tab [ $i ][ " alink " ]} </ link >
< description > { $news_tab [ $i ][ " alink " ]} </ description >
" ;
}
else
{
echo " <description> { $news } </description>
" ;
}
echo " </item>
" ;
}
echo " </channel>
</ rss >
2013-08-27 18:36:46 +02:00
" ;
$time_stop = microtime_float ();
$time_elaps = intval ( ( $time_stop - $time_start ) * 1000 ) / 1000 ;
echo " <!-- Page generated in $time_elaps seconds by { $lmb_myname } (http://www.rx3.org/dvp/?dvp= " . strtolower ( $lmb_myname ) . " ) V { $lmb_myver } -->
2013-08-20 18:32:00 +02:00
" ;
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* About Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_about_tab ( $skin_path )
2012-12-01 17:27:04 +01:00
{
$about_file = " about.txt " ;
$about_string = file_get_contents ( " { $about_file } " );
ob_start ();
echo " <tr class= \" about1 \" >
< td class = \ " about01 \" ></td>
2013-01-18 00:05:06 +01:00
< td class = \ " about1 \" > " ;
2012-12-01 17:27:04 +01:00
2013-01-18 00:05:06 +01:00
// echo str_replace( "\n", "<br/>\n ", "{$about_string}");
echo " " . lmb_html_text_format ( " { $about_string } " ) . "
2012-12-01 17:27:04 +01:00
</ td >
2013-01-18 00:05:06 +01:00
< td class = \ " about01 \" ></td>
2012-12-01 17:27:04 +01:00
</ tr >
" ;
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "about", "about", "l", "{$skin_path}/images/lm_logo2-border-220.png", $data, $skin_path);
lmb_make_tab ( " about " , " about " , " l " , " sprite-lm-logo2-border-220 " , $data , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* History Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_history_tab ( $skin_path )
2012-12-01 17:27:04 +01:00
{
$history_file = " history.txt " ;
$history_string = file_get_contents ( " { $history_file } " );
$history_tab = explode ( " \n \n " , " { $history_string } " );
ob_start ();
for ( $i = 0 ; $i < count ( $history_tab ); $i ++ )
{
$history_line = explode ( " \n " , " { $history_tab [ $i ] } " );
$css_row = ( $i + 1 ) % 2 + 1 ;
echo " <tr class= \" history { $css_row } \" >
< td class = \ " history01 \" ></td>
< td class = \ " history1 \" > { $history_line [ 0 ] } </td>
< td class = \ " history2 \" > { $history_line [ 1 ] } </td>
< td class = \ " history3 \" >
2013-01-18 00:05:06 +01:00
< br />
2012-12-01 17:27:04 +01:00
" ;
for ( $j = 2 ; $j < count ( $history_line ); $j ++ )
{
2013-01-18 00:05:06 +01:00
echo " " . lmb_html_text_format ( " { $history_line [ $j ] } " ) . " <br/>
2012-12-01 17:27:04 +01:00
" ;
}
2013-01-18 00:05:06 +01:00
echo " <br/>
2012-12-01 17:27:04 +01:00
</ td >
< td class = \ " history01 \" ></td>
</ tr >
" ;
}
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "history", "history", "r", "{$skin_path}/images/lm_logo1-border-220.png", $data, $skin_path);
lmb_make_tab ( " history " , " history " , " r " , " sprite-lm-logo1-border-220 " , $data , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* About Body */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_about_body ( $lmb_tab , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
lmb_about_tab ( $skin_path );
2012-12-01 17:27:04 +01:00
lmb_spacer ( 4 );
2015-08-07 01:43:15 +02:00
lmb_history_tab ( $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* About Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_about_page ()
{
global $lmb_tab ;
2015-08-07 01:43:15 +02:00
$skin_path = " /skin " ;
lmb_header ( 1 , " Langueur Monotone - About Page " , " About " , " Langueur Monotone about page, describing the project, the members and its history " , " about " , 0 , " { $skin_path } " );
lmb_about_body ( $lmb_tab , $skin_path );
lmb_footer ( $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Info Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_play_info_get ( $play_type , $play_id , $play_priority )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$cmd = " sed -e 's/ \t * \t / \t /g' { $play_path } /.list " ;
$line = array ();
$play_info = array ();
exec ( $cmd , $line );
$tab = explode ( " \t " , $line [ 0 ]);
$play_info [ " name " ] = $tab [ 0 ];
$play_info [ " month " ] = $tab [ 1 ];
$play_info [ " year " ] = $tab [ 2 ];
$play_info [ " comment " ] = $tab [ 3 ];
return ( $play_info );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play List Cur */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_playlist_cur ( $play_type , $path , $row , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$line = array ();
$cmd = " ls -d { $path } /??-* | sed -e 's/.* \ ///' " ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
exec ( $cmd , $line );
2012-12-01 17:27:04 +01:00
for ( $i = 0 ; $i < count ( $line ); $i ++ , $row ++ )
{
2012-12-19 00:49:57 +01:00
$play_tab = explode ( " - " , $line [ $i ]);
$play_priority = $play_tab [ 0 ];
$play_id = $play_tab [ 1 ];
if ( ! file_exists ( " { $path } / { $play_priority } - { $play_id } /.hide " ) || lmb_admin_is ())
{
$play_info = lmb_play_info_get ( $play_type , $play_id , $play_priority );
$css_row = ( $row + 1 ) % 2 + 1 ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$url = " { $lmb_url_post } ?page=play&type= { $play_type } &id= { $play_tab [ 1 ] } &priority= { $play_tab [ 0 ] } " ;
2012-12-01 17:27:04 +01:00
2015-09-07 21:23:56 +02:00
echo " <tr class= \" play { $css_row } \" ><td class= \" play1 \" ><a href= \" { $url } \" ><img class= \" button-item \" src= \" / { $path } / { $play_tab [ 0 ] } - { $play_tab [ 1 ] } /covers/ { $play_tab [ 1 ] } -cover-1-icon.png \" alt= \" \" /></a></td><td class= \" play2 \" ><div class= \" link-item \" ><a href= \" { $url } \" > { $play_info [ " name " ] } </a></div></td><td class= \" play3 \" > { $play_info [ " month " ] } </td><td class= \" play3 \" > { $play_info [ " year " ] } </td><td class= \" play4 \" > { $play_info [ " comment " ] } </td><td> </td></tr>
2012-12-01 17:27:04 +01:00
" ;
2012-12-19 00:49:57 +01:00
}
2013-12-30 17:47:19 +01:00
else
{
$row -- ;
}
2012-12-01 17:27:04 +01:00
}
2013-01-18 00:05:06 +01:00
return ( $row );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play List Next */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_playlist_next ( $play_type , $path , $row , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$line = array ();
$cmd = " sed -e 's/ \t * \t / \t /g' ${ path } /.list " ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
exec ( $cmd , $line );
2012-12-01 17:27:04 +01:00
for ( $i = 0 ; $i < count ( $line ); $i ++ , $row ++ )
{
2015-08-07 01:43:15 +02:00
$tab = explode ( " \t " , $line [ $i ]);
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
if ( ( count ( $tab ) > 4 ) && ( " { $tab [ 4 ] } " != " " ))
2012-12-01 17:27:04 +01:00
{
2015-09-07 21:23:56 +02:00
$icon_tag = " <img src= \" { $skin_path } /images/ { $tab [ 4 ] } \" alt= \" \" /> " ;
2012-12-01 17:27:04 +01:00
}
else
{
2015-09-07 21:23:56 +02:00
$icon_tag = " <div class= \" sprite-unknown-cover-96 \" ></div> " ;
2012-12-01 17:27:04 +01:00
}
2015-08-07 01:43:15 +02:00
$css_row = ( $row + 1 ) % 2 + 1 ;
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
if ( count ( $tab ) > 3 )
{
$comment = $tab [ 3 ];
}
else
{
$comment = " " ;
}
2015-09-07 21:23:56 +02:00
echo " <tr class= \" play { $css_row } \" ><td class= \" play1 \" > { $icon_tag } </td><td class= \" play2 \" > { $tab [ 0 ] } </td><td class= \" play3 \" > { $tab [ 1 ] } </td><td class= \" play3 \" > { $tab [ 2 ] } </td><td class= \" play4 \" > { $comment } </td><td> </td></tr>
2012-12-01 17:27:04 +01:00
" ;
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play List */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_playlist ( $play_type , $side , $skin_path )
2012-12-01 17:27:04 +01:00
{
$row = 1 ;
ob_start ();
2015-08-07 01:43:15 +02:00
$row = lmb_playlist_cur ( $play_type , lmb_playtype_path_get ( $play_type ), $row , $skin_path );
$row = lmb_playlist_next ( $play_type , lmb_playtype_path_get ( $play_type ), $row , $skin_path );
2012-12-01 17:27:04 +01:00
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "{$play_type}", "play", $side, "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path);
lmb_make_tab ( " { $play_type } " , " play " , $side , " sprite-lm-logo1-96 " , $data , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Discography Body */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_discography_body ( $skin_path )
2012-12-01 17:27:04 +01:00
{
/* --- EP --- */
2015-08-07 01:43:15 +02:00
lmb_playlist ( " ep " , " l " , $skin_path );
2012-12-01 17:27:04 +01:00
lmb_spacer ( 5 );
/* --- LP --- */
2015-08-07 01:43:15 +02:00
lmb_playlist ( " lp " , " r " , $skin_path );
2012-12-01 17:27:04 +01:00
lmb_spacer ( 5 );
/* --- Oldies --- */
2015-08-07 01:43:15 +02:00
lmb_playlist ( " oldies " , " l " , $skin_path );
2013-12-30 17:47:19 +01:00
lmb_spacer ( 5 );
/* --- TrackList --- */
2015-08-07 01:43:15 +02:00
lmb_tracklist_body ( $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Discography Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_discography_page ()
{
global $lmb_tab ;
2015-08-07 01:43:15 +02:00
$skin_path = " /skin " ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
lmb_header ( 2 , " Langueur Monotone - Discography Page " , " Discography " , " Langueur Monotone discography page, listing the released and the futures ep, lp and oldies " , " discography " , 0 , " { $skin_path } " );
lmb_discography_body ( $skin_path );
lmb_footer ( $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Introduction */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_play_intro ( $play_type , $play_id , $play_priority , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$cover_path = " { $play_path } /covers/ { $play_id } -cover " ;
$logo_path = " { $play_path } /logos/ { $play_id } -logo " ;
2012-12-01 17:27:04 +01:00
echo " <tr>
< td class = \ " body \" colspan= \" 3 \" rowspan= \" 1 \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
< tbody >
< tr >
< td rowspan = \ " 2 \" style= \" width: 286px; height: 286px; \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " cover \" style= \" width: 266px; height: 266px; \" ><a href= \" { $cover_path } -1-1024.png \" ><img class= \" button-item-big \" src= \" { $cover_path } -1-256.png \" alt= \" \" /></a></td>
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
< td colspan = \ " 2 \" style= \" height: 40px; \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
2012-12-02 10:04:06 +01:00
< tr class = \ " intro0 \" >
< td class = \ " intro0 \" >Introduction</td>
2012-12-01 17:27:04 +01:00
</ tr >
2012-12-02 10:04:06 +01:00
< tr class = \ " intro1 \" >
< td class = \ " intro1 \" >
2013-01-18 00:05:06 +01:00
< br />
2012-12-01 17:27:04 +01:00
" ;
2012-12-02 10:04:06 +01:00
$intro_file = " { $play_path } /.intro " ;
$intro_string = file_get_contents ( " { $intro_file } " );
2013-01-18 00:05:06 +01:00
echo " " . lmb_html_text_format ( " { $intro_string } " ) . " <br/>
2012-12-02 10:04:06 +01:00
" ;
2013-01-18 00:05:06 +01:00
echo " <br/>
2012-12-01 17:27:04 +01:00
</ td >
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
< tr >
< td style = \ " vertical-align: middle; \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
< tr >
2013-01-18 00:05:06 +01:00
< td class = \ " logo \" ><img src= \" { $logo_path } -1-128.png \" alt= \" \" /><br/></td>
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
< td rowspan = \ " 2 \" style= \" width: 286px; height: 286px; vertical-align:bottom \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " cover \" style= \" width: 266px; height: 266px; \" ><a href= \" { $cover_path } -2-1024.png \" ><img class= \" button-item-big \" src= \" { $cover_path } -2-256.png \" alt= \" \" /></a></td>
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
< tr >
< td colspan = \ " 2 \" style= \" height: 40px; \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
2012-12-02 10:04:06 +01:00
< tr class = \ " hardware1 \" >
< td class = \ " hardware1 \" >
2013-01-18 00:05:06 +01:00
< br />
2012-12-01 17:27:04 +01:00
" ;
2012-12-02 10:04:06 +01:00
$hardware_file = " { $play_path } /.hardware " ;
$hardware_string = file_get_contents ( " { $hardware_file } " );
2013-01-18 00:05:06 +01:00
echo " " . lmb_html_text_format ( " { $hardware_string } " ) . " <br/>
2012-12-02 10:04:06 +01:00
" ;
2013-01-18 00:05:06 +01:00
echo " <br/>
</ td >
2012-12-01 17:27:04 +01:00
</ tr >
2012-12-02 10:04:06 +01:00
< tr class = \ " hardware0 \" >
< td class = \ " hardware0 \" >Hardware & Software</td>
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
</ tbody >
</ table >
2013-01-18 00:05:06 +01:00
</ td >
2012-12-01 17:27:04 +01:00
</ tr >
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Info Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_info_get ( $play_type , $play_id , $play_priority , $track_id )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$track_path = " { $play_path } /tracks " ;
$track_array = glob ( " { $track_path } /flac/ { $track_id } -*.flac " );
$track_file = $track_array [ 0 ];
2015-08-07 01:43:15 +02:00
$line = array ();
$track_info = array ();
2012-12-01 17:27:04 +01:00
2013-12-30 17:47:19 +01:00
$track_info [ " play_type " ] = $play_type ;
$track_info [ " play_priority " ] = $play_priority ;
$track_info [ " play_id " ] = $play_id ;
2013-08-20 18:32:00 +02:00
if ( count ( $track_array ) == 0 )
{
2013-12-30 17:47:19 +01:00
$track_info [ " status " ] = 0 ;
2013-08-20 18:32:00 +02:00
}
else
{
2013-12-30 17:47:19 +01:00
$track_info [ " status " ] = 1 ;
2013-08-20 18:32:00 +02:00
$cmd = " eval \$ ( metaflac --export-tags-to=- \" ${ track_file } \" | grep -v -e \" .* .*= \" -e \" .*-.*= \" | sed -e 's/=/= \\ \" /' -e 's/ $ / \" /')
2012-12-02 10:04:06 +01:00
echo - e \ " \$ { TRACKNUMBER} \t \$ (basename ${ track_file } .flac) \t \$ { ARTIST} \t \$ { ALBUM} \t \$ (echo \$ { TITLE} | sed 's/ (.*//') \t \$ (echo \$ { TITLE} | sed -e 's/.* (//' -e 's/) $ //') \t \$ { COMPOSER} \t \$ { COMMENT} \t \$ (metaflac --show-sample-rate \" ${ track_file } \" ) \t \$ (metaflac --show-total-samples \" ${ track_file}\")\t\${SAFECREATIVE } \" " ;
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
exec ( $cmd , $line );
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
$tab = explode ( " \t " , $line [ 0 ]);
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
$track_info [ " id " ] = $tab [ 0 ];
$track_info [ " file " ] = $tab [ 1 ];
$track_info [ " artist " ] = $tab [ 2 ];
$track_info [ " album " ] = $tab [ 3 ];
$track_info [ " title " ] = $tab [ 4 ];
$track_info [ " mix " ] = $tab [ 5 ];
$track_info [ " composer " ] = $tab [ 6 ];
$track_info [ " comment " ] = $tab [ 7 ];
$track_info [ " sample_rate " ] = $tab [ 8 ];
$track_info [ " sample_nb " ] = $tab [ 9 ];
if ( " { $track_info [ " title " ] } " == " { $track_info [ " mix " ] } " )
{
2013-03-21 17:21:45 +01:00
$track_info [ " mix " ] = " " ;
2013-08-20 18:32:00 +02:00
}
2013-03-21 17:21:45 +01:00
2013-08-20 18:32:00 +02:00
$total = intval ( $track_info [ " sample_nb " ] / $track_info [ " sample_rate " ]);
$min = intval ( $total / 60 );
$sec = $total - $min * 60 ;
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
$track_info [ " length " ] = " { $min } ' { $sec } \" " ;
$track_info [ " duration " ] = " PT { $min } M { $sec } S " ;
$track_info [ " safe_creative " ] = $tab [ 10 ];
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
$search_tab = array ( " /flac/ " , " .flac " );
$replace_tab = array ( " /mp3-192/ " , " .mp3 " );
2013-01-18 00:05:06 +01:00
2013-08-20 18:32:00 +02:00
$track_info [ " url " ] = " / " . str_replace ( $search_tab , $replace_tab , " ${ track_file } " );
}
2013-01-18 00:05:06 +01:00
2012-12-01 17:27:04 +01:00
return ( $track_info );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track File Tag Get */
/*--------------------------------------------------------------------------------------------------------------------*/
2013-08-27 18:36:46 +02:00
2012-12-01 17:27:04 +01:00
function lmb_track_file_tag_get ( $play_type , $play_id , $play_priority , $track_id )
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$track_path = " { $play_path } /tracks " ;
$file_type_pat = " { $track_path } / { flac,ogg,mp3,med}* " ;
$file_dir_tab = glob ( " { $file_type_pat } " , GLOB_BRACE );
$file_tag = " " ;
foreach ( $file_dir_tab as $file_dir )
{
$dir = basename ( $file_dir );
$tab = explode ( " - " , $dir );
$file_type = $tab [ 0 ];
2013-08-20 18:32:00 +02:00
if ( count ( $tab ) > 1 )
{
$file_subtype = $tab [ 1 ];
}
else
{
$file_subtype = " " ;
}
if ( " { $track_id } " == " 00 " )
{
$file_pat = " { $track_path } / { $dir } /01-*. { $file_type } " ;
}
else
{
$file_pat = " { $track_path } / { $dir } / { $track_id } -*. { $file_type } " ;
}
2012-12-01 17:27:04 +01:00
$file_tab = glob ( " { $file_pat } " );
2013-08-20 18:32:00 +02:00
if ( count ( $file_tab ) > 0 )
{
$file_url = $file_tab [ 0 ];
}
else
{
$file_url = " " ;
}
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
$file_tag = " { $file_tag } <td class= \" tracks7 \" > " ;
2012-12-01 17:27:04 +01:00
if ( count ( glob ( " { $file_url } " )))
{
if ( " { $track_id } " == " 00 " )
{
2015-08-07 01:43:15 +02:00
$download_url = " { $lmb_url_post } ?page=download&type= { $play_type } &id= { $play_id } &priority= { $play_priority } &dtype=track&ftype= { $dir } " ;
2012-12-01 17:27:04 +01:00
$file_size = lmb_download_tracks ( $play_type , $play_id , $play_priority , $dir , " SIZE " );
$size_tab = lmb_size_convert ( $file_size );
}
else
{
$download_url = " { $file_url } " ;
$size_tab = lmb_size_convert ( filesize ( " { $file_url } " ));
}
2015-09-07 21:23:56 +02:00
$file_tag = " { $file_tag } <table class= \" list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" ><tbody><tr><td class= \" tracks7 \" ><div class= \" link-item \" ><a href= \" { $download_url } \" > { $file_type } { $file_subtype } </a></div></td></tr><tr><td class= \" tracks8 \" >( ${ size_tab["size"] } { $size_tab [ " unit " ] } )</td></tr></tbody></table> " ;
2012-12-01 17:27:04 +01:00
}
$file_tag = " { $file_tag } </td>
" ;
}
return ( " { $file_tag } " );
}
2013-12-30 17:47:19 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Loc Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_loc_get ( $track_url )
{
$path_tab = explode ( " / " , $track_url );
$play_tab = explode ( " - " , $path_tab [ 2 ]);
$track_tab = explode ( " - " , basename ( " { $path_tab [ 5 ] } " , " .flac " ));
$track_loc [ " play_type " ] = $path_tab [ 1 ];
$track_loc [ " play_priority " ] = $play_tab [ 0 ];
$track_loc [ " play_id " ] = $play_tab [ 1 ];
$track_loc [ " track_id " ] = $track_tab [ 0 ];
$track_loc [ " track_title " ] = $track_tab [ 1 ];
2015-08-07 01:43:15 +02:00
if ( isset ( $track_tab [ 2 ]))
{
$track_loc [ " track_mix " ] = $track_tab [ 2 ];
}
else
{
$track_loc [ " track_mix " ] = " " ;
}
2013-12-30 17:47:19 +01:00
return ( $track_loc );
}
2013-01-18 00:05:06 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track List Info Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_tracklist_info_get ( $play_type , $play_id , $play_priority )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$track_path = " { $play_path } /tracks " ;
2013-01-18 00:05:06 +01:00
2015-08-07 01:43:15 +02:00
$track_list = glob ( " { $track_path } /flac/*.flac " );
2013-01-18 00:05:06 +01:00
$track_list_info = array ();
for ( $i = 0 ; $i < count ( $track_list ); $i ++ )
{
2013-12-30 17:47:19 +01:00
$track_loc = lmb_track_loc_get ( " { $track_list [ $i ] } " );
$track_info_list [ $i ] = lmb_track_info_get ( " { $track_loc [ " play_type " ] } " , $track_loc [ " play_id " ], $track_loc [ " play_priority " ], $track_loc [ " track_id " ]);
2013-01-18 00:05:06 +01:00
}
2013-12-30 17:47:19 +01:00
return ( $track_info_list );
2013-01-18 00:05:06 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track List Microdata */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_tracklist_microdata ( $play_type , $play_id , $play_priority )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$cover_path = " { $play_path } /covers/ { $play_id } -cover " ;
2013-01-18 00:05:06 +01:00
$track_list_info = lmb_tracklist_info_get ( $play_type , $play_id , $play_priority );
$tracks_nb = count ( $track_list_info );
echo " <div itemscope= \" itemscope \" itemtype= \" http://schema.org/MusicAlbum \" >
< meta itemprop = \ " name \" content= \" { $track_list_info [ 0 ][ " album " ] } \" />
< meta itemprop = \ " numtracks \" content= \" { $tracks_nb } \" />
< meta itemprop = \ " image \" content= \" { $cover_path } -1-128.png \" />
< div itemscope = \ " itemscope \" itemtype= \" http://schema.org/MusicGroup \" >
< meta itemprop = \ " name \" content= \" { $track_list_info [ 0 ][ " artist " ] } \" />
</ div >
" ;
for ( $i = 0 ; $i < $tracks_nb ; $i ++ )
{
echo " <div itemprop= \" tracks \" itemscope= \" itemscope \" itemtype= \" http://schema.org/MusicRecording \" >
< meta itemprop = \ " name \" content= \" { $track_list_info [ $i ][ " title " ] } ( { $track_list_info [ $i ][ " mix " ] } ) \" />
< meta itemprop = \ " byArtist \" content= \" { $track_list_info [ $i ][ " artist " ] } \" />
< meta itemprop = \ " inAlbum \" content= \" { $track_list_info [ $i ][ " album " ] } \" />
< meta itemprop = \ " author \" content= \" { $track_list_info [ $i ][ " composer " ] } \" />
< meta itemprop = \ " duration \" content= \" { $track_list_info [ $i ][ " duration " ] } \" />
< meta itemprop = \ " version \" content= \" { $track_list_info [ $i ][ " comment " ] } \" />
< meta itemprop = \ " url \" content= \" { $track_list_info [ $i ][ " url " ] } \" />
</ div >
" ;
}
echo " </div>
" ;
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track List */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_tracklist ( $play_type , $play_id , $play_priority , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$cover_path = " { $play_path } /covers/ { $play_id } -cover " ;
$logo_path = " { $play_path } /logos/ { $play_id } -logo " ;
$track_path = " { $play_path } /tracks " ;
2012-12-01 17:27:04 +01:00
2013-01-18 00:05:06 +01:00
$track_list_info = lmb_tracklist_info_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
2013-01-18 00:05:06 +01:00
$track_nb = count ( $track_list_info );
ob_start ();
2012-12-01 17:27:04 +01:00
2013-01-18 00:05:06 +01:00
$size = $track_nb + 1 ;
$height = 220 / $size ;
2012-12-01 17:27:04 +01:00
$file_tag = lmb_track_file_tag_get ( " { $play_type } " , " { $play_id } " , " { $play_priority } " , " 00 " );
2015-09-07 21:23:56 +02:00
// $title_tag = "<td class=\"tracks00\" rowspan=\"$size\"> </td><td class=\"tracks0\" rowspan=\"$size\"><img src=\"{$skin_path}/images/tab-tracks-r.png\" alt=\"\"/></td>";
2013-01-18 00:05:06 +01:00
echo " <tr class= \" tracks0 \" style= \" height: { $height } px; \" >
< td colspan = \ " 6 \" class= \" tracks2 \" style= \" text-align: left; \" >
" ;
lmb_tracklist_microdata ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
2013-01-18 00:05:06 +01:00
echo " Full Album including covers </td>
{ $file_tag }
</ tr >
2012-12-01 17:27:04 +01:00
" ;
2013-01-18 00:05:06 +01:00
for ( $i = 0 , $row = 1 ; $i < $track_nb ; $i ++ , $row ++ )
2012-12-01 17:27:04 +01:00
{
2013-01-18 00:05:06 +01:00
$track_info = $track_list_info [ $i ];
2012-12-01 17:27:04 +01:00
$css_row = ( $row + 1 ) % 2 + 1 ;
2013-01-18 00:05:06 +01:00
$track_id = str_pad ( " { $track_info [ " id " ] } " , 2 , '0' , STR_PAD_LEFT );
2015-08-07 01:43:15 +02:00
$track_url = " { $lmb_url_post } ?page=track&type= { $play_type } &id= { $play_id } &priority= { $play_priority } &tid= { $track_id } " ;
2012-12-01 17:27:04 +01:00
$file_tag = lmb_track_file_tag_get ( $play_type , $play_id , $play_priority , $track_id );
echo " <tr class= \" tracks { $css_row } \" style= \" height: { $height } px; \" > " ;
2015-09-07 21:23:56 +02:00
echo " <td class= \" tracks1 \" > { $track_info [ " id " ] } </td><td class= \" tracks2 \" > <div class= \" link-item \" ><a href= \" { $track_url } \" > { $track_info [ " title " ] } </a></div> </td><td class= \" tracks3 \" > <div class= \" link-item \" ><a href= \" { $track_url } \" > { $track_info [ " mix " ] } </a></div> </td><td class= \" tracks4 \" > { $track_info [ " length " ] } </td><td class= \" tracks5 \" > { $track_info [ " composer " ] } </td><td class= \" tracks6 \" > { $track_info [ " comment " ] } </td> { $file_tag } </tr>
2012-12-01 17:27:04 +01:00
" ;
}
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "tracks", "tracks", "r", "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path);
lmb_make_tab ( " tracks " , " tracks " , " r " , " sprite-lm-logo1-96 " , $data , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* File Entry Print */
/*--------------------------------------------------------------------------------------------------------------------*/
2013-08-20 18:32:00 +02:00
function lmb_file_entry_print ( $file_tab , $format_css_id , $size_css_id , $entry_tag , $max_nb )
2012-12-01 17:27:04 +01:00
{
echo " { $entry_tag } " ;
foreach ( $file_tab as $file )
{
echo " <td class= \" { $format_css_id } \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
2015-09-07 21:23:56 +02:00
< tr >< td class = \ " { $format_css_id } \" ><div class= \" link-item \" ><a href= \" { $file [ " url " ] } \" > { $file [ " format " ] } </a></div></td></tr>
2012-12-01 17:27:04 +01:00
< tr >< td class = \ " { $size_css_id } \" >( ${ file["size"] } { $file [ " unit " ] } )</td></tr>
</ tbody >
</ table >
</ td >
" ;
}
2013-08-20 18:32:00 +02:00
for ( $i = count ( $file_tab ); $i < $max_nb ; $i ++ )
{
echo " <td class= \" { $format_css_id } \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr >< td class = \ " { $format_css_id } \" ></td></tr>
< tr >< td class = \ " { $size_css_id } \" ></td></tr>
</ tbody >
</ table >
</ td >
" ;
}
2012-12-01 17:27:04 +01:00
echo " </tr>
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Cover File Tab Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_cover_file_tab_get ( $play_type , $play_id , $play_priority , $cover_id , $mode )
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$cover_path = " { $play_path } /covers " ;
2012-12-01 17:27:04 +01:00
$cmd = " ls { $cover_path } / { $play_id } -cover-1-*.png | sed -e 's/.*-//' -e 's/.png $ //' | sort -rn " ;
exec ( $cmd , $cover_format_tab );
$file_tab = array ();
2013-08-20 18:32:00 +02:00
$file_tag = " " ;
2012-12-01 17:27:04 +01:00
for ( $i = 0 ; $i < count ( $cover_format_tab ); $i ++ )
{
$cover_format = " { $cover_format_tab [ $i ] } " ;
if ( " { $cover_format } " != " icon " )
{
$file_url = " { $cover_path } / { $play_id } -cover- { $cover_id } - { $cover_format } .png " ;
$file_tag = " { $file_tag } <td class= \" covers3 \" > " ;
if ( count ( glob ( " { $file_url } " )))
{
if ( $mode == " MULTI " )
{
2015-08-07 01:43:15 +02:00
$file_tab [ $i ][ " url " ] = " { $lmb_url_post } ?page=download&type= { $play_type } &id= { $play_id } &priority= { $play_priority } &dtype=cover&cformat= { $cover_format } " ;
2012-12-01 17:27:04 +01:00
$file_size = lmb_download_covers ( $play_type , $play_id , $play_priority , $cover_format , " SIZE " );
$size_tab = lmb_size_convert ( $file_size );
}
else
{
$file_tab [ $i ][ " url " ] = " { $file_url } " ;
$size_tab = lmb_size_convert ( filesize ( " { $file_url } " ));
}
$file_tab [ $i ][ " format " ] = " { $cover_format } " ;
$file_tab [ $i ][ " size " ] = " { $size_tab [ " size " ] } " ;
$file_tab [ $i ][ " unit " ] = " { $size_tab [ " unit " ] } " ;
}
}
}
return ( $file_tab );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Cover List */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_coverlist ( $play_type , $play_id , $play_priority , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$cover_path = " { $play_path } /covers/ { $play_id } -cover " ;
$logo_path = " { $play_path } /logos/ { $play_id } -logo " ;
2012-12-01 17:27:04 +01:00
ob_start ();
$cmd = " ls { $cover_path } -*-icon.png | sed -e 's/-icon.png $ //' -e 's/.*-//' " ;
exec ( $cmd , $sheet_tab );
$size = count ( $sheet_tab ) + 1 ;
// $height=220/$size;
// $height=110;
$height = max ( 110 , ( ( 220 - 30 ) / count ( $sheet_tab )));
$file_tab = lmb_cover_file_tab_get ( $play_type , $play_id , $play_priority , " * " , " MULTI " );
$entry_tag = " <tr class= \" covers0 \" style= \" height: 30px \" >
2013-01-18 00:05:06 +01:00
< td class = \ " covers2 \" colspan= \" 2 \" style= \" text-align: left; \" > All the Covers </td>
2012-12-01 17:27:04 +01:00
" ;
2013-08-20 18:32:00 +02:00
lmb_file_entry_print ( $file_tab , " covers3 " , " covers4 " , " { $entry_tag } " , count ( $file_tab ));
2012-12-01 17:27:04 +01:00
for ( $i = 0 ; $i < count ( $sheet_tab ); $i ++ )
{
if ( $i == 0 )
{
$sheet_name = " Front " ;
}
else
{
2013-03-21 17:21:45 +01:00
if ( $i == 1 )
2012-12-01 17:27:04 +01:00
{
$sheet_name = " Back " ;
}
else
{
2013-03-21 17:21:45 +01:00
$sheet_name = $i - 1 ;
2012-12-01 17:27:04 +01:00
}
}
/* Cover Entry */
$file_tab = lmb_cover_file_tab_get ( $play_type , $play_id , $play_priority , $i + 1 , " MONO " );
$css_row = $i % 2 + 1 ;
$entry_tag = " <tr class= \" covers { $css_row } \" style= \" height: { $height } px \" >
2015-09-07 21:23:56 +02:00
< td class = \ " covers1 \" ><a href= \" { $file_tab [ 0 ][ " url " ] } \" ><img class= \" button-item \" src= \" { $cover_path } - { $sheet_tab [ $i ] } -icon.png \" alt= \" \" /></a></td>
2012-12-01 17:27:04 +01:00
< td class = \ " covers2 \" > { $sheet_name } </td> " ;
2013-08-20 18:32:00 +02:00
lmb_file_entry_print ( $file_tab , " covers3 " , " covers4 " , " { $entry_tag } " , count ( $file_tab ));
2012-12-01 17:27:04 +01:00
}
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
lmb_make_tab ( " covers " , " covers " , " l " , " / { $logo_path } -2-128.png " , $data , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Video File Tab Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_video_file_tab_get ( $play_type , $play_id , $play_priority , $video_id , $mode )
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$video_path = " { $play_path } /videos " ;
2012-12-01 17:27:04 +01:00
$cmd = " ls { $video_path } / { $video_id } -*-*-*.avi | sed -e 's/.* { $play_id } -.*-//' -e 's/.avi $ //' | sort -rn " ;
exec ( $cmd , $video_format_tab );
$file_tab = array ();
for ( $i = 0 ; $i < count ( $video_format_tab ); $i ++ )
{
$video_format = " { $video_format_tab [ $i ] } " ;
$file_url = " { $video_path } / { $video_id } -*- { $video_format } .avi " ;
if ( count ( glob ( " { $file_url } " )))
{
if ( $mode == " MULTI " )
{
2015-08-07 01:43:15 +02:00
$file_tab [ $i ][ " url " ] = " { $lmb_url_post } ?page=download&type= { $play_type } &id= { $play_id } &priority= { $play_priority } &dtype=video&vformat= { $video_format } " ;
2012-12-01 17:27:04 +01:00
$file_size = lmb_download_videos ( $play_type , $play_id , $play_priority , $video_format , " SIZE " );
$size_tab = lmb_size_convert ( $file_size );
}
else
{
$tab = glob ( " { $file_url } " );
$file_tab [ $i ][ " url " ] = " { $tab [ 0 ] } " ;
$size_tab = lmb_size_convert ( filesize ( " { $file_tab [ $i ][ " url " ] } " ));
}
$file_tab [ $i ][ " format " ] = " { $video_format } " ;
$file_tab [ $i ][ " size " ] = " { $size_tab [ " size " ] } " ;
$file_tab [ $i ][ " unit " ] = " { $size_tab [ " unit " ] } " ;
}
}
return ( $file_tab );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Video List */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_videolist ( $play_type , $play_id , $play_priority , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$video_path = " { $play_path } /videos " ;
$logo_path = " { $play_path } /logos/ { $play_id } -logo " ;
ob_start ();
$cmd = " ls { $video_path } /*-icon.png | sed -e 's/-icon.png $ //' -e 's/.* \ ///' " ;
exec ( $cmd , $video_tab );
2013-01-02 22:31:56 +01:00
if ( count ( $video_tab ) == 0 || ( file_exists ( " { $video_path } /.hide " ) && ! lmb_admin_is ()))
2012-12-01 17:27:04 +01:00
{
echo " <tr class= \" videos2 \" style= \" height: 60px \" ><td class= \" videos1 \" ></td><td class= \" videos2 \" > </td></tr>
2015-09-07 21:23:56 +02:00
< tr class = \ " videos1 \" style= \" height: 110px \" ><td class= \" videos1 \" ><div class= \" sprite-unknown-cover-96 \" ></div></td><td class= \" videos2 \" > No video found... </td></tr>
2012-12-01 17:27:04 +01:00
< tr class = \ " videos2 \" style= \" height: 60px \" ><td class= \" videos1 \" ></td><td class= \" videos2 \" > </td></tr>
" ;
}
else
{
$height = max ( 110 , ( ( 220 - 30 ) / count ( $video_tab )));
$file_tab = lmb_video_file_tab_get ( $play_type , $play_id , $play_priority , " * " , " MULTI " );
$entry_tag = "
< tr class = \ " videos0 \" style= \" height: 30px \" >
2013-01-18 00:05:06 +01:00
< td class = \ " videos2 \" colspan= \" 4 \" style= \" text-align: left; \" > All the Videos </td>
2012-12-01 17:27:04 +01:00
" ;
2013-08-20 18:32:00 +02:00
lmb_file_entry_print ( $file_tab , " videos5 " , " videos6 " , $entry_tag , count ( $file_tab ));
2012-12-01 17:27:04 +01:00
for ( $i = 0 ; $i < count ( $video_tab ); $i ++ )
{
$tab = explode ( " - " , $video_tab [ $i ]);
$video_id = " { $tab [ 0 ] } " ;
$video_track = " { $tab [ 1 ] } " ;
$video_mix = " { $tab [ 2 ] } " ;
$video_track_name = ucwords ( str_replace ( " _ " , " " , " { $video_track } " ));
$video_mix_name = ucwords ( str_replace ( " _ " , " " , " { $video_mix } " ));
$video_file = " { $video_id } - { $video_track } - { $video_mix } " ;
/* Video Entry */
$file_tab = lmb_video_file_tab_get ( $play_type , $play_id , $play_priority , $i + 1 , " MONO " );
$css_row = $i % 2 + 1 ;
$entry_tag = " <tr class= \" videos { $css_row } \" style= \" height: { $height } px \" >
2015-09-07 21:23:56 +02:00
< td class = \ " videos1 \" ><a href= \" { $file_tab [ 0 ][ " url " ] } \" ><img class= \" button-item \" src= \" { $video_path } / { $video_file } -icon.png \" alt= \" \" /></a></td>
2012-12-01 17:27:04 +01:00
< td class = \ " videos2 \" > { $video_id } </td>
< td class = \ " videos3 \" > { $video_track_name } </td>
< td class = \ " videos4 \" > { $video_mix_name } </td>
" ;
2013-08-20 18:32:00 +02:00
lmb_file_entry_print ( $file_tab , " videos5 " , " videos6 " , " { $entry_tag } " , count ( $file_tab ));
2012-12-01 17:27:04 +01:00
}
}
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
lmb_make_tab ( " videos " , " videos " , " r " , " / { $logo_path } -1-128.png " , $data , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Extra File Tab Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_extra_file_tab_get ( $play_type , $play_id , $play_priority , $extra_id , $mode )
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$extra_path = " { $play_path } /extras " ;
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
$cmd = " ls { $extra_path } / { $play_id } - { $extra_id } -*.png | sed -e 's/.*-//' -e 's/.png $ //' | sort -nu " ;
2012-12-01 17:27:04 +01:00
exec ( $cmd , $extra_format_tab );
$file_tab = array ();
2013-08-20 18:32:00 +02:00
$file_tag = " " ;
2012-12-01 17:27:04 +01:00
for ( $i = 0 ; $i < count ( $extra_format_tab ); $i ++ )
{
$extra_format = " { $extra_format_tab [ $i ] } " ;
if ( " { $extra_format } " != " icon " )
{
$file_url = " { $extra_path } / { $play_id } - { $extra_id } - { $extra_format } .png " ;
$file_tag = " { $file_tag } <td class= \" extras5 \" > " ;
if ( count ( glob ( " { $file_url } " )))
{
if ( $mode == " MULTI " )
{
2015-08-07 01:43:15 +02:00
$file_tab [ $i ][ " url " ] = " { $lmb_url_post } ?page=download&type= { $play_type } &id= { $play_id } &priority= { $play_priority } &dtype=extra&eformat= { $extra_id } - { $extra_format } " ;
2012-12-01 17:27:04 +01:00
$file_size = lmb_download_extras ( $play_type , $play_id , $play_priority , $extra_format , " SIZE " );
$size_tab = lmb_size_convert ( $file_size );
}
else
{
$file_tab [ $i ][ " url " ] = " { $file_url } " ;
$size_tab = lmb_size_convert ( filesize ( " { $file_url } " ));
}
$file_tab [ $i ][ " format " ] = " { $extra_format } " ;
$file_tab [ $i ][ " size " ] = " { $size_tab [ " size " ] } " ;
$file_tab [ $i ][ " unit " ] = " { $size_tab [ " unit " ] } " ;
}
}
}
return ( $file_tab );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Extra List */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_extralist ( $play_type , $play_id , $play_priority , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$extra_path = " { $play_path } /extras " ;
ob_start ();
2013-08-20 18:32:00 +02:00
$cmd = " ls { $extra_path } / { $play_id } -*-*-icon.png | sed -e 's/-icon.png $ //' -e 's/.* { $play_id } -.*-//' | sort -u " ;
2012-12-01 17:27:04 +01:00
exec ( $cmd , $format_tab );
2013-01-02 22:31:56 +01:00
if ( count ( $format_tab ) == 0 || ( file_exists ( " { $extra_path } /.hide " ) && ! lmb_admin_is ()))
2012-12-01 17:27:04 +01:00
{
echo " <tr class= \" extras2 \" style= \" height: 60px \" ><td class= \" extras1 \" ></td><td class= \" extras2 \" > </td></tr>
2015-09-07 21:23:56 +02:00
< tr class = \ " extras1 \" style= \" height: 110px \" ><td class= \" extras1 \" ><div class= \" sprite-unknown-cover-96 \" ></div></td><td class= \" extras2 \" > No extra found... </td></tr>
2012-12-01 17:27:04 +01:00
< tr class = \ " extras2 \" style= \" height: 60px \" ><td class= \" extras1 \" ></td><td class= \" extras2 \" > </td></tr>
" ;
}
else
{
$format_nb = count ( $format_tab );
2013-01-18 00:05:06 +01:00
$title_tag = " <td class= \" extras2 \" rowspan= \" { $format_nb } \" colspan= \" 3 \" style= \" text-align: left; \" > All the Extras </td>
2012-12-01 17:27:04 +01:00
" ;
2013-08-20 18:32:00 +02:00
$file_tab = array ();
$max_file_nb = 0 ;
foreach ( $format_tab as $format )
{
$file_tab [ $format ] = lmb_extra_file_tab_get ( $play_type , $play_id , $play_priority , " *- { $format } " , " MULTI " );
$max_file_nb = max ( $max_file_nb , count ( $file_tab [ $format ]));
}
2012-12-01 17:27:04 +01:00
foreach ( $format_tab as $format )
{
$extra_format = str_replace ( " _ " , " / " , " { $format } " );
2013-08-20 18:32:00 +02:00
2012-12-01 17:27:04 +01:00
$entry_tag = " <tr class= \" extras0 \" style= \" height: 30px \" >
$ { title_tag } < td class = \ " extras4 \" > { $extra_format } </td>
" ;
2013-08-20 18:32:00 +02:00
lmb_file_entry_print ( $file_tab [ $format ], " extras5 " , " extras6 " , " { $entry_tag } " , $max_file_nb );
2012-12-01 17:27:04 +01:00
$title_tag = " " ;
}
2013-08-20 18:32:00 +02:00
$cmd = " ls { $extra_path } / { $play_id } -*-*-icon.png | sed -e 's/-icon.png $ //' -e 's/.* { $play_id } -//' | sort " ;
2012-12-01 17:27:04 +01:00
exec ( $cmd , $extra_tab );
$height = max ( 86 , ( ( 220 - 30 * $format_nb ) / count ( $extra_tab )));
for ( $i = 0 ; $i < count ( $extra_tab ); $i ++ )
{
$tab = explode ( " - " , $extra_tab [ $i ]);
$extra_type = ucwords ( $tab [ 0 ]);
$extra_subid = $tab [ 1 ];
$extra_format = str_replace ( " _ " , " / " , $tab [ 2 ]);
$extra_id = " { $tab [ 0 ] } - { $tab [ 1 ] } - { $tab [ 2 ] } " ;
$extra_prefix = " { $extra_path } / { $play_id } - { $extra_id } " ;
/* Extra Entry */
$file_tab = lmb_extra_file_tab_get ( " { $play_type } " , " { $play_id } " , " { $play_priority } " , " { $extra_id } " , " MONO " );
$css_row = $i % 2 + 1 ;
$entry_tag = " <tr class= \" extras { $css_row } \" style= \" height: { $height } px \" >
2015-09-07 21:23:56 +02:00
< td class = \ " extras1 \" ><a href= \" { $file_tab [ 1 ][ " url " ] } \" ><img class= \" button-item \" src= \" { $extra_prefix } -icon.png \" alt= \" \" /></a></td>
2012-12-01 17:27:04 +01:00
< td class = \ " extras2 \" > { $extra_type } </td>
< td class = \ " extras3 \" > { $extra_subid } </td>
< td class = \ " extras4 \" > { $extra_format } </td>
" ;
2013-08-20 18:32:00 +02:00
lmb_file_entry_print ( $file_tab , " extras5 " , " extras6 " , " { $entry_tag } " , $max_file_nb );
2012-12-01 17:27:04 +01:00
}
}
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "extras", "extras", "l", "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path);
lmb_make_tab ( " extras " , " extras " , " l " , " sprite-lm-logo1-96 " , $data , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Links Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_links_tab ( $play_type , $play_id , $play_priority )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2013-08-20 18:32:00 +02:00
$global_links_file = " .links " ;
$local_links_file = " { $play_path } /.links " ;
2012-12-01 17:27:04 +01:00
$line = array ();
2013-08-20 18:32:00 +02:00
$cmd = " cat ${ local_links_file } ${ global_links_file } | sed -e 's/ \t * \t / \t /g' " ;
2012-12-01 17:27:04 +01:00
exec ( $cmd , $line );
2012-12-02 10:04:06 +01:00
echo " <table class= \" tab \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 5 \" style= \" \" >
2012-12-01 17:27:04 +01:00
< tbody >
" ;
for ( $i = 0 ; $i < count ( $line ); $i ++ )
{
$tab = explode ( " \t " , $line [ $i ]);
$css_row = ( $i + 1 ) % 2 + 1 ;
2013-08-20 18:32:00 +02:00
$text = lmb_html_text_format ( " { $tab [ 0 ] } " );
$link = htmlentities ( " { $tab [ 1 ] } " );
$image = " { $tab [ 2 ] } " ;
if ( count ( $tab ) > 3 )
{
$flag = " { $tab [ 3 ] } " ;
}
else
{
$flag = " " ;
}
2013-01-18 00:05:06 +01:00
if ( $flag == " nf " )
{
$attr = " rel= \" nofollow \" " ;
}
else
{
$attr = " " ;
}
2012-12-01 17:27:04 +01:00
2015-09-07 21:23:56 +02:00
if ( $image [ 0 ] == " / " )
{
$image_tag = " <img class= \" button-item \" src= \" { $image } \" width= \" 16 \" height= \" 16 \" alt= \" \" /> " ;
}
else
{
$image_tag = " <div class= \" { $image } \" style= \" width:16px; height:16px; \" ></div> " ;
}
2012-12-02 10:04:06 +01:00
echo " <tr class= \" links1 \" >
< td class = \ " links1 \" >
2015-09-07 21:23:56 +02:00
< div class = \ " link-item \" ><a { $attr } href= \" { $link } \" > { $text } </a></div>
2012-12-02 10:04:06 +01:00
</ td >
< td class = \ " links2 \" >
2015-09-07 21:23:56 +02:00
< a class = \ " button-item \" { $attr } href= \" { $link } \" ><div > { $image_tag } </a>
2012-12-02 10:04:06 +01:00
</ td >
</ tr >
2012-12-01 17:27:04 +01:00
" ;
}
2012-12-02 10:04:06 +01:00
echo " <tr class= \" links0 \" >
< td class = \ " links0 \" colspan= \" 2 \" >Links</td>
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Last */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_play_last ( $play_type , $play_id , $play_priority , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
echo " <tr>
< td class = \ " body \" colspan= \" 3 \" rowspan= \" 1 \" >
2012-12-02 10:04:06 +01:00
< table class = \ " tab \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
2012-12-01 17:27:04 +01:00
< tbody >
< tr >
< td style = \ " width: 66%; \" >
2012-12-02 10:04:06 +01:00
< table class = \ " tab \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
2012-12-01 17:27:04 +01:00
< tbody >
2012-12-02 10:04:06 +01:00
< tr class = \ " thanks0 \" >
< td class = \ " thanks0 \" >Thanks</td>
2012-12-01 17:27:04 +01:00
</ tr >
2012-12-02 10:04:06 +01:00
< tr class = \ " thanks1 \" >
< td class = \ " thanks1 \" >
2012-12-01 17:27:04 +01:00
" ;
2012-12-02 10:04:06 +01:00
$thanks_file = " { $play_path } /.thanks " ;
$thanks_string = file_get_contents ( " { $thanks_file } " );
2013-01-18 00:05:06 +01:00
echo " " . lmb_html_text_format ( " { $thanks_string } " ) . " <br/>
2012-12-02 10:04:06 +01:00
" ;
echo " </td>
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
< td style = \ " width: 33%; \" >
" ;
lmb_links_tab ( $play_type , $play_id , $play_priority );
echo " </td>
</ tr >
</ tbody >
</ table >
2013-01-18 00:05:06 +01:00
</ td >
2012-12-01 17:27:04 +01:00
</ tr >
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Body */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_play_body ( $play_type , $play_id , $play_priority , $skin_path )
2012-12-01 17:27:04 +01:00
{
/* --- Introduction --- */
2015-08-07 01:43:15 +02:00
lmb_play_intro ( $play_type , $play_id , $play_priority , $skin_path );
2012-12-01 17:27:04 +01:00
lmb_spacer ( 4 );
/* --- Tracks --- */
2015-08-07 01:43:15 +02:00
lmb_tracklist ( $play_type , $play_id , $play_priority , $skin_path );
2013-01-18 00:05:06 +01:00
// lmb_tracklist_microdata( $play_type, $play_id, $play_priority);
2012-12-01 17:27:04 +01:00
lmb_spacer ( 5 );
/* --- Covers --- */
2015-08-07 01:43:15 +02:00
lmb_coverlist ( $play_type , $play_id , $play_priority , $skin_path );
2012-12-01 17:27:04 +01:00
lmb_spacer ( 5 );
/* --- Videos --- */
2015-08-07 01:43:15 +02:00
lmb_videolist ( $play_type , $play_id , $play_priority , $skin_path );
2012-12-01 17:27:04 +01:00
lmb_spacer ( 5 );
/* --- Etras --- */
2015-08-07 01:43:15 +02:00
lmb_extralist ( $play_type , $play_id , $play_priority , $skin_path );
2012-12-01 17:27:04 +01:00
lmb_spacer ( 4 );
/* --- Last --- */
2015-08-07 01:43:15 +02:00
lmb_play_last ( $play_type , $play_id , $play_priority , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Type Name Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_play_type_name_get ( $play_type_id )
{
switch ( " { $play_type_id } " )
{
case " ep " :
{
return ( " EP " );
}
case " lp " :
{
return ( " LP " );
}
case " oldies " :
{
return ( " Oldies " );
}
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Name Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_play_name_get ( $play_type , $play_id , $play_priority )
{
2013-08-27 18:36:46 +02:00
$play_info = lmb_play_info_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
2013-08-27 18:36:46 +02:00
return ( " { $play_info [ " name " ] } " );
}
2012-12-01 17:27:04 +01:00
2013-08-27 18:36:46 +02:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Title Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_play_title_get ( $play_type , $play_id , $play_priority )
{
$play_name = lmb_play_name_get ( $play_type , $play_id , $play_priority );
$play_type_name = lmb_play_type_name_get ( $play_type );
return ( " { $play_name } - { $play_type_name } " );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Play Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_play_page ( $play_type , $play_id , $play_priority )
{
global $lmb_tab ;
2013-08-27 18:36:46 +02:00
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$play_info = lmb_play_info_get ( $play_type , $play_id , $play_priority );
2013-08-27 18:36:46 +02:00
$play_title = lmb_play_title_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$play_image = " { $play_type } " ;
2015-08-07 01:43:15 +02:00
$play_name = lmb_play_type_name_get ( $play_type );
2015-09-07 21:23:56 +02:00
$skin_path = " { $play_path } /skin " ;
2012-12-01 17:27:04 +01:00
2013-08-27 18:36:46 +02:00
2015-08-07 01:43:15 +02:00
lmb_header ( 3 , " Langueur Monotone - { $play_title } Page " , " { $play_title } " , " Langueur Monotone play page, giving all the information about { $play_info [ " name " ] } { $play_name } " , " { $play_type } , { $play_info [ " name " ] } " , 0 , " { $skin_path } " );
lmb_play_body ( $play_type , $play_id , $play_priority , $skin_path );
lmb_footer ( $skin_path );
2012-12-01 17:27:04 +01:00
}
2013-12-30 17:47:19 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track List Page */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_tracklist_body ( $skin_path )
2013-12-30 17:47:19 +01:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2013-12-30 17:47:19 +01:00
$play_type = " * " ;
$play_id = " * " ;
$play_priority = " * " ;
$track_info_list = lmb_tracklist_info_get ( $play_type , $play_id , $play_priority );
usort ( $track_info_list , lmb_make_comparer ( 'title' , 'mix' ));
$track_nb = count ( $track_info_list );
ob_start ();
$size = $track_nb + 1 ;
$height = 220 / $size ;
for ( $i = 0 , $row = 1 ; $i < $track_nb ; $i ++ , $row ++ )
{
$css_row = ( $row + 1 ) % 2 + 1 ;
$play_type = " { $track_info_list [ $i ][ " play_type " ] } " ;
$play_type_name = lmb_play_type_name_get ( $play_type );
$play_id = " { $track_info_list [ $i ][ " play_id " ] } " ;
$play_priority = " { $track_info_list [ $i ][ " play_priority " ] } " ;
$track_id = str_pad ( " { $track_info_list [ $i ][ " id " ] } " , 2 , '0' , STR_PAD_LEFT );
$track_title = " { $track_info_list [ $i ][ " title " ] } " ;
$track_mix = " { $track_info_list [ $i ][ " mix " ] } " ;
$track_length = " { $track_info_list [ $i ][ " length " ] } " ;
$track_album = " { $track_info_list [ $i ][ " album " ] } " ;
2015-08-07 01:43:15 +02:00
$play_url = " { $lmb_url_post } ?page=play&type= { $play_type } &id= { $play_id } &priority= { $play_priority } " ;
$track_url = " { $lmb_url_post } ?page=track&type= { $play_type } &id= { $play_id } &priority= { $play_priority } &tid= { $track_id } " ;
2013-12-30 17:47:19 +01:00
echo " <tr class= \" tracks { $css_row } \" style= \" height: { $height } px; \" > " ;
2015-09-07 21:23:56 +02:00
echo " <td class= \" tracks1 \" > { $row } </td><td class= \" tracks2 \" > <div class= \" link-item \" ><a href= \" { $track_url } \" > { $track_title } </a></div> </td><td class= \" tracks3 \" > <div class= \" link-item \" ><a href= \" { $track_url } \" > { $track_mix } </a></div> </td><td class= \" tracks3 \" > { $track_length } </td><td class= \" tracks3 \" > { $play_type_name } </td><td class= \" tracks3 \" > <div class= \" link-item \" ><a href= \" { $play_url } \" > { $track_album } </a></div> </td></tr>
2013-12-30 17:47:19 +01:00
" ;
}
$data = ob_get_contents ();
ob_end_clean ();
2015-09-07 21:23:56 +02:00
// lmb_make_tab( "tracks", "tracks", "r", "{$skin_path}/images/lm_logo2-96.png", $data, $skin_path);
lmb_make_tab ( " tracks " , " tracks " , " r " , " sprite-lm-logo2-96 " , $data , $skin_path );
2013-12-30 17:47:19 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track List Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_tracklist_page ()
{
2015-08-07 01:43:15 +02:00
$skin_path = " /skin " ;
lmb_header ( 3 , " / " , " Langueur Monotone - Track List Page " , " Track List " , " Langueur Monotone track list page, listing all the released tracks " , " track list " , 0 , " { $skin_path } " );
lmb_tracklist_body ( $skin_path );
lmb_footer ( $skin_path );
2013-12-30 17:47:19 +01:00
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Info */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_info ( $play_type , $play_id , $play_priority , $track_id )
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2012-12-02 10:04:06 +01:00
$track_info = lmb_track_info_get ( $play_type , $play_id , $play_priority , $track_id );
$height = 220 / 8 ;
if ( $track_info [ " safe_creative " ] != " " )
{
$rowspan = 9 ;
}
else
{
$rowspan = 8 ;
}
2013-01-18 00:05:06 +01:00
/*
echo " <div itemscope itemtype= \" http://schema.org/MusicGroup \" >
< meta itemprop = \ " name \" content= \" { $track_info [ " artist " ] } \" >
< div itemprop = \ " tracks \" itemscope itemtype= \" http://schema.org/MusicRecording \" >
< meta itemprop = \ " inAlbum \" content= \" { $track_info [ " album " ] } \" >
< meta itemprop = \ " name \" content= \" { $track_info [ " title " ] } ( { $track_info [ " mix " ] } ) \" >
< meta itemprop = \ " url \" content= \" http://ddddddddd \" >
< meta itemprop = \ " author \" content= \" { $track_info [ " composer " ] } \" >
< meta itemprop = \ " duration \" content= \" PT10M33S \" >
</ div >
</ div >
" ;
*/
2012-12-02 10:04:06 +01:00
echo " <table class= \" list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
2013-01-02 22:31:56 +01:00
< tr >
< td >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr class = \ " info1 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Group Name</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" link-item \" ><a href= \" { $lmb_url_post } ?page=discography \" > { $track_info [ " artist " ] } </a></div></td>
2013-01-02 22:31:56 +01:00
</ tr >
< tr class = \ " info2 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Album</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" link-item \" ><a href= \" { $lmb_url_post } ?page=play&type= { $play_type } &id= { $play_id } &priority= { $play_priority } \" > { $track_info [ " album " ] } </a></div></td>
2013-01-02 22:31:56 +01:00
</ tr >
< tr class = \ " info1 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Track Number</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" normal-item \" > { $track_info [ " id " ] } </div></td>
2013-01-02 22:31:56 +01:00
</ tr >
< tr class = \ " info2 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Track Name</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" normal-item \" > { $track_info [ " title " ] } </div></td>
2013-01-02 22:31:56 +01:00
</ tr >
< tr class = \ " info1 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Mix Name</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" normal-item \" > { $track_info [ " mix " ] } </div></td>
2013-01-02 22:31:56 +01:00
</ tr >
< tr class = \ " info2 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Composer</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" normal-item \" > { $track_info [ " composer " ] } </div></td>
2013-01-02 22:31:56 +01:00
</ tr >
< tr class = \ " info1 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Comment</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" normal-item \" > { $track_info [ " comment " ] } </div></td>
2013-01-02 22:31:56 +01:00
</ tr >
< tr class = \ " info2 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Length</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" normal-item \" > { $track_info [ " length " ] } </div></td>
2013-01-02 22:31:56 +01:00
</ tr >
2012-12-02 10:04:06 +01:00
" ;
if ( $track_info [ " safe_creative " ] != " " )
{
2013-01-02 22:31:56 +01:00
echo " <tr class= \" info1 \" style= \" height: { $height } px; \" >
< td class = \ " info1 \" >Safe Creative</td>
2015-09-07 21:23:56 +02:00
< td class = \ " info2 \" ><div class= \" link-item \" ><a rel= \" nofollow \" href= \" { $track_info [ " safe_creative " ] } \" >Link</a></div></td>
2013-01-02 22:31:56 +01:00
</ tr >
2012-12-02 10:04:06 +01:00
" ;
}
2013-01-02 22:31:56 +01:00
echo " </tbody>
</ table >
</ td >
</ tr >
</ tbody >
2012-12-02 10:04:06 +01:00
</ table >
" ;
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Lyrics */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_lyrics ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix )
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$cover_path = " { $play_path } /covers/ { $play_id } -cover " ;
$logo_path = " { $play_path } /logos/ { $play_id } -logo " ;
$track_path = " { $play_path } /tracks " ;
$lyrics_file = " tracks/ { $track_name } / { $track_mix } /lyrics.txt " ;
2015-09-07 21:23:56 +02:00
echo " <table class= \" tab \" style= \" height: 100%; \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
2012-12-02 10:04:06 +01:00
< tbody >
< tr class = \ " lyrics1 \" >
< td class = \ " lyrics1 \" >
2013-01-18 00:05:06 +01:00
< br />
2012-12-02 10:04:06 +01:00
" ;
if ( file_exists ( " { $lyrics_file } " ))
{
$lyrics_string = file_get_contents ( " { $lyrics_file } " );
}
else
{
$lyrics_string = " No lyrics found... \n " ;
}
2013-01-18 00:05:06 +01:00
echo str_replace ( " \n " , " <br/> \n " , " { $lyrics_string } " );
2012-12-02 10:04:06 +01:00
2013-01-18 00:05:06 +01:00
echo " <br/>
2012-12-02 10:04:06 +01:00
</ td >
</ tr >
</ tbody >
</ table >
" ;
2015-08-07 01:43:15 +02:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Title Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_title_get ( $play_type , $play_id , $play_priority , $track_id )
{
$track_info = lmb_track_info_get ( $play_type , $play_id , $play_priority , $track_id );
return ( " { $track_info [ " title " ] } " );
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* FullTitle Get */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_fulltitle_get ( $play_type , $play_id , $play_priority , $track_id )
{
$track_info = lmb_track_info_get ( $play_type , $play_id , $play_priority , $track_id );
if ( " { $track_info [ " mix " ] } " == " " )
{
return ( " { $track_info [ " title " ] } " );
}
else
{
return ( " { $track_info [ " title " ] } ( { $track_info [ " mix " ] } ) " );
}
2012-12-02 10:04:06 +01:00
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* JPlayer Insert */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-09-07 21:23:56 +02:00
function lmb_jplayer_insert ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix )
2015-08-07 01:43:15 +02:00
{
global $lmb_cookie_tab ;
global $lmb_url_pre ;
global $lmb_url_post ;
global $lmb_jpi_enable ;
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$track_path = " { $play_path } /tracks " ;
if ( " { $track_mix } " == " " )
{
$track_file_base = " { $track_id } - { $track_name } " ;
}
else
{
$track_file_base = " { $track_id } - { $track_name } - { $track_mix } " ;
}
$track_file_ogg = " { $track_path } /ogg-256/ { $track_file_base } .ogg " ;
$track_file_mp3 = " { $track_path } /mp3-192/ { $track_file_base } .mp3 " ;
$track_fulltitle = lmb_fulltitle_get ( $play_type , $play_id , $play_priority , $track_id );
$solution_cookie = " jpsolution " ;
$prefix_url = " { $lmb_url_post } ?cookie_id= { $solution_cookie } &cookie_value= " ;
$query_string = preg_replace ( " /cookie_id= { $solution_cookie } &cookie_value=[^&]*&/ " , " " , " { $_SERVER [ 'QUERY_STRING' ] } " );
$solution_html_url = htmlentities ( " { $prefix_url } html, flash& { $query_string } " );
$solution_flash_url = htmlentities ( " { $prefix_url } flash, html& { $query_string } " );
$solution_native_url = htmlentities ( " { $prefix_url } native& { $query_string } " );
$solution_value = $lmb_cookie_tab [ $solution_cookie ];
if ( " { $solution_value } " == " html, flash " )
{
2015-09-07 21:23:56 +02:00
$html_class = " link-item-disabled " ;
$flash_class = " link-item " ;
$native_class = " link-item " ;
2015-08-07 01:43:15 +02:00
}
else
{
if ( " { $solution_value } " == " flash, html " )
{
2015-09-07 21:23:56 +02:00
$html_class = " link-item " ;
$flash_class = " link-item-disabled " ;
$native_class = " link-item " ;
2015-08-07 01:43:15 +02:00
}
else
{
2015-09-07 21:23:56 +02:00
$html_class = " link-item " ;
$flash_class = " link-item " ;
$native_class = " link-item-disabled " ;
2015-08-07 01:43:15 +02:00
}
}
if ( " { $solution_value } " == " native " )
{
echo "
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr style = \ " background-color:#222222; height: 75px; \" >
2015-09-07 21:23:56 +02:00
< td style = \ " vertical-align: middle; padding: 10px 0px 0px 0px; \" >
2015-08-07 01:43:15 +02:00
< audio controls autoplay style = \ " width: 90%; \" >
< source src = \ " http:// { $lmb_url_pre } / { $track_file_ogg } \" type= \" audio/ogg \" >
< source src = \ " http:// { $lmb_url_pre } / { $track_file_mp3 } \" type= \" audio/mpeg \" >
Your browser does not support the audio element .
</ audio >
</ td >
</ tr >
< tr style = \ " background-color:#222222; height: 25px; \" >
< td style = \ " horizontal-align: left; vertical-align: middle; \" >
< div style = \ " font-size: 12px; \" ><a rel= \" nofollow \" class= \" { $html_class } \" href= \" { $solution_html_url } \" >JPlayer HTML</a> <a rel= \" nofollow \" class= \" { $flash_class } \" href= \" { $solution_flash_url } \" >JPlayer Flash</a> <a rel= \" nofollow \" class= \" { $native_class } \" href= \" { $solution_native_url } \" >Native</a></div>
</ td >
</ tr >
</ tbody >
</ table >
" ;
}
else
{
echo "
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr >
< td style = \ " background-color:#3a2a45; border-top:1px solid #554461; border-bottom:1px solid #180a1f; border-left:1px solid #554461; \" > </td>
< td style = \ " width: 1%; \" >
< script type = \ " text/javascript \" src= \" /jplayer/lib/jquery.min.js \" ></script>
< script type = \ " text/javascript \" src= \" /jplayer/jquery.jplayer.min.js \" ></script>
< script type = \ " text/javascript \" src= \" /jplayer/jquery.jplayer.inspector.js \" ></script>
" ;
echo "
< script type = \ " text/javascript \" >
//<![CDATA[
$ ( document ) . ready ( function (){
$ ( \ " #jquery_jplayer_1 \" ).jPlayer( {
ready : function ( event ) {
$ ( this ) . jPlayer ( \ " setMedia \" , {
title : \ " { $track_fulltitle } \" ,
oga : \ " http:// { $lmb_url_pre } / { $track_file_ogg } \" ,
mp3 : \ " http:// { $lmb_url_pre } / { $track_file_mp3 } \"
}) . jPlayer ( \ " play \" );
},
swfPath : \ " /jplayer \" ,
supplied : \ " oga, mp3 \" ,
wmode : \ " window \" ,
useStateClassSkin : true ,
autoBlur : true ,
smoothPlayBar : false ,
keyEnabled : true ,
remainingDuration : true ,
toggleDuration : true ,
backgroundColor : \ " #012345 \"
});
$ ( \ " #jplayer_inspector \" ).jPlayerInspector( { jPlayer: $ ( \" #jquery_jplayer_1 \" )});
});
//]]>
</ script >
" ;
echo "
< div id = \ " jquery_jplayer_1 \" class= \" jp-jplayer \" ></div>
< div id = \ " jp_container_1 \" class= \" jp-audio \" role= \" application \" aria-label= \" media player \" >
< div class = \ " jp-type-single \" >
< div class = \ " jp-gui jp-interface \" >
< div class = \ " jp-volume-controls \" >
< button class = \ " jp-mute \" role= \" button \" tabindex= \" 0 \" >mute</button>
< button class = \ " jp-volume-max \" role= \" button \" tabindex= \" 0 \" >max volume</button>
< div class = \ " jp-volume-bar \" >
< div class = \ " jp-volume-bar-value \" ></div>
</ div >
</ div >
< div class = \ " jp-controls-holder \" >
< div class = \ " jp-controls \" >
< button class = \ " jp-play \" role= \" button \" tabindex= \" 0 \" >play</button>
< button class = \ " jp-stop \" role= \" button \" tabindex= \" 0 \" >stop</button>
</ div >
< div class = \ " jp-progress \" >
< div class = \ " jp-seek-bar \" >
< div class = \ " jp-play-bar \" ></div>
</ div >
</ div >
< div class = \ " jp-current-time \" role= \" timer \" aria-label= \" time \" > </div>
< div class = \ " jp-duration \" role= \" timer \" aria-label= \" duration \" > </div>
< div class = \ " jp-toggles \" >
< button class = \ " jp-repeat \" role= \" button \" tabindex= \" 0 \" >repeat</button>
</ div >
</ div >
</ div >
< div class = \ " jp-details \" >
< div class = \ " jp-title \" aria-label= \" title \" > </div>
</ div >
< div class = \ " jp-no-solution \" >
< span > Update Required </ span >
2015-09-07 21:23:56 +02:00
To play the media you will need to either update your browser to a recent version or update your < div class = \ " link-item \" ><a href= \" http://get.adobe.com/flashplayer/ \" target= \" _blank \" >Flash plugin</a></div>.
2015-08-07 01:43:15 +02:00
</ div >
< div >& nbsp ;
</ div >
< div style = \ " font-size: 12px; \" ><a rel= \" nofollow \" class= \" { $html_class } \" href= \" { $solution_html_url } \" >JPlayer HTML</a> <a rel= \" nofollow \" class= \" { $flash_class } \" href= \" { $solution_flash_url } \" >JPlayer Flash</a> <a rel= \" nofollow \" class= \" { $native_class } \" href= \" { $solution_native_url } \" >Native</a></div>
</ div >
</ div >
" ;
echo " </td>
< td style = \ " background-color:#3a2a45; border-top:1px solid #554461; border-bottom:1px solid #180a1f; border-right:1px solid #180a1f; \" > </td>
</ tr >
</ tbody >
</ table >
" ;
if ( $lmb_jpi_enable == true )
{
echo " <div id= \" jplayer_inspector \" ></div> " ;
}
}
}
2012-12-01 17:27:04 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Introduction */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_track_intro ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$cover_path = " { $play_path } /covers/ { $play_id } -cover " ;
$logo_path = " { $play_path } /logos/ { $play_id } -logo " ;
$track_path = " { $play_path } /tracks " ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$cover_size = 400 ;
$border1_size = $cover_size + 30 ;
$border2_size = $cover_size + 10 ;
2012-12-01 17:27:04 +01:00
2012-12-02 10:04:06 +01:00
2013-01-18 00:05:06 +01:00
echo " <tr><td><br/></td></tr>
2012-12-01 17:27:04 +01:00
< tr >
< td class = \ " body \" colspan= \" 3 \" rowspan= \" 1 \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
< tbody >
< tr >
2012-12-02 10:04:06 +01:00
< td >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
2012-12-01 17:27:04 +01:00
< tbody >
< tr >
2012-12-02 10:04:06 +01:00
< td rowspan = \ " 2 \" style= \" width: { $border1_size } px; height: { $border1_size } px; \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " cover \" style= \" width: { $border2_size } px; height: { $border2_size } px; \" ><a href= \" { $cover_path } -1-1024.png \" ><img class= \" button-item-big \" src= \" { $cover_path } -1- { $cover_size } .png \" alt= \" \" /></a></td>
2012-12-02 10:04:06 +01:00
</ tr >
</ tbody >
</ table >
</ td >
< td style = \ " height: 40px; width: auto; \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
2013-08-20 18:32:00 +02:00
< tr class = \ " info0 \" style= \" height: 0px; \" >
2013-01-02 22:31:56 +01:00
< td class = \ " info0 \" >Informations</td>
</ tr >
2012-12-02 10:04:06 +01:00
< tr >
< td >
2012-12-01 17:27:04 +01:00
" ;
lmb_track_info ( $play_type , $play_id , $play_priority , $track_id );
2013-01-18 00:05:06 +01:00
// echo "<br/>";
2012-12-01 17:27:04 +01:00
2012-12-02 10:04:06 +01:00
echo " </td>
</ tr >
</ tbody >
</ table >
</ td >
2012-12-01 17:27:04 +01:00
</ tr >
< tr >
< td >
2012-12-02 10:04:06 +01:00
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
< tr >
< td >
2012-12-01 17:27:04 +01:00
" ;
2015-09-07 21:23:56 +02:00
lmb_jplayer_insert ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix );
2012-12-01 17:27:04 +01:00
2012-12-02 10:04:06 +01:00
echo " </td>
</ tr >
</ tbody >
</ table >
</ td >
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
< tr >
2012-12-02 10:04:06 +01:00
< td >
2012-12-19 00:49:57 +01:00
< table class = \ " tab \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" style= \" \" >
2012-12-01 17:27:04 +01:00
< tbody >
2012-12-02 10:04:06 +01:00
< tr >
2015-09-07 21:23:56 +02:00
< td style = \ " height: 100%; vertical-align: bottom; \" >
2012-12-19 00:49:57 +01:00
< table class = \ " tab \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" text-align: left; width: 100%; height: 100%; \" >
2012-12-02 10:04:06 +01:00
< tbody >
< tr >
< td >
2012-12-01 17:27:04 +01:00
" ;
lmb_track_lyrics ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix );
2012-12-02 10:04:06 +01:00
echo " </td>
</ tr >
2013-01-02 22:31:56 +01:00
< tr class = \ " lyrics0 \" >
< td class = \ " lyrics0 \" >Lyrics</td>
</ tr >
2012-12-02 10:04:06 +01:00
</ tbody >
</ table >
</ td >
< td style = \ " width: { $border1_size } px; height: { $border1_size } px; vertical-align:bottom \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" style= \" \" >
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " cover \" style= \" width: { $border2_size } px; height: { $border2_size } px; \" ><a href= \" { $cover_path } -2-1024.png \" ><img class= \" button-item-big \" src= \" { $cover_path } -2- { $cover_size } .png \" alt= \" \" /></a></td>
2012-12-02 10:04:06 +01:00
</ tr >
</ tbody >
</ table >
</ td >
2012-12-01 17:27:04 +01:00
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
</ tbody >
</ table >
2013-01-18 00:05:06 +01:00
</ td >
2012-12-01 17:27:04 +01:00
</ tr >
2013-01-18 00:05:06 +01:00
< tr >< td >< br />< br />< br />< br />< br /></ td ></ tr >
2012-12-01 17:27:04 +01:00
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Download */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_track_download ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
$logo_path = " { $play_path } /logos/ { $play_id } -logo " ;
$track_path = " { $play_path } /tracks " ;
2012-12-01 17:27:04 +01:00
$file_tag = lmb_track_file_tag_get ( $play_type , $play_id , $play_priority , $track_id );
2013-01-18 00:05:06 +01:00
echo " <tr><td><br/></td></tr>
2012-12-01 17:27:04 +01:00
< tr >
< td colspan = \ " 3 \" >
2013-01-02 22:31:56 +01:00
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 10 \" >
2012-12-01 17:27:04 +01:00
< tbody >
< tr >
2015-09-07 21:23:56 +02:00
< td class = \ " logo \" style= \" width: 128px; \" ><div class= \" sprite-lm-logo1-96 \" ></div></td>
2012-12-01 17:27:04 +01:00
< td class = \ " body \" >
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
< tr class = \ " row0 \" >
< td class = \ " title_r \" colspan= \" 5 \" >Download </td>
</ tr >
< tr class = \ " row3 \" > { $file_tag } </tr>
</ tbody >
</ table >
2013-01-18 00:05:06 +01:00
< br />
2012-12-01 17:27:04 +01:00
< table class = \ " list \" border= \" 0 \" cellpadding= \" 0 \" cellspacing= \" 0 \" >
< tbody >
" ;
2013-03-21 17:21:45 +01:00
$mix_list = glob ( " discography/*/*/tracks/flac/*- { $track_name } *.flac " );
2012-12-01 17:27:04 +01:00
for ( $i = 0 , $k = 0 ; $i < count ( $mix_list ); $i ++ )
{
$path_tab = explode ( " / " , $mix_list [ $i ]);
$play_tab = explode ( " - " , $path_tab [ 2 ]);
$track_tab = explode ( " - " , $path_tab [ 5 ]);
2013-08-20 18:32:00 +02:00
$play_type = $path_tab [ 1 ];
$play_pri = $play_tab [ 0 ];
$play_id = $play_tab [ 1 ];
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
if ( file_exists ( " discography/ { $play_type } / { $play_pri } - { $play_id } /.hide " ))
{
$hide = " y " ;
}
else
{
$hide = " n " ;
}
2012-12-01 17:27:04 +01:00
2013-08-20 18:32:00 +02:00
if ( ( $hide == " n " ) || lmb_admin_is ())
{
$mix_tab [ $k ][ " hide " ] = $hide ;
$mix_tab [ $k ][ " play_type " ] = $play_type ;
$mix_tab [ $k ][ " play_type_name " ] = lmb_play_type_name_get ( $path_tab [ 1 ]);
$mix_tab [ $k ][ " play_id " ] = $play_id ;
$mix_tab [ $k ][ " play_pri " ] = $play_pri ;
$mix_tab [ $k ][ " track_id " ] = $track_tab [ 0 ];
2015-08-07 01:43:15 +02:00
$mix_tab [ $k ][ " play_url " ] = " { $lmb_url_post } ?page=play&type= { $mix_tab [ $k ][ " play_type " ] } &id= { $mix_tab [ $k ][ " play_id " ] } &priority= { $mix_tab [ $k ][ " play_pri " ] } " ;
$mix_tab [ $k ][ " mix_url " ] = " { $lmb_url_post } ?page=track&type= { $mix_tab [ $k ][ " play_type " ] } &id= { $mix_tab [ $k ][ " play_id " ] } &priority= { $mix_tab [ $k ][ " play_pri " ] } &tid= { $mix_tab [ $k ][ " track_id " ] } " ;
2013-08-20 18:32:00 +02:00
$track_info = lmb_track_info_get ( $mix_tab [ $k ][ " play_type " ], $mix_tab [ $k ][ " play_id " ], $mix_tab [ $k ][ " play_pri " ], $mix_tab [ $k ][ " track_id " ]);
$mix_tab [ $k ][ " track_name " ] = $track_info [ " title " ];
$mix_tab [ $k ][ " mix_name " ] = $track_info [ " mix " ];
$mix_tab [ $k ][ " play_name " ] = $track_info [ " album " ];
$k ++ ;
}
2012-12-01 17:27:04 +01:00
}
2013-08-20 18:32:00 +02:00
2012-12-01 17:27:04 +01:00
2015-12-04 11:40:41 +01:00
if ( isset ( $mix_tab ))
2012-12-01 17:27:04 +01:00
{
2015-12-04 11:40:41 +01:00
for ( $k = 0 ; $k < count ( $mix_tab ); $k ++ )
{
if ( " { $mix_tab [ $k ][ " hide " ] } " == " y " )
{
$hide_flag = " * " ;
}
else
{
$hide_flag = " " ;
}
$css_row = ( $k + 1 + count ( $mix_tab )) % 2 + 3 ;
echo " <tr class= \" row ${ css_row } \" >
2015-09-07 21:23:56 +02:00
< td class = \ " tracks2 \" ><div class= \" link-item \" ><a href= \" { $mix_tab [ $k ][ " mix_url " ] } \" > { $mix_tab [ $k ][ " track_name " ] } { $hide_flag } </a></div></td>
< td class = \ " tracks3 \" ><div class= \" link-item \" ><a href= \" { $mix_tab [ $k ][ " mix_url " ] } \" > { $mix_tab [ $k ][ " mix_name " ] } </a></div></td>
2012-12-02 10:04:06 +01:00
< td class = \ " tracks2 \" > { $mix_tab [ $k ][ " play_type_name " ] } </td>
2015-09-07 21:23:56 +02:00
< td class = \ " tracks3 \" ><div class= \" link-item \" ><a href= \" { $mix_tab [ $k ][ " play_url " ] } \" > { $mix_tab [ $k ][ " play_name " ] } </a></div></td>
2012-12-01 17:27:04 +01:00
</ tr >
" ;
2015-12-04 11:40:41 +01:00
}
2012-12-01 17:27:04 +01:00
}
2015-12-04 11:40:41 +01:00
2012-12-01 17:27:04 +01:00
echo " <tr class= \" row0 \" >
< td class = \ " title_r \" colspan= \" 4 \" >Mixes </td>
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
</ tbody >
</ table >
</ td >
</ tr >
" ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Body */
/*--------------------------------------------------------------------------------------------------------------------*/
2015-08-07 01:43:15 +02:00
function lmb_track_body ( $play_type , $play_id , $play_priority , $track_id , $skin_path )
2012-12-01 17:27:04 +01:00
{
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$track_path = " { $play_path } /tracks " ;
$track_file_name = glob ( " { $track_path } /flac/ $track_id -*.flac " );
$tab = explode ( " - " , basename ( " { $track_file_name [ 0 ] } " , " .flac " ));
$track_name = $tab [ 1 ];
2015-12-04 11:40:41 +01:00
if ( isset ( $tab [ 2 ]))
{
$track_mix = $tab [ 2 ];
}
else
{
$track_mix = " " ;
}
2012-12-01 17:27:04 +01:00
/* --- Introduction --- */
2015-08-07 01:43:15 +02:00
lmb_track_intro ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix , $skin_path );
2012-12-01 17:27:04 +01:00
/* --- Download --- */
2015-08-07 01:43:15 +02:00
lmb_track_download ( $play_type , $play_id , $play_priority , $track_id , $track_name , $track_mix , $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Page */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_page ( $play_type , $play_id , $play_priority , $track_id )
{
global $lmb_tab ;
2015-08-07 01:43:15 +02:00
$play_path = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2015-09-07 21:23:56 +02:00
$skin_path = " { $play_path } /skin " ;
2015-08-07 01:43:15 +02:00
$track_title = lmb_title_get ( $play_type , $play_id , $play_priority , $track_id );
$track_fulltitle = lmb_fulltitle_get ( $play_type , $play_id , $play_priority , $track_id );
2013-03-21 17:21:45 +01:00
2015-08-07 01:43:15 +02:00
lmb_header ( 4 , " Langueur Monotone - { $track_fulltitle } - Track Page " , " { $track_fulltitle } - Track " , " Langueur Monotone track page, giving all the information about { $track_fulltitle } track " , " track, { $track_title } , { $track_fulltitle } " , 962 , " { $skin_path } " );
lmb_track_body ( $play_type , $play_id , $play_priority , $track_id , $skin_path );
lmb_footer ( $skin_path );
2012-12-01 17:27:04 +01:00
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Download ZIP */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_download_zip ( $directory , $file_list , $mode )
{
switch ( $mode )
{
case " SIZE " :
{
return ( exec ( " cd { $directory } ; du -cb ${ file_list } | tail -1 | cut -f 1 " ));
}
case " RSIZE " :
{
return ( exec ( " cd { $directory } ; zip -0 -j -p - ${ file_list } | wc -c " ));
}
case " DUMP " :
{
passthru ( " cd { $directory } ; zip -0 -j -p - ${ file_list } " );
break ;
}
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Download File */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_download_file ( $play_dir , $file_list , $mode , $download_name )
{
if ( $mode == " SIZE " )
{
return ( lmb_download_zip ( " { $play_dir } " , $file_list , " SIZE " ));
}
else
{
$zip_size = lmb_download_zip ( " { $play_dir } " , $file_list , " RSIZE " );
header ( " Content-Description: Langueur Monotone - { $download_name } " );
header ( 'Content-Type: application/zip' );
header ( 'Content-Disposition: attachment; filename="' . " langueur_monotone- { $download_name } .zip " . '"' );
header ( 'Content-Length: ' . $zip_size );
$zip_size = lmb_download_zip ( " { $play_dir } " , $file_list , " DUMP " );
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Download Tracks */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_download_tracks ( $play_type , $play_id , $play_priority , $file_type , $mode )
{
2015-08-07 01:43:15 +02:00
$play_dir = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$file_list = " tracks/ { $file_type } /* covers/ { $play_id } -*-800.png " ;
return ( lmb_download_file ( $play_dir , $file_list , $mode , " { $play_id } - { $file_type } " ));
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Download Covers */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_download_covers ( $play_type , $play_id , $play_priority , $cover_format , $mode )
{
2015-08-07 01:43:15 +02:00
$play_dir = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$file_list = " covers/ { $play_id } -cover-*- { $cover_format } .png " ;
return ( lmb_download_file ( $play_dir , $file_list , $mode , " { $play_id } - { $cover_format } " ));
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Download Videos */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_download_videos ( $play_type , $play_id , $play_priority , $video_format , $mode )
{
2015-08-07 01:43:15 +02:00
$play_dir = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$file_list = " videos/*- { $video_format } .avi " ;
return ( lmb_download_file ( $play_dir , $file_list , $mode , " { $play_id } - { $video_format } " ));
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Download Extras */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_download_extras ( $play_type , $play_id , $play_priority , $extra_format , $mode )
{
2015-08-07 01:43:15 +02:00
$play_dir = lmb_play_path_get ( $play_type , $play_id , $play_priority );
2012-12-01 17:27:04 +01:00
$file_list = " extras/ { $play_id } -*- { $extra_format } .png " ;
return ( lmb_download_file ( $play_dir , $file_list , $mode , " { $play_id } - { $extra_format } " ));
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_body ( $id , $name , $curver , $currel )
{
global $lmb_download_http_url ;
global $lmb_download_ftp_url ;
$description = lmb_tag_get ( $id , $curver , $currel , " " , " % { DESCRIPTION} " );
$change_log = lmb_tag_get ( $id , $curver , $currel , " " , " % { CHANGELOGTIME:date} % { CHANGELOGNAME} \n % { CHANGELOGTEXT} " );
echo " <P>
2013-01-18 00:05:06 +01:00
< BR />
< BR />
2012-12-01 17:27:04 +01:00
</ P >
< PRE >
" ;
lmb_tab_dump ( $description , 0 );
echo " </PRE>
< P >
2013-01-18 00:05:06 +01:00
< BR />
< BR />
2012-12-01 17:27:04 +01:00
</ P >
" ;
echo " <P>
2013-01-18 00:05:06 +01:00
< BR />
2012-12-01 17:27:04 +01:00
</ P >
< HR >
< H5 > Last Release Notes :</ H5 >
" ;
echo " <PRE>
" ;
lmb_tab_dump ( $change_log , 0 );
echo " </PRE>
" ;
$lmb_list = lmb_list_get ( $id , $curver , $currel );
if ( $lmb_list != " " )
{
echo " <HR>
< H5 > Sub - Package List :</ H5 >< P > " ;
for ( $i = 0 ; $i < count ( $lmb_list ); $i ++ )
{
echo " $lmb_list[$i] " ;
}
echo " </P>
" ;
}
echo " <HR>
< H5 > " ;
echo " <A HREF= \" ?pkg= $id &cl=yes \" > $name changelog page</A> " ;
echo " <A HREF= \" ?pkg= $id &fl=yes \" > $name file list page</A> " ;
echo " <A HREF= \" $lmb_download_http_url / $id\ " > $name HTTP download page </ A >& nbsp ; & nbsp ; & nbsp ; " ;
echo " <A HREF= \" $lmb_download_ftp_url / $id\ " > $name FTP download page </ A >& nbsp ; & nbsp ; & nbsp ; " ;
echo " </H5> " ;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_page ( $lmb_id , $lmb_name , $lmb_curver , $lmb_currel )
{
$summary = lmb_tag_get ( $lmb_id , $lmb_curver , $lmb_currel , " " , " % { SUMMARY} " );
$lmb_summary = $summary [ 0 ];
lmb_header ( $lmb_id , $lmb_name , $lmb_summary , $lmb_curver , $lmb_currel );
lmb_body ( $lmb_id , $lmb_name , $pkg_curver , $pkg_currel );
pkg_footer ();
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_cl_header ( $id , $name , $curver , $currel )
{
$page_name = " Rx3 $name ChangeLog Page " ;
$page_title = " $page_name " ;
2015-08-07 01:43:15 +02:00
global $lmb_url_post ;
2012-12-01 17:27:04 +01:00
global $lmb_header ;
global $lmb_keywords ;
$keywords = " $lmb_keywords , $id , rx3 $id changelog " ;
include " $lmb_header " ;
echo " <META NAME= \" keywords \" CONTENT= \" $keywords\ " >
< TITLE > $page_name </ TITLE >
</ HEAD >
< BODY >
< H1 > $page_title </ H1 >
< H4 > $curver - $currel </ H4 >
2015-08-07 01:43:15 +02:00
< H5 >< A HREF = \ " .. \" >Rx3.Org Main Page</A> / <A HREF= \" $lmb_url_post\ " > Rx3 Free Software Packaging Main Page </ A >& nbsp ; & nbsp ; /& nbsp ; & nbsp ; < A HREF = \ " $lmb_url_post ?pkg= $id\ " > Rx3 $name Home Page </ A ></ H5 >
2012-12-01 17:27:04 +01:00
< HR >
" ;
}
2012-12-19 00:49:57 +01:00
/*--------------------------------------------------------------------------------------------------------------------*/
/* Get Proceed */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_get_proceed ( $get_array )
{
2013-08-20 18:32:00 +02:00
global $lmb_tab ;
2012-12-19 00:49:57 +01:00
lmb_admin_update ();
lmb_cookie_update ( $get_array );
2013-08-20 18:32:00 +02:00
if ( array_key_exists ( " page " , $get_array ))
{
$page_id = $get_array [ " page " ];
}
else
{
$page_id = " " ;
}
2012-12-01 17:27:04 +01:00
switch ( $page_id )
{
2013-08-27 18:36:46 +02:00
case " sitemap " :
{
lmb_sitemap_page ( );
break ;
}
2013-08-20 18:32:00 +02:00
case " rss " :
{
lmb_rss_page ( );
break ;
}
2012-12-01 17:27:04 +01:00
case " about " :
{
lmb_about_page ( $lmb_tab );
break ;
}
case " discography " :
{
lmb_discography_page ( $lmb_tab );
break ;
}
case " play " :
{
$play_type = $get_array [ " type " ];
$play_id = $get_array [ " id " ];
$play_priority = $get_array [ " priority " ];
lmb_play_page ( $play_type , $play_id , $play_priority );
break ;
}
2013-12-30 17:47:19 +01:00
case " tracklist " :
{
lmb_tracklist_page ();
break ;
}
2012-12-01 17:27:04 +01:00
case " track " :
{
$play_type = $get_array [ " type " ];
$play_id = $get_array [ " id " ];
$play_priority = $get_array [ " priority " ];
$track_id = $get_array [ " tid " ];
lmb_track_page ( $play_type , $play_id , $play_priority , $track_id );
break ;
}
case " download " :
{
$play_type = $get_array [ " type " ];
$play_id = $get_array [ " id " ];
$play_priority = $get_array [ " priority " ];
$download_type = $get_array [ " dtype " ];
switch ( " { $download_type } " )
{
case " track " :
{
$file_type = $get_array [ " ftype " ];
lmb_download_tracks ( $play_type , $play_id , $play_priority , $file_type , " DUMP " );
break ;
}
case " cover " :
{
$cover_format = $get_array [ " cformat " ];
lmb_download_covers ( $play_type , $play_id , $play_priority , $cover_format , " DUMP " );
break ;
}
case " video " :
{
$video_format = $get_array [ " vformat " ];
lmb_download_videos ( $play_type , $play_id , $play_priority , $video_format , " DUMP " );
break ;
}
case " extra " :
{
$extra_format = $get_array [ " eformat " ];
lmb_download_extras ( $play_type , $play_id , $play_priority , $extra_format , " DUMP " );
break ;
}
}
break ;
}
2012-12-19 00:49:57 +01:00
case " login " :
{
lmb_login_page ( $lmb_tab );
break ;
}
2012-12-01 17:27:04 +01:00
default :
{
2013-08-20 18:32:00 +02:00
lmb_main_page ( );
2012-12-01 17:27:04 +01:00
break ;
}
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Main */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_cookie_tab = array ();
lmb_cookies_load ();
lmb_get_proceed ( $_GET );
?>