- Add News Tab support,
- Add RSS support, - Add RSS button.
This commit is contained in:
parent
f1a872a452
commit
79bfba676b
@ -1,8 +1,8 @@
|
|||||||
<?
|
<?
|
||||||
// $RCSfile: lmbrowse.php,v $
|
// $RCSfile: lmbrowse.php,v $
|
||||||
// $Revision: 1.6 $
|
// $Revision: 1.7 $
|
||||||
// $Name: $
|
// $Name: $
|
||||||
// $Date: 2013/03/21 16:21:45 $
|
// $Date: 2013/08/20 16:32:00 $
|
||||||
// $Author: agibert $
|
// $Author: agibert $
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -41,7 +41,7 @@ $time_start = microtime_float();
|
|||||||
include "/var/httpd/www.langueur-monotone.com/html/lmbrowse_config.inc";
|
include "/var/httpd/www.langueur-monotone.com/html/lmbrowse_config.inc";
|
||||||
|
|
||||||
$lmb_myname="LMBrowse";
|
$lmb_myname="LMBrowse";
|
||||||
$lmb_tag_tab=explode( " ", "$Name: $");
|
$lmb_tag_tab=explode( " ", "\$Name: $");
|
||||||
$lmb_tag_tab=explode( "-", $lmb_tag_tab[1]);
|
$lmb_tag_tab=explode( "-", $lmb_tag_tab[1]);
|
||||||
$lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", ".");
|
$lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", ".");
|
||||||
|
|
||||||
@ -74,13 +74,16 @@ function lmb_cookie_load( $cookie_id, $cookie_defvalue)
|
|||||||
global $lmb_cookie_tab;
|
global $lmb_cookie_tab;
|
||||||
|
|
||||||
|
|
||||||
$cookie_value = $_COOKIE[ $cookie_id];
|
if( array_key_exists ( $cookie_id, $_COOKIE))
|
||||||
// echo "load val ($cookie_value) for ($cookie_id)";
|
{
|
||||||
|
$cookie_value = $_COOKIE[ $cookie_id];
|
||||||
|
// echo "load val ($cookie_value) for ($cookie_id)";
|
||||||
|
}
|
||||||
|
|
||||||
if( ! isset( $cookie_value))
|
if( ! isset( $cookie_value))
|
||||||
{
|
{
|
||||||
$cookie_value = $cookie_defvalue;
|
$cookie_value = $cookie_defvalue;
|
||||||
// echo "set def val ($cookie_defvalue) for ($cookie_id)";
|
// echo "set def val ($cookie_defvalue) for ($cookie_id)";
|
||||||
}
|
}
|
||||||
|
|
||||||
$lmb_cookie_tab[ $cookie_id] = $cookie_value;
|
$lmb_cookie_tab[ $cookie_id] = $cookie_value;
|
||||||
@ -109,7 +112,14 @@ function lmb_cookies_load()
|
|||||||
|
|
||||||
function lmb_cookie_update( $get_array)
|
function lmb_cookie_update( $get_array)
|
||||||
{
|
{
|
||||||
$cookie_id=$get_array["cookie_id"];
|
if( array_key_exists ( "cookie_id", $get_array))
|
||||||
|
{
|
||||||
|
$cookie_id = $get_array["cookie_id"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$cookie_id = "";
|
||||||
|
}
|
||||||
|
|
||||||
if( $cookie_id != "")
|
if( $cookie_id != "")
|
||||||
{
|
{
|
||||||
@ -155,7 +165,14 @@ function lmb_admin_update()
|
|||||||
global $lmb_cookie_tab;
|
global $lmb_cookie_tab;
|
||||||
|
|
||||||
|
|
||||||
$passwd = $_POST["password"];
|
if( array_key_exists ( "password", $_POST))
|
||||||
|
{
|
||||||
|
$passwd = $_POST["password"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$passwd = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if( $passwd != "")
|
if( $passwd != "")
|
||||||
@ -401,6 +418,59 @@ gapi.plusone.render
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Make Tab */
|
/* Make Tab */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@ -709,11 +779,12 @@ function lmb_header( $page_id, $page_name, $img_path, $img_alt, $description, $k
|
|||||||
|
|
||||||
function lmb_footer()
|
function lmb_footer()
|
||||||
{
|
{
|
||||||
global $lmb_myname;
|
global $lmb_url;
|
||||||
global $lmb_myver;
|
global $lmb_myname;
|
||||||
global $lmb_body_footer;
|
global $lmb_myver;
|
||||||
global $lmb_page_footer;
|
global $lmb_body_footer;
|
||||||
global $time_start;
|
global $lmb_page_footer;
|
||||||
|
global $time_start;
|
||||||
|
|
||||||
|
|
||||||
echo " </tbody>
|
echo " </tbody>
|
||||||
@ -745,6 +816,8 @@ function lmb_footer()
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td style=\"width: 16px;\"></td>
|
<td style=\"width: 16px;\"></td>
|
||||||
|
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-rss\" href=\"http://www.langueur-monotone.com/?page=rss\" title=\"Langueur Monotone RSS feed\"></a></td>
|
||||||
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 96px;\"><a rel=\"\" class=\"button-rx3\" href=\"http://www.rx3.net/\" title=\"Rx3.Net\"></a></td>
|
<td class=\"button-item\" style=\"width: 96px;\"><a rel=\"\" class=\"button-rx3\" href=\"http://www.rx3.net/\" title=\"Rx3.Net\"></a></td>
|
||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-safe_creative\" href=\"http://www.safecreative.org/\" title=\"SafeCreative\"></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-safe_creative\" href=\"http://www.safecreative.org/\" title=\"SafeCreative\"></a></td>
|
||||||
@ -753,7 +826,7 @@ function lmb_footer()
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style=\"width: 25%;\">
|
<td style=\"width: 30%;\">
|
||||||
<table style=\"width: 100%; height: auto; text-align: left; \" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
<table style=\"width: 100%; height: auto; text-align: left; \" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@ -766,6 +839,8 @@ function lmb_footer()
|
|||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-w3c-css\" href=\"http://jigsaw.w3.org/css-validator/check/referer\" title=\"W3C CSS Validator\"></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" 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 style=\"width: 8px;\"> </td>
|
||||||
|
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-w3c-rss\" href=\"http://feed1.w3.org/check.cgi?url=http%3A//www.langueur-monotone.com/%3Fpage%3Drss\" title=\"W3C RSS Validator\"></a></td>
|
||||||
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-stats\" href=\"/www-stats/\" title=\"Rx3 Statistics\"></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-stats\" href=\"/www-stats/\" title=\"Rx3 Statistics\"></a></td>
|
||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-stats\" href=\"https://www.google.com/analytics/web/?hl=en&pli=1#dashboard//a37642754w66067134p67926512\" title=\"Google Analytics\"></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-stats\" href=\"https://www.google.com/analytics/web/?hl=en&pli=1#dashboard//a37642754w66067134p67926512\" title=\"Google Analytics\"></a></td>
|
||||||
@ -857,11 +932,69 @@ function lmb_welcome_tab( )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* News Tab Get */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_news_tab_get( )
|
||||||
|
{
|
||||||
|
global $lmb_url;
|
||||||
|
|
||||||
|
|
||||||
|
$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}";
|
||||||
|
$news_tab[$i]["rlink"] = "{$lmb_url}?page=play&type={$play_type}&id={$play_id}&priority={$play_priority}";
|
||||||
|
$news_tab[$i]["alink"] = "http://www.langueur-monotone.com{$news_tab[$i]["rlink"]}";
|
||||||
|
$news_tab[$i]["rimg"] = "/discography/{$play_type}/{$play_priority}-{$play_id}/covers/{$play_id}-cover-1-icon.png";
|
||||||
|
$news_tab[$i]["aimg"] = "http://www.langueur-monotone.com{$news_tab[$i]["rimg"]}";
|
||||||
|
}
|
||||||
|
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"] = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return($news_tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* News Tab */
|
/* News Tab */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
function lmb_news_tab( )
|
function lmb_news_tab_old( )
|
||||||
{
|
{
|
||||||
global $lmb_url;
|
global $lmb_url;
|
||||||
|
|
||||||
@ -918,6 +1051,64 @@ function lmb_news_tab( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* News Tab */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_news_tab( )
|
||||||
|
{
|
||||||
|
global $lmb_url;
|
||||||
|
|
||||||
|
|
||||||
|
$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;
|
||||||
|
$link_tag = "<a href=\"{$news_tab[$i]["rlink"]}\">";
|
||||||
|
$img_tag = "<img src=\"{$news_tab[$i]["rimg"]}\" alt=\"\"/>";
|
||||||
|
$play_tag=" <td class=\"news3\">{$link_tag}{$news_tab[$i]["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\"";
|
||||||
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
lmb_make_tab( "news", "news", "r", "/images/lm-logo5-n-220.png", $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Main Body */
|
/* Main Body */
|
||||||
@ -950,6 +1141,83 @@ function lmb_main_page()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* RSS Page */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_rss_page()
|
||||||
|
{
|
||||||
|
header( 'Content-Type: application/rss+xml');
|
||||||
|
|
||||||
|
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>
|
||||||
|
<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>
|
||||||
|
<link>http://www.langueur-monotone.com/?page=rss</link>
|
||||||
|
<atom:link href=\"http://www.langueur-monotone.com/?page=rss\" rel=\"self\" type=\"application/rss+xml\" />
|
||||||
|
<description>Langueur Monotone project news RSS feed</description>
|
||||||
|
<image>
|
||||||
|
<url>http://www.langueur-monotone.com/images/lm-logo6-n-220.png</url>
|
||||||
|
<title>Langueur Monotone News Page</title>
|
||||||
|
<link>http://www.langueur-monotone.com/?page=rss</link>
|
||||||
|
</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>
|
||||||
|
<guid>http://www.langueur-monotone.com/#$i</guid>
|
||||||
|
";
|
||||||
|
|
||||||
|
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>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* About Tab */
|
/* About Tab */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@ -1135,7 +1403,7 @@ function lmb_playlist_next( $play_type, $path, $row)
|
|||||||
{
|
{
|
||||||
$tab=explode( "\t", $line[$i]);
|
$tab=explode( "\t", $line[$i]);
|
||||||
|
|
||||||
if( "{$tab[4]}" != "")
|
if( ( count($tab) >4 ) && ( "{$tab[4]}" != ""))
|
||||||
{
|
{
|
||||||
$icon = "/images/{$tab[4]}";
|
$icon = "/images/{$tab[4]}";
|
||||||
}
|
}
|
||||||
@ -1146,7 +1414,16 @@ function lmb_playlist_next( $play_type, $path, $row)
|
|||||||
|
|
||||||
$css_row=($row+1)%2+1;
|
$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>
|
if( count($tab) > 3)
|
||||||
|
{
|
||||||
|
$comment = $tab[3];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$comment = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
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\">{$comment}</td><td> </td></tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1330,42 +1607,52 @@ function lmb_track_info_get( $play_type, $play_id, $play_priority, $track_id)
|
|||||||
$line = array();
|
$line = array();
|
||||||
$track_info = array();
|
$track_info = array();
|
||||||
|
|
||||||
$cmd="eval \$( metaflac --export-tags-to=- \"${track_file}\" | grep -v -e \".* .*=\" -e \".*-.*=\" | sed -e 's/=/=\\\"/' -e 's/$/\"/')
|
if( count($track_array) == 0)
|
||||||
|
{
|
||||||
|
$track_info["status"] = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$track_info["status"] = 1;
|
||||||
|
|
||||||
|
|
||||||
|
$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}\"";
|
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);
|
exec($cmd, $line);
|
||||||
|
|
||||||
$tab = explode( "\t", $line[0]);
|
$tab = explode( "\t", $line[0]);
|
||||||
|
|
||||||
$track_info["id"] = $tab[0];
|
$track_info["id"] = $tab[0];
|
||||||
$track_info["file"] = $tab[1];
|
$track_info["file"] = $tab[1];
|
||||||
$track_info["artist"] = $tab[2];
|
$track_info["artist"] = $tab[2];
|
||||||
$track_info["album"] = $tab[3];
|
$track_info["album"] = $tab[3];
|
||||||
$track_info["title"] = $tab[4];
|
$track_info["title"] = $tab[4];
|
||||||
$track_info["mix"] = $tab[5];
|
$track_info["mix"] = $tab[5];
|
||||||
$track_info["composer"] = $tab[6];
|
$track_info["composer"] = $tab[6];
|
||||||
$track_info["comment"] = $tab[7];
|
$track_info["comment"] = $tab[7];
|
||||||
$track_info["sample_rate"] = $tab[8];
|
$track_info["sample_rate"] = $tab[8];
|
||||||
$track_info["sample_nb"] = $tab[9];
|
$track_info["sample_nb"] = $tab[9];
|
||||||
|
|
||||||
if( "{$track_info["title"]}" == "{$track_info["mix"]}")
|
if( "{$track_info["title"]}" == "{$track_info["mix"]}")
|
||||||
{
|
{
|
||||||
$track_info["mix"]="";
|
$track_info["mix"]="";
|
||||||
|
}
|
||||||
|
|
||||||
|
$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["duration"] = "PT{$min}M{$sec}S";
|
||||||
|
$track_info["safe_creative"] = $tab[10];
|
||||||
|
|
||||||
|
$search_tab = array( "/flac/", ".flac");
|
||||||
|
$replace_tab = array( "/mp3-192/", ".mp3");
|
||||||
|
|
||||||
|
$track_info["url"] = "/".str_replace( $search_tab, $replace_tab, "${track_file}");
|
||||||
}
|
}
|
||||||
|
|
||||||
$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["duration"] = "PT{$min}M{$sec}S";
|
|
||||||
$track_info["safe_creative"] = $tab[10];
|
|
||||||
|
|
||||||
$search_tab = array( "/flac/", ".flac");
|
|
||||||
$replace_tab = array( "/mp3-192/", ".mp3");
|
|
||||||
|
|
||||||
$track_info["url"] = "/".str_replace( $search_tab, $replace_tab, "${track_file}");
|
|
||||||
|
|
||||||
return( $track_info);
|
return( $track_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1391,16 +1678,39 @@ function lmb_track_file_tag_get( $play_type, $play_id, $play_priority, $track_id
|
|||||||
$dir = basename( $file_dir);
|
$dir = basename( $file_dir);
|
||||||
$tab = explode( "-", $dir);
|
$tab = explode( "-", $dir);
|
||||||
$file_type = $tab[0];
|
$file_type = $tab[0];
|
||||||
$file_subtype = $tab[1];
|
|
||||||
|
|
||||||
$file_pat = "{$track_path}/{$dir}/{$track_id}-*.{$file_type}";
|
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}";
|
||||||
|
}
|
||||||
|
|
||||||
$file_tab = glob( "{$file_pat}");
|
$file_tab = glob( "{$file_pat}");
|
||||||
$file_url = $file_tab[0];
|
|
||||||
|
if( count( $file_tab) > 0)
|
||||||
|
{
|
||||||
|
$file_url = $file_tab[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$file_url = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$file_tag = "{$file_tag}<td class=\"tracks7\">";
|
$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( count( glob( "{$file_url}")))
|
||||||
{
|
{
|
||||||
if( "{$track_id}" == "00")
|
if( "{$track_id}" == "00")
|
||||||
@ -1555,8 +1865,6 @@ function lmb_tracklist( $play_type, $play_id, $play_priority)
|
|||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
lmb_make_tab( "tracks", "tracks", "r", "/images/lm-logo3-n-96.png", $data);
|
lmb_make_tab( "tracks", "tracks", "r", "/images/lm-logo3-n-96.png", $data);
|
||||||
|
|
||||||
return( $row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1565,7 +1873,7 @@ function lmb_tracklist( $play_type, $play_id, $play_priority)
|
|||||||
/* File Entry Print */
|
/* File Entry Print */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
function lmb_file_entry_print( $file_tab, $format_css_id, $size_css_id, $entry_tag)
|
function lmb_file_entry_print( $file_tab, $format_css_id, $size_css_id, $entry_tag, $max_nb)
|
||||||
{
|
{
|
||||||
echo "{$entry_tag}";
|
echo "{$entry_tag}";
|
||||||
|
|
||||||
@ -1582,6 +1890,19 @@ function lmb_file_entry_print( $file_tab, $format_css_id, $size_css_id, $entry_t
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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>
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
echo " </tr>
|
echo " </tr>
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
@ -1604,6 +1925,7 @@ function lmb_cover_file_tab_get( $play_type, $play_id, $play_priority, $cover_id
|
|||||||
exec( $cmd, $cover_format_tab);
|
exec( $cmd, $cover_format_tab);
|
||||||
|
|
||||||
$file_tab = array();
|
$file_tab = array();
|
||||||
|
$file_tag = "";
|
||||||
|
|
||||||
for( $i = 0; $i < count($cover_format_tab); $i++)
|
for( $i = 0; $i < count($cover_format_tab); $i++)
|
||||||
{
|
{
|
||||||
@ -1669,7 +1991,7 @@ function lmb_coverlist( $play_type, $play_id, $play_priority)
|
|||||||
<td class=\"covers2\" colspan=\"2\" style=\"text-align: left;\"> All the Covers </td>
|
<td class=\"covers2\" colspan=\"2\" style=\"text-align: left;\"> All the Covers </td>
|
||||||
";
|
";
|
||||||
|
|
||||||
lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}");
|
lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}", count( $file_tab));
|
||||||
|
|
||||||
for( $i = 0; $i < count($sheet_tab); $i++)
|
for( $i = 0; $i < count($sheet_tab); $i++)
|
||||||
{
|
{
|
||||||
@ -1699,7 +2021,7 @@ function lmb_coverlist( $play_type, $play_id, $play_priority)
|
|||||||
<td class=\"covers1\"><a href=\"{$file_tab[0]["url"]}\"><img src=\"{$cover_path}-{$sheet_tab[$i]}-icon.png\" alt=\"\"/></a></td>
|
<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>";
|
<td class=\"covers2\"> {$sheet_name} </td>";
|
||||||
|
|
||||||
lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}");
|
lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}", count( $file_tab));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1708,8 +2030,6 @@ function lmb_coverlist( $play_type, $play_id, $play_priority)
|
|||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
lmb_make_tab( "covers", "covers", "l", "{$logo_path}-2-128.png", $data);
|
lmb_make_tab( "covers", "covers", "l", "{$logo_path}-2-128.png", $data);
|
||||||
|
|
||||||
return( $row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1797,7 +2117,7 @@ function lmb_videolist( $play_type, $play_id, $play_priority)
|
|||||||
<td class=\"videos2\" colspan=\"4\" style=\"text-align: left;\"> All the Videos </td>
|
<td class=\"videos2\" colspan=\"4\" style=\"text-align: left;\"> All the Videos </td>
|
||||||
";
|
";
|
||||||
|
|
||||||
lmb_file_entry_print( $file_tab, "videos5", "videos6", $entry_tag);
|
lmb_file_entry_print( $file_tab, "videos5", "videos6", $entry_tag, count( $file_tab));
|
||||||
|
|
||||||
for( $i = 0; $i < count($video_tab); $i++)
|
for( $i = 0; $i < count($video_tab); $i++)
|
||||||
{
|
{
|
||||||
@ -1825,7 +2145,7 @@ function lmb_videolist( $play_type, $play_id, $play_priority)
|
|||||||
<td class=\"videos4\"> {$video_mix_name} </td>
|
<td class=\"videos4\"> {$video_mix_name} </td>
|
||||||
";
|
";
|
||||||
|
|
||||||
lmb_file_entry_print( $file_tab, "videos5", "videos6", "{$entry_tag}");
|
lmb_file_entry_print( $file_tab, "videos5", "videos6", "{$entry_tag}", count( $file_tab));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1834,8 +2154,6 @@ function lmb_videolist( $play_type, $play_id, $play_priority)
|
|||||||
ob_end_clean();
|
ob_end_clean();
|
||||||
|
|
||||||
lmb_make_tab( "videos", "videos", "r", "{$logo_path}-1-128.png", $data);
|
lmb_make_tab( "videos", "videos", "r", "{$logo_path}-1-128.png", $data);
|
||||||
|
|
||||||
return( $row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1852,10 +2170,11 @@ function lmb_extra_file_tab_get( $play_type, $play_id, $play_priority, $extra_id
|
|||||||
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
||||||
$extra_path="{$play_path}/extras";
|
$extra_path="{$play_path}/extras";
|
||||||
|
|
||||||
$cmd = "ls {$extra_path}/{$play_id}-{$extra_id}-*.png | sed -e 's/.*-//' -e 's/.png$//' | sort -rnu";
|
$cmd = "ls {$extra_path}/{$play_id}-{$extra_id}-*.png | sed -e 's/.*-//' -e 's/.png$//' | sort -nu";
|
||||||
exec( $cmd, $extra_format_tab);
|
exec( $cmd, $extra_format_tab);
|
||||||
|
|
||||||
$file_tab = array();
|
$file_tab = array();
|
||||||
|
$file_tag = "";
|
||||||
|
|
||||||
for( $i = 0; $i < count($extra_format_tab); $i++)
|
for( $i = 0; $i < count($extra_format_tab); $i++)
|
||||||
{
|
{
|
||||||
@ -1905,7 +2224,7 @@ function lmb_extralist( $play_type, $play_id, $play_priority)
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-.*-//' | sort -rnu";
|
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-.*-//' | sort -u";
|
||||||
exec($cmd, $format_tab);
|
exec($cmd, $format_tab);
|
||||||
|
|
||||||
if( count($format_tab) == 0 || ( file_exists( "{$extra_path}/.hide" ) && ! lmb_admin_is()))
|
if( count($format_tab) == 0 || ( file_exists( "{$extra_path}/.hide" ) && ! lmb_admin_is()))
|
||||||
@ -1921,22 +2240,30 @@ function lmb_extralist( $play_type, $play_id, $play_priority)
|
|||||||
$title_tag = " <td class=\"extras2\" rowspan=\"{$format_nb}\" colspan=\"3\" style=\"text-align: left;\"> All the Extras </td>
|
$title_tag = " <td class=\"extras2\" rowspan=\"{$format_nb}\" colspan=\"3\" style=\"text-align: left;\"> All the Extras </td>
|
||||||
";
|
";
|
||||||
|
|
||||||
|
$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]));
|
||||||
|
}
|
||||||
|
|
||||||
foreach( $format_tab as $format)
|
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}");
|
$extra_format = str_replace( "_", "/", "{$format}");
|
||||||
|
|
||||||
$entry_tag = " <tr class=\"extras0\" style=\"height: 30px\">
|
$entry_tag = " <tr class=\"extras0\" style=\"height: 30px\">
|
||||||
${title_tag} <td class=\"extras4\"> {$extra_format} </td>
|
${title_tag} <td class=\"extras4\"> {$extra_format} </td>
|
||||||
";
|
";
|
||||||
|
|
||||||
lmb_file_entry_print( $file_tab, "extras5", "extras6", "{$entry_tag}");
|
lmb_file_entry_print( $file_tab[ $format], "extras5", "extras6", "{$entry_tag}", $max_file_nb);
|
||||||
|
|
||||||
$title_tag = "";
|
$title_tag = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-//'";
|
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-//' | sort ";
|
||||||
exec($cmd, $extra_tab);
|
exec($cmd, $extra_tab);
|
||||||
|
|
||||||
$height = max( 86, ( ( 220 - 30 * $format_nb) / count($extra_tab)));
|
$height = max( 86, ( ( 220 - 30 * $format_nb) / count($extra_tab)));
|
||||||
@ -1957,13 +2284,13 @@ ${title_tag} <td class=\"extras4\">&nbs
|
|||||||
$css_row = $i % 2 + 1;
|
$css_row = $i % 2 + 1;
|
||||||
|
|
||||||
$entry_tag = " <tr class=\"extras{$css_row}\" style=\"height: {$height}px\">
|
$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=\"extras1\"><a href=\"{$file_tab[1]["url"]}\"><img src=\"{$extra_prefix}-icon.png\" alt=\"\"/></a></td>
|
||||||
<td class=\"extras2\"> {$extra_type} </td>
|
<td class=\"extras2\"> {$extra_type} </td>
|
||||||
<td class=\"extras3\"> {$extra_subid} </td>
|
<td class=\"extras3\"> {$extra_subid} </td>
|
||||||
<td class=\"extras4\"> {$extra_format} </td>
|
<td class=\"extras4\"> {$extra_format} </td>
|
||||||
";
|
";
|
||||||
|
|
||||||
lmb_file_entry_print( $file_tab, "extras5", "extras6", "{$entry_tag}");
|
lmb_file_entry_print( $file_tab, "extras5", "extras6", "{$entry_tag}", $max_file_nb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1981,12 +2308,13 @@ ${title_tag} <td class=\"extras4\">&nbs
|
|||||||
|
|
||||||
function lmb_links_tab( $play_type, $play_id, $play_priority)
|
function lmb_links_tab( $play_type, $play_id, $play_priority)
|
||||||
{
|
{
|
||||||
$play_path="discography/{$play_type}/{$play_priority}-{$play_id}";
|
$play_path = "discography/{$play_type}/{$play_priority}-{$play_id}";
|
||||||
$links_file = "{$play_path}/.links";
|
$global_links_file = ".links";
|
||||||
|
$local_links_file = "{$play_path}/.links";
|
||||||
|
|
||||||
|
|
||||||
$line = array();
|
$line = array();
|
||||||
$cmd = "sed -e 's/\t*\t/\t/g' ${links_file}";
|
$cmd = "cat ${local_links_file} ${global_links_file} | sed -e 's/\t*\t/\t/g'";
|
||||||
|
|
||||||
exec( $cmd, $line);
|
exec( $cmd, $line);
|
||||||
|
|
||||||
@ -1999,10 +2327,18 @@ function lmb_links_tab( $play_type, $play_id, $play_priority)
|
|||||||
$tab = explode( "\t", $line[$i]);
|
$tab = explode( "\t", $line[$i]);
|
||||||
$css_row = ( $i + 1) % 2 + 1;
|
$css_row = ( $i + 1) % 2 + 1;
|
||||||
|
|
||||||
$text = lmb_html_text_format( "{$tab[0]}");
|
$text = lmb_html_text_format( "{$tab[0]}");
|
||||||
$link = htmlentities( "{$tab[1]}");
|
$link = htmlentities( "{$tab[1]}");
|
||||||
$image = "{$tab[2]}";
|
$image = "{$tab[2]}";
|
||||||
$flag = "{$tab[3]}";
|
|
||||||
|
if( count( $tab) > 3)
|
||||||
|
{
|
||||||
|
$flag = "{$tab[3]}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$flag = "";
|
||||||
|
}
|
||||||
|
|
||||||
if( $flag == "nf")
|
if( $flag == "nf")
|
||||||
{
|
{
|
||||||
@ -2519,7 +2855,7 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
|
|||||||
<td style=\"height: 40px; width: auto;\">
|
<td style=\"height: 40px; width: auto;\">
|
||||||
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr class=\"info0\" style=\"height: {$height}px;\">
|
<tr class=\"info0\" style=\"height: 0px;\">
|
||||||
<td class=\"info0\">Informations</td>
|
<td class=\"info0\">Informations</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -2648,28 +2984,59 @@ function lmb_track_download( $play_type, $play_id, $play_priority, $track_id, $t
|
|||||||
$play_tab = explode( "-", $path_tab[2]);
|
$play_tab = explode( "-", $path_tab[2]);
|
||||||
$track_tab = explode( "-", $path_tab[5]);
|
$track_tab = explode( "-", $path_tab[5]);
|
||||||
|
|
||||||
$mix_tab[$i]["play_type"] = $path_tab[1];
|
$play_type = $path_tab[1];
|
||||||
$mix_tab[$i]["play_type_name"] = lmb_play_type_name_get( $path_tab[1]);
|
$play_pri = $play_tab[0];
|
||||||
$mix_tab[$i]["play_id"] = $play_tab[1];
|
$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"]);
|
if( file_exists( "discography/{$play_type}/{$play_pri}-{$play_id}/.hide" ))
|
||||||
|
{
|
||||||
|
$hide = "y";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$hide = "n";
|
||||||
|
}
|
||||||
|
|
||||||
$mix_tab[$i]["track_name"] = $track_info["title"];
|
if( ( $hide == "n") || lmb_admin_is())
|
||||||
$mix_tab[$i]["mix_name"] = $track_info["mix"];
|
{
|
||||||
$mix_tab[$i]["play_name"] = $track_info["album"];
|
$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];
|
||||||
|
|
||||||
|
$mix_tab[$k]["play_url"] = "{$lmb_url}?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}?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"]}";
|
||||||
|
|
||||||
|
$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++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
for( $k = 0; $k < count( $mix_tab); $k++)
|
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;
|
$css_row = ( $k + 1 + count( $mix_tab)) % 2 + 3;
|
||||||
|
|
||||||
echo " <tr class=\"row${css_row}\">
|
echo " <tr class=\"row${css_row}\">
|
||||||
<td class=\"tracks2\"><a href=\"{$mix_tab[$k]["mix_url"]}\">{$mix_tab[$k]["track_name"]}</a></td>
|
<td class=\"tracks2\"><a href=\"{$mix_tab[$k]["mix_url"]}\">{$mix_tab[$k]["track_name"]}{$hide_flag}</a></td>
|
||||||
<td class=\"tracks3\"><a href=\"{$mix_tab[$k]["mix_url"]}\">{$mix_tab[$k]["mix_name"]}</a></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=\"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>
|
<td class=\"tracks3\"><a href=\"{$mix_tab[$k]["play_url"]}\">{$mix_tab[$k]["play_name"]}</a></td>
|
||||||
@ -3141,13 +3508,29 @@ function lmb_fl_page( $lmb_id, $lmb_name, $lmb_curver, $lmb_currel)
|
|||||||
|
|
||||||
function lmb_get_proceed( $get_array)
|
function lmb_get_proceed( $get_array)
|
||||||
{
|
{
|
||||||
|
global $lmb_tab;
|
||||||
|
|
||||||
|
|
||||||
lmb_admin_update();
|
lmb_admin_update();
|
||||||
lmb_cookie_update( $get_array);
|
lmb_cookie_update( $get_array);
|
||||||
|
|
||||||
$page_id=$get_array["page"];
|
if( array_key_exists ( "page", $get_array))
|
||||||
|
{
|
||||||
|
$page_id=$get_array["page"];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$page_id="";
|
||||||
|
}
|
||||||
|
|
||||||
switch ($page_id)
|
switch ($page_id)
|
||||||
{
|
{
|
||||||
|
case "rss":
|
||||||
|
{
|
||||||
|
lmb_rss_page( );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case "about":
|
case "about":
|
||||||
{
|
{
|
||||||
lmb_about_page( $lmb_tab);
|
lmb_about_page( $lmb_tab);
|
||||||
@ -3234,7 +3617,7 @@ function lmb_get_proceed( $get_array)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
lmb_main_page( $lmb_tab);
|
lmb_main_page( );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user