Add admin login management,

Start .hide file support,
Add statistics button.
This commit is contained in:
agibert 2012-12-18 23:49:57 +00:00
parent 98288ec0c6
commit 861aca911c
3 changed files with 297 additions and 390 deletions

View File

@ -1377,7 +1377,7 @@ td.lyrics1
td.bottext td.bottext
{ {
vertical-align: top; vertical-align: middle;
text-align: right; text-align: right;
font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif; font-family: verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
margin: 0; margin: 0;
@ -1440,13 +1440,48 @@ a:active
a.jp-on,
a.jp-off
{
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
}
a.jp-on:hover,
a.jp-off:hover
{
/*Glow*/
-webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.3);
-moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.3);
box-shadow: 0px 0px 20px rgba(255,255,255,0.3);
}
a.jp-on
{
background-color: #4a3a55;
}
a.jp-off
{
}
a.menu-home_page, a.menu-home_page,
a.menu-about, a.menu-about,
a.menu-discography, a.menu-discography,
a.button-w3c-html, a.button-w3c-html,
a.button-w3c-css, a.button-w3c-css,
a.button-rx3, a.button-rx3,
a.button-safe_creative a.button-safe_creative,
a.button-stats
{ {
border: 0px solid; border: 0px solid;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -1470,7 +1505,8 @@ a.menu-discography:hover,
a.button-w3c-html:hover, a.button-w3c-html:hover,
a.button-w3c-css:hover, a.button-w3c-css:hover,
a.button-rx3:hover, a.button-rx3:hover,
a.button-safe_creative:hover a.button-safe_creative:hover,
a.button-stats:hover
{ {
/*Glow*/ /*Glow*/
@ -1532,10 +1568,12 @@ a.button-w3c-html,
a.button-w3c-css, a.button-w3c-css,
a.button-rx3, a.button-rx3,
a.button-safe_creative, a.button-safe_creative,
a.button-stats,
a.button-w3c-html:hover, a.button-w3c-html:hover,
a.button-w3c-css:hover, a.button-w3c-css:hover,
a.button-rx3:hover, a.button-rx3:hover,
a.button-safe_creative:hover a.button-safe_creative:hover,
a.button-stats:hover
{ {
height: 26px; height: 26px;
} }
@ -1582,3 +1620,70 @@ a.button-safe_creative:hover
background-image: url("/images/button-safe_creative-hi.png"); background-image: url("/images/button-safe_creative-hi.png");
} }
a.button-stats
{
background-image: url("/images/button-stats-on.png");
}
a.button-stats:hover
{
background-image: url("/images/button-stats-hi.png");
}
/*--------------------------------------------*/
/* INPUT */
/*--------------------------------------------*/
input.password
{
border: 0px solid;;
background-color: #222222;
color: #FFFFFF;
}
input.login,
input.logout
{
border: 0px solid;;
width: 32px;
height: 26px;
/*Transition*/
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
}
input.login:hover,
input.logout:hover
{
/*Glow*/
-webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.3);
-moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.3);
box-shadow: 0px 0px 20px rgba(255,255,255,0.3);
}
input.login
{
background-image: url("/images/button-login-on.png");
}
input.login:hover
{
background-image: url("/images/button-login-hi.png");
}
input.logout
{
background-image: url("/images/button-logout-on.png");
}
input.logout:hover
{
background-image: url("/images/button-logout-hi.png");
}

View File

