861aca911c
Start .hide file support, Add statistics button.
2847 lines
98 KiB
PHP
2847 lines
98 KiB
PHP
<?
|
|
// $RCSfile: lmbrowse.php,v $
|
|
// $Revision: 1.3 $
|
|
// $Name: $
|
|
// $Date: 2012/12/18 23:49:57 $
|
|
// $Author: agibert $
|
|
|
|
/*
|
|
* LMBrowse - Langueur Monotone Browser
|
|
* Copyright (C) 2012 Arnaud G. GIBERT
|
|
* 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());
|
|
return ((float)$usec + (float)$sec);
|
|
}
|
|
|
|
$time_start = microtime_float();
|
|
|
|
|
|
|
|
include "/var/httpd/www.langueur-monotone.com/html/lmbrowse_config.inc";
|
|
|
|
$lmb_myname="LMBrowse";
|
|
$lmb_tag_tab=explode( " ", "$Name: $");
|
|
$lmb_tag_tab=explode( "-", $lmb_tag_tab[1]);
|
|
$lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", ".");
|
|
|
|
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Admin Is */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_admin_is()
|
|
{
|
|
global $lmb_password;
|
|
global $lmb_cookie_tab;
|
|
|
|
|
|
$admin = $lmb_cookie_tab["admin"];
|
|
|
|
if( $admin == $lmb_password)
|
|
{
|
|
return( true);
|
|
}
|
|
else
|
|
{
|
|
return( false);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Admin Update */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_admin_update()
|
|
{
|
|
global $lmb_password;
|
|
global $lmb_cookie_tab;
|
|
|
|
|
|
$passwd = $_POST["password"];
|
|
|
|
|
|
if( $passwd != "")
|
|
{
|
|
if( $passwd == $lmb_password)
|
|
{
|
|
lmb_cookie_set( "admin", $lmb_password, 360000);
|
|
}
|
|
else
|
|
{
|
|
lmb_cookie_set( "admin", "", 360000);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* 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(
|
|
"\n",
|
|
"&"
|
|
);
|
|
|
|
$replace_tab = array(
|
|
"<br>\n ",
|
|
"&"
|
|
);
|
|
|
|
return( str_replace( $search_tab, $replace_tab, $input_text));
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Make Tab */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_make_tab( $tab_id, $css_id, $tab_side, $logo_path, $data)
|
|
{
|
|
$tab_file = "tab-{$tab_id}-{$tab_side}.png";
|
|
$image_path = "/images";
|
|
$tab_path = "{$image_path}/{$tab_file}";
|
|
|
|
if( "$tab_side" == "l")
|
|
{
|
|
$logo_side="r";
|
|
}
|
|
else
|
|
{
|
|
$logo_side="l";
|
|
}
|
|
|
|
$tab_tag = "<td class=\"{$css_id}0\"><img src=\"{$tab_path}\" alt=\"\"></td>";
|
|
$logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><img src=\"{$logo_path}\" alt=\"\"></td>";
|
|
|
|
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++)
|
|
{
|
|
echo "<br>";
|
|
}
|
|
|
|
echo "</td></tr>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Menu */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_menu( $menu_id)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
for( $i = 0; $i < 3; $i++)
|
|
{
|
|
if( $i == $menu_id)
|
|
{
|
|
$mode="off";
|
|
}
|
|
else
|
|
{
|
|
$mode="on";
|
|
}
|
|
|
|
switch($i)
|
|
{
|
|
case 0:
|
|
{
|
|
if( $i == $menu_id)
|
|
{
|
|
echo " <td class=\"menu-item\" style=\"width: 128px;\"><img class=\"menu-item\" src=\"/images/menu-home_page-off.png\" alt=\"Home Page\"></td>
|
|
";
|
|
}
|
|
else
|
|
{
|
|
|
|
echo " <td class=\"menu-item\" style=\"width: 128px;\"><a class=\"menu-home_page\" href=\"{$lmb_url}\"></a></td>
|
|
";
|
|
}
|
|
break;
|
|
}
|
|
|
|
case 1:
|
|
{
|
|
if( $i == $menu_id)
|
|
{
|
|
echo " <td class=\"menu-item\" style=\"width: 128px;\"><img class=\"menu-item\" src=\"/images/menu-about-off.png\" alt=\"About\"></td>
|
|
";
|
|
}
|
|
else
|
|
{
|
|
echo " <td class=\"menu-item\" style=\"width: 128px;\"><a class=\"menu-about\" href=\"{$lmb_url}?page=about\"></a></td>
|
|
";
|
|
}
|
|
break;
|
|
}
|
|
|
|
case 2:
|
|
{
|
|
if( $i == $menu_id)
|
|
{
|
|
echo " <td class=\"menu-item\" style=\"width: 128px;\"><img class=\"menu-item\" src=\"/images/menu-discography-off.png\" alt=\"Discography\"></td>
|
|
";
|
|
}
|
|
else
|
|
{
|
|
echo " <td class=\"menu-item\" style=\"width: 128px;\"><a class=\"menu-discography\" href=\"{$lmb_url}?page=discography\"></a></td>
|
|
";
|
|
}
|
|
break;
|
|
}
|
|
|
|
default:
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
|
|
if( $i < 2)
|
|
{
|
|
echo " <td class=\"menu-item\" style=\"width: 20px;\"><img class=\"menu-item\" src=\"/images/menu-bg.png\" alt=\"\"></td>
|
|
";
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Header */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_header( $page_id, $page_name, $img_path, $img_alt, $keywords, $min_width)
|
|
{
|
|
global $lmb_keywords;
|
|
|
|
|
|
$page_title = "$page_name";
|
|
$keywords = "$lmb_keywords,$keywords";
|
|
|
|
|
|
if( $min_width != 0)
|
|
{
|
|
$mw_tag = "min-width: {$min_width}px;";
|
|
}
|
|
else
|
|
{
|
|
$mw_tag = "";
|
|
}
|
|
|
|
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
|
|
<meta name=\"keywords\" content=\"$keywords\">
|
|
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/images/lm-icon2.ico\">
|
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"/default.css\">
|
|
<link rel=\"stylesheet\" type=\"text/css\" href=\"/jplayer/pink.flag/jplayer.pink.flag.css\" >
|
|
<title>$page_name</title>
|
|
";
|
|
|
|
echo " </head>
|
|
<body style=\"background-image:url(''); background-repeat:repeat;\">
|
|
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"{$mw_tag}\">
|
|
<tbody>
|
|
<tr>
|
|
<td class=\"border\" colspan=\"2\"><img src=\"/images/border-top-left.png\" alt=\"\"></td>
|
|
<td></td>
|
|
<td class=\"border\"><img src=\"/images/title-1.png\" alt=\"\"></td>
|
|
<td class=\"border\" style=\"width: 540px;\"><img src=\"/images/title-3.png\" alt=\"Langueur Monotone\"></td>
|
|
<td class=\"border\"><img src=\"/images/title-5.png\" alt=\"\"></td>
|
|
<td></td>
|
|
<td class=\"border\" colspan=\"2\"><img src=\"/images/border-top-right.png\" alt=\"\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=\"2\"></td>
|
|
<td></td>
|
|
<td></td>
|
|
";
|
|
|
|
echo " <td style=\"height: 70px;\"><img src=\"$img_path\" alt=\"$img_alt\"></td>
|
|
";
|
|
|
|
|
|
echo " <td></td>
|
|
<td></td>
|
|
<td colspan=\"2\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=\"1\" rowspan=\"3\" style=\"vertical-align: middle; height: 16px;\"><img src=\"/images/border-left.png\" alt=\"\"></td>
|
|
<td colspan=\"2\"></td>
|
|
<td></td>
|
|
<td style=\"height: 16px;\"></td>
|
|
<td></td>
|
|
<td colspan=\"2\"></td>
|
|
<td colspan=\"1\" rowspan=\"3\" style=\"vertical-align: middle; height: 16px;\"><img src=\"/images/border-right.png\" alt=\"\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td style=\"vertical-align: top; height: 30px; text-align: center; \" rowspan=\"1\" colspan=\"7\">
|
|
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td style=\"width: 16px; vertical-align: top;\"><img class=\"menu-item\" src=\"/images/menu-begin.png\" alt=\"\"></td>
|
|
|
|
<td class=\"menu-bg\"></td>
|
|
";
|
|
|
|
lmb_menu($page_id);
|
|
|
|
echo " <td class=\"menu-bg\"></td>
|
|
<td style=\"width: 16px; vertical-align: top;\"><img class=\"menu-item\"src=\"/images/menu-end.png\" alt=\"\"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<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 */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_footer()
|
|
{
|
|
global $lmb_myname;
|
|
global $lmb_myver;
|
|
global $lmb_body_footer;
|
|
global $lmb_page_footer;
|
|
global $time_start;
|
|
|
|
|
|
echo " </tbody>
|
|
</table>
|
|
</td>
|
|
<td style=\"vertical-align: top; width: 16px;\"></td>
|
|
</tr>
|
|
";
|
|
|
|
echo " </tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style=\"vertical-align: top; height: 20px; text-align: right;\" colspan=\"2\"><img src=\"/images/line-l.png\" alt=\"\"> </td>
|
|
|
|
<td class=\"line-bg\" colspan=\"5\"></td>
|
|
|
|
<td style=\"vertical-align: top; height: 20px; text-align: left;\" colspan=\"2\"><img src=\"/images/line-r.png\" alt=\"\"> </td>
|
|
</tr>
|
|
<tr class=\"border\" style=\"height: 35px;\">
|
|
<td colspan=\"2\" rowspan=\"2\"><img src=\"/images/border-bottom-left.png\" alt=\"\"></td>
|
|
<td colspan=\"5\">
|
|
<table style=\"text-align: left; width: 100%; height: auto;\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
<tr>
|
|
<td class=\"body\">
|
|
<table style=\"width: 100%; height: auto; text-align: left; \" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
<tr>
|
|
<td style=\"width: 16px;\"></td>
|
|
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-w3c-html\" href=\"http://validator.w3.org/check?uri=referer\" title=\"W3C HTML Validator\"></a></td>
|
|
<td style=\"width: 8px;\"> </td>
|
|
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-w3c-css\" href=\"http://jigsaw.w3.org/css-validator/check/referer\" title=\"W3C CSS Validator\"></a></td>
|
|
<td style=\"width: 8px;\"> </td>
|
|
<td class=\"button-item\" style=\"width: 96px;\"><a class=\"button-rx3\" href=\"http://www.rx3.net/\" title=\"Rx3.Net\"></a></td>
|
|
<td style=\"width: 8px;\"> </td>
|
|
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-safe_creative\" href=\"http://www.safecreative.org/\" title=\"SafeCreative\"></a></td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td style=\"width: 20%;\">
|
|
<table style=\"width: 100%; height: auto; text-align: left; \" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
<tr>
|
|
";
|
|
|
|
if( lmb_admin_is())
|
|
{
|
|
echo " <td></td>
|
|
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-stats\" href=\"/www-stats/\" title=\"Statistics\"></a></td>
|
|
<td style=\"width: 8px;\"> </td>
|
|
<td class=\"button-item\" style=\"width: 32px;\">
|
|
<form name=\"login\" action=\"{$lmb_url}\" method=\"post\">
|
|
<input type=\"hidden\" name=\"password\" value=\"XXX\">
|
|
<input class=\"logout\" type=\"submit\" value=\"\" title=\"Logout\">
|
|
</form>
|
|
</td>
|
|
<td></td>
|
|
";
|
|
}
|
|
else
|
|
{
|
|
echo " <td class=\"button-item\" style=\"\">
|
|
<form name=\"login\" action=\"{$lmb_url}\" method=\"post\">
|
|
<input class=\"password\" type=\"password\" name=\"password\" size=\"8\" title=\"Password\">
|
|
<input class=\"login\" type=\"submit\" value=\"\" title=\"Login\">
|
|
</form>
|
|
</td>
|
|
";
|
|
}
|
|
|
|
|
|
$time_stop = microtime_float();
|
|
$time_elaps = intval( ( $time_stop - $time_start) * 1000) / 1000;
|
|
|
|
echo " </tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td class=\"bottext\">Page generated in $time_elaps seconds by <a href=\"http://www.rx3.org/dvp/?dvp=".strtolower($lmb_myname)."\">{$lmb_myname}</a> V {$lmb_myver}</td>
|
|
";
|
|
|
|
echo " </tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td class=\"border\" colspan=\"2\" rowspan=\"2\"><img src=\"/images/border-bottom-right.png\" alt=\"\"></td>
|
|
</tr>
|
|
<tr>
|
|
<td style=\"vertical-align: top;\"></td>
|
|
<td colspan=\"3\" rowspan=\"1\" style=\"height: 15px; vertical-align: top; text-align: center;\"><img src=\"/images/border-bottom.png\" alt=\"\"></td>
|
|
<td style=\"vertical-align: top;\"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* News Tab */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_news_tab( )
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$news_file = "news.txt";
|
|
|
|
$line = array();
|
|
$cmd = "sed -e 's/\t*\t/\t/g' ${news_file}";
|
|
|
|
exec( $cmd, $line);
|
|
|
|
|
|
ob_start();
|
|
|
|
for( $i = 0; $i < count($line); $i++)
|
|
{
|
|
$tab = explode( "\t", $line[$i]);
|
|
$css_row = ( $i + 1) % 2 + 1;
|
|
|
|
if( count($tab) > 2)
|
|
{
|
|
$play_name = $tab[2];
|
|
$play_type = $tab[3];
|
|
$play_id = $tab[4];
|
|
$play_priority = $tab[5];
|
|
|
|
$link_tag = "<a href=\"{$lmb_url}?page=play&type={$play_type}&id={$play_id}&priority={$play_priority}\">";
|
|
$img_tag = "<img src=\"/discography/{$play_type}/{$play_priority}-{$play_id}/covers/{$play_id}-cover-1-icon.png\" alt=\"\">";
|
|
$height = 110;
|
|
$play_tag=" <td class=\"news3\">{$link_tag}{$play_name}</a></td>
|
|
<td class=\"news4\" style=\"height: {$height}px\">{$link_tag}{$img_tag}</a></td>";
|
|
$colspan_tag = "";
|
|
}
|
|
else
|
|
{
|
|
$play_tag = "";
|
|
$cover_tag = "";
|
|
$colspan_tag = "colspan=\"3\"";
|
|
}
|
|
|
|
echo " <tr class=\"news{$css_row}\">
|
|
<td class=\"news01\"></td>
|
|
<td class=\"news1\">{$tab[0]}</td>
|
|
<td class=\"news2\" {$colspan_tag}>{$tab[1]}</td>
|
|
{$play_tag} <td class=\"news01\"></td>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "news", "news", "l", "/images/lm-logo3-n-220.png", $data);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Main Body */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_main_body()
|
|
{
|
|
|
|
lmb_news_tab();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Main Page */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_main_page()
|
|
{
|
|
global $lmb_tab;
|
|
|
|
|
|
lmb_header( 0, "Langueur Monotone - Home Page", "/images/title-home_page.png", "Home Page", "home page", 0);
|
|
lmb_main_body();
|
|
lmb_footer();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* About Tab */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_about_tab( )
|
|
{
|
|
$about_file = "about.txt";
|
|
$about_string = file_get_contents( "{$about_file}");
|
|
|
|
ob_start();
|
|
|
|
echo " <tr class=\"about1\">
|
|
<td class=\"about01\"></td>
|
|
<td class=\"about1\" style=\"height: 220px;\">";
|
|
|
|
// echo str_replace( "\n", "<br>\n ", "{$about_string}");
|
|
echo " ".lmb_html_text_format( "{$about_string}")."<br>
|
|
</td>
|
|
<td class=\"history01\"></td>
|
|
</tr>
|
|
";
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "about", "about", "l", "/images/lm-logo4-n-220.png", $data);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* History Tab */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_history_tab()
|
|
{
|
|
$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\">
|
|
<br>
|
|
";
|
|
|
|
for( $j = 2; $j < count($history_line); $j++)
|
|
{
|
|
echo " ".lmb_html_text_format( "{$history_line[$j]}")."<br>
|
|
";
|
|
}
|
|
|
|
echo " <br>
|
|
</td>
|
|
<td class=\"history01\"></td>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "history", "history", "r", "/images/lm-logo4-n-220.png", $data);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* About Body */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_about_body( $lmb_tab)
|
|
{
|
|
lmb_about_tab();
|
|
|
|
lmb_spacer(4);
|
|
|
|
lmb_history_tab();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* About Page */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_about_page()
|
|
{
|
|
global $lmb_tab;
|
|
|
|
|
|
lmb_header( 1, "Langueur Monotone - About Page", "/images/title-about.png", "About", "about", 0);
|
|
lmb_about_body( $lmb_tab);
|
|
lmb_footer();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Play Info Get */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_play_info_get( $play_type, $play_id, $play_priority)
|
|
{
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
|
|
$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 */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_playlist_cur( $play_type, $path, $row)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$line=array();
|
|
$cmd="ls -d {$path}/??-* | sed -e 's/.*\///'";
|
|
|
|
exec($cmd, $line);
|
|
|
|
for( $i = 0; $i < count($line); $i++, $row++)
|
|
{
|
|
$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;
|
|
|
|
$url = "{$lmb_url}?page=play&type={$play_type}&id={$play_tab[1]}&priority={$play_tab[0]}";
|
|
|
|
echo " <tr class=\"play{$css_row}\"><td class=\"play1\"><a href=\"{$url}\"><img src=\"/{$path}/{$play_tab[0]}-{$play_tab[1]}/covers/{$play_tab[1]}-cover-1-icon.png\" alt=\"\"></a></td><td class=\"play2\"><a href=\"{$url}\">{$play_info["name"]}</a></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>
|
|
";
|
|
}
|
|
}
|
|
|
|
return ($row);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Play List Next */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_playlist_next( $play_type, $path, $row)
|
|
{
|
|
$line=array();
|
|
$cmd="sed -e 's/\t*\t/\t/g' ${path}/.list";
|
|
|
|
exec($cmd, $line);
|
|
|
|
for( $i = 0; $i < count($line); $i++, $row++)
|
|
{
|
|
$tab=explode( "\t", $line[$i]);
|
|
|
|
if( "{$tab[4]}" != "")
|
|
{
|
|
$icon = "/images/{$tab[4]}";
|
|
}
|
|
else
|
|
{
|
|
$icon = "/images/unknown-cover-96.png";
|
|
}
|
|
|
|
$css_row=($row+1)%2+1;
|
|
|
|
echo " <tr class=\"play{$css_row}\"><td class=\"play1\"><img src=\"{$icon}\" alt=\"\"></td><td class=\"play2\">{$tab[0]}</td><td class=\"play3\"> {$tab[1]}</td><td class=\"play3\"> {$tab[2]} </td><td class=\"play4\">{$tab[3]}</td><td> </td></tr>
|
|
";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Play List */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_playlist( $play_type, $side)
|
|
{
|
|
$row = 1;
|
|
|
|
ob_start();
|
|
|
|
$row = lmb_playlist_cur( $play_type, "discography/{$play_type}", $row);
|
|
$row = lmb_playlist_next( $play_type, "discography/{$play_type}", $row);
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "{$play_type}", "play", $side, "/images/lm-logo3-n-96.png", $data);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Discography Body */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_discography_body()
|
|
{
|
|
|
|
/* --- EP --- */
|
|
lmb_playlist( "ep", "l");
|
|
|
|
lmb_spacer( 5);
|
|
|
|
/* --- LP --- */
|
|
lmb_playlist( "lp", "r");
|
|
|
|
lmb_spacer( 5);
|
|
|
|
/* --- Oldies --- */
|
|
lmb_playlist( "oldies", "l");
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Discography Page */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_discography_page()
|
|
{
|
|
global $lmb_tab;
|
|
|
|
|
|
lmb_header( 2, "Langueur Monotone - Discography Page", "/images/title-discography.png", "Discography", "discography", 0);
|
|
lmb_discography_body();
|
|
lmb_footer();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Play Introduction */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_play_intro( $play_type, $play_id, $play_priority)
|
|
{
|
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$cover_path="{$play_path}/covers/{$play_id}-cover";
|
|
$logo_path="{$play_path}/logos/{$play_id}-logo";
|
|
|
|
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>
|
|
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-1-1024.png\"><img src=\"{$cover_path}-1-256.png\" alt=\"\"></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td colspan=\"2\" style=\"height: 40px;\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
|
<tbody>
|
|
<tr class=\"intro0\">
|
|
<td class=\"intro0\">Introduction</td>
|
|
</tr>
|
|
<tr class=\"intro1\">
|
|
<td class=\"intro1\">
|
|
";
|
|
|
|
$intro_file = "{$play_path}/.intro";
|
|
$intro_string = file_get_contents( "{$intro_file}");
|
|
|
|
echo " ".lmb_html_text_format( "{$intro_string}")."<br>
|
|
";
|
|
|
|
|
|
echo " <br>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td style=\"vertical-align: middle;\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td class=\"logo\"><img src=\"{$logo_path}-1-128.png\" alt=\"\"><br></td>
|
|
</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>
|
|
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-2-1024.png\"><img src=\"{$cover_path}-2-256.png\" alt=\"\"></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan=\"2\" style=\"height: 40px;\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
|
<tbody>
|
|
<tr class=\"hardware1\">
|
|
<td class=\"hardware1\">
|
|
<br>
|
|
";
|
|
|
|
$hardware_file = "{$play_path}/.hardware";
|
|
$hardware_string = file_get_contents( "{$hardware_file}");
|
|
|
|
echo " ".lmb_html_text_format( "{$hardware_string}")."<br>
|
|
";
|
|
|
|
echo " </td>
|
|
</tr>
|
|
<tr class=\"hardware0\">
|
|
<td class=\"hardware0\">Hardware & Software</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track Info Get */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_track_info_get( $play_type, $play_id, $play_priority, $track_id)
|
|
{
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$track_path = "{$play_path}/tracks";
|
|
$track_array = glob("{$track_path}/flac/{$track_id}-*.flac");
|
|
$track_file = $track_array[0];
|
|
|
|
$line = array();
|
|
$track_info = array();
|
|
|
|
$cmd="eval \$( metaflac --export-tags-to=- \"${track_file}\" | grep -v -e \".* .*=\" -e \".*-.*=\" | sed -e 's/=/=\\\"/' -e 's/$/\"/')
|
|
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}\"";
|
|
|
|
exec($cmd, $line);
|
|
|
|
$tab = explode( "\t", $line[0]);
|
|
|
|
$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];
|
|
|
|
$total = intval( $track_info["sample_nb"] / $track_info["sample_rate"]);
|
|
$min = intval( $total / 60);
|
|
$sec = $total - $min * 60;
|
|
|
|
$track_info["length"] = "{$min}' {$sec}\"";
|
|
$track_info["safe_creative"] = $tab[10];
|
|
|
|
return( $track_info);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track File Tag Get */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
function lmb_track_file_tag_get( $play_type, $play_id, $play_priority, $track_id)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$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];
|
|
$file_subtype = $tab[1];
|
|
|
|
$file_pat = "{$track_path}/{$dir}/{$track_id}-*.{$file_type}";
|
|
$file_tab = glob( "{$file_pat}");
|
|
$file_url = $file_tab[0];
|
|
|
|
$file_tag = "{$file_tag}<td class=\"tracks7\">";
|
|
|
|
// echo "TI: $track_id | FD: $tab[0] | FP: $file_pat | file_url: {$file_url}<br>";
|
|
|
|
if( count( glob( "{$file_url}")))
|
|
{
|
|
if( "{$track_id}" == "00")
|
|
{
|
|
$download_url = "{$lmb_url}?page=download&type={$play_type}&id={$play_id}&priority={$play_priority}&dtype=track&ftype={$dir}";
|
|
|
|
$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}"));
|
|
}
|
|
|
|
$file_tag = "{$file_tag}<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tbody><tr><td class=\"tracks7\"><a href=\"{$download_url}\">{$file_type} {$file_subtype}</a></td></tr><tr><td class=\"tracks8\">(${size_tab["size"]} {$size_tab["unit"]})</td></tr></tbody></table>";
|
|
}
|
|
|
|
$file_tag = "{$file_tag}</td>
|
|
";
|
|
}
|
|
|
|
return( "{$file_tag}");
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track List */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_tracklist( $play_type, $play_id, $play_priority)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$cover_path = "{$play_path}/covers/{$play_id}-cover";
|
|
$logo_path = "{$play_path}/logos/{$play_id}-logo";
|
|
$track_path = "{$play_path}/tracks";
|
|
$file_type_tab = array( "flac", "ogg", "mp3", "med");
|
|
|
|
|
|
ob_start();
|
|
|
|
$track_list = glob( "{$track_path}/flac/*.flac");
|
|
|
|
$size=count($track_list) + 1;
|
|
$height=220/$size;
|
|
|
|
$file_tag = lmb_track_file_tag_get( "{$play_type}", "{$play_id}", "{$play_priority}", "00");
|
|
$title_tag = "<td class=\"tracks00\" rowspan=\"$size\"> </td><td class=\"tracks0\" rowspan=\"$size\"><img src=\"/images/tab-tracks-r.png\" alt=\"\"></td>";
|
|
|
|
echo " <tr class=\"tracks0\" style=\"height: {$height}px;\"><td colspan=\"6\" class=\"tracks2\" STYLE=\"text-align: left;\"> Full Album including covers </td>{$file_tag}</tr>
|
|
";
|
|
for( $i = 0, $row = 1; $i < count($track_list); $i++, $row++)
|
|
{
|
|
$track_id = preg_replace( "/-.*/", "", basename( "{$track_list[$i]}", ".flac"));
|
|
$track_info = lmb_track_info_get( $play_type, $play_id, $play_priority, $track_id);
|
|
|
|
$css_row = ($row+1)%2+1;
|
|
$track_url = "{$lmb_url}?page=track&type={$play_type}&id={$play_id}&priority={$play_priority}&tid={$track_id}";
|
|
|
|
$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;\">";
|
|
|
|
echo "<td class=\"tracks1\"> {$track_info["id"]} </td><td class=\"tracks2\"> <a href=\"{$track_url}\">{$track_info["title"]}</a> </td><td class=\"tracks3\"> <a href=\"{$track_url}\">{$track_info["mix"]}</a> </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>
|
|
";
|
|
}
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "tracks", "tracks", "r", "/images/lm-logo3-n-96.png", $data);
|
|
|
|
return ($row);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* File Entry Print */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_file_entry_print( $file_tab, $format_css_id, $size_css_id, $entry_tag)
|
|
{
|
|
echo "{$entry_tag}";
|
|
|
|
foreach( $file_tab as $file)
|
|
{
|
|
echo " <td class=\"{$format_css_id}\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
<tr><td class=\"{$format_css_id}\"><a href=\"{$file["url"]}\">{$file["format"]}</a></td></tr>
|
|
<tr><td class=\"{$size_css_id}\">(${file["size"]} {$file["unit"]})</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
";
|
|
}
|
|
|
|
echo " </tr>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Cover File Tab Get */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_cover_file_tab_get( $play_type, $play_id, $play_priority, $cover_id, $mode)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$cover_path="{$play_path}/covers";
|
|
|
|
$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();
|
|
|
|
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")
|
|
{
|
|
$file_tab[$i]["url"] = "{$lmb_url}?page=download&type={$play_type}&id={$play_id}&priority={$play_priority}&dtype=cover&cformat={$cover_format}";
|
|
|
|
$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 */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_coverlist( $play_type, $play_id, $play_priority)
|
|
{
|
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$cover_path="{$play_path}/covers/{$play_id}-cover";
|
|
$logo_path="{$play_path}/logos/{$play_id}-logo";
|
|
|
|
|
|
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\">
|
|
<td class=\"covers2\" colspan=\"2\" STYLE=\"text-align: left;\"> All the Covers </td>
|
|
";
|
|
|
|
lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}");
|
|
|
|
for( $i = 0; $i < count($sheet_tab); $i++)
|
|
{
|
|
if( $i == 0)
|
|
{
|
|
$sheet_name="Front";
|
|
}
|
|
else
|
|
{
|
|
if( $i == ( count($sheet_tab) - 1))
|
|
{
|
|
$sheet_name="Back";
|
|
}
|
|
else
|
|
{
|
|
$sheet_name="$i";
|
|
}
|
|
}
|
|
|
|
/* 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\">
|
|
<td class=\"covers1\"><a href=\"{$file_tab[0]["url"]}\"><img src=\"{$cover_path}-{$sheet_tab[$i]}-icon.png\" alt=\"\"></a></td>
|
|
<td class=\"covers2\"> {$sheet_name} </td>";
|
|
|
|
lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}");
|
|
|
|
}
|
|
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "covers", "covers", "l", "{$logo_path}-2-128.png", $data);
|
|
|
|
return ($row);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Video File Tab Get */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_video_file_tab_get( $play_type, $play_id, $play_priority, $video_id, $mode)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$video_path="{$play_path}/videos";
|
|
|
|
$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")
|
|
{
|
|
$file_tab[$i]["url"] = "{$lmb_url}?page=download&type={$play_type}&id={$play_id}&priority={$play_priority}&dtype=video&vformat={$video_format}";
|
|
|
|
$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 */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_videolist( $play_type, $play_id, $play_priority)
|
|
{
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$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);
|
|
|
|
if( count($video_tab) == 0)
|
|
{
|
|
echo " <tr class=\"videos2\" style=\"height: 60px\"><td class=\"videos1\"></td><td class=\"videos2\"> </td></tr>
|
|
<tr class=\"videos1\" style=\"height: 110px\"><td class=\"videos1\"><img src=\"/images/unknown-cover-96.png\" alt=\"\"></td><td class=\"videos2\"> No video found... </td></tr>
|
|
<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\">
|
|
<td class=\"videos2\" colspan=\"4\" STYLE=\"text-align: left;\"> All the Videos </td>
|
|
";
|
|
|
|
lmb_file_entry_print( $file_tab, "videos5", "videos6", $entry_tag);
|
|
|
|
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\">
|
|
<td class=\"videos1\"><a href=\"{$file_tab[0]["url"]}\"><img src=\"{$video_path}/{$video_file}-icon.png\" alt=\"\"></a></td>
|
|
<td class=\"videos2\"> {$video_id} </td>
|
|
<td class=\"videos3\"> {$video_track_name} </td>
|
|
<td class=\"videos4\"> {$video_mix_name} </td>
|
|
";
|
|
|
|
lmb_file_entry_print( $file_tab, "videos5", "videos6", "{$entry_tag}");
|
|
}
|
|
}
|
|
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "videos", "videos", "r", "{$logo_path}-1-128.png", $data);
|
|
|
|
return ($row);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Extra File Tab Get */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_extra_file_tab_get( $play_type, $play_id, $play_priority, $extra_id, $mode)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$extra_path="{$play_path}/extras";
|
|
|
|
$cmd = "ls {$extra_path}/{$play_id}-{$extra_id}-*.png | sed -e 's/.*-//' -e 's/.png$//' | sort -rnu";
|
|
exec( $cmd, $extra_format_tab);
|
|
|
|
$file_tab = array();
|
|
|
|
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")
|
|
{
|
|
$file_tab[$i]["url"] = "{$lmb_url}?page=download&type={$play_type}&id={$play_id}&priority={$play_priority}&dtype=extra&eformat={$extra_id}-{$extra_format}";
|
|
|
|
$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 */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_extralist( $play_type, $play_id, $play_priority)
|
|
{
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$extra_path = "{$play_path}/extras";
|
|
|
|
|
|
ob_start();
|
|
|
|
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-.*-//' | sort -rnu";
|
|
exec($cmd, $format_tab);
|
|
|
|
if( count($format_tab) == 0)
|
|
{
|
|
echo " <tr class=\"extras2\" style=\"height: 60px\"><td class=\"extras1\"></td><td class=\"extras2\"> </td></tr>
|
|
<tr class=\"extras1\" style=\"height: 110px\"><td class=\"extras1\"><img src=\"/images/unknown-cover-96.png\" alt=\"\"></td><td class=\"extras2\"> No extra found... </td></tr>
|
|
<tr class=\"extras2\" style=\"height: 60px\"><td class=\"extras1\"></td><td class=\"extras2\"> </td></tr>
|
|
";
|
|
}
|
|
else
|
|
{
|
|
$format_nb = count($format_tab);
|
|
$title_tag = " <td class=\"extras2\" rowspan=\"{$format_nb}\" colspan=\"3\" STYLE=\"text-align: left;\"> All the Extras </td>
|
|
";
|
|
|
|
foreach( $format_tab as $format)
|
|
{
|
|
$file_tab = lmb_extra_file_tab_get( $play_type, $play_id, $play_priority, "*-{$format}", "MULTI");
|
|
$extra_format = str_replace( "_", "/", "{$format}");
|
|
|
|
$entry_tag = " <tr class=\"extras0\" style=\"height: 30px\">
|
|
${title_tag} <td class=\"extras4\"> {$extra_format} </td>
|
|
";
|
|
|
|
lmb_file_entry_print( $file_tab, "extras5", "extras6", "{$entry_tag}");
|
|
|
|
$title_tag = "";
|
|
}
|
|
|
|
|
|
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-//'";
|
|
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\">
|
|
<td class=\"extras1\"><a href=\"{$file_tab[0]["url"]}\"><img src=\"{$extra_prefix}-icon.png\" alt=\"\"></a></td>
|
|
<td class=\"extras2\"> {$extra_type} </td>
|
|
<td class=\"extras3\"> {$extra_subid} </td>
|
|
<td class=\"extras4\"> {$extra_format} </td>
|
|
";
|
|
|
|
lmb_file_entry_print( $file_tab, "extras5", "extras6", "{$entry_tag}");
|
|
}
|
|
}
|
|
|
|
$data = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
lmb_make_tab( "extras", "extras", "l", "/images/lm-logo3-n-96.png", $data);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Links Tab */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_links_tab( $play_type, $play_id, $play_priority)
|
|
{
|
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$links_file = "{$play_path}/.links";
|
|
|
|
|
|
$line = array();
|
|
$cmd = "sed -e 's/\t*\t/\t/g' ${links_file}";
|
|
|
|
exec( $cmd, $line);
|
|
|
|
echo " <table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"5\" style=\"\">
|
|
<tbody>
|
|
";
|
|
|
|
for( $i = 0; $i < count($line); $i++)
|
|
{
|
|
$tab = explode( "\t", $line[$i]);
|
|
$css_row = ( $i + 1) % 2 + 1;
|
|
|
|
$text = "{$tab[0]}";
|
|
$link = htmlentities( "{$tab[1]}");
|
|
$image = "{$tab[2]}";
|
|
|
|
echo " <tr class=\"links1\">
|
|
<td class=\"links1\">
|
|
<a href=\"{$link}\">{$text}</a>
|
|
</td>
|
|
<td class=\"links2\">
|
|
<a href=\"{$link}\"><img src=\"{$image}\" width=\"16\" height=\"16\" alt=\"\"></a>
|
|
</td>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
echo " <tr class=\"links0\">
|
|
<td class=\"links0\" colspan=\"2\">Links</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Play Last */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_play_last( $play_type, $play_id, $play_priority)
|
|
{
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
|
|
|
|
echo " <tr>
|
|
<td class=\"body\" colspan=\"3\" rowspan=\"1\">
|
|
<table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td style=\"width: 66%;\">
|
|
<table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
|
<tbody>
|
|
<tr class=\"thanks0\">
|
|
<td class=\"thanks0\">Thanks</td>
|
|
</tr>
|
|
<tr class=\"thanks1\">
|
|
<td class=\"thanks1\">
|
|
";
|
|
|
|
$thanks_file = "{$play_path}/.thanks";
|
|
$thanks_string = file_get_contents( "{$thanks_file}");
|
|
|
|
echo " ".lmb_html_text_format( "{$thanks_string}")."<br>
|
|
";
|
|
|
|
|
|
|
|
echo " </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td style=\"width: 33%;\">
|
|
";
|
|
|
|
lmb_links_tab( $play_type, $play_id, $play_priority);
|
|
// include "{$play_path}/.links";
|
|
|
|
echo " </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Play Body */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_play_body( $play_type, $play_id, $play_priority)
|
|
{
|
|
|
|
/* --- Introduction --- */
|
|
lmb_play_intro( $play_type, $play_id, $play_priority);
|
|
|
|
lmb_spacer(4);
|
|
|
|
/* --- Tracks --- */
|
|
lmb_tracklist( $play_type, $play_id, $play_priority);
|
|
|
|
lmb_spacer(5);
|
|
|
|
/* --- Covers --- */
|
|
lmb_coverlist( $play_type, $play_id, $play_priority);
|
|
|
|
lmb_spacer(5);
|
|
|
|
/* --- Videos --- */
|
|
lmb_videolist( $play_type, $play_id, $play_priority);
|
|
|
|
lmb_spacer(5);
|
|
|
|
/* --- Etras --- */
|
|
lmb_extralist( $play_type, $play_id, $play_priority);
|
|
|
|
lmb_spacer(4);
|
|
|
|
/* --- Last --- */
|
|
lmb_play_last( $play_type, $play_id, $play_priority);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* 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)
|
|
{
|
|
$file = "discography/{$play_type}/{$play_priotiry}-{}-*";
|
|
|
|
switch( "{$play_type_id}")
|
|
{
|
|
case "ep":
|
|
{
|
|
return( "EP");
|
|
}
|
|
|
|
case "lp":
|
|
{
|
|
return( "LP");
|
|
}
|
|
|
|
case "oldies":
|
|
{
|
|
return( "Oldies");
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Play Page */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_play_page( $play_type, $play_id, $play_priority)
|
|
{
|
|
global $lmb_tab;
|
|
|
|
|
|
$play_info = lmb_play_info_get( $play_type, $play_id, $play_priority);
|
|
$play_name = lmb_play_type_name_get( $play_type);
|
|
$play_title = "{$play_name} - {$play_info["name"]}";
|
|
$play_image = "{$play_type}";
|
|
|
|
lmb_header( 3, "Langueur Monotone - {$play_title} Page", "/images/title-{$play_image}.png", "{$play_name}", "{$play_type},{$play_info["name"]}", 0);
|
|
lmb_play_body( $play_type, $play_id, $play_priority);
|
|
lmb_footer();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track Info */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_track_info( $play_type, $play_id, $play_priority, $track_id)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$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;
|
|
}
|
|
|
|
echo " <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
<tr class=\"info0\" style=\"height: {$height}px;\">
|
|
<td class=\"info0\" colspan=\"2\">Informations</td>
|
|
</tr>
|
|
<tr class=\"info1\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Group Name</td>
|
|
<td class=\"info2\"><a href=\"{$lmb_url}?page=discography\">{$track_info["artist"]}</a></td>
|
|
</tr>
|
|
<tr class=\"info2\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Album</td>
|
|
<td class=\"info2\"><a href=\"{$lmb_url}?page=play&type={$play_type}&id={$play_id}&priority={$play_priority}\">{$track_info["album"]}</a></td>
|
|
</tr>
|
|
<tr class=\"info1\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Track Number</td>
|
|
<td class=\"info2\">{$track_info["id"]}</td>
|
|
</tr>
|
|
<tr class=\"info2\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Track Name</td>
|
|
<td class=\"info2\">{$track_info["title"]}</td>
|
|
</tr>
|
|
<tr class=\"info1\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Mix Name</td>
|
|
<td class=\"info2\">{$track_info["mix"]}</td>
|
|
</tr>
|
|
<tr class=\"info2\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Composer</td>
|
|
<td class=\"info2\">{$track_info["composer"]}</td>
|
|
</tr>
|
|
<tr class=\"info1\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Comment</td>
|
|
<td class=\"info2\">{$track_info["comment"]}</td>
|
|
</tr>
|
|
<tr class=\"info2\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Length</td>
|
|
<td class=\"info2\">{$track_info["length"]}</td>
|
|
</tr>
|
|
";
|
|
|
|
if ($track_info["safe_creative"] != "")
|
|
{
|
|
echo " <tr class=\"info1\" style=\"height: {$height}px;\">
|
|
<td class=\"info1\">Safe Creative</td>
|
|
<td class=\"info2\"><a href=\"{$track_info["safe_creative"]}\">Link</a></td>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
echo " </tbody>
|
|
</table>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track Lyrics */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_track_lyrics( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix)
|
|
{
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$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";
|
|
|
|
|
|
echo " <table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
<tr class=\"lyrics1\">
|
|
<td class=\"lyrics1\">
|
|
<br>
|
|
";
|
|
|
|
|
|
if( file_exists( "{$lyrics_file}"))
|
|
{
|
|
$lyrics_string = file_get_contents( "{$lyrics_file}");
|
|
}
|
|
else
|
|
{
|
|
$lyrics_string = "No lyrics found...\n";
|
|
}
|
|
|
|
echo str_replace( "\n", "<br>\n ", "{$lyrics_string}");
|
|
|
|
echo "<br>
|
|
</td>
|
|
</tr>
|
|
<tr class=\"lyrics0\">
|
|
<td class=\"lyrics0\" colspan=\"2\">Lyrics</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* JPlayer Insert */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix)
|
|
{
|
|
global $lmb_cookie_tab;
|
|
global $lmb_url;
|
|
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$track_path = "{$play_path}/tracks";
|
|
$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";
|
|
|
|
|
|
$solution_cookie = "jpsolution";
|
|
$prefix_url = "{$lmb_url}?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_value = $lmb_cookie_tab[$solution_cookie];
|
|
|
|
if( "{$solution_value}" == "html, flash")
|
|
{
|
|
$html_class = "jp-on";
|
|
$flash_class = "jp-off";
|
|
}
|
|
else
|
|
{
|
|
$html_class = "jp-off";
|
|
$flash_class = "jp-on";
|
|
}
|
|
|
|
|
|
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/jquery.min.js\"></script>
|
|
<script type=\"text/javascript\" src=\"/jplayer/jquery.jplayer.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>
|
|
|
|
<script type=\"text/javascript\">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
$(\"#jquery_jplayer_1\").jPlayer({
|
|
ready: function () {
|
|
$(this).jPlayer(\"setMedia\", {
|
|
oga:\"http://www.langueur-monotone.com/{$track_file_ogg}\",
|
|
mp3:\"http://www.langueur-monotone.com/{$track_file_mp3}\"
|
|
}).jPlayer(\"play\");
|
|
},
|
|
swfPath: \"/jplayer\",
|
|
solution: \"{$solution_value}\",
|
|
supplied: \"oga, mp3\",
|
|
wmode: \"window\",
|
|
backgroundColor: \"#012345\"
|
|
|
|
});
|
|
|
|
$(\"#jplayer_inspector\").jPlayerInspector({jPlayer:$(\"#jquery_jplayer_1\")});
|
|
});
|
|
|
|
//]]>
|
|
</script>
|
|
|
|
<div id=\"jquery_jplayer_1\" class=\"jp-jplayer\"></div>
|
|
|
|
<div id=\"jp_container_1\" class=\"jp-audio\">
|
|
<div class=\"jp-type-single\">
|
|
<div class=\"jp-gui jp-interface\">
|
|
<ul class=\"jp-controls\">
|
|
<li><a href=\"javascript:;\" class=\"jp-play\" tabindex=\"1\">play</a></li>
|
|
<li><a href=\"javascript:;\" class=\"jp-pause\" tabindex=\"1\">pause</a></li>
|
|
<li><a href=\"javascript:;\" class=\"jp-stop\" tabindex=\"1\">stop</a></li>
|
|
<li><a href=\"javascript:;\" class=\"jp-mute\" tabindex=\"1\" title=\"mute\">mute</a></li>
|
|
<li><a href=\"javascript:;\" class=\"jp-unmute\" tabindex=\"1\" title=\"unmute\">unmute</a></li>
|
|
<li><a href=\"javascript:;\" class=\"jp-volume-max\" tabindex=\"1\" title=\"max volume\">max volume</a></li>
|
|
</ul>
|
|
<div class=\"jp-progress\">
|
|
<div class=\"jp-seek-bar\">
|
|
<div class=\"jp-play-bar\"></div>
|
|
</div>
|
|
</div>
|
|
<div class=\"jp-volume-bar\">
|
|
<div class=\"jp-volume-bar-value\"></div>
|
|
</div>
|
|
<div class=\"jp-current-time\"></div>
|
|
<div class=\"jp-duration\"></div>
|
|
<ul class=\"jp-toggles\">
|
|
<li><a href=\"javascript:;\" class=\"jp-repeat\" tabindex=\"1\" title=\"repeat\">repeat</a></li>
|
|
<li><a href=\"javascript:;\" class=\"jp-repeat-off\" tabindex=\"1\" title=\"repeat off\">repeat off</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class=\"jp-no-solution\">
|
|
<span>Update Required</span>
|
|
To play the media you will need to either update your browser to a recent version or update your <a href=\"http://get.adobe.com/flashplayer/\">Flash plugin</a>.
|
|
</div>
|
|
<div style=\"font-size: 12px;\"><a class=\"{$html_class}\" href=\"{$solution_html_url}\">Force HTML</a> <a class=\"{$flash_class}\" href=\"{$solution_flash_url}\">Force Flash</a></div>
|
|
</div>
|
|
</div>
|
|
";
|
|
|
|
/*
|
|
echo " <div id=\"jplayer_inspector\"></div>
|
|
";
|
|
*/
|
|
|
|
/*
|
|
|
|
echo " <div><a href=\"{$lmb_url}?cookie_id={$solution_cookie}&cookie_value={$solution_html_url}&{$query_string}\" style=\"color:#FFFFFF; background-color: black;\">ZZZForce HTML</a> <a href=\"{$lmb_url}?cookie_id={$solution_cookie}&cookie_value={$solution_flash_url}&{$query_string}\">Force Flash</a></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>
|
|
";
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track Introduction */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix)
|
|
{
|
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$cover_path="{$play_path}/covers/{$play_id}-cover";
|
|
$logo_path="{$play_path}/logos/{$play_id}-logo";
|
|
$track_path="{$play_path}/tracks";
|
|
|
|
$cover_size = 400;
|
|
$border1_size= $cover_size + 30;
|
|
$border2_size= $cover_size + 10;
|
|
|
|
|
|
echo " <tr><td><br></td></tr>
|
|
<tr>
|
|
<td class=\"body\" colspan=\"3\" rowspan=\"1\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td rowspan=\"2\" style=\"width: {$border1_size}px; height: {$border1_size}px;\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td class=\"cover\" style=\"width: {$border2_size}px; height: {$border2_size}px;\"><a href=\"{$cover_path}-1-1024.png\"><img src=\"{$cover_path}-1-{$cover_size}.png\" alt=\"\"></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
<td style=\"height: 40px; width: auto;\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
";
|
|
|
|
lmb_track_info( $play_type, $play_id, $play_priority, $track_id);
|
|
|
|
// echo "<br>";
|
|
|
|
echo " </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
";
|
|
|
|
lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
|
|
|
|
echo " </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"\">
|
|
<tbody>
|
|
<tr>
|
|
<td style=\"height: 100%; vertical-align:bottom\">
|
|
<table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"text-align: left; width: 100%; height: 100%;\">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
";
|
|
|
|
lmb_track_lyrics( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
|
|
|
|
echo " </td>
|
|
</tr>
|
|
</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>
|
|
<td class=\"cover\" style=\"width: {$border2_size}px; height: {$border2_size}px;\"><a href=\"{$cover_path}-2-1024.png\"><img src=\"{$cover_path}-2-{$cover_size}.png\" alt=\"\"></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</tr>
|
|
<tr><td><br><br><br><br><br></td></tr>
|
|
";
|
|
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track Download */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_track_download( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix)
|
|
{
|
|
global $lmb_url;
|
|
|
|
|
|
$play_path ="discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$logo_path ="{$play_path}/logos/{$play_id}-logo";
|
|
$track_path ="{$play_path}/tracks";
|
|
|
|
$file_tag = lmb_track_file_tag_get( $play_type, $play_id, $play_priority, $track_id);
|
|
|
|
|
|
echo " <tr><td><br></td></tr>
|
|
<tr>
|
|
<td colspan=\"3\">
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
<tr>
|
|
<td class=\"logo\" style=\"width: 128px;\"><img src=\"/images/lm-logo3-n-96.png\" alt=\"\"></td>
|
|
<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>
|
|
<br>
|
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
|
<tbody>
|
|
";
|
|
|
|
$mix_list = glob( "discography/*/*/tracks/flac/*-{$track_name}-*.flac");
|
|
|
|
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]);
|
|
|
|
$mix_tab[$i]["play_type"] = $path_tab[1];
|
|
$mix_tab[$i]["play_type_name"] = lmb_play_type_name_get( $path_tab[1]);
|
|
$mix_tab[$i]["play_id"] = $play_tab[1];
|
|
$mix_tab[$i]["play_pri"] = $play_tab[0];
|
|
$mix_tab[$i]["track_id"] = $track_tab[0];
|
|
|
|
$mix_tab[$i]["play_url"] = "{$lmb_url}?page=play&type={$mix_tab[$i]["play_type"]}&id={$mix_tab[$i]["play_id"]}&priority={$mix_tab[$i]["play_pri"]}";
|
|
$mix_tab[$i]["mix_url"] = "{$lmb_url}?page=track&type={$mix_tab[$i]["play_type"]}&id={$mix_tab[$i]["play_id"]}&priority={$mix_tab[$i]["play_pri"]}&tid={$mix_tab[$i]["track_id"]}";
|
|
|
|
$track_info = lmb_track_info_get( $mix_tab[$i]["play_type"], $mix_tab[$i]["play_id"], $mix_tab[$i]["play_pri"], $mix_tab[$i]["track_id"]);
|
|
|
|
$mix_tab[$i]["track_name"] = $track_info["title"];
|
|
$mix_tab[$i]["mix_name"] = $track_info["mix"];
|
|
$mix_tab[$i]["play_name"] = $track_info["album"];
|
|
}
|
|
|
|
for( $k = 0; $k < count( $mix_tab); $k++)
|
|
{
|
|
$css_row = ( $k + 1 + count( $mix_tab)) % 2 + 3;
|
|
|
|
echo " <tr class=\"row${css_row}\">
|
|
<td class=\"tracks2\">{$mix_tab[$k]["track_name"]}</td>
|
|
<td class=\"tracks3\"><a href=\"{$mix_tab[$k]["mix_url"]}\">{$mix_tab[$k]["mix_name"]}</a></td>
|
|
<td class=\"tracks2\">{$mix_tab[$k]["play_type_name"]}</td>
|
|
<td class=\"tracks3\"><a href=\"{$mix_tab[$k]["play_url"]}\">{$mix_tab[$k]["play_name"]}</a></td>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
echo " <tr class=\"row0\">
|
|
<td class=\"title_r\" colspan=\"4\">Mixes </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track Body */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_track_body( $play_type, $play_id, $play_priority, $track_id)
|
|
{
|
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$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];
|
|
$track_mix = $tab[2];
|
|
|
|
/* --- Introduction --- */
|
|
lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
|
|
|
|
/* --- Download --- */
|
|
lmb_track_download( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Track Page */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_track_page( $play_type, $play_id, $play_priority, $track_id)
|
|
{
|
|
global $lmb_tab;
|
|
|
|
|
|
$track_info = lmb_track_info_get( $play_type, $play_id, $play_priority, $track_id);
|
|
$track_title = "Track - {$track_info["title"]} ({$track_info["mix"]})";
|
|
|
|
// lmb_header( 4, "Langueur Monotone - Track Page", "/images/title-track.png", "Track", 962);
|
|
// lmb_header( 4, "Langueur Monotone - {$track_title} Page", "/images/title-track.png", "Track", "track,{$track_info["title"]},{$track_info["title"]} {$track_info["mix"]}", 1234);
|
|
lmb_header( 4, "Langueur Monotone - {$track_title} Page", "/images/title-track.png", "Track", "track,{$track_info["title"]},{$track_info["title"]} {$track_info["mix"]}", 962);
|
|
lmb_track_body( $play_type, $play_id, $play_priority, $track_id);
|
|
lmb_footer();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* 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)
|
|
{
|
|
$play_dir = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$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)
|
|
{
|
|
$play_dir = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$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)
|
|
{
|
|
$play_dir = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$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)
|
|
{
|
|
$play_dir = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
|
$file_list = "extras/{$play_id}-*-{$extra_format}.png";
|
|
|
|
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$extra_format}"));
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_header_old( $id, $name, $summary, $curver, $currel)
|
|
{
|
|
$page_name="Rx3 $name Home Page";
|
|
$page_title="$page_name !";
|
|
global $lmb_url;
|
|
global $lmb_page_header;
|
|
global $lmb_keywords;
|
|
$keywords="$lmb_keywords,$id";
|
|
|
|
|
|
include "$lmb_page_header";
|
|
|
|
echo " <META NAME=\"keywords\" CONTENT=\"$keywords\">
|
|
<TITLE>$page_name</TITLE>
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
<H1>$page_title</H1>
|
|
<H4>$summary</H4>
|
|
<H4>$curver-$currel</H4>
|
|
|
|
<H5><A HREF=\"..\">Rx3.Org Main Page</A> / <A HREF=\"$lmb_url\">Rx3 Free Software Packaging Main Page</A></H5>
|
|
|
|
<HR>
|
|
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
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>
|
|
<BR>
|
|
<BR>
|
|
</P>
|
|
|
|
<PRE>
|
|
";
|
|
|
|
lmb_tab_dump( $description, 0);
|
|
|
|
echo " </PRE>
|
|
<P>
|
|
<BR>
|
|
<BR>
|
|
</P>
|
|
";
|
|
|
|
echo " <P>
|
|
<BR>
|
|
</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> ";
|
|
echo "<A HREF=\"$lmb_download_ftp_url/$id\">$name FTP download page</A> ";
|
|
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";
|
|
global $lmb_url;
|
|
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>
|
|
|
|
<H5><A HREF=\"..\">Rx3.Org Main Page</A> / <A HREF=\"$lmb_url\">Rx3 Free Software Packaging Main Page</A> / <A HREF=\"$lmb_url?pkg=$id\">Rx3 $name Home Page</A></H5>
|
|
|
|
<HR>
|
|
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_cl_body( $id, $curver, $currel)
|
|
{
|
|
echo " <PRE>
|
|
";
|
|
|
|
$changelog_tab = lmb_tag_get( $id, $curver, $currel, "", "[\n%{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n]");
|
|
lmb_tab_dump( $changelog_tab, 0);
|
|
|
|
echo " </PRE>
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_cl_page( $lmb_id, $lmb_name, $lmb_curver, $lmb_currel)
|
|
{
|
|
lmb_cl_header( $lmb_id, $lmb_name, $lmb_curver, $lmb_currel);
|
|
lmb_cl_body( $lmb_id, $lmb_curver, $lmb_currel);
|
|
lmb_footer();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_fl_header( $id, $name, $curver, $currel)
|
|
{
|
|
$page_name="Rx3 $name File List Page";
|
|
$page_title="$page_name";
|
|
global $lmb_url;
|
|
global $lmb_header;
|
|
global $lmb_keywords;
|
|
$keywords="$lmb_keywords,$id, rx3 $id file list";
|
|
|
|
|
|
include "$lmb_header";
|
|
|
|
echo " <META NAME=\"keywords\" CONTENT=\"$keywords\">
|
|
<TITLE>$page_name</TITLE>
|
|
</HEAD>
|
|
|
|
<BODY>
|
|
<H1>$page_title</H1>
|
|
<H4>$curver-$currel</H4>
|
|
|
|
<H5><A HREF=\"..\">Rx3.Org Main Page</A> / <A HREF=\"$lmb_url\">Rx3 Free Software Packaging Main Page</A> / <A HREF=\"$lmb_url?pkg=$id\">$name Home Page</A></H5>
|
|
|
|
<HR>
|
|
|
|
";
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_fl_body( $id, $curver, $currel)
|
|
{
|
|
$lmb_list = lmb_list_get( $id, $curver, $currel);
|
|
|
|
if( $lmb_list != "")
|
|
{
|
|
for( $i = 0; $i < count($lmb_list); $i++)
|
|
{
|
|
echo" <H5>Sub-Package $lmb_list[$i]:</H5>
|
|
<PRE>";
|
|
|
|
$filelist_tab = lmb_tag_get( $id, $curver, $currel, $lmb_list[$i], "[%{FILENAMES}\n]");
|
|
lmb_tab_dump( $filelist_tab, 0);
|
|
|
|
echo " </PRE>
|
|
";
|
|
|
|
if( $i < count($lmb_list) - 1)
|
|
{
|
|
echo" <HR>
|
|
";
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
echo " <PRE>
|
|
";
|
|
|
|
$filelist_tab = lmb_tag_get( $id, $curver, $currel, "", "[%{FILENAMES}\n]");
|
|
lmb_tab_dump( $filelist_tab, 0);
|
|
|
|
echo " </PRE>
|
|
";
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_fl_page( $lmb_id, $lmb_name, $lmb_curver, $lmb_currel)
|
|
{
|
|
lmb_fl_header( $lmb_id, $lmb_name, $lmb_curver, $lmb_currel);
|
|
lmb_fl_body( $lmb_id, $lmb_curver, $lmb_currel);
|
|
lmb_footer();
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* 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;
|
|
|
|
|
|
$cookie_value = $_COOKIE[ $cookie_id];
|
|
// echo "load val ($cookie_value) for ($cookie_id)";
|
|
|
|
if( ! isset( $cookie_value))
|
|
{
|
|
$cookie_value = $cookie_defvalue;
|
|
// echo "set def val ($cookie_defvalue) for ($cookie_id)";
|
|
}
|
|
|
|
$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)
|
|
{
|
|
$cookie_id=$get_array["cookie_id"];
|
|
|
|
if( $cookie_id != "")
|
|
{
|
|
$cookie_value = $get_array["cookie_value"];
|
|
|
|
lmb_cookie_set( $cookie_id, $cookie_value, 360000);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Get Proceed */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
function lmb_get_proceed( $get_array)
|
|
{
|
|
lmb_admin_update();
|
|
lmb_cookie_update( $get_array);
|
|
|
|
$page_id=$get_array["page"];
|
|
|
|
switch ($page_id)
|
|
{
|
|
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;
|
|
}
|
|
|
|
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;
|
|
}
|
|
|
|
case "login":
|
|
{
|
|
lmb_login_page( $lmb_tab);
|
|
break;
|
|
}
|
|
|
|
default:
|
|
{
|
|
lmb_main_page( $lmb_tab);
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
/* Main */
|
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
|
|
|
|
|
$lmb_cookie_tab = array();
|
|
|
|
lmb_cookies_load();
|
|
|
|
lmb_get_proceed( $_GET);
|
|
|
|
?>
|