- Complete Admin implementation,

- Add bold and italic tag support in lmb_html_text_format() function.
- First official LMBrowse release !
This commit is contained in:
agibert 2013-01-02 21:31:56 +00:00
parent 861aca911c
commit ae315a1431
2 changed files with 84 additions and 58 deletions

View File

@ -718,7 +718,7 @@ td.play4
width: 40%;
text-align: right;
height: 30px;
font-size: 10px;
font-size: 12px;
}

View File

@ -1,8 +1,8 @@
<?
// $RCSfile: lmbrowse.php,v $
// $Revision: 1.3 $
// $Revision: 1.4 $
// $Name: $
// $Date: 2012/12/18 23:49:57 $
// $Date: 2013/01/02 21:31:56 $
// $Author: agibert $
/*
@ -129,12 +129,26 @@ function lmb_html_text_format( $input_text)
{
$search_tab = array(
"\n",
"&"
"&",
"< >",
"<B>",
"</B>",
"<I>",
"</I>",
"<H>",
"</H>"
);
$replace_tab = array(
"&nbsp;",
"&amp;",
"<br>\n ",
"&amp;"
"<span style=\"font-weight:bold;\">",
"</span>",
"<span style=\"font-style:italic;\">",
"</span>",
"<span style=\"font-weight:bold; font-style:italic;\">",
"</span>"
);
return( str_replace( $search_tab, $replace_tab, $input_text));
@ -335,7 +349,7 @@ function lmb_header( $page_id, $page_name, $img_path, $img_alt, $keywords, $min_
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"keywords\" content=\"$keywords\">
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/images/lm-icon2.ico\">
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/images/lm-icon4.ico\">
<link rel=\"stylesheet\" type=\"text/css\" href=\"/default.css\">
<link rel=\"stylesheet\" type=\"text/css\" href=\"/jplayer/pink.flag/jplayer.pink.flag.css\" >
<title>$page_name</title>
@ -477,8 +491,10 @@ function lmb_footer()
<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\">
<div>
<input type=\"hidden\" name=\"password\" value=\"XXX\">
<input class=\"logout\" type=\"submit\" value=\"\" title=\"Logout\">
</div>
</form>
</td>
<td></td>
@ -488,9 +504,11 @@ function lmb_footer()
{
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>
<div>
<input class=\"password\" type=\"password\" name=\"password\" size=\"8\" title=\"Password\">
<input class=\"login\" type=\"submit\" value=\"\" title=\"Login\">
</div>
</form>
</td>
";
}
@ -574,7 +592,7 @@ function lmb_news_tab( )
echo " <tr class=\"news{$css_row}\">
<td class=\"news01\"></td>
<td class=\"news1\">{$tab[0]}</td>
<td class=\"news2\" {$colspan_tag}>{$tab[1]}</td>
<td class=\"news2\" {$colspan_tag}>".lmb_html_text_format( "{$tab[1]}")."</td>
{$play_tag} <td class=\"news01\"></td>
</tr>
";
@ -1353,7 +1371,7 @@ function lmb_videolist( $play_type, $play_id, $play_priority)
$cmd="ls {$video_path}/*-icon.png | sed -e 's/-icon.png$//' -e 's/.*\///'";
exec($cmd, $video_tab);
if( count($video_tab) == 0)
if( count($video_tab) == 0 || ( file_exists( "{$video_path}/.hide" ) && ! lmb_admin_is()))
{
echo " <tr class=\"videos2\" style=\"height: 60px\"><td class=\"videos1\"></td><td class=\"videos2\">&nbsp;&nbsp;</td></tr>
<tr class=\"videos1\" style=\"height: 110px\"><td class=\"videos1\"><img src=\"/images/unknown-cover-96.png\" alt=\"\"></td><td class=\"videos2\">&nbsp;No video found...&nbsp;</td></tr>
@ -1482,7 +1500,7 @@ function lmb_extralist( $play_type, $play_id, $play_priority)
$cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-.*-//' | sort -rnu";
exec($cmd, $format_tab);
if( count($format_tab) == 0)
if( count($format_tab) == 0 || ( file_exists( "{$extra_path}/.hide" ) && ! lmb_admin_is()))
{
echo " <tr class=\"extras2\" style=\"height: 60px\"><td class=\"extras1\"></td><td class=\"extras2\">&nbsp;&nbsp;</td></tr>
<tr class=\"extras1\" style=\"height: 110px\"><td class=\"extras1\"><img src=\"/images/unknown-cover-96.png\" alt=\"\"></td><td class=\"extras2\">&nbsp;No extra found...&nbsp;</td></tr>
@ -1789,53 +1807,58 @@ function lmb_track_info( $play_type, $play_id, $play_priority, $track_id)
echo " <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody>
<tr class=\"info0\" style=\"height: {$height}px;\">
<td class=\"info0\" colspan=\"2\">Informations</td>
</tr>
<tr class=\"info1\" style=\"height: {$height}px;\">
<td class=\"info1\">Group Name</td>
<td class=\"info2\"><a href=\"{$lmb_url}?page=discography\">{$track_info["artist"]}</a></td>
</tr>
<tr class=\"info2\" style=\"height: {$height}px;\">
<td class=\"info1\">Album</td>
<td class=\"info2\"><a href=\"{$lmb_url}?page=play&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>
<tr>
<td>
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody>
<tr class=\"info1\" style=\"height: {$height}px;\">
<td class=\"info1\">Group Name</td>
<td class=\"info2\"><a href=\"{$lmb_url}?page=discography\">{$track_info["artist"]}</a></td>
</tr>
<tr class=\"info2\" style=\"height: {$height}px;\">
<td class=\"info1\">Album</td>
<td class=\"info2\"><a href=\"{$lmb_url}?page=play&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 " <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>
echo " </tbody>
</table>
</td>
</tr>
</tbody>
</table>
";
}
@ -1877,9 +1900,6 @@ function lmb_track_lyrics( $play_type, $play_id, $play_priority, $track_id, $tra
echo "<br>
</td>
</tr>
<tr class=\"lyrics0\">
<td class=\"lyrics0\" colspan=\"2\">Lyrics</td>
</tr>
</tbody>
</table>
";
@ -2056,6 +2076,9 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
<td style=\"height: 40px; width: auto;\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody>
<tr class=\"info0\" style=\"height: {$height}px;\">
<td class=\"info0\">Informations</td>
</tr>
<tr>
<td>
";
@ -2106,6 +2129,9 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
echo " </td>
</tr>
<tr class=\"lyrics0\">
<td class=\"lyrics0\">Lyrics</td>
</tr>
</tbody>
</table>
</td>
@ -2152,7 +2178,7 @@ function lmb_track_download( $play_type, $play_id, $play_priority, $track_id, $t
echo " <tr><td><br></td></tr>
<tr>
<td colspan=\"3\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\">
<tbody>
<tr>
<td class=\"logo\" style=\"width: 128px;\"><img src=\"/images/lm-logo3-n-96.png\" alt=\"\"></td>