@ -1,8 +1,8 @@
<? <?
// $RCSfile: lmbrowse.php,v $ // $RCSfile: lmbrowse.php,v $
// $Revision: 1.2 $ // $Revision: 1.3 $
// $Name: $ // $Name: $
// $Date: 2012/12/02 09:04:06 $ // $Date: 2012/12/18 23:49:57 $
// $Author: agibert $ // $Author: agibert $
/* /*
@ -48,122 +48,52 @@ $lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", ".");
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* */ /* Admin Is */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
function lmb_get_section( $lmb_id_lookup) function lmb_admin_is()
{ {
global $lmb_tab; global $lmb_password;
global $lmb_cookie_tab;
foreach( $lmb_tab as $section_id => $value) $admin = $lmb_cookie_tab["admin"];
{
$lmb=$lmb_tab[$section_id]["lmb"];
foreach( $lmb as $lmb_id => $value) if( $admin == $lmb_password)
{ {
if( $lmb_id == $lmb_id_lookup) return( true);
{
return $section_id;
} }
else
{
return( false);
} }
} }
return "";
}
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* */ /* Admin Update */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
function lmb_get_name( $lmb_id_lookup) function lmb_admin_update()
{ {
global $lmb_tab; global $lmb_password;
global $lmb_cookie_tab;
foreach( $lmb_tab as $section_id => $value) $passwd = $_POST["password"];
{
$lmb=$lmb_tab[$section_id]["lmb"];
foreach( $lmb as $lmb_id => $value)
if( $passwd != "")
{ {
if( $lmb_id == $lmb_id_lookup) if( $passwd == $lmb_password)
{ {
return $lmb[$lmb_id]["name"]; lmb_cookie_set( "admin", $lmb_password, 360000);
} }
} else
}
return "";
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_curverrel_get( $id)
{ {
$cmd="ls -rt download/$id/*/$id*.src.rpm | sed -e 's/^download.$id.//' -e 's/.src.rpm$//'"; lmb_cookie_set( "admin", "", 360000);
$curverrel=exec($cmd);
$tab=explode( "/", $curverrel);
$curver=$tab[0];
$tab=explode( "-$curver-", $curverrel);
$currel=$tab[1];
return( array( $curver, $currel));
} }
/*--------------------------------------------------------------------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_list_get( $id, $curver, $currel)
{
$cmd="ls download/$id/$curver/$id-*$curver-$currel* | sort | sed -e 's/^download.$id.$curver.//'";
exec($cmd, $list);
return( $list);
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_tag_get( $lmb_id, $lmb_curver, $lmb_currel, $lmb_name, $lmb_qt)
{
if( $lmb_name == "")
{
$lmb_name="$lmb_id-$lmb_curver-$lmb_currel.src.rpm";
}
$cmd="rpm -qp --qf \"$lmb_qt\" download/$lmb_id/$lmb_curver/$lmb_name | sed -e 's/</\&lt;/g' -e's/>/\&gt;/g'";
exec( $cmd, $reply_tab);
return $reply_tab;
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_tab_dump( $tab, $start)
{
for( $i = $start; $i < count($tab); $i++)
{
echo "$tab[$i]\n";
} }
} }
@ -400,19 +330,16 @@ function lmb_header( $page_id, $page_name, $img_path, $img_alt, $keywords, $min_
$mw_tag = ""; $mw_tag = "";
} }
// include "$lmb_page_header";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"> echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">
<html> <html>
<head> <head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"keywords\" content=\"$keywords\"> <meta name=\"keywords\" content=\"$keywords\">
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/images/lm-icon3.ico\"> <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=\"/default.css\">
<link rel=\"stylesheet\" type=\"text/css\" href=\"/jplayer/pink.flag/jplayer.pink.flag.css\" > <link rel=\"stylesheet\" type=\"text/css\" href=\"/jplayer/pink.flag/jplayer.pink.flag.css\" >
<title>$page_name</title>"; <title>$page_name</title>
";
// include "$lmb_body_header";
echo " </head> echo " </head>
<body style=\"background-image:url(''); background-repeat:repeat;\"> <body style=\"background-image:url(''); background-repeat:repeat;\">
@ -436,7 +363,6 @@ function lmb_header( $page_id, $page_name, $img_path, $img_alt, $keywords, $min_
echo " <td style=\"height: 70px;\"><img src=\"$img_path\" alt=\"$img_alt\"></td> echo " <td style=\"height: 70px;\"><img src=\"$img_path\" alt=\"$img_alt\"></td>
"; ";
// include "$lmb_body_1";
echo " <td></td> echo " <td></td>
<td></td> <td></td>
@ -463,8 +389,6 @@ function lmb_header( $page_id, $page_name, $img_path, $img_alt, $keywords, $min_
lmb_menu($page_id); lmb_menu($page_id);
// include "$lmb_body_2";
echo " <td class=\"menu-bg\"></td> echo " <td class=\"menu-bg\"></td>
<td style=\"width: 16px; vertical-align: top;\"><img class=\"menu-item\"src=\"/images/menu-end.png\" alt=\"\"></td> <td style=\"width: 16px; vertical-align: top;\"><img class=\"menu-item\"src=\"/images/menu-end.png\" alt=\"\"></td>
</tr> </tr>
@ -505,7 +429,6 @@ function lmb_footer()
<td style=\"vertical-align: top; width: 16px;\"></td> <td style=\"vertical-align: top; width: 16px;\"></td>
</tr> </tr>
"; ";
// include "$lmb_body_footer";
echo " </tbody> echo " </tbody>
</table> </table>
@ -529,28 +452,60 @@ 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 class=\"button-w3c-html\" href=\"http://validator.w3.org/check?uri=referer\"></a></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;\">&nbsp;&nbsp;&nbsp;</td> <td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-w3c-css\" href=\"http://jigsaw.w3.org/css-validator/check/referer\"></a></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;\">&nbsp;&nbsp;&nbsp;</td> <td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 96px;\"><a class=\"button-rx3\" href=\"http://www.rx3.net/\"></a></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;\">&nbsp;&nbsp;&nbsp;</td> <td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-safe_creative\" href=\"http://www.safecreative.org/\"></a></td> <td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-safe_creative\" href=\"http://www.safecreative.org/\" title=\"SafeCreative\"></a></td>
<td></td> <td></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</td> </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;\">&nbsp;&nbsp;&nbsp;</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_stop = microtime_float();
$time_elaps = intval( ( $time_stop - $time_start) * 1000) / 1000; $time_elaps = intval( ( $time_stop - $time_start) * 1000) / 1000;
echo " <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=\"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>
"; ";
// include "$lmb_page_footer";
echo " </tr> echo " </tr>
</tbody> </tbody>
</table> </table>
@ -603,7 +558,7 @@ function lmb_news_tab( )
$play_priority = $tab[5]; $play_priority = $tab[5];
$link_tag = "<a href=\"{$lmb_url}?page=play&amp;type={$play_type}&amp;id={$play_id}&amp;priority={$play_priority}\">"; $link_tag = "<a href=\"{$lmb_url}?page=play&amp;type={$play_type}&amp;id={$play_id}&amp;priority={$play_priority}\">";
$img_tag = "<img src=\"/discography/{$play_type}/{$play_priority}-{$play_id}/covers/{$play_id}-cover-1-96.png\" alt=\"\">"; $img_tag = "<img src=\"/discography/{$play_type}/{$play_priority}-{$play_id}/covers/{$play_id}-cover-1-icon.png\" alt=\"\">";
$height = 110; $height = 110;
$play_tag=" <td class=\"news3\">{$link_tag}{$play_name}</a></td> $play_tag=" <td class=\"news3\">{$link_tag}{$play_name}</a></td>
<td class=\"news4\" style=\"height: {$height}px\">{$link_tag}{$img_tag}</a></td>"; <td class=\"news4\" style=\"height: {$height}px\">{$link_tag}{$img_tag}</a></td>";
@ -811,14 +766,20 @@ function lmb_playlist_cur( $play_type, $path, $row)
for( $i = 0; $i < count($line); $i++, $row++) for( $i = 0; $i < count($line); $i++, $row++)
{ {
$play_tab = explode( "-", $line[$i]); $play_tab = explode( "-", $line[$i]);
$play_info = lmb_play_info_get( $play_type, $play_tab[1], $play_tab[0]); $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; $css_row = ($row+1)%2+1;
$url = "{$lmb_url}?page=play&amp;type={$play_type}&amp;id={$play_tab[1]}&amp;priority={$play_tab[0]}"; $url = "{$lmb_url}?page=play&amp;type={$play_type}&amp;id={$play_tab[1]}&amp;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-96.png\" alt=\"\"></a></td><td class=\"play2\"><a href=\"{$url}\">{$play_info["name"]}</a></td><td class=\"play3\">&nbsp;{$play_info["month"]}</td><td class=\"play3\">&nbsp;{$play_info["year"]}&nbsp;</td><td class=\"play4\">{$play_info["comment"]}</td><td>&nbsp;</td></tr> 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\">&nbsp;{$play_info["month"]}</td><td class=\"play3\">&nbsp;{$play_info["year"]}&nbsp;</td><td class=\"play4\">{$play_info["comment"]}</td><td>&nbsp;</td></tr>
"; ";
} }
}
return ($row); return ($row);
} }
@ -1881,81 +1842,6 @@ function lmb_track_info( $play_type, $play_id, $play_priority, $track_id)
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Info */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_info_old( $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=\"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>
<td class=\"info00\"rowspan=\"$rowspan\"></td>
<td class=\"info0\" rowspan=\"$rowspan\"><img src=\"/images/tab-info-r.png\" alt=\"\"></td>
</tr>
<tr class=\"info2\" style=\"height: {$height}px;\">
<td class=\"info1\">Album</td>
<td class=\"info2\"><a href=\"{$lmb_url}?page=play&amp;type={$play_type}&amp;id={$play_id}&amp;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 */ /* Track Lyrics */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
@ -1969,7 +1855,7 @@ function lmb_track_lyrics( $play_type, $play_id, $play_priority, $track_id, $tra
$lyrics_file = "tracks/{$track_name}/{$track_mix}/lyrics.txt"; $lyrics_file = "tracks/{$track_name}/{$track_mix}/lyrics.txt";
echo " <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> echo " <table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody> <tbody>
<tr class=\"lyrics1\"> <tr class=\"lyrics1\">
<td class=\"lyrics1\"> <td class=\"lyrics1\">
@ -2001,50 +1887,6 @@ function lmb_track_lyrics( $play_type, $play_id, $play_priority, $track_id, $tra
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Lyrics */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_lyrics_old( $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=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody>
<tr class=\"lyric1\">
<td class=\"lyric0\" rowspan=\"1\"><img src=\"/images/tab-lyrics-l.png\" alt=\"\"></td>
<td class=\"lyric00\" rowspan=\"1\">&nbsp;</td>
<td class=\"lyric1\">
<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>
</tbody>
</table>
";
}
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* JPlayer Insert */ /* JPlayer Insert */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
@ -2069,13 +1911,24 @@ function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $t
$solution_value = $lmb_cookie_tab[$solution_cookie]; $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 " echo "
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody> <tbody>
<tr> <tr>
<td>&nbsp;</td> <td style=\"background-color:#3a2a45; border-top:1px solid #554461; border-bottom:1px solid #180a1f; border-left:1px solid #554461;\">&nbsp;</td>
<td style=\"width: 1%\"> <td style=\"width: 1%;\">
<script type=\"text/javascript\" src=\"/jplayer/jquery.min.js\"></script> <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>
@ -2138,7 +1991,7 @@ function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $t
<span>Update Required</span> <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>. 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>
<div style=\"font-size: 12px;\"><a href=\"{$solution_html_url}\">Force HTML</a>&nbsp;<a href=\"{$solution_flash_url}\">Force Flash</a></div> <div style=\"font-size: 12px;\"><a class=\"{$html_class}\" href=\"{$solution_html_url}\">Force HTML</a>&nbsp;<a class=\"{$flash_class}\" href=\"{$solution_flash_url}\">Force Flash</a></div>
</div> </div>
</div> </div>
"; ";
@ -2150,12 +2003,12 @@ function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $t
/* /*
echo " <div><a href=\"{$lmb_url}?cookie_id={$solution_cookie}&amp;cookie_value={$solution_html_url}&amp;{$query_string}\">Force HTML</a>&nbsp;<a href=\"{$lmb_url}?cookie_id={$solution_cookie}&amp;cookie_value={$solution_flash_url}&amp;{$query_string}\">Force Flash</a></div> echo " <div><a href=\"{$lmb_url}?cookie_id={$solution_cookie}&amp;cookie_value={$solution_html_url}&amp;{$query_string}\" style=\"color:#FFFFFF; background-color: black;\">ZZZForce HTML</a>&nbsp;<a href=\"{$lmb_url}?cookie_id={$solution_cookie}&amp;cookie_value={$solution_flash_url}&amp;{$query_string}\">Force Flash</a></div>
"; ";
*/ */
echo " </td> echo " </td>
<td>&nbsp;</td> <td style=\"background-color:#3a2a45; border-top:1px solid #554461; border-bottom:1px solid #180a1f; border-right:1px solid #180a1f;\">&nbsp;</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -2239,16 +2092,12 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
</tr> </tr>
<tr> <tr>
<td> <td>
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"\"> <table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"\">
<tbody> <tbody>
<tr> <tr>
<td style=\"height: 100%; vertical-align:bottom\"> <td style=\"height: 100%; vertical-align:bottom\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"text-align: left; width: 100%; height: 100%;\"> <table class=\"tab\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"text-align: left; width: 100%; height: 100%;\">
<tbody> <tbody>
<tr>
<td style=\"height: 100%;\">
</td>
</tr>
<tr> <tr>
<td> <td>
"; ";
@ -2284,104 +2133,6 @@ echo " </td>
/*--------------------------------------------------------------------------------------------------------------------*/
/* Track Introduction */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_track_intro_old( $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 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 colspan=\"2\" style=\"height: 40px;\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody>
<tr>
<td>
";
lmb_track_info_old( $play_type, $play_id, $play_priority, $track_id);
echo " </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style=\"vertical-align: middle;\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody>
<tr style=\"height: 200px;\">
<td>";
// <td class=\"logo\"><img src=\"{$logo_path}-1-128.png\" alt=\"\"><br></td>
lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
echo " </tr>
</tbody>
</table>
</td>
<td rowspan=\"2\" 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>
<tr>
<td colspan=\"2\" style=\"height: 40px;\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody>
<tr>
<td>
";
lmb_track_lyrics_old( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
echo " </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</tr>
<tr><td><br><br><br><br><br></td></tr>
";
}
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* Track Download */ /* Track Download */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
@ -2506,8 +2257,9 @@ function lmb_track_page( $play_type, $play_id, $play_priority, $track_id)
$track_info = lmb_track_info_get( $play_type, $play_id, $play_priority, $track_id); $track_info = lmb_track_info_get( $play_type, $play_id, $play_priority, $track_id);
$track_title = "Track - {$track_info["title"]} ({$track_info["mix"]})"; $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 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"]}", 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_track_body( $play_type, $play_id, $play_priority, $track_id);
lmb_footer(); lmb_footer();
} }
@ -2535,9 +2287,6 @@ function lmb_download_zip( $directory, $file_list, $mode)
case "DUMP": case "DUMP":
{ {
passthru( "cd {$directory}; zip -0 -j -p - ${file_list}"); passthru( "cd {$directory}; zip -0 -j -p - ${file_list}");
// passthru( "cd {$directory}; zip -0 -j -p - ${file_list} >/tmp/toto.zip");
// readfile("/tmp/toto.zip");
// echo "passthru( cd {$directory}; zip -0 -j -p - ${file_list});";
break; break;
} }
} }
@ -2905,20 +2654,37 @@ function lmb_fl_page( $lmb_id, $lmb_name, $lmb_curver, $lmb_currel)
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* Cookies Load */ /* Cookies Set */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
function lmb_Cookies_Load() 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; global $lmb_cookie_tab;
$cookie_id = "jpsolution";
$cookie_value = $_COOKIE[ $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 = "html, flash"; $cookie_value = $cookie_defvalue;
// echo "set def val ($cookie_defvalue) for ($cookie_id)";
} }
$lmb_cookie_tab[ $cookie_id] = $cookie_value; $lmb_cookie_tab[ $cookie_id] = $cookie_value;
@ -2926,25 +2692,47 @@ function lmb_Cookies_Load()
/*--------------------------------------------------------------------------------------------------------------------*/
/* 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 */ /* Get Proceed */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
function lmb_get_proceed( $get_array) function lmb_get_proceed( $get_array)
{ {
global $lmb_cookie_tab; lmb_admin_update();
lmb_cookie_update( $get_array);
$cookie_id=$get_array["cookie_id"];
if( $cookie_id != "")
{
$cookie_value = $get_array["cookie_value"];
setcookie( $cookie_id, $cookie_value, time() + 360000);
$lmb_cookie_tab["$cookie_id"] = $cookie_value;
}
$page_id=$get_array["page"]; $page_id=$get_array["page"];
@ -3028,6 +2816,12 @@ function lmb_get_proceed( $get_array)
break; break;
} }
case "login":
{
lmb_login_page( $lmb_tab);
break;
}
default: default:
{ {
lmb_main_page( $lmb_tab); lmb_main_page( $lmb_tab);

View File

@ -1,8 +1,8 @@
<? <?
// $RCSfile: lmbrowse_config.inc,v $ // $RCSfile: lmbrowse_config.inc,v $
// $Revision: 1.1 $ // $Revision: 1.2 $
// $Name: $ // $Name: $
// $Date: 2012/12/01 16:27:05 $ // $Date: 2012/12/18 23:49:57 $
// $Author: agibert $ // $Author: agibert $
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
@ -20,4 +20,12 @@ $lmb_url="/lmbrowse.php";
$lmb_keywords = "langueur-monotone.com,langueur monotone,music,music group,music band,Arnaud GIBERT,Arnaud G. GIBERT"; $lmb_keywords = "langueur-monotone.com,langueur monotone,music,music group,music band,Arnaud GIBERT,Arnaud G. GIBERT";
/*--------------------------------------------------------------------------------------------------------------------*/
/* Admin Password definitions */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_password = "XXXXXXXX";
?> ?>