- 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%; width: 40%;
text-align: right; text-align: right;
height: 30px; height: 30px;
font-size: 10px; font-size: 12px;
} }

View File

@ -1,8 +1,8 @@
<? <?
// $RCSfile: lmbrowse.php,v $ // $RCSfile: lmbrowse.php,v $
// $Revision: 1.3 $ // $Revision: 1.4 $
// $Name: $ // $Name: $
// $Date: 2012/12/18 23:49:57 $ // $Date: 2013/01/02 21:31:56 $
// $Author: agibert $ // $Author: agibert $
/* /*
@ -129,12 +129,26 @@ function lmb_html_text_format( $input_text)
{ {
$search_tab = array( $search_tab = array(
"\n", "\n",
"&" "&",
"< >",
"<B>",
"</B>",
"<I>",
"</I>",
"<H>",
"</H>"
); );
$replace_tab = array( $replace_tab = array(
"&nbsp;",
"&amp;",
"<br>\n ", "<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)); 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> <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-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=\"/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>
@ -477,8 +491,10 @@ function lmb_footer()
<td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td> <td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"> <td class=\"button-item\" style=\"width: 32px;\">
<form name=\"login\" action=\"{$lmb_url}\" method=\"post\"> <form name=\"login\" action=\"{$lmb_url}\" method=\"post\">
<input type=\"hidden\" name=\"password\" value=\"XXX\"> <div>
<input class=\"logout\" type=\"submit\" value=\"\" title=\"Logout\"> <input type=\"hidden\" name=\"password\" value=\"XXX\">
<input class=\"logout\" type=\"submit\" value=\"\" title=\"Logout\">
</div>
</form> </form>
</td> </td>
<td></td> <td></td>
@ -488,9 +504,11 @@ function lmb_footer()
{ {
echo " <td class=\"button-item\" style=\"\"> echo " <td class=\"button-item\" style=\"\">
<form name=\"login\" action=\"{$lmb_url}\" method=\"post\"> <form name=\"login\" action=\"{$lmb_url}\" method=\"post\">
<input class=\"password\" type=\"password\" name=\"password\" size=\"8\" title=\"Password\"> <div>
<input class=\"login\" type=\"submit\" value=\"\" title=\"Login\"> <input class=\"password\" type=\"password\" name=\"password\" size=\"8\" title=\"Password\">
</form> <input class=\"login\" type=\"submit\" value=\"\" title=\"Login\">
</div>
</form>
</td> </td>
"; ";
} }
@ -574,7 +592,7 @@ function lmb_news_tab( )
echo " <tr class=\"news{$css_row}\"> echo " <tr class=\"news{$css_row}\">
<td class=\"news01\"></td> <td class=\"news01\"></td>
<td class=\"news1\">{$tab[0]}</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> {$play_tag} <td class=\"news01\"></td>
</tr> </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/.*\///'"; $cmd="ls {$video_path}/*-icon.png | sed -e 's/-icon.png$//' -e 's/.*\///'";
exec($cmd, $video_tab); 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> 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> <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"; $cmd="ls {$extra_path}/{$play_id}-*-*-icon.png | sed -e 's/-icon.png$//' -e 's/.*{$play_id}-.*-//' | sort -rnu";
exec($cmd, $format_tab); 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> 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> <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\"> echo " <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody> <tbody>
<tr class=\"info0\" style=\"height: {$height}px;\"> <tr>
<td class=\"info0\" colspan=\"2\">Informations</td> <td>
</tr> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr class=\"info1\" style=\"height: {$height}px;\"> <tbody>
<td class=\"info1\">Group Name</td> <tr class=\"info1\" style=\"height: {$height}px;\">
<td class=\"info2\"><a href=\"{$lmb_url}?page=discography\">{$track_info["artist"]}</a></td> <td class=\"info1\">Group Name</td>
</tr> <td class=\"info2\"><a href=\"{$lmb_url}?page=discography\">{$track_info["artist"]}</a></td>
<tr class=\"info2\" style=\"height: {$height}px;\"> </tr>
<td class=\"info1\">Album</td> <tr class=\"info2\" style=\"height: {$height}px;\">
<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> <td class=\"info1\">Album</td>
</tr> <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 class=\"info1\" style=\"height: {$height}px;\"> </tr>
<td class=\"info1\">Track Number</td> <tr class=\"info1\" style=\"height: {$height}px;\">
<td class=\"info2\">{$track_info["id"]}</td> <td class=\"info1\">Track Number</td>
</tr> <td class=\"info2\">{$track_info["id"]}</td>
<tr class=\"info2\" style=\"height: {$height}px;\"> </tr>
<td class=\"info1\">Track Name</td> <tr class=\"info2\" style=\"height: {$height}px;\">
<td class=\"info2\">{$track_info["title"]}</td> <td class=\"info1\">Track Name</td>
</tr> <td class=\"info2\">{$track_info["title"]}</td>
<tr class=\"info1\" style=\"height: {$height}px;\"> </tr>
<td class=\"info1\">Mix Name</td> <tr class=\"info1\" style=\"height: {$height}px;\">
<td class=\"info2\">{$track_info["mix"]}</td> <td class=\"info1\">Mix Name</td>
</tr> <td class=\"info2\">{$track_info["mix"]}</td>
<tr class=\"info2\" style=\"height: {$height}px;\"> </tr>
<td class=\"info1\">Composer</td> <tr class=\"info2\" style=\"height: {$height}px;\">
<td class=\"info2\">{$track_info["composer"]}</td> <td class=\"info1\">Composer</td>
</tr> <td class=\"info2\">{$track_info["composer"]}</td>
<tr class=\"info1\" style=\"height: {$height}px;\"> </tr>
<td class=\"info1\">Comment</td> <tr class=\"info1\" style=\"height: {$height}px;\">
<td class=\"info2\">{$track_info["comment"]}</td> <td class=\"info1\">Comment</td>
</tr> <td class=\"info2\">{$track_info["comment"]}</td>
<tr class=\"info2\" style=\"height: {$height}px;\"> </tr>
<td class=\"info1\">Length</td> <tr class=\"info2\" style=\"height: {$height}px;\">
<td class=\"info2\">{$track_info["length"]}</td> <td class=\"info1\">Length</td>
</tr> <td class=\"info2\">{$track_info["length"]}</td>
</tr>
"; ";
if ($track_info["safe_creative"] != "") if ($track_info["safe_creative"] != "")
{ {
echo " <tr class=\"info1\" style=\"height: {$height}px;\"> echo " <tr class=\"info1\" style=\"height: {$height}px;\">
<td class=\"info1\">Safe Creative</td> <td class=\"info1\">Safe Creative</td>
<td class=\"info2\"><a href=\"{$track_info["safe_creative"]}\">Link</a></td> <td class=\"info2\"><a href=\"{$track_info["safe_creative"]}\">Link</a></td>
</tr> </tr>
"; ";
} }
echo " </tbody> echo " </tbody>
</table>
</td>
</tr>
</tbody>
</table> </table>
"; ";
} }
@ -1877,9 +1900,6 @@ function lmb_track_lyrics( $play_type, $play_id, $play_priority, $track_id, $tra
echo "<br> echo "<br>
</td> </td>
</tr> </tr>
<tr class=\"lyrics0\">
<td class=\"lyrics0\" colspan=\"2\">Lyrics</td>
</tr>
</tbody> </tbody>
</table> </table>
"; ";
@ -2056,6 +2076,9 @@ 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;\">
<td class=\"info0\">Informations</td>
</tr>
<tr> <tr>
<td> <td>
"; ";
@ -2106,6 +2129,9 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
echo " </td> echo " </td>
</tr> </tr>
<tr class=\"lyrics0\">
<td class=\"lyrics0\">Lyrics</td>
</tr>
</tbody> </tbody>
</table> </table>
</td> </td>
@ -2152,7 +2178,7 @@ function lmb_track_download( $play_type, $play_id, $play_priority, $track_id, $t
echo " <tr><td><br></td></tr> echo " <tr><td><br></td></tr>
<tr> <tr>
<td colspan=\"3\"> <td colspan=\"3\">
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\">
<tbody> <tbody>
<tr> <tr>
<td class=\"logo\" style=\"width: 128px;\"><img src=\"/images/lm-logo3-n-96.png\" alt=\"\"></td> <td class=\"logo\" style=\"width: 128px;\"><img src=\"/images/lm-logo3-n-96.png\" alt=\"\"></td>