Compare commits
2 Commits
lmbrowse-1
...
lmbrowse-1
| Author | SHA1 | Date | |
|---|---|---|---|
| d5f7cf5bc8 | |||
| 2d8ad0c05b |
@@ -1,13 +1,13 @@
|
|||||||
<?
|
<?
|
||||||
// $RCSfile: lmbrowse.php,v $
|
// $RCSfile: lmbrowse.php,v $
|
||||||
// $Revision: 1.17 $
|
// $Revision: 1.17 $
|
||||||
// $Name: lmbrowse-1_6_0-1 $
|
// $Name: lmbrowse-1_7_0-1 $
|
||||||
// $Date: 2016/03/21 16:07:30 $
|
// $Date: 2016/03/21 16:07:30 $
|
||||||
// $Author: agibert $
|
// $Author: agibert $
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* LMBrowse - Langueur Monotone Browser
|
* LMBrowse - Langueur Monotone Browser
|
||||||
* Copyright (C) 2012-2018 Arnaud G. GIBERT
|
* Copyright (C) 2012-2020 Arnaud G. GIBERT
|
||||||
* mailto:arnaud@rx3.net
|
* mailto:arnaud@rx3.net
|
||||||
* http://www.rx3.org/dvp/lmbrowse
|
* http://www.rx3.org/dvp/lmbrowse
|
||||||
*
|
*
|
||||||
@@ -38,11 +38,10 @@ $time_start = microtime_float();
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//include "/var/httpd/www.langueurmonotone.com/html/lmbrowse_config.inc";
|
|
||||||
include "lmbrowse_config.inc";
|
include "lmbrowse_config.inc";
|
||||||
|
|
||||||
$lmb_myname="LMBrowse";
|
$lmb_myname="LMBrowse";
|
||||||
$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_6_0-1 $");
|
$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_7_0-1 $");
|
||||||
$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]", "_", ".");
|
||||||
|
|
||||||
@@ -173,7 +172,7 @@ function lmb_cookies_load()
|
|||||||
|
|
||||||
|
|
||||||
lmb_cookie_load( "video_res", "1080p");
|
lmb_cookie_load( "video_res", "1080p");
|
||||||
lmb_cookie_load( "jpsolution", "html, flash");
|
lmb_cookie_load( "jpsolution", "native");
|
||||||
lmb_cookie_load( "admin", "");
|
lmb_cookie_load( "admin", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,6 +203,24 @@ function lmb_cookie_update( $get_array)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* Get Array */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_get_array( $get_array, $get_key, $default_value)
|
||||||
|
{
|
||||||
|
if( array_key_exists ( "$get_key", $get_array))
|
||||||
|
{
|
||||||
|
return( preg_replace("/[^A-Za-z0-9\-_\*\.]/", "", $get_array["$get_key"]));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return( "$default_value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Admin Is */
|
/* Admin Is */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -305,8 +322,6 @@ function lmb_html_text_format( $input_text)
|
|||||||
"</H>",
|
"</H>",
|
||||||
"<LM>",
|
"<LM>",
|
||||||
"</LM>",
|
"</LM>",
|
||||||
"<G+1/>",
|
|
||||||
"<G+B/>",
|
|
||||||
"<F+1/>",
|
"<F+1/>",
|
||||||
"<MSF/>"
|
"<MSF/>"
|
||||||
);
|
);
|
||||||
@@ -326,42 +341,6 @@ function lmb_html_text_format( $input_text)
|
|||||||
"<span style=\"font-family:CustomFont; font-weight:normal;\">",
|
"<span style=\"font-family:CustomFont; font-weight:normal;\">",
|
||||||
"</span>",
|
"</span>",
|
||||||
"
|
"
|
||||||
<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script>
|
|
||||||
<div class=\"g-plusone\" style=\"font-size: 0px;\" data-href=\"http://plus.google.com/117621568322370019205\" data-size=\"medium\" data-annotation=\"inline\" data-align=\"right\"></div>",
|
|
||||||
"
|
|
||||||
<div style=\"text-align: right;\"> <div id=\"gplus-div\"></div></div>
|
|
||||||
<script type=\"text/javascript\">
|
|
||||||
function getElementByIdUniversal( id )
|
|
||||||
{
|
|
||||||
return ( document.getElementById ) ? document.getElementById( id ) : document.all[ id ];
|
|
||||||
}
|
|
||||||
function plusoneready()
|
|
||||||
{
|
|
||||||
gapi.plus.render( 'gplus-div', { 'href': 'http://plus.google.com/117621568322370019205', 'theme': 'dark', 'height': '69', 'width': '400'} );
|
|
||||||
}
|
|
||||||
(function()
|
|
||||||
{
|
|
||||||
var gp = document.createElement( 'script' );
|
|
||||||
gp.type = 'text/javascript';
|
|
||||||
gp.async = true;
|
|
||||||
gp.src = 'https://apis.google.com/js/plusone.js';
|
|
||||||
gp.onload = plusoneready;
|
|
||||||
|
|
||||||
// Only for IE 6 and 7
|
|
||||||
gp.onreadystatechange = function()
|
|
||||||
{
|
|
||||||
if( this.readyState == 'complete' )
|
|
||||||
{
|
|
||||||
plusoneready();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var div = getElementByIdUniversal( 'gplus-div' );
|
|
||||||
div.parentNode.insertBefore( gp, div );
|
|
||||||
}
|
|
||||||
)();
|
|
||||||
</script>",
|
|
||||||
"
|
|
||||||
<div class=\"fb-like\" style=\"font-size: 0px;\" data-href=\"http://www.facebook.com/langueur.monotone\" data-send=\"false\" data-layout=\"button_count\" data-width=\"90\" data-show-faces=\"true\" data-colorscheme=\"dark\"></div>
|
<div class=\"fb-like\" style=\"font-size: 0px;\" data-href=\"http://www.facebook.com/langueur.monotone\" data-send=\"false\" data-layout=\"button_count\" data-width=\"90\" data-show-faces=\"true\" data-colorscheme=\"dark\"></div>
|
||||||
<div id=\"fb-root\"></div>
|
<div id=\"fb-root\"></div>
|
||||||
<script type=\"text/javascript\">
|
<script type=\"text/javascript\">
|
||||||
@@ -397,6 +376,7 @@ function lmb_xml_text_format( $input_text)
|
|||||||
{
|
{
|
||||||
$search_tab = array(
|
$search_tab = array(
|
||||||
"&",
|
"&",
|
||||||
|
"\"",
|
||||||
"\n",
|
"\n",
|
||||||
"< >",
|
"< >",
|
||||||
"<br/>",
|
"<br/>",
|
||||||
@@ -410,14 +390,13 @@ function lmb_xml_text_format( $input_text)
|
|||||||
"</H>",
|
"</H>",
|
||||||
"<LM>",
|
"<LM>",
|
||||||
"</LM>",
|
"</LM>",
|
||||||
"<G+1/>",
|
|
||||||
"<G+B/>",
|
|
||||||
"<F+1/>",
|
"<F+1/>",
|
||||||
"<MSF/>"
|
"<MSF/>"
|
||||||
);
|
);
|
||||||
|
|
||||||
$replace_tab = array(
|
$replace_tab = array(
|
||||||
"&",
|
"&",
|
||||||
|
""",
|
||||||
"\n ",
|
"\n ",
|
||||||
"",
|
"",
|
||||||
"\n",
|
"\n",
|
||||||
@@ -431,8 +410,6 @@ function lmb_xml_text_format( $input_text)
|
|||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
""
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -463,6 +440,17 @@ function lmb_play_path_get( $play_type, $play_id, $play_priority)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* Play Validate */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_play_validate( $play_type, $play_id, $play_priority)
|
||||||
|
{
|
||||||
|
return( file_exists( lmb_play_path_get( $play_type, $play_id, $play_priority)));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Make Tab */
|
/* Make Tab */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -634,6 +622,18 @@ function lmb_menu( $menu_id, $skin_path)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* Redirect Page */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_redirect_page( $page)
|
||||||
|
{
|
||||||
|
header( "Location: /${page}");
|
||||||
|
die();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Header */
|
/* Header */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -776,6 +776,7 @@ function lmb_footer( $skin_path)
|
|||||||
global $time_start;
|
global $time_start;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo " </tbody>
|
echo " </tbody>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
@@ -804,11 +805,11 @@ function lmb_footer( $skin_path)
|
|||||||
<table style=\"width: 100%; height: auto; \" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
<table style=\"width: 100%; height: auto; \" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-item\" href=\"http://{$lmb_url_pre}/?page=rss\" title=\"Langueur Monotone RSS feed\"><div class=\"sprite-button-rss-on\" style=\"\"></div></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-item\" href=\"/?page=rss\" title=\"Langueur Monotone RSS feed\"><div class=\"sprite-button-rss-on\" style=\"\"></div></a></td>
|
||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 96px;\"><a rel=\"\" class=\"button-item\" href=\"http://www.rx3.net/\" title=\"Rx3.Net\"><div class=\"sprite-button-rx3-on\"></div></a></td>
|
<td class=\"button-item\" style=\"width: 96px;\"><a rel=\"\" class=\"button-item\" href=\"https://www.rx3.net/\" title=\"Rx3.Net\"><div class=\"sprite-button-rx3-on\"></div></a></td>
|
||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-item\" href=\"http://www.safecreative.org/\" title=\"SafeCreative\"><div class=\"sprite-button-safe_creative-on\"></div></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-item\" href=\"https://www.safecreative.org/\" title=\"SafeCreative\"><div class=\"sprite-button-safe_creative-on\"></div></a></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -835,7 +836,7 @@ function lmb_footer( $skin_path)
|
|||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"https://www.google.com/webmasters/tools/dashboard?hl=fr&siteUrl=http%3A%2F%2F{$lmb_url_pre}%2F\" title=\"Google Webmaster Tools\"><div class=\"sprite-button-stats-on\"></div></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"https://www.google.com/webmasters/tools/dashboard?hl=fr&siteUrl=http%3A%2F%2F{$lmb_url_pre}%2F\" title=\"Google Webmaster Tools\"><div class=\"sprite-button-stats-on\"></div></a></td>
|
||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-item\" href=\"http://{$lmb_url_pre}/?page=sitemap\" title=\"SiteMap\"><div class=\"sprite-button-rss-on\"></div></a></td>
|
<td class=\"button-item\" style=\"width: 32px;\"><a rel=\"nofollow\" class=\"button-item\" href=\"/?page=sitemap\" title=\"SiteMap\"><div class=\"sprite-button-rss-on\"></div></a></td>
|
||||||
<td style=\"width: 8px;\"> </td>
|
<td style=\"width: 8px;\"> </td>
|
||||||
<td class=\"button-item\" style=\"width: 32px;\">
|
<td class=\"button-item\" style=\"width: 32px;\">
|
||||||
<form action=\"{$lmb_url_post}\" method=\"post\">
|
<form action=\"{$lmb_url_post}\" method=\"post\">
|
||||||
@@ -997,25 +998,22 @@ function lmb_news_json_ld( $news_tab)
|
|||||||
echo "<script type=\"application/ld+json\"> {
|
echo "<script type=\"application/ld+json\"> {
|
||||||
\"@context\": {
|
\"@context\": {
|
||||||
\"ical\": \"http://www.w3.org/2002/12/cal/ical#\",
|
\"ical\": \"http://www.w3.org/2002/12/cal/ical#\",
|
||||||
\"xsd\": \"http://www.w3.org/2001/XMLSchema#\",
|
\"xsd\": \"http://www.w3.org/2001/XMLSchema#\"
|
||||||
\"ical:dtstart\": {
|
|
||||||
\"@type\": \"xsd:dateTime\"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
";
|
";
|
||||||
|
|
||||||
if( "{$news_tab[$i]["news"]}" == "")
|
if( "{$news_tab[$i]["news"]}" == "")
|
||||||
{
|
{
|
||||||
echo " \"ical:summary\": \"{$news_tab[$i]["title"]}: {$news_tab[$i]["name"]}\",
|
echo " \"ical:summary\": \"".lmb_xml_text_format( "{$news_tab[$i]["title"]}: {$news_tab[$i]["name"]}")."\",
|
||||||
\"ical:description\": \"{$news_tab[$i]["title"]}: {$news_tab[$i]["name"]}\",
|
\"ical:description\": \"".lmb_xml_text_format( "{$news_tab[$i]["title"]}").": ".lmb_xml_text_format( "{$news_tab[$i]["name"]}")."\",
|
||||||
\"ical:url\": \"{$news_tab[$i]["alink"]}\",
|
\"ical:url\": \"{$news_tab[$i]["alink"]}\",
|
||||||
\"ical:attach\": \"{$news_tab[$i]["aimg"]}\",
|
\"ical:attach\": \"{$news_tab[$i]["aimg"]}\",
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo " \"ical:summary\": \"{$news_tab[$i]["title"]}\",
|
echo " \"ical:summary\": \"".lmb_xml_text_format( "{$news_tab[$i]["title"]}")."\",
|
||||||
\"ical:description\": \"{$news_tab[$i]["news"]}\",
|
\"ical:description\": \"".lmb_xml_text_format( "{$news_tab[$i]["news"]}")."\",
|
||||||
\"ical:url\": \"http://www.langueur-monotone.com/\",
|
\"ical:url\": \"http://www.langueur-monotone.com/\",
|
||||||
\"ical:attach\": \"http://www.langueur-monotone.com/skin/images/lm-logo2-96.png\",
|
\"ical:attach\": \"http://www.langueur-monotone.com/skin/images/lm-logo2-96.png\",
|
||||||
";
|
";
|
||||||
@@ -1862,6 +1860,21 @@ function lmb_play_intro( $play_type, $play_id, $play_priority, $skin_path)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
/* Track Validate */
|
||||||
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
function lmb_track_validate( $play_type, $play_id, $play_priority, $track_id)
|
||||||
|
{
|
||||||
|
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
|
$track_path = "{$play_path}/tracks";
|
||||||
|
$track_array = glob("{$track_path}/flac/{$track_id}-*.flac");
|
||||||
|
|
||||||
|
return( isset($track_array[0]) && file_exists($track_array[0]));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
/* Track Info Get */
|
/* Track Info Get */
|
||||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||||
@@ -2507,7 +2520,7 @@ ${title_tag} <td class=\"videos4\">&nbs
|
|||||||
$cmd="ls {$video_path}/* | grep -v -- -icon | grep -v -- -poster | sed -e 's/-[0-9][0-9]*p//' -e 's/.*\///' | sort -u";
|
$cmd="ls {$video_path}/* | grep -v -- -icon | grep -v -- -poster | sed -e 's/-[0-9][0-9]*p//' -e 's/.*\///' | sort -u";
|
||||||
exec($cmd, $video_tab);
|
exec($cmd, $video_tab);
|
||||||
|
|
||||||
$height = max( 86, ( ( 220 - 30 * $codec_nb) / count($extra_tab)));
|
$height = max( 86, ( ( 220 - 30 * $codec_nb) / count($video_tab)));
|
||||||
|
|
||||||
for( $i = 0; $i < count($video_tab); $i++)
|
for( $i = 0; $i < count($video_tab); $i++)
|
||||||
{
|
{
|
||||||
@@ -2930,6 +2943,10 @@ function lmb_play_page( $play_type, $play_id, $play_priority)
|
|||||||
|
|
||||||
|
|
||||||
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
|
|
||||||
|
if( file_exists( $play_path))
|
||||||
|
{
|
||||||
|
|
||||||
$play_info = lmb_play_info_get( $play_type, $play_id, $play_priority);
|
$play_info = lmb_play_info_get( $play_type, $play_id, $play_priority);
|
||||||
$play_title = lmb_play_title_get( $play_type, $play_id, $play_priority);
|
$play_title = lmb_play_title_get( $play_type, $play_id, $play_priority);
|
||||||
$play_image = "{$play_type}";
|
$play_image = "{$play_type}";
|
||||||
@@ -2941,6 +2958,11 @@ function lmb_play_page( $play_type, $play_id, $play_priority)
|
|||||||
lmb_play_body( $play_type, $play_id, $play_priority, $skin_path);
|
lmb_play_body( $play_type, $play_id, $play_priority, $skin_path);
|
||||||
lmb_footer( $skin_path);
|
lmb_footer( $skin_path);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3273,8 +3295,8 @@ function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $t
|
|||||||
<td style=\"vertical-align: middle; padding: 10px 0px 0px 0px;\">
|
<td style=\"vertical-align: middle; padding: 10px 0px 0px 0px;\">
|
||||||
|
|
||||||
<audio controls autoplay style=\"width: 90%;\">
|
<audio controls autoplay style=\"width: 90%;\">
|
||||||
<source src=\"http://{$lmb_url_pre}/{$track_file_ogg}\" type=\"audio/ogg\">
|
<source src=\"{$track_file_ogg}\" type=\"audio/ogg\">
|
||||||
<source src=\"http://{$lmb_url_pre}/{$track_file_mp3}\" type=\"audio/mpeg\">
|
<source src=\"{$lmb_url_pre}/{$track_file_mp3}\" type=\"audio/mpeg\">
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
</td>
|
</td>
|
||||||
@@ -3313,8 +3335,8 @@ Your browser does not support the audio element.
|
|||||||
ready: function (event) {
|
ready: function (event) {
|
||||||
$(this).jPlayer(\"setMedia\", {
|
$(this).jPlayer(\"setMedia\", {
|
||||||
title: \"{$track_fulltitle}\",
|
title: \"{$track_fulltitle}\",
|
||||||
oga:\"http://{$lmb_url_pre}/{$track_file_ogg}\",
|
oga:\"{$track_file_ogg}\",
|
||||||
mp3:\"http://{$lmb_url_pre}/{$track_file_mp3}\"
|
mp3:\"{$track_file_mp3}\"
|
||||||
}).jPlayer(\"play\");
|
}).jPlayer(\"play\");
|
||||||
},
|
},
|
||||||
swfPath: \"/jplayer\",
|
swfPath: \"/jplayer\",
|
||||||
@@ -3529,6 +3551,7 @@ function lmb_track_video( $play_type, $play_id, $play_priority, $track_id, $trac
|
|||||||
{
|
{
|
||||||
global $lmb_cookie_tab;
|
global $lmb_cookie_tab;
|
||||||
global $lmb_url_pre;
|
global $lmb_url_pre;
|
||||||
|
global $lmb_url_post;
|
||||||
|
|
||||||
|
|
||||||
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
@@ -3877,7 +3900,6 @@ function lmb_download_zip( $directory, $file_list, $mode)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3914,10 +3936,19 @@ function lmb_download_file( $play_dir, $file_list, $mode, $download_name)
|
|||||||
function lmb_download_tracks( $play_type, $play_id, $play_priority, $file_type, $mode)
|
function lmb_download_tracks( $play_type, $play_id, $play_priority, $file_type, $mode)
|
||||||
{
|
{
|
||||||
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
|
$file_array = glob("{$play_dir}/tracks/{$file_type}/*");
|
||||||
|
|
||||||
|
if( isset($file_array[0]) && file_exists( $file_array[0]))
|
||||||
|
{
|
||||||
$file_list = "tracks/{$file_type}/* covers/{$play_id}-*-800.png";
|
$file_list = "tracks/{$file_type}/* covers/{$play_id}-*-800.png";
|
||||||
|
|
||||||
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$file_type}"));
|
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$file_type}"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3929,9 +3960,17 @@ function lmb_download_covers( $play_type, $play_id, $play_priority, $cover_forma
|
|||||||
{
|
{
|
||||||
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
$file_list = "covers/{$play_id}-cover-*-{$cover_format}.png";
|
$file_list = "covers/{$play_id}-cover-*-{$cover_format}.png";
|
||||||
|
$file_array = glob("{$play_dir}/{$file_list}");
|
||||||
|
|
||||||
|
if( isset($file_array[0]) && file_exists( $file_array[0]))
|
||||||
|
{
|
||||||
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$cover_format}"));
|
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$cover_format}"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3943,9 +3982,17 @@ function lmb_download_videos( $play_type, $play_id, $play_priority, $video_forma
|
|||||||
{
|
{
|
||||||
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
$file_list = "videos/*-{$video_format}";
|
$file_list = "videos/*-{$video_format}";
|
||||||
|
$file_array = glob("{$play_dir}/{$file_list}");
|
||||||
|
|
||||||
|
if( isset($file_array[0]) && file_exists( $file_array[0]))
|
||||||
|
{
|
||||||
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$video_format}"));
|
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$video_format}"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -3957,9 +4004,17 @@ function lmb_download_extras( $play_type, $play_id, $play_priority, $extra_forma
|
|||||||
{
|
{
|
||||||
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
$play_dir = lmb_play_path_get( $play_type, $play_id, $play_priority);
|
||||||
$file_list = "extras/{$play_id}-*-{$extra_format}.png";
|
$file_list = "extras/{$play_id}-*-{$extra_format}.png";
|
||||||
|
$file_array = glob("{$play_dir}/{$file_list}");
|
||||||
|
|
||||||
|
if( isset($file_array[0]) && file_exists( $file_array[0]))
|
||||||
|
{
|
||||||
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$extra_format}"));
|
return( lmb_download_file( $play_dir, $file_list, $mode, "{$play_id}-{$extra_format}"));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -4098,14 +4153,7 @@ function lmb_get_proceed( $get_array)
|
|||||||
lmb_admin_update();
|
lmb_admin_update();
|
||||||
lmb_cookie_update( $get_array);
|
lmb_cookie_update( $get_array);
|
||||||
|
|
||||||
if( array_key_exists ( "page", $get_array))
|
$page_id = lmb_get_array( $get_array, "page", "main");
|
||||||
{
|
|
||||||
$page_id=$get_array["page"];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$page_id="";
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($page_id)
|
switch ($page_id)
|
||||||
{
|
{
|
||||||
@@ -4135,11 +4183,19 @@ function lmb_get_proceed( $get_array)
|
|||||||
|
|
||||||
case "play":
|
case "play":
|
||||||
{
|
{
|
||||||
$play_type=$get_array["type"];
|
$play_type = lmb_get_array( $get_array, "type", "");
|
||||||
$play_id=$get_array["id"];
|
$play_id = lmb_get_array( $get_array, "id", "");
|
||||||
$play_priority=$get_array["priority"];
|
$play_priority = lmb_get_array( $get_array, "priority", "");
|
||||||
|
|
||||||
|
if( lmb_play_validate( $play_type, $play_id, $play_priority))
|
||||||
|
{
|
||||||
lmb_play_page( $play_type, $play_id, $play_priority);
|
lmb_play_page( $play_type, $play_id, $play_priority);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( "");
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4151,27 +4207,37 @@ function lmb_get_proceed( $get_array)
|
|||||||
|
|
||||||
case "track":
|
case "track":
|
||||||
{
|
{
|
||||||
$play_type=$get_array["type"];
|
$play_type = lmb_get_array( $get_array, "type", "");
|
||||||
$play_id=$get_array["id"];
|
$play_id = lmb_get_array( $get_array, "id", "");
|
||||||
$play_priority=$get_array["priority"];
|
$play_priority = lmb_get_array( $get_array, "priority", "");
|
||||||
$track_id=$get_array["tid"];
|
$track_id = lmb_get_array( $get_array, "tid", "");
|
||||||
|
|
||||||
|
if( lmb_track_validate( $play_type, $play_id, $play_priority, $track_id))
|
||||||
|
{
|
||||||
lmb_track_page( $play_type, $play_id, $play_priority, $track_id);
|
lmb_track_page( $play_type, $play_id, $play_priority, $track_id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( "");
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "download":
|
case "download":
|
||||||
{
|
{
|
||||||
$play_type=$get_array["type"];
|
$play_type = lmb_get_array( $get_array, "type", "");
|
||||||
$play_id=$get_array["id"];
|
$play_id = lmb_get_array( $get_array, "id", "");
|
||||||
$play_priority=$get_array["priority"];
|
$play_priority = lmb_get_array( $get_array, "priority", "");
|
||||||
$download_type=$get_array["dtype"];
|
|
||||||
|
if( lmb_play_validate( $play_type, $play_id, $play_priority))
|
||||||
|
{
|
||||||
|
$download_type = lmb_get_array( $get_array, "dtype", "");
|
||||||
|
|
||||||
switch( "{$download_type}")
|
switch( "{$download_type}")
|
||||||
{
|
{
|
||||||
case "track":
|
case "track":
|
||||||
{
|
{
|
||||||
$file_type=$get_array["ftype"];
|
$file_type = lmb_get_array( $get_array, "ftype", "");
|
||||||
|
|
||||||
lmb_download_tracks( $play_type, $play_id, $play_priority, $file_type, "DUMP");
|
lmb_download_tracks( $play_type, $play_id, $play_priority, $file_type, "DUMP");
|
||||||
break;
|
break;
|
||||||
@@ -4179,7 +4245,7 @@ function lmb_get_proceed( $get_array)
|
|||||||
|
|
||||||
case "cover":
|
case "cover":
|
||||||
{
|
{
|
||||||
$cover_format=$get_array["cformat"];
|
$cover_format = lmb_get_array( $get_array, "cformat", "");
|
||||||
|
|
||||||
lmb_download_covers( $play_type, $play_id, $play_priority, $cover_format, "DUMP");
|
lmb_download_covers( $play_type, $play_id, $play_priority, $cover_format, "DUMP");
|
||||||
break;
|
break;
|
||||||
@@ -4187,7 +4253,7 @@ function lmb_get_proceed( $get_array)
|
|||||||
|
|
||||||
case "video":
|
case "video":
|
||||||
{
|
{
|
||||||
$video_format=$get_array["vformat"];
|
$video_format=lmb_get_array( $get_array, "vformat", "");
|
||||||
|
|
||||||
lmb_download_videos( $play_type, $play_id, $play_priority, $video_format, "DUMP");
|
lmb_download_videos( $play_type, $play_id, $play_priority, $video_format, "DUMP");
|
||||||
break;
|
break;
|
||||||
@@ -4195,11 +4261,22 @@ function lmb_get_proceed( $get_array)
|
|||||||
|
|
||||||
case "extra":
|
case "extra":
|
||||||
{
|
{
|
||||||
$extra_format=$get_array["eformat"];
|
$extra_format=lmb_get_array( $get_array, "eformat", "");
|
||||||
|
|
||||||
lmb_download_extras( $play_type, $play_id, $play_priority, $extra_format, "DUMP");
|
lmb_download_extras( $play_type, $play_id, $play_priority, $extra_format, "DUMP");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
lmb_redirect_page( );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lmb_redirect_page( );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@@ -4211,11 +4288,17 @@ function lmb_get_proceed( $get_array)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
case "main":
|
||||||
{
|
{
|
||||||
lmb_main_page( );
|
lmb_main_page( );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
lmb_redirect_page( );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user