Files
recycled-ni-neutrino/src/nhttpd/web/scripts/Y_Plugins.sh
yjogol 679eff9cc9 Set SVN:keyword Date, Revision
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@427 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Branch: ni/coolstream
Commit: 7264e3f506
Author: yjogol <yjogol2@online.de>
Date: 2010-02-27 (Sat, 27 Feb 2010)



------------------
This commit was generated by Migit
2010-02-27 05:43:48 +00:00

71 lines
1.6 KiB
Bash
Executable File

#!/bin/sh
# -----------------------------------------------------------
# Plugins (yjogol)
# $Date$
# $Revision: 1.2 $
# -----------------------------------------------------------
. ./_Y_Globals.sh
. ./_Y_Library.sh
# ===========================================================
# Settings : Skins
# ===========================================================
# -----------------------------------------------------------
# Skin Liste
# -----------------------------------------------------------
skin_get()
{
check_Y_Web_conf
active_skin=`config_get_value_direct $y_config_Y_Web 'skin'`
html_option_list=""
skin_list=`find $y_path_httpd -name 'Y_Main-*'`
for f in $skin_list
do
skin=`echo "$f"|sed -e s/^.*Y_Main-//g|sed -e s/.css//g`
if [ "$skin" = "$active_skin" ]
then
selec="selected"
else
selec=""
fi
opt="<option $selec value='$skin'>$skin</option>"
html_option_list="$html_option_list $opt"
done
echo "$html_option_list"
}
# -----------------------------------------------------------
# Skin setzen : css ueberschreiben $1=Skin-Name
# -----------------------------------------------------------
skin_set()
{
cd $y_path_httpd
cp Y_Main-$1.css Y_Main.css
if [ -e global-$1.css ]
then
cp global-$1.css global.css
else
cp global-Standard.css global.css
fi
config_set_value_direct $y_config_Y_Web 'skin' $1
msg="Skin changed - Now browsers Refresh/actualization explain"
y_format_message_html
}
# -----------------------------------------------------------
# Main
# -----------------------------------------------------------
case "$1" in
skin_set)
skin_set $2 ;;
skin_get)
skin_get ;;
*)
echo "Parameter falsch: $*" ;;
esac