11 Commits

Author SHA1 Message Date
1025ed11a7 - Fix release date 2026-07-15 18:53:48 +02:00
6c2df772f9 - Add docker support,
- Add cache support for zip file size,
- Remove obsolete JPlayer.
2026-07-13 00:44:09 +02:00
c764dcaba1 - Add docker support,
- Remove obsolete JPlayer.
2026-07-12 13:14:47 +02:00
d270f2e2b4 - Force .hide handling in play and track page. 2026-06-20 11:15:10 +02:00
1d03dc1df3 - Now open a modal window over the curent window to display cover, extra, icons... 2026-06-20 11:15:10 +02:00
b722d620e4 - Remove tweeter widget,
- Fix security,
- Cleanup code.
2025-12-15 17:34:03 +01:00
a4ae21b60f - Update RSS code. 2023-07-19 14:11:06 +02:00
6c119a448f - Update Twiter code. 2022-06-21 11:48:00 +02:00
6516ba3a7a - Update Google Analytics code. 2021-12-01 14:55:10 +01:00
8ebd42e83e - Now use 400px cover size instead of 256px. 2021-06-07 11:53:44 +02:00
bec60e3bf0 - Remove FaceBook +1 button. 2020-12-28 12:42:44 +01:00
49 changed files with 2375 additions and 2125 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*~
*.old

81
Dockerfile Normal file
View File

@@ -0,0 +1,81 @@
# Rx3/LMBrowse Dockerfile
#-------------------------------------------------------------------------------
ARG IMG_FROM_URL="rx3-docker/pphp-apache:latest"
FROM ${IMG_FROM_URL}
ARG IMG_NAME
ARG IMG_NAME_FULL
ARG IMG_VERSION
ARG IMG_MAINTAINER
ARG IMG_URL
LABEL org.rx3.${IMG_NAME}.name=${IMG_NAME_FULL}
LABEL org.rx3.${IMG_NAME}.version=${IMG_VERSION}
LABEL org.rx3.${IMG_NAME}.maintainer=${IMG_MAINTAINER}
LABEL maintainer=${IMG_MAINTAINER}
ARG MODULE_NAME
ARG MODULE_PATH
ARG MODULE_VERSION
ARG HTTPD_VHOST_CONFIG_DIR=/etc/httpd/conf/sites.d/default_vhost.d
ARG LMBROWSE_HTTPD_CONFIG_NAME=70-lmbrowse.conf
ARG LMBROWSE_HTTPD_CONFIG_FILE=${HTTPD_VHOST_CONFIG_DIR}/${LMBROWSE_HTTPD_CONFIG_NAME}
ARG LMBROWSE_CONFIG_NAME=lmbrowse_config.inc
ARG LMBROWSE_CONFIG_FILE=/etc/lmbrowse/lmbrowse_config.inc
ARG LMBROWSE_SHARE_DIR=/usr/share/lmbrowse
ARG LMBROWSE_WWW_DIR=/var/www/lmbrowse
ARG LMBROWSE_LINKS="about.txt history.txt news.txt welcome.txt discography .links fonts skin skins tracks"
#-------------------------------------------------------------------------------------------------------
ARG LMBROWSE='#!/bin/bash \n\
\n\
cp -f '${LMBROWSE_HTTPD_CONFIG_FILE}.ref' '${LMBROWSE_HTTPD_CONFIG_FILE}' \n\
\n\
sed -i -e "s%LMBROWSE_URL%${LMBROWSE_URL}%g" '${LMBROWSE_HTTPD_CONFIG_FILE}' \n\
\n\
\n\
if [[ ! -f '${LMBROWSE_CONFIG_FILE}' ]] \n\
then \n\
cp '${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME}.ref' '${LMBROWSE_CONFIG_FILE}' \n\
fi \n\
\n\
\n\
if [[ ! -d '${LMBROWSE_WWW_DIR}'/discography ]] \n\
then \n\
cp -Rf '${LMBROWSE_WWW_DIR}.ref/*' '${LMBROWSE_WWW_DIR}' \n\
fi \n\
\n\
chown -R apache:apache '${LMBROWSE_WWW_DIR}' \n\
chmod -R a-x,a+X '${LMBROWSE_WWW_DIR}' \n\
chmod o-rwx '${LMBROWSE_WWW_DIR}' \n\
chmod -R ug+rwX '${LMBROWSE_WWW_DIR}
#-------------------------------------------------------------------------------------------------------
COPY ${MODULE_PATH}/conf.d/${LMBROWSE_HTTPD_CONFIG_NAME}.ref ${LMBROWSE_HTTPD_CONFIG_FILE}.ref
COPY ${MODULE_PATH}/html ${LMBROWSE_SHARE_DIR}
RUN . /etc/profile.d/rx3.sh && isl --add ${IMG_URL} \
&& urpmi.update -a \
&& urpmi --force flac zip \
&& sed -i -e "s%Alias /lmbrowse/%Alias LMBROWSE_URL%" ${LMBROWSE_HTTPD_CONFIG_FILE}.ref \
&& mv ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME} ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME}.ref \
&& ln -s ${LMBROWSE_CONFIG_FILE} ${LMBROWSE_SHARE_DIR}/${LMBROWSE_CONFIG_NAME} \
&& mkdir ${LMBROWSE_WWW_DIR}.ref \
&& for file in ${LMBROWSE_LINKS}; \
do \
mv ${LMBROWSE_SHARE_DIR}/${file} ${LMBROWSE_WWW_DIR}.ref \
&& ln -s ${LMBROWSE_WWW_DIR}/${file} ${LMBROWSE_SHARE_DIR}; \
done \
&& echo -e "${LMBROWSE}" | sed -e "s/\`/'/g" -e 's/ *$//' > /etc/init.d/lmbrowse \
&& chmod a+x /etc/init.d/lmbrowse \
&& ln -s /etc/init.d/lmbrowse /etc/rcD.d/S40lmbrowse

View File

@@ -1,12 +1,22 @@
# $RCSfile: ReleaseNotes.txt,v $ ------------------------------------------------------------------------------------------------------------------------------------
# $Revision: 1.1 $ LMBrowse V 1.9.1 - A. GIBERT - 2026/07/15
# $Name: $ ------------------------------------------------------------------------------------------------------------------------------------
# $Date: 2012/12/01 16:27:04 $
# $Author: agibert $ - Add docker support,
- Add cache support for zip file size,
- Remove obsolete JPlayer.
------------------------------------------------------------------------------------------------------------------------------------
LMBrowse V 1.9.0 - A. GIBERT - 2026/06/20
------------------------------------------------------------------------------------------------------------------------------------
- Now open a modal window over the curent window to display cover, extra, icons...
- Force .hide handling in play and track page.
[...]
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
LMBrowse V 1.0.0-1 - A. Gibert - 2012/12/01 LMBrowse V 1.0.0-1 - A. Gibert - 2012/12/01

58
compose.yaml Normal file
View File

@@ -0,0 +1,58 @@
# Rx3/LMBrowse Docker Image
#-------------------------------------------------------------------------------
name: ${HOST_NAME_PREFIX}
services:
#-------------------------------------------------------------------------------
webapp:
container_name: ${WA_HOST_NAME}
hostname: ${WA_HOST_NAME}
image: ${WA_IMG_URL}
restart: unless-stopped
build:
dockerfile: Dockerfile
args:
IMG_NAME: ${WA_IMG_URL}
IMG_NAME_FULL: ${WA_IMG_NAME_FULL}
IMG_VERSION: ${WA_IMG_VERSION}
IMG_MAINTAINER: ${APPL_MAINTAINER}
IMG_URL: ${WA_IMG_URL}
IMG_FROM_URL: ${WA_IMG_FROM_URL}
MODULE_NAME: ${WA_MODULE_NAME}
MODULE_PATH: ${WA_MODULE_PATH}
MODULE_VERSION: ${WA_MODULE_VERSION}
environment:
APACHE_UID: ${WA_USER_ID}
APACHE_GID: ${WA_GROUP_ID}
APACHE_DOC_ROOT: ${WA_DOC_ROOT}
APACHE_HTTPD_ENABLED: ${WA_APACHE_HTTPD_ENABLED}
PHP_MEMORY_LIMIT: ${WA_PHP_MEMORY_LIMIT}
PHP_UPLOAD_LIMIT: ${WA_PHP_UPLOAD_LIMIT}
LMBROWSE_URL: ${WA_LMBROWSE_URL}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${WA_PORT_MAIN_INT}"]
interval: 10s
timeout: 3s
retries: 3
volumes:
- ./${WA_LOG_INIT_EXT}:${WA_LOG_INIT_INT}
- ./${WA_LOG_SV_EXT}:${WA_LOG_SV_INT}
- ./${WA_LOG_HTTPD_EXT}:${WA_LOG_HTTPD_INT}
- ./${WA_CONF_EXT}:${WA_CONF_INT}
- ./${WA_WWW_EXT}:${WA_WWW_INT}
ports:
- "127.0.0.1:${WA_PORT_SV_EXT}:${WA_PORT_SV_INT}"
- "127.0.0.1:${WA_PORT_MAIN_EXT}:${WA_PORT_MAIN_INT}"

121
env.dist Normal file
View File

@@ -0,0 +1,121 @@
# Rx3/LMBrowse Docker Image
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# Global Settings
#-------------------------------------------------------------------------------
ORG_NAME="rx3-docker"
ORG_REGISTRY="docker.xor.rx3:5000"
ORG_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
ORG_URL_PREFIX="${ORG_REGISTRY}/${ORG_NAME}"
#-------------------------------------------------------------------------------
# Image Settings
#-------------------------------------------------------------------------------
APPL_NAME="lmbrowse"
APPL_NAME_FULL="LMBrowse Docker Image"
APPL_NAME_SHORT="lmb"
APPL_ORG="rx3"
APPL_VERSION="1.0.0"
APPL_MAINTAINER='"Arnaud G. GIBERT" <arnaud@rx3.net>'
#-------------------------------------------------------------------------------
# User Settings
#-------------------------------------------------------------------------------
#APPL_ENV="prd"
#APPL_ENV="tst"
#APPL_ENV="int"
APPL_ENV="dvp"
#-------------------------------------------------------------------------------
# Common
#-------------------------------------------------------------------------------
if [[ "${APPL_ENV}" != "prd" ]]
then
APPL_SUFFIX="-${APPL_ENV}"
PORT_ENV_OFFSET=100
if [[ "${APPL_ENV}" == "tst" ]]
then
DOCKER_TOOLS_USER_GROUP_FORCE=FALSE
else
DOCKER_TOOLS_USER_GROUP_FORCE=TRUE
fi
else
APPL_SUFFIX=""
PORT_ENV_OFFSET=0
DOCKER_TOOLS_USER_GROUP_FORCE=FALSE
fi
if [[ "${APPL_ENV}" != "dvp" ]]
then
APPL_USER="apache"
APPL_GROUP="lm"
else
APPL_USER="apache"
APPL_GROUP="apache"
fi
#APPL_URL_PREFIX="${ORG_REGISTRY}/${APPL_ORG}/${APPL_NAME_SHORT}"
APPL_URL_PREFIX="${ORG_REGISTRY}/${APPL_ORG}"
HOST_NAME_PREFIX=${APPL_NAME_SHORT}${APPL_SUFFIX}
PORT_SV_INT=9001
PORT_SV_OFFSET=1000
NETWORK_NAME=${HOST_NAME_PREFIX}
NETWORK_IF_NAME=br-${APPL_NAME_SHORT}-${APPL_ENV}
DOCKER_TOOLS_DEBUG=FALSE
DOCKER_TOOLS_VOLUME=SINGLE
#DOCKER_TOOLS_VOLUME=MIXED
#DOCKER_TOOLS_VOLUME=MERGED
#DOCKER_TOOLS_VOLUME=SPLITED
#DOCKER_TOOLS_EXEPTION_LIBS="webapp:/var/www/data"
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
# | Variable | Service | Target Image | From Image | Module | Main Port | Admin Port | User | Group |
# | Prefix | Name | URL Prefix | Name | Name Full | Version | URL Prefix | Name | Version | Name | Version | Ext | Int | Ext | Int | Name / Id | Name / Id |
#------------------+----------+--------------------------+--------------------+------------------+-------------------------------+----------------------+--------------------+---------------+------------+--------------+------------+-------+-------+-------+-------+--------------+--------------+
docker_service_add WA webapp ${APPL_URL_PREFIX} ${APPL_NAME} "${APPL_NAME_FULL}" ${APPL_VERSION}-mga9 ${ORG_URL_PREFIX} php-apache 1.7.0-mga9 - - 8069 80 - - ${APPL_USER} ${APPL_GROUP}
#-------------------------------------------------------------------------------
# Web App
#-------------------------------------------------------------------------------
SERVER_CROND_ENABLED="TRUE"
WA_MODULE_PATH=src
WA_DOC_ROOT="/var/www/html"
WA_APACHE_HTTPD_ENABLED="TRUE"
WA_PHP_MEMORY_LIMIT="512M"
WA_PHP_UPLOAD_LIMIT="32M"
WA_LOG_HTTPD_INT=/var/log/httpd
WA_LOG_HTTPD_EXT=./${WA_LOG_HTTPD_INT}
WA_CONF_INT=/etc/${APPL_NAME}
WA_CONF_EXT=./${WA_CONF_INT}
WA_WWW_INT=/var/www/${APPL_NAME}
WA_WWW_EXT=./${WA_WWW_INT}
WA_LMBROWSE_URL="/"

4
etc/lmbrowse/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

View File

@@ -1,3 +0,0 @@
This is the About text !
Bye Bye...

View File

@@ -1,44 +0,0 @@
<?
// $RCSfile: lmbrowse_config.inc,v $
// $Revision: 1.3 $
// $Name: $
// $Date: 2015/08/06 23:49:02 $
// $Author: agibert $
/*--------------------------------------------------------------------------------------------------------------------*/
/* Path and URL definition */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_path = "/var/httpd/www.langueur-monotone.com/html";
$lmb_url_pre = "www.langueur-monotone.com";
$lmb_url_post = "/";
/*--------------------------------------------------------------------------------------------------------------------*/
/* Keywords definition */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_keywords = "langueur monotone,music,graphic,project,group,band,Arnaud G. GIBERT";
/*--------------------------------------------------------------------------------------------------------------------*/
/* Features control */
/*--------------------------------------------------------------------------------------------------------------------*/
/* Google analytics */
$lmb_ga_enable = true;
/* JPlayer Inpector link*/
$lmb_jpi_enable = false;
/*--------------------------------------------------------------------------------------------------------------------*/
/* Admin Password definition */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_password = "XXXXXXXX";
?>

View File

@@ -0,0 +1,8 @@
# LMBrowse configuration
Alias /lmbrowse/ /usr/share/lmbrowse/
<Directory /usr/share/lmbrowse>
Require all granted
Options +FollowSymLinks
</Directory>

32
src/html/.htaccess Normal file
View File

@@ -0,0 +1,32 @@
# AddType TYPE/SUBTYPE EXTENSION
AddType audio/mpeg mp3
AddType audio/mp4 m4a
AddType audio/ogg ogg
AddType audio/ogg oga
AddType audio/webm webma
AddType audio/wav wav
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
# Or, compress certain file types by extension:
<files *.ttf>
SetOutputFilter DEFLATE
</files>
<files *.eot>
SetOutputFilter DEFLATE
</files>
<Files lmbrowse_config.inc>
order allow,deny
deny from all
</Files>

3
src/html/about.txt Normal file
View File

@@ -0,0 +1,3 @@
This is the About text!
Bye Bye...

View File

1
src/html/history.txt Normal file
View File

@@ -0,0 +1 @@
This is the History text!

1
src/html/index.php Symbolic link
View File

@@ -0,0 +1 @@
lmbrowse.php

View File

@@ -1,30 +1,29 @@
<? <?
// $RCSfile: lmbrowse.php,v $ /*--------------------------------------------------------------------------------------------------------------------------------*/
// $Revision: 1.17 $ /* */
// $Name: lmbrowse-1_7_0-1 $ /* LMBrowse - Langueur Monotone Browser */
// $Date: 2016/03/21 16:07:30 $ /* */
// $Author: agibert $ /* Copyright (C) 2012-2026 Arnaud G. GIBERT */
/* mailto:arnaud@rx3.net */
/* http://www.rx3.org/dvp/lmbrowse */
/* */
/* This is free software: you can redistribute it and/or modify it */
/* under the terms of the GNU Lesser General Public License as published */
/* by the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public */
/* License along with this program; If not, see */
/* <https://www.gnu.org/licenses/>. */
/* */
/*--------------------------------------------------------------------------------------------------------------------------------*/
/*
* LMBrowse - Langueur Monotone Browser
* Copyright (C) 2012-2020 Arnaud G. GIBERT
* mailto:arnaud@rx3.net
* http://www.rx3.org/dvp/lmbrowse
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
function microtime_float() function microtime_float()
{ {
@@ -41,9 +40,7 @@ $time_start = microtime_float();
include "lmbrowse_config.inc"; include "lmbrowse_config.inc";
$lmb_myname="LMBrowse"; $lmb_myname="LMBrowse";
$lmb_tag_tab=explode( " ", "\$Name: lmbrowse-1_7_0-1 $"); $lmb_myver="1.9.1-1";
$lmb_tag_tab=explode( "-", $lmb_tag_tab[1]);
$lmb_myver=strtr( "$lmb_tag_tab[1]-$lmb_tag_tab[2]", "_", ".");
@@ -172,7 +169,7 @@ function lmb_cookies_load()
lmb_cookie_load( "video_res", "1080p"); lmb_cookie_load( "video_res", "1080p");
lmb_cookie_load( "jpsolution", "native"); // lmb_cookie_load( "jpsolution", "native");
lmb_cookie_load( "admin", ""); lmb_cookie_load( "admin", "");
} }
@@ -309,6 +306,7 @@ function lmb_size_convert( $size)
function lmb_html_text_format( $input_text) function lmb_html_text_format( $input_text)
{ {
$search_tab = array( $search_tab = array(
"#",
"&", "&",
"\n", "\n",
"< >", "< >",
@@ -323,10 +321,13 @@ function lmb_html_text_format( $input_text)
"<LM>", "<LM>",
"</LM>", "</LM>",
"<F+1/>", "<F+1/>",
"<MSF/>" "<TW/>",
"<BC/>",
"<YT/>"
); );
$replace_tab = array( $replace_tab = array(
"",
"&amp;", "&amp;",
"<br/>\n ", "<br/>\n ",
"&nbsp;", "&nbsp;",
@@ -340,27 +341,10 @@ function lmb_html_text_format( $input_text)
"</span>", "</span>",
"<span style=\"font-family:CustomFont; font-weight:normal;\">", "<span style=\"font-family:CustomFont; font-weight:normal;\">",
"</span>", "</span>",
" "<div style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"http://www.facebook.com/langueur.monotone\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on FaceBook\"><i class=\"sprite-icon-facebook-16x16\" style=\"display:block;\"></i></a></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 style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"http://www.twitter.com/langueurmon\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on X\"><i class=\"sprite-icon-twitter-16x16\" style=\"display:block;\"></i></a></div>",
<div id=\"fb-root\"></div> "<div style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"https://langueur-monotone.bandcamp.com/\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on BandCamp\"><i class=\"sprite-icon-bandcamp-16x16\" style=\"display:block;\"></i></a></div>",
<script type=\"text/javascript\"> "<div style=\"text-align: right; vertical-align: top; display:block;\"><a class=\"button-item\" href=\"https://www.youtube.com/c/langueur-monotone\" style=\"vertical-align: text-bottom;\" title=\"Langueur Monotone on YouTube\"><i class=\"sprite-icon-youtube-16x16\" style=\"display:block;\"></i></a></div>",
(function(d, s, id)
{
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = \"//connect.facebook.net/fr_FR/all.js#xfbml=1\";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>",
"
<form method=\"post\" action=\"http://www.myspace.com/my/friends/addtofriends/langueur-monotone\">
<input type=\"submit\" value=\"myspace Friend\">
<style type=\"text/css\">input {background-color: 000000; border-width:1px; border-style:groove; border-color: 444444; color: FFFFFF; font-family:;}
</style>
</form>
"
); );
return( str_replace( $search_tab, $replace_tab, $input_text)); return( str_replace( $search_tab, $replace_tab, $input_text));
@@ -391,7 +375,10 @@ function lmb_xml_text_format( $input_text)
"<LM>", "<LM>",
"</LM>", "</LM>",
"<F+1/>", "<F+1/>",
"<MSF/>" "<MSF/>",
"<TW/>",
"<BC/>",
"<YT/>"
); );
$replace_tab = array( $replace_tab = array(
@@ -410,6 +397,8 @@ function lmb_xml_text_format( $input_text)
"", "",
"", "",
"", "",
"",
"",
"" ""
); );
@@ -455,7 +444,7 @@ function lmb_play_validate( $play_type, $play_id, $play_priority)
/* Make Tab */ /* Make Tab */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
function lmb_make_tab( $tab_id, $css_id, $tab_side, $logo_path, $data, $skin_path) function lmb_make_tab( $tab_id, $css_id, $tab_side, $logo_path, $img_path, $data, $skin_path)
{ {
$tab_class = "sprite-tab-{$tab_id}-{$tab_side}"; $tab_class = "sprite-tab-{$tab_id}-{$tab_side}";
@@ -471,9 +460,16 @@ function lmb_make_tab( $tab_id, $css_id, $tab_side, $logo_path, $data, $skin_pat
$tab_tag = "<td class=\"{$css_id}0\"><div class=\"{$tab_class}\"></div></td>"; $tab_tag = "<td class=\"{$css_id}0\"><div class=\"{$tab_class}\"></div></td>";
if( $logo_path[0] == "/") if( $logo_path[0] == "/")
{
if( $img_path != "")
{
$logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><img class=\"button-item\" src=\"{$logo_path}\" alt=\"\" onclick=\"openModal('{$img_path}')\" style=\"cursor:pointer\"/></td>";
}
else
{ {
$logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><img src=\"{$logo_path}\" alt=\"\"/></td>"; $logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><img src=\"{$logo_path}\" alt=\"\"/></td>";
} }
}
else else
{ {
$logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><div class=\"{$logo_path}\"></div></td>"; $logo_tag = "<td class=\"logo-{$logo_side}\" style=\"width: 20%;\"><div class=\"{$logo_path}\"></div></td>";
@@ -670,19 +666,15 @@ function lmb_header( $page_id, $page_name, $page_title, $description, $keywords,
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>
<meta name=\"Description\" content=\"$description\"/> <meta name=\"Description\" content=\"$description\"/>
<meta name=\"keywords\" content=\"$keywords\"/> <meta name=\"keywords\" content=\"$keywords\"/>
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/>
<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"{$skin_path}/images/favicon.ico\"/> <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"{$skin_path}/images/favicon.ico\"/>
<link rel=\"stylesheet\" type=\"text/css\" href=\"{$skin_path}/default.css\"/> <link rel=\"stylesheet\" type=\"text/css\" href=\"{$skin_path}/default.css\"/>
<link rel=\"stylesheet\" type=\"text/css\" href=\"/jplayer/skin/pink.flag/css/jplayer.pink.flag.css\"/>
<title>$page_name</title> <title>$page_name</title>
</head>
"; ";
echo " <body style=\"background-image:url(''); background-repeat:repeat;\">
";
if( $lmb_ga_enable == true) if( $lmb_ga_enable == true)
{ {
/*
echo "<script> echo "<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
@@ -694,8 +686,61 @@ function lmb_header( $page_id, $page_name, $page_title, $description, $keywords,
</script> </script>
"; ";
*/
echo " <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src=\"https://www.googletagmanager.com/gtag/js?id=UA-37642754-1\"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-37642754-1');
</script>
";
} }
echo " </head>
";
echo " <body style=\"background-image:url(''); background-repeat:repeat;\">
";
/* Modal Window */
echo " <script type=\"text/javascript\" class=\"init\">
function openModal(src)
{
document.getElementById('modal-img').src = src;
document.getElementById('overlay').style.display = 'block';
}
function closeModal()
{
document.getElementById('overlay').style.display = 'none';
}
// Close when clicking the dark backdrop
document.getElementById('overlay').addEventListener('click', function(e)
{
if (e.target === this) closeModal();
});
// Close with Escape key
document.addEventListener('keydown', e =>
{
if (e.key === 'Escape') closeModal();
});
</script>
";
echo " <div id=\"overlay\" class=\"overlay\">
<div class=\"modal\">
<button class=\"modal\" onclick=\"closeModal()\">✕</button>
<img id=\"modal-img\" class=\"modal\" src=\"\" alt=\"\">
</div>
</div>
";
echo " <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"{$mw_tag}\"> echo " <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"{$mw_tag}\">
<tbody> <tbody>
<tr> <tr>
@@ -832,6 +877,8 @@ function lmb_footer( $skin_path)
<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-item\" href=\"/www-stats/\" title=\"Rx3 Statistics\"><div class=\"sprite-button-stats-on\"></div></a></td> <td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"/www-stats/\" title=\"Rx3 Statistics\"><div class=\"sprite-button-stats-on\"></div></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-item\" href=\"/www-ssl-stats/\" title=\"Rx3 SSL Statistics\"><div class=\"sprite-button-stats-on\"></div></a></td>
<td style=\"width: 8px;\">&nbsp;&nbsp;&nbsp;</td>
<td class=\"button-item\" style=\"width: 32px;\"><a class=\"button-item\" href=\"https://www.google.com/analytics/web/?hl=en&amp;pli=1#dashboard//a37642754w66067134p67926512\" title=\"Google Analytics\"><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/analytics/web/?hl=en&amp;pli=1#dashboard//a37642754w66067134p67926512\" title=\"Google Analytics\"><div class=\"sprite-button-stats-on\"></div></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-item\" href=\"https://www.google.com/webmasters/tools/dashboard?hl=fr&amp;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&amp;siteUrl=http%3A%2F%2F{$lmb_url_pre}%2F\" title=\"Google Webmaster Tools\"><div class=\"sprite-button-stats-on\"></div></a></td>
@@ -918,8 +965,7 @@ function lmb_welcome_tab( $skin_path)
$data = ob_get_contents(); $data = ob_get_contents();
ob_end_clean(); ob_end_clean();
lmb_make_tab( "welcome", "welcome", "l", "{$skin_path}/images/lm-logo1-border-220.png", $data, $skin_path); lmb_make_tab( "welcome", "welcome", "l", "{$skin_path}/images/lm-logo1-border-220.png", "", $data, $skin_path);
// lmb_make_tab( "welcome", "welcome", "l", "sprite-lm-logo1-border-220", $data, $skin_path);
} }
@@ -957,7 +1003,7 @@ function lmb_news_tab_get( )
$news_tab[$i]["name"] = "{$play_name}"; $news_tab[$i]["name"] = "{$play_name}";
$news_tab[$i]["rlink"] = "{$lmb_url_post}?page=play&amp;type={$play_type}&amp;id={$play_id}&amp;priority={$play_priority}"; $news_tab[$i]["rlink"] = "{$lmb_url_post}?page=play&amp;type={$play_type}&amp;id={$play_id}&amp;priority={$play_priority}";
$news_tab[$i]["alink"] = "http://{$lmb_url_pre}{$news_tab[$i]["rlink"]}"; $news_tab[$i]["alink"] = "http://{$lmb_url_pre}{$news_tab[$i]["rlink"]}";
$news_tab[$i]["rimg"] = lmb_play_path_get( $play_type, $play_id, $play_priority) . "/covers/{$play_id}-cover-1-icon.png"; $news_tab[$i]["rimg"] = "{$lmb_url_post}" . lmb_play_path_get( $play_type, $play_id, $play_priority) . "/covers/{$play_id}-cover-1-icon.png";
$news_tab[$i]["aimg"] = "http://{$lmb_url_pre}{$news_tab[$i]["rimg"]}"; $news_tab[$i]["aimg"] = "http://{$lmb_url_pre}{$news_tab[$i]["rimg"]}";
} }
else else
@@ -1085,57 +1131,7 @@ function lmb_news_tab( $skin_path)
ob_end_clean(); ob_end_clean();
// lmb_make_tab( "news", "news", "r", "{$skin_path}/images/lm_logo2-border-220.png", $data, $skin_path); // lmb_make_tab( "news", "news", "r", "{$skin_path}/images/lm_logo2-border-220.png", $data, $skin_path);
lmb_make_tab( "news", "news", "r", "sprite-lm-logo2-border-220", $data, $skin_path); lmb_make_tab( "news", "news", "r", "sprite-lm-logo2-border-220", "", $data, $skin_path);
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Twitter Tab */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_twitter_tab( $skin_path)
{
global $lmb_url_post;
ob_start();
echo " <tr class=\"twitter1\">
<td class=\"twitter01\"></td>
<td class=\"twitter0\"></td>
<td class=\"twitter01\"></td>
</tr>
<tr class=\"twitter1\">
<td class=\"twitter01\">&nbsp;</td>
<td class=\"twitter0\">
<div class=\"button-item\" style=\"display: inline-block; border-radius: 5px;\"><a class=\"twitter-timeline\" href=\"https://twitter.com/langueurmon\" data-widget-id=\"544258336741670912\">Tweets by @langueurmon</a></div>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+\"://platform.twitter.com/widgets.js\";fjs.parentNode.insertBefore(js,fjs);}}(document,\"script\",\"twitter-wjs\");</script>
</td>
<td class=\"twitter01\">&nbsp;</td>
</tr>
<tr class=\"twitter1\">
<td class=\"twitter01\"></td>
<td class=\"twitter0\"></td>
<td class=\"twitter01\"></td>
</tr>
";
/*
echo " <tr class=\"twitter1\">
<td class=\"twitter01\"></td>
<td class=\"twitter1\">AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</td>
<td class=\"twitter01\"></td>
</tr>
";
*/
$data = ob_get_contents();
ob_end_clean();
// lmb_make_tab( "twitter", "twitter", "l", "{$skin_path}/images/lm_logo1-border-220.png", $data, $skin_path);
lmb_make_tab( "twitter", "twitter", "l", "sprite-lm-logo1-border-220", $data, $skin_path);
} }
@@ -1151,10 +1147,6 @@ function lmb_main_body( $skin_path)
lmb_spacer(4); lmb_spacer(4);
lmb_news_tab( $skin_path); lmb_news_tab( $skin_path);
lmb_spacer(4);
lmb_twitter_tab( $skin_path);
} }
@@ -1395,20 +1387,17 @@ function lmb_rss_page()
header( 'Content-Type: application/rss+xml'); header( 'Content-Type: application/rss+xml');
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?> echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<rss version=\"2.0\" <rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">
xmlns:atom=\"http://www.w3.org/2005/Atom\"
xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
>
<channel> <channel>
<title>Langueur Monotone News Page</title> <title>Langueur Monotone News Page</title>
<link>http://{$lmb_url_pre}/?page=rss</link> <link>http://{$lmb_url_pre}/</link>
<atom:link href=\"http://{$lmb_url_pre}/?page=rss\" rel=\"self\" type=\"application/rss+xml\" /> <atom:link href=\"http://{$lmb_url_pre}/?page=rss\" rel=\"self\" type=\"application/rss+xml\" />
<description>Langueur Monotone project news RSS feed</description> <description>Langueur Monotone project news RSS feed</description>
<image> <image>
<url>http://{$lmb_url_pre}/images/lm_logo2-border-220.png</url> <url>http://{$lmb_url_pre}/skin/images/lm-logo2-border-rss.png</url>
<title>Langueur Monotone News Page</title> <title>Langueur Monotone News Page</title>
<link>http://{$lmb_url_pre}/?page=rss</link> <link>http://{$lmb_url_pre}/</link>
</image> </image>
"; ";
@@ -1440,17 +1429,21 @@ xmlns:dc=\"http://purl.org/dc/elements/1.1/\"
if( "{$news_tab[$i]["name"]}" != "") if( "{$news_tab[$i]["name"]}" != "")
{ {
echo " <enclosure url=\"{$news_tab[$i]["aimg"]}\" length=\"".filesize("{$news_tab[$i]["rimg"]}")."\" type=\"picture/png\" /> echo " <enclosure url=\"{$news_tab[$i]["aimg"]}\" length=\"".filesize(".{$news_tab[$i]["rimg"]}")."\" type=\"picture/png\" />
<link>{$news_tab[$i]["alink"]}</link> <link>{$news_tab[$i]["alink"]}</link>";
<description>{$news_tab[$i]["alink"]}</description>
"; $data = "<table stryle=\"width: 100%;\"><tr><td>{$news_tab[$i]["date"]}: </td><td>{$news_tab[$i]["title"]}</td><td><a href=\"{$news_tab[$i]["alink"]}\">{$news_tab[$i]["name"]}</td><td><a href=\"{$news_tab[$i]["alink"]}\"><img src=\"{$news_tab[$i]["rimg"]}\"/></a></td></tr></table>";
} }
else else
{ {
echo " <description>{$news}</description> $data = "<table stryle=\"width: 100%;\"><tr><td>{$news}</td></tr></table>";
";
} }
echo '
<description><![CDATA[<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1"><style>table { border-collapse: collapse; width: 100%; border: 0px solid #ddd; color: white; background-color: #333333; font-family: verdana, geneva, lucida, \'lucida grande\', arial, helvetica, sans-serif; font-size: 14px;} th, td { text-align: left; padding: 16px;} a:link { font-weight: bold; color: #6644FF;} a:visited { font-weight: bold; color: #FF00FF;}</style></head><body></br></br></br>';
echo "{$data}";
echo '</br></br></br></body></html>]]></description>
';
echo " </item> echo " </item>
"; ";
} }
@@ -1495,7 +1488,7 @@ function lmb_about_tab( $skin_path)
ob_end_clean(); ob_end_clean();
// lmb_make_tab( "about", "about", "l", "{$skin_path}/images/lm_logo2-border-220.png", $data, $skin_path); // lmb_make_tab( "about", "about", "l", "{$skin_path}/images/lm_logo2-border-220.png", $data, $skin_path);
lmb_make_tab( "about", "about", "l", "sprite-lm-logo2-border-220", $data, $skin_path); lmb_make_tab( "about", "about", "l", "sprite-lm-logo2-border-220", "", $data, $skin_path);
} }
@@ -1542,7 +1535,7 @@ function lmb_history_tab( $skin_path)
ob_end_clean(); ob_end_clean();
// lmb_make_tab( "history", "history", "r", "{$skin_path}/images/lm_logo1-border-220.png", $data, $skin_path); // lmb_make_tab( "history", "history", "r", "{$skin_path}/images/lm_logo1-border-220.png", $data, $skin_path);
lmb_make_tab( "history", "history", "r", "sprite-lm-logo1-border-220", $data, $skin_path); lmb_make_tab( "history", "history", "r", "sprite-lm-logo1-border-220", "", $data, $skin_path);
} }
@@ -1706,7 +1699,7 @@ function lmb_playlist( $play_type, $side, $skin_path)
ob_end_clean(); ob_end_clean();
// lmb_make_tab( "{$play_type}", "play", $side, "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path); // lmb_make_tab( "{$play_type}", "play", $side, "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path);
lmb_make_tab( "{$play_type}", "play", $side, "sprite-lm-logo1-96", $data, $skin_path); lmb_make_tab( "{$play_type}", "play", $side, "sprite-lm-logo1-96", "", $data, $skin_path);
} }
@@ -1776,7 +1769,7 @@ function lmb_play_intro( $play_type, $play_id, $play_priority, $skin_path)
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody> <tbody>
<tr> <tr>
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-1-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-1-256.png\" alt=\"\"/></a></td> <td class=\"cover\" style=\"width: 266px; height: 266px;\"><img class=\"button-item-big\" src=\"{$cover_path}-1-400.png\" alt=\"\" onclick=\"openModal('{$cover_path}-1-1024.png')\" style=\"cursor:pointer\"/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1811,7 +1804,7 @@ function lmb_play_intro( $play_type, $play_id, $play_priority, $skin_path)
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody> <tbody>
<tr> <tr>
<td class=\"logo\"><img src=\"{$logo_path}-1-128.png\" alt=\"\"/><br/></td> <td class=\"logo\"><img class=\"button-item\" src=\"{$logo_path}-1-128.png\" alt=\"\" onclick=\"openModal('{$logo_path}-1-1024.png')\" style=\"cursor:pointer\"/><br/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -1820,7 +1813,7 @@ function lmb_play_intro( $play_type, $play_id, $play_priority, $skin_path)
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody> <tbody>
<tr> <tr>
<td class=\"cover\" style=\"width: 266px; height: 266px;\"><a href=\"{$cover_path}-2-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-2-256.png\" alt=\"\"/></a></td> <td class=\"cover\" style=\"width: 266px; height: 266px;\"><img class=\"button-item-big\" src=\"{$cover_path}-2-400.png\" alt=\"\" onclick=\"openModal('{$cover_path}-2-1024.png')\" style=\"cursor:pointer\"/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -2199,7 +2192,7 @@ function lmb_tracklist( $play_type, $play_id, $play_priority, $skin_path)
ob_end_clean(); ob_end_clean();
// lmb_make_tab( "tracks", "tracks", "r", "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path); // lmb_make_tab( "tracks", "tracks", "r", "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path);
lmb_make_tab( "tracks", "tracks", "r", "sprite-lm-logo1-96", $data, $skin_path); lmb_make_tab( "tracks", "tracks", "r", "sprite-lm-logo1-96", "", $data, $skin_path);
} }
@@ -2353,7 +2346,7 @@ function lmb_coverlist( $play_type, $play_id, $play_priority, $skin_path)
$css_row = $i % 2 + 1; $css_row = $i % 2 + 1;
$entry_tag = " <tr class=\"covers{$css_row}\" style=\"height: {$height}px\"> $entry_tag = " <tr class=\"covers{$css_row}\" style=\"height: {$height}px\">
<td class=\"covers1\"><a href=\"{$file_tab[0]["url"]}\"><img class=\"button-item\" src=\"{$cover_path}-{$sheet_tab[$i]}-icon.png\" alt=\"\"/></a></td> <td class=\"covers1\"><img class=\"button-item\" src=\"{$cover_path}-{$sheet_tab[$i]}-icon.png\" alt=\"\" onclick=\"openModal('{$file_tab[0]["url"]}')\" style=\"cursor:pointer\"/></td>
<td class=\"covers2\">&nbsp;{$sheet_name}&nbsp;</td>"; <td class=\"covers2\">&nbsp;{$sheet_name}&nbsp;</td>";
lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}", count( $file_tab)); lmb_file_entry_print( $file_tab, "covers3", "covers4", "{$entry_tag}", count( $file_tab));
@@ -2364,7 +2357,7 @@ function lmb_coverlist( $play_type, $play_id, $play_priority, $skin_path)
$data = ob_get_contents(); $data = ob_get_contents();
ob_end_clean(); ob_end_clean();
lmb_make_tab( "covers", "covers", "l", "/{$logo_path}-2-128.png", $data, $skin_path); lmb_make_tab( "covers", "covers", "l", "/{$logo_path}-2-128.png", "/{$logo_path}-2-1024.png", $data, $skin_path);
} }
@@ -2381,7 +2374,7 @@ function lmb_video_file_tab_get( $play_type, $play_id, $play_priority, $video_id
$play_path = lmb_play_path_get( $play_type, $play_id, $play_priority); $play_path = lmb_play_path_get( $play_type, $play_id, $play_priority);
$video_path = "{$play_path}/videos"; $video_path = "{$play_path}/videos";
$cmd = "ls {$video_path}/{$video_id}* | sed -e 's/.*-//' -e 's/\..*$//' | grep -v icon | grep -v poster | sort -rnu"; $cmd = "ls {$video_path}/{$video_id}* 2>/dev/null | sed -e 's/.*-//' -e 's/\..*$//' | grep -v icon | grep -v poster | sort -rnu";
exec( $cmd, $video_format_tab); exec( $cmd, $video_format_tab);
$file_tab = array(); $file_tab = array();
@@ -2479,7 +2472,7 @@ function lmb_videolist( $play_type, $play_id, $play_priority, $skin_path)
ob_start(); ob_start();
$cmd="ls {$video_path}/* | sed -e 's/.*\.//' | grep -v \"png\" | sort -u"; $cmd="ls {$video_path}/* 2>/dev/null | sed -e 's/.*\.//' | grep -v \"png\" | sort -u";
exec( $cmd, $codec_tab); exec( $cmd, $codec_tab);
if( count( $codec_tab) == 0 || ( file_exists( "{$video_path}/.hide" ) && ! lmb_admin_is())) if( count( $codec_tab) == 0 || ( file_exists( "{$video_path}/.hide" ) && ! lmb_admin_is()))
@@ -2559,7 +2552,7 @@ ${title_tag} <td class=\"videos4\">&nbs
$data = ob_get_contents(); $data = ob_get_contents();
ob_end_clean(); ob_end_clean();
lmb_make_tab( "videos", "videos", "r", "/{$logo_path}-1-128.png", $data, $skin_path); lmb_make_tab( "videos", "videos", "r", "/{$logo_path}-1-128.png", "/{$logo_path}-1-1024.png", $data, $skin_path);
} }
@@ -2690,7 +2683,7 @@ ${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[1]["url"]}\"><img class=\"button-item\" src=\"{$extra_prefix}-icon.png\" alt=\"\"/></a></td> <td class=\"extras1\"><img class=\"button-item\" src=\"{$extra_prefix}-icon.png\" alt=\"\" onclick=\"openModal('{$file_tab[array_key_last($file_tab)]["url"]}')\" style=\"cursor:pointer\"/></td>
<td class=\"extras2\">&nbsp;{$extra_type}&nbsp;</td> <td class=\"extras2\">&nbsp;{$extra_type}&nbsp;</td>
<td class=\"extras3\">&nbsp;{$extra_subid}&nbsp;</td> <td class=\"extras3\">&nbsp;{$extra_subid}&nbsp;</td>
<td class=\"extras4\">&nbsp;{$extra_format}&nbsp;</td> <td class=\"extras4\">&nbsp;{$extra_format}&nbsp;</td>
@@ -2704,7 +2697,7 @@ ${title_tag} <td class=\"extras4\">&nbs
ob_end_clean(); ob_end_clean();
// lmb_make_tab( "extras", "extras", "l", "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path); // lmb_make_tab( "extras", "extras", "l", "{$skin_path}/images/lm_logo1-96.png", $data, $skin_path);
lmb_make_tab( "extras", "extras", "l", "sprite-lm-logo1-96", $data, $skin_path); lmb_make_tab( "extras", "extras", "l", "sprite-lm-logo1-96", "", $data, $skin_path);
} }
@@ -2944,7 +2937,7 @@ 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)) if( file_exists( $play_path) && ( ! file_exists( "{$play_path}/.hide" ) || lmb_admin_is()))
{ {
$play_info = lmb_play_info_get( $play_type, $play_id, $play_priority); $play_info = lmb_play_info_get( $play_type, $play_id, $play_priority);
@@ -2953,6 +2946,7 @@ function lmb_play_page( $play_type, $play_id, $play_priority)
$play_name = lmb_play_type_name_get( $play_type); $play_name = lmb_play_type_name_get( $play_type);
$skin_path = "{$play_path}/skin"; $skin_path = "{$play_path}/skin";
lmb_cache_test( $play_path);
lmb_header( 3, "Langueur Monotone - {$play_title} Page", "{$play_title}", "Langueur Monotone play page, giving all the information about {$play_info["name"]} {$play_name}", "{$play_type},{$play_info["name"]}", 0, "{$skin_path}"); lmb_header( 3, "Langueur Monotone - {$play_title} Page", "{$play_title}", "Langueur Monotone play page, giving all the information about {$play_info["name"]} {$play_name}", "{$play_type},{$play_info["name"]}", 0, "{$skin_path}");
lmb_play_body( $play_type, $play_id, $play_priority, $skin_path); lmb_play_body( $play_type, $play_id, $play_priority, $skin_path);
@@ -2967,7 +2961,7 @@ function lmb_play_page( $play_type, $play_id, $play_priority)
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* Track List Page */ /* Track List Body */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
function lmb_tracklist_body( $skin_path) function lmb_tracklist_body( $skin_path)
@@ -3034,7 +3028,7 @@ function lmb_tracklist_body( $skin_path)
ob_end_clean(); ob_end_clean();
// lmb_make_tab( "tracks", "tracks", "r", "{$skin_path}/images/lm_logo2-96.png", $data, $skin_path); // lmb_make_tab( "tracks", "tracks", "r", "{$skin_path}/images/lm_logo2-96.png", $data, $skin_path);
lmb_make_tab( "tracks", "tracks", "r", "sprite-lm-logo2-96", $data, $skin_path); lmb_make_tab( "tracks", "tracks", "r", "sprite-lm-logo2-96", "", $data, $skin_path);
} }
@@ -3227,10 +3221,10 @@ function lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id)
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
/* JPlayer Insert */ /* Player Insert */
/*--------------------------------------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------------------------------------*/
function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix) function lmb_player_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix)
{ {
global $lmb_cookie_tab; global $lmb_cookie_tab;
global $lmb_url_pre; global $lmb_url_pre;
@@ -3254,40 +3248,6 @@ function lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $t
$track_file_mp3 = "{$track_path}/mp3-192/{$track_file_base}.mp3"; $track_file_mp3 = "{$track_path}/mp3-192/{$track_file_base}.mp3";
$track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id); $track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id);
$solution_cookie = "jpsolution";
$prefix_url = "{$lmb_url_post}?cookie_id={$solution_cookie}&cookie_value=";
$query_string = preg_replace( "/cookie_id={$solution_cookie}&cookie_value=[^&]*&/", "", "{$_SERVER['QUERY_STRING']}");
$solution_html_url = htmlentities( "{$prefix_url}html, flash&{$query_string}");
$solution_flash_url = htmlentities( "{$prefix_url}flash, html&{$query_string}");
$solution_native_url = htmlentities( "{$prefix_url}native&{$query_string}");
$solution_value = $lmb_cookie_tab[$solution_cookie];
if( "{$solution_value}" == "html, flash")
{
$html_class = "link-item-disabled";
$flash_class = "link-item";
$native_class = "link-item";
}
else
{
if( "{$solution_value}" == "flash, html")
{
$html_class = "link-item";
$flash_class = "link-item-disabled";
$native_class = "link-item";
}
else
{
$html_class = "link-item";
$flash_class = "link-item";
$native_class = "link-item-disabled";
}
}
if( "{$solution_value}" == "native")
{
echo " echo "
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody> <tbody>
@@ -3301,123 +3261,10 @@ Your browser does not support the audio element.
</audio> </audio>
</td> </td>
</tr> </tr>
<tr style=\"background-color:#222222; height: 25px;\">
<td style=\"horizontal-align: left; vertical-align: middle;\">
<div style=\"font-size: 12px;\"><a rel=\"nofollow\" class=\"{$html_class}\" href=\"{$solution_html_url}\">JPlayer HTML</a>&nbsp;<a rel=\"nofollow\" class=\"{$flash_class}\" href=\"{$solution_flash_url}\">JPlayer Flash</a>&nbsp;<a rel=\"nofollow\" class=\"{$native_class}\" href=\"{$solution_native_url}\">Native</a></div>
</td>
</tr>
</tbody> </tbody>
</table> </table>
"; ";
} }
else
{
echo "
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tbody>
<tr>
<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%;\">
<script type=\"text/javascript\" src=\"/jplayer/lib/jquery.min.js\"></script>
<script type=\"text/javascript\" src=\"/jplayer/jquery.jplayer.min.js\"></script>
<script type=\"text/javascript\" src=\"/jplayer/jquery.jplayer.inspector.js\"></script>
";
echo "
<script type=\"text/javascript\">
//<![CDATA[
$(document).ready(function(){
$(\"#jquery_jplayer_1\").jPlayer({
ready: function (event) {
$(this).jPlayer(\"setMedia\", {
title: \"{$track_fulltitle}\",
oga:\"{$track_file_ogg}\",
mp3:\"{$track_file_mp3}\"
}).jPlayer(\"play\");
},
swfPath: \"/jplayer\",
supplied: \"oga, mp3\",
wmode: \"window\",
useStateClassSkin: true,
autoBlur: true,
smoothPlayBar: false,
keyEnabled: true,
remainingDuration: true,
toggleDuration: true,
backgroundColor: \"#012345\"
});
$(\"#jplayer_inspector\").jPlayerInspector({jPlayer:$(\"#jquery_jplayer_1\")});
});
//]]>
</script>
";
echo "
<div id=\"jquery_jplayer_1\" class=\"jp-jplayer\"></div>
<div id=\"jp_container_1\" class=\"jp-audio\" role=\"application\" aria-label=\"media player\">
<div class=\"jp-type-single\">
<div class=\"jp-gui jp-interface\">
<div class=\"jp-volume-controls\">
<button class=\"jp-mute\" role=\"button\" tabindex=\"0\">mute</button>
<button class=\"jp-volume-max\" role=\"button\" tabindex=\"0\">max volume</button>
<div class=\"jp-volume-bar\">
<div class=\"jp-volume-bar-value\"></div>
</div>
</div>
<div class=\"jp-controls-holder\">
<div class=\"jp-controls\">
<button class=\"jp-play\" role=\"button\" tabindex=\"0\">play</button>
<button class=\"jp-stop\" role=\"button\" tabindex=\"0\">stop</button>
</div>
<div class=\"jp-progress\">
<div class=\"jp-seek-bar\">
<div class=\"jp-play-bar\"></div>
</div>
</div>
<div class=\"jp-current-time\" role=\"timer\" aria-label=\"time\">&nbsp;</div>
<div class=\"jp-duration\" role=\"timer\" aria-label=\"duration\">&nbsp;</div>
<div class=\"jp-toggles\">
<button class=\"jp-repeat\" role=\"button\" tabindex=\"0\">repeat</button>
</div>
</div>
</div>
<div class=\"jp-details\">
<div class=\"jp-title\" aria-label=\"title\">&nbsp;</div>
</div>
<div class=\"jp-no-solution\">
<span>Update Required</span>
To play the media you will need to either update your browser to a recent version or update your <div class=\"link-item\"><a href=\"http://get.adobe.com/flashplayer/\" target=\"_blank\">Flash plugin</a></div>.
</div>
<div>&nbsp;
</div>
<div style=\"font-size: 12px;\"><a rel=\"nofollow\" class=\"{$html_class}\" href=\"{$solution_html_url}\">JPlayer HTML</a>&nbsp;<a rel=\"nofollow\" class=\"{$flash_class}\" href=\"{$solution_flash_url}\">JPlayer Flash</a>&nbsp;<a rel=\"nofollow\" class=\"{$native_class}\" href=\"{$solution_native_url}\">Native</a></div>
</div>
</div>
";
echo " </td>
<td style=\"background-color:#3a2a45; border-top:1px solid #554461; border-bottom:1px solid #180a1f; border-right:1px solid #180a1f;\">&nbsp;</td>
</tr>
</tbody>
</table>
";
if( $lmb_jpi_enable == true)
{
echo "<div id=\"jplayer_inspector\"></div>";
}
}
}
@@ -3451,7 +3298,7 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody> <tbody>
<tr> <tr>
<td class=\"cover\" style=\"width: {$border2_size}px; height: {$border2_size}px;\"><a href=\"{$cover_path}-1-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-1-{$cover_size}.png\" alt=\"\"/></a></td> <td class=\"cover\" style=\"width: {$border2_size}px; height: {$border2_size}px;\"><img class=\"button-item-big\" src=\"{$cover_path}-1-{$cover_size}.png\" alt=\"\" onclick=\"openModal('{$cover_path}-1-1024.png')\" style=\"cursor:pointer\"/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -3484,7 +3331,7 @@ function lmb_track_intro( $play_type, $play_id, $play_priority, $track_id, $trac
<td> <td>
"; ";
lmb_jplayer_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix); lmb_player_insert( $play_type, $play_id, $play_priority, $track_id, $track_name, $track_mix);
echo " </td> echo " </td>
</tr> </tr>
@@ -3522,7 +3369,7 @@ echo " </td>
<table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\"> <table class=\"list\" border=\"0\" cellpadding=\"0\" cellspacing=\"10\" style=\"\">
<tbody> <tbody>
<tr> <tr>
<td class=\"cover\" style=\"width: {$border2_size}px; height: {$border2_size}px;\"><a href=\"{$cover_path}-2-1024.png\"><img class=\"button-item-big\" src=\"{$cover_path}-2-{$cover_size}.png\" alt=\"\"/></a></td> <td class=\"cover\" style=\"width: {$border2_size}px; height: {$border2_size}px;\"><img class=\"button-item-big\" src=\"{$cover_path}-2-{$cover_size}.png\" alt=\"\" onclick=\"openModal('{$cover_path}-2-1024.png')\" style=\"cursor:pointer\"/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@@ -3674,7 +3521,7 @@ Your browser does not support the video tag.
$data = ob_get_contents(); $data = ob_get_contents();
ob_end_clean(); ob_end_clean();
lmb_make_tab( "video", "videos", "r", "/{$logo_path}-1-128.png", $data, $skin_path); lmb_make_tab( "video", "videos", "r", "/{$logo_path}-1-128.png", "/{$logo_path}-1-1024.png", $data, $skin_path);
echo " </tr> echo " </tr>
<tr><td><br/><br/><br/><br/><br/></td></tr> <tr><td><br/><br/><br/><br/><br/></td></tr>
@@ -3865,14 +3712,44 @@ function lmb_track_page( $play_type, $play_id, $play_priority, $track_id)
$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) && ( ! file_exists( "{$play_path}/.hide" ) || lmb_admin_is()))
{
$skin_path = "{$play_path}/skin"; $skin_path = "{$play_path}/skin";
$track_title = lmb_title_get( $play_type, $play_id, $play_priority, $track_id); $track_title = lmb_title_get( $play_type, $play_id, $play_priority, $track_id);
$track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id); $track_fulltitle = lmb_fulltitle_get( $play_type, $play_id, $play_priority, $track_id);
lmb_cache_test( $play_path);
lmb_header( 4, "Langueur Monotone - {$track_fulltitle} - Track Page", "{$track_fulltitle} - Track", "Langueur Monotone track page, giving all the information about {$track_fulltitle} track", "track, {$track_title}, {$track_fulltitle}", 962, "{$skin_path}"); lmb_header( 4, "Langueur Monotone - {$track_fulltitle} - Track Page", "{$track_fulltitle} - Track", "Langueur Monotone track page, giving all the information about {$track_fulltitle} track", "track, {$track_title}, {$track_fulltitle}", 962, "{$skin_path}");
lmb_track_body( $play_type, $play_id, $play_priority, $track_id, $skin_path); lmb_track_body( $play_type, $play_id, $play_priority, $track_id, $skin_path);
lmb_footer( $skin_path); lmb_footer( $skin_path);
} }
else
{
lmb_redirect_page( "");
}
}
/*--------------------------------------------------------------------------------------------------------------------*/
/* Cache Test */
/*--------------------------------------------------------------------------------------------------------------------*/
function lmb_cache_test( $directory)
{
$cache_dir = "{$directory}/cache";
// Check if any content file is newer than the cache directory
$count = (int)exec( "find {$directory} -newer {$cache_dir} -not -path '{$cache_dir}/*' | grep -c .");
if( $count > 0)
{
// Purge all caches, they are all potentially stale
array_map('unlink', glob("{$cache_dir}/*"));
}
}
@@ -3886,17 +3763,32 @@ function lmb_download_zip( $directory, $file_list, $mode)
{ {
case "SIZE": case "SIZE":
{ {
return( exec( "cd {$directory}; du -cb ${file_list} | tail -1 | cut -f 1")); $cache_dir = "{$directory}/cache";
$cache_file = "{$cache_dir}/size-" . md5($file_list);
// Ensure cache directory exists
if( !is_dir( $cache_dir))
{
mkdir( $cache_dir, 0755);
} }
case "RSIZE": if( file_exists( $cache_file))
{ {
return( exec( "cd {$directory}; zip -0 -j -p - ${file_list} | wc -c")); $size = file_get_contents( $cache_file);
}
else
{
// Recompute and store — this updates cache dir mtime for next check
$size = exec( "cd {$directory}; zip -0 -j -p - {$file_list} 2>/dev/null | wc -c");
file_put_contents( $cache_file, $size);
}
return( (int)$size);
} }
case "DUMP": case "DUMP":
{ {
passthru( "cd {$directory}; zip -0 -j -p - ${file_list}"); passthru( "cd {$directory}; zip -0 -j -p - {$file_list} 2>/dev/null");
break; break;
} }
} }
@@ -3916,13 +3808,15 @@ function lmb_download_file( $play_dir, $file_list, $mode, $download_name)
} }
else else
{ {
$zip_size = lmb_download_zip( "{$play_dir}", $file_list, "RSIZE"); $zip_size = lmb_download_zip( "{$play_dir}", $file_list, "SIZE");
header( "Content-Description: Langueur Monotone - {$download_name}"); header( "Content-Description: Langueur Monotone - {$download_name}");
header( 'Content-Type: application/zip'); header( 'Content-Type: application/zip');
header( 'Content-Disposition: attachment; filename="'."langueur_monotone-{$download_name}.zip".'"'); header( 'Content-Disposition: attachment; filename="'."langueur_monotone-{$download_name}.zip".'"');
header( 'Content-Length: ' . $zip_size); header( 'Content-Length: ' . $zip_size);
flush();
$zip_size = lmb_download_zip( "{$play_dir}", $file_list, "DUMP"); $zip_size = lmb_download_zip( "{$play_dir}", $file_list, "DUMP");
} }
} }

View File

@@ -0,0 +1,64 @@
<?
/*--------------------------------------------------------------------------------------------------------------------------------*/
/* */
/* LMBrowse - Langueur Monotone Browser */
/* */
/* Copyright (C) 2012-2026 Arnaud G. GIBERT */
/* mailto:arnaud@rx3.net */
/* http://www.rx3.org/dvp/lmbrowse */
/* */
/* This is free software: you can redistribute it and/or modify it */
/* under the terms of the GNU Lesser General Public License as published */
/* by the Free Software Foundation, either version 3 of the License, or */
/* (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
/* GNU Lesser General Public License for more details. */
/* */
/* You should have received a copy of the GNU Lesser General Public */
/* License along with this program; If not, see */
/* <https://www.gnu.org/licenses/>. */
/* */
/*--------------------------------------------------------------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------------------------------------------------*/
/* Path and URL definition */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_path = "/var/httpd/www.langueur-monotone.com/html";
$lmb_url_pre = "www.langueur-monotone.com";
$lmb_url_post = "/";
/*--------------------------------------------------------------------------------------------------------------------*/
/* Keywords definition */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_keywords = "langueur monotone,music,graphic,project,group,band,Arnaud G. GIBERT";
/*--------------------------------------------------------------------------------------------------------------------*/
/* Features control */
/*--------------------------------------------------------------------------------------------------------------------*/
/* Google analytics */
$lmb_ga_enable = true;
/* JPlayer Inpector link*/
$lmb_jpi_enable = false;
/*--------------------------------------------------------------------------------------------------------------------*/
/* Admin Password definition */
/*--------------------------------------------------------------------------------------------------------------------*/
$lmb_password = "XXXXXXXX";
?>

1
src/html/skin Symbolic link
View File

@@ -0,0 +1 @@
skins/black

1
src/html/welcome.txt Normal file
View File

@@ -0,0 +1 @@
This is the Welcome text!

4
var/log/httpd/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
var/log/init/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
var/log/supervisor/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

4
var/www/lmbrowse/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore