2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

Reading HTMLs directly from the filesystem is working again.

git-svn-id: https://svn.fhem.de/fhem/trunk@2888 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2013-03-10 18:49:21 +00:00
parent 2bad079b65
commit 1f34f34c98
15 changed files with 240 additions and 173 deletions

View File

@ -335,6 +335,7 @@ FW_serveSpecial($$$$)
my ($file,$ext,$dir,$cacheable)= @_;
$file =~ s,\.\./,,g; # little bit of security
Log 1, "Serve: $dir, $file, $ext";
$file = "$FW_sp$file" if($ext eq "css" && -f "$dir/$FW_sp$file.$ext");
$FW_RETTYPE = ext2MIMEType($ext);
#Log 1, "Serving $dir/$file.$ext as $FW_RETTYPE, cacheable:$cacheable";
@ -348,6 +349,7 @@ FW_answerCall($)
my ($arg) = @_;
my $me=$defs{$FW_cname}; # cache, else rereadcfg will delete us
Log 1, "ANSWER $arg";
$FW_RET = "";
$FW_RETTYPE = "text/html; charset=$FW_encoding";
$FW_ME = "/" . AttrVal($FW_wname, "webname", "fhem");
@ -376,11 +378,13 @@ FW_answerCall($)
} elsif($arg =~ m,^$FW_ME/(.*)/([^/]*)$,) { # the "normal" case
my ($dir, $ofile, $ext) = ($1, $2, "");
$dir =~ s/\.\.//g;
$dir =~ s,www/,,g; # Want commandref.html to work from file://...
my $file = $ofile;
if($file =~ m/^(.*)\.([^.]*)$/) {
$file = $1; $ext = $2;
}
Log 1, "GOT $dir";
my $ldir = "$FW_dir/$dir";
$ldir = "$FW_dir/pgm2" if($dir eq "css" || $dir eq "js");
$ldir = "$attr{global}{modpath}/docs" if($dir eq "docs");
@ -402,6 +406,7 @@ FW_answerCall($)
return -1;
}
Log 1, "Searching for $arg";
$FW_plotmode = AttrVal($FW_wname, "plotmode", "SVG");

View File

@ -81,6 +81,10 @@ foreach my $lang (@lang) {
} elsif(!$skip) {
# here we copy line by line from the module
# if($l =~ m/<.?pre>/) {
# print "$lang $mod REMOVING <pre> Formatting\n";
# $l =~ s/<.?pre>//g;
# }
print OUT $l;
$docCount++;
$hasLink = ($l =~ m/<a name="$mod">/) if(!$hasLink);

View File

@ -8,115 +8,153 @@ sub collectSubmitted($$@);
sub printChapter($$@);
my @hw = qw(
ALL3076
ALL4000T
ALL4027
BS
CM11
CUL
CUL_EM
CUL_FHTTK
CUL_HM
ALL3076
ALL4000T
ALL4027
BS
CM11
CUL
CUL_EM
CUL_FHTTK
CUL_HM
CUL_HOERMANN
CUL_IR
CUL_RFR
CUL_TX
CUL_WS
CUL_IR
CUL_MAX
CUL_RFR
CUL_TX
CUL_WS
ECMD
ECMDDevice
EIB
EM
EMEM
EMGZ
EMWZ
ESA2000
ECMDDevice
EIB
EM
EMEM
EMGZ
EMWZ
ESA2000
EnOcean
FHT
FHT8V
FHZ
FS20
HMLAN
HMS
FBAHA
FBDECT
FHT
FHT8V
FHZ
FRM
FRM_AD
FRM_I2C
FRM_IN
FRM_OUT
FRM_PWM
FRM_SERVO
FS20
HMLAN
HMS
HTTPSRV
HUEBridge
HUEDevice
IPCAM
IPWE
IT
IPWE
IT
Itach_Relay
KM271
KS300
KM271
KS300
LGTV
LIRC
M232
M232Counter
M232Voltage
NetIO230B
LIRC
LUXTRONIK2
M232
M232Counter
M232Voltage
MAX
MAXLAN
NetIO230B
OREGON
OWFS
OWTEMP
OWAD
OWCOUNT
OWDevice
OWFS
OWID
OWLCD
OWMULTI
OWSWITCH
OWServer
OWTEMP
OWTHERM
OWX
POKEYS
RFXCOM
RFXMETER
RFXX10REC
SCIVT
SISPM
SIS_PMS
RFXCOM
RFXMETER
RFXX10REC
RSS
SCIVT
SISPM
SIS_PMS
SML
STV
TCM
TCM
TRX
TRX_ELSE
TRX_LIGHT
TRX_SECURITY
TRX_WEATHER
TUL
TUL
TellStick
USBWX
USF1000
VantagePro2
UNIRoll
USBWX
USF1000
VantagePro2
WEBCOUNT
WEBIO
WEBIO_12DIGITAL
WEBTHERM
WOL
WS2000
WS300
WS3600
X10
WEBIO
WEBIO_12DIGITAL
WEBTHERM
WS2000
WS300
WS3600
Weather
X10
YAMAHA_AVR
ZWDongle
ZWave
xxLG7000
xxLG7000
);
my @help = qw(
CULflash
Calendar
DbLog
FB_CALLMONITOR
FHEM2FHEM
FileLog
HTTPSRV
HCS
Heating_Control
JsonList
MSG
MSGFile
MSGMail
PID
PRESENCE
PachLog
RSS
SUNRISE_EL
Weather
SYSSTAT
Twilight
WOL
XmlList
at
autocreate
average
backup
createlog
dewpoint
dummy
fheminfo
holiday
notice
notify
sequence
structure
telnet
updatefhem
update
usb
watchdog
weblink
);
@ -158,12 +196,16 @@ my $title = "Used FHEM Modules & Components";
my $q = new CGI;
print $q->header,
$q->start_html( -title => $title, -style=>{-src=>"style.css"}), "\n";
$q->start_html( -title => $title,
-style => {-src=>"../www/pgm2/style.css"}), "\n";
print '<div id="left">', "\n",
'<img src="fhem.png" alt="fhem-logo"/>', "\n",
' <h3>FHEM survey</h3>', "\n",
'</div>', "\n";
'<div id="menuScrollArea">',"\n",
'<div id="logo"></div>',"\n",
'<div id="menu">',"\n",
'<h3>FHEM survey</h3>', "\n",
'</div>', "\n",
'</div>', "\n";
print '<div id="right">',"\n",
$q->h3("$title"), "\n";

View File

@ -4,34 +4,36 @@
<head>
<title>FHEM Howto</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>FHEM Howto</h3>
Version: <b>EN</b>&nbsp;<a href="HOWTO_DE.html">DE</a>
<br>
<br>
<table id="room">
<tr><td></td></tr>
<tr><td><b>Content:</b></td></tr>
<tr><td><a href="#Description">Description</a></td></tr>
<tr><td><a href="#starting">Starting</a></td></tr>
<tr><td><a href="#attaching">USB device</a></td></tr>
<tr><td><a href="#sensors">Sensors</a></td></tr>
<tr><td><a href="#actors">Actors</a></td></tr>
<tr><td><a href="#at">At / Notify</a></td></tr>
<tr><td><a href="#logging">Logging data</a></td></tr>
<tr><td><a href="#plotting">Plotting</a></td></tr>
<tr><td><a href="#security">Security</a></td></tr>
<tr><td><a href="#fhemweb">Look &amp; Feel</a></td></tr>
<tr><td><a href="#structure">Structures</a></td></tr>
</table>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>FHEM Howto</h3>
Version: <b>EN</b>&nbsp;<a href="HOWTO_DE.html">DE</a>
<br>
<br>
<table id="room">
<tr><td></td></tr>
<tr><td><b>Content:</b></td></tr>
<tr><td><a href="#Description">Description</a></td></tr>
<tr><td><a href="#starting">Starting</a></td></tr>
<tr><td><a href="#attaching">USB device</a></td></tr>
<tr><td><a href="#sensors">Sensors</a></td></tr>
<tr><td><a href="#actors">Actors</a></td></tr>
<tr><td><a href="#at">At / Notify</a></td></tr>
<tr><td><a href="#logging">Logging data</a></td></tr>
<tr><td><a href="#plotting">Plotting</a></td></tr>
<tr><td><a href="#security">Security</a></td></tr>
<tr><td><a href="#fhemweb">Look &amp; Feel</a></td></tr>
<tr><td><a href="#structure">Structures</a></td></tr>
</table>
</div>
</div>

View File

@ -1,34 +1,36 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title>Mit FHEM beginnen</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>FHEM Howto</h3>
Version: <a href="HOWTO.html">EN</a>&nbsp;<b>DE</b>
<br>
<br>
<table id="room">
<tr><td></td></tr>
<tr><td><b>Inhalt:</b></td></tr>
<tr><td><a href="#starting">Start</a></td></tr>
<tr><td><a href="#attaching">USB Geräte</a></td></tr>
<tr><td><a href="#sensors">Sensoren</a></td></tr>
<tr><td><a href="#actors">Aktoren</a></td></tr>
<tr><td><a href="#at">At/Notify</a></td></tr>
<tr><td><a href="#logging">Daten loggen</a></td></tr>
<tr><td><a href="#plotting">Plotten</a></td></tr>
<tr><td><a href="#security">Sicherheit</a></td></tr>
<tr><td><a href="#fhemweb">Anpassungen</a></td></tr>
<tr><td><a href="#structure">Strukturen</a></td></tr>
<tr><td>
</table>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>FHEM Howto</h3>
Version: <a href="HOWTO.html">EN</a>&nbsp;<b>DE</b>
<br>
<br>
<table id="room">
<tr><td></td></tr>
<tr><td><b>Inhalt:</b></td></tr>
<tr><td><a href="#starting">Start</a></td></tr>
<tr><td><a href="#attaching">USB Geräte</a></td></tr>
<tr><td><a href="#sensors">Sensoren</a></td></tr>
<tr><td><a href="#actors">Aktoren</a></td></tr>
<tr><td><a href="#at">At/Notify</a></td></tr>
<tr><td><a href="#logging">Daten loggen</a></td></tr>
<tr><td><a href="#plotting">Plotten</a></td></tr>
<tr><td><a href="#security">Sicherheit</a></td></tr>
<tr><td><a href="#fhemweb">Anpassungen</a></td></tr>
<tr><td><a href="#structure">Strukturen</a></td></tr>
<tr><td>
</table>
</div>
</div>
<div id="right">

View File

@ -4,16 +4,18 @@
<head>
<title>USB compendium</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>USB compendium</h3>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>USB compendium</h3>
</div>
</div>
<div id="right">

View File

@ -5,18 +5,19 @@
<head>
<title>fhem reference</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
<link rel="shortcut icon" href="favicon.ico"/>
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>fhem.pl reference</h3>
Version: <b>EN</b>&nbsp;<a href="commandref_DE.html">DE</a>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>fhem.pl reference</h3>
Version: <b>EN</b>&nbsp;<a href="commandref_DE.html">DE</a>
</div>
</div>
<div id="right">

View File

@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>FHEM reference</title>
<link rel="stylesheet" type="text/css" href="../css/style.css">
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8">
<link rel="shortcut icon" href="http://fhem.de/favicon.ico">

View File

@ -4,16 +4,18 @@
<head>
<title>FHEM FAQ</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>FHEM FAQ</h3>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>FHEM FAQ</h3>
</div>
</div>
<div id="right">

View File

@ -4,7 +4,7 @@
<head>
<title>Home of FHEM</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
<link rel="shortcut icon" href="favicon.ico"/>
</head>
@ -12,33 +12,35 @@
<body>
<div id="logo"></div>
<div id="menu">
<table><tr><td> <!-- Playing with the width -->
<table id="room">
<tr><td></td></tr>
<tr><td><b>Content:</b></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Description">Description</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Download">Download</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Screenshots">Screenshots</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Features">Features</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Hardware">Hardware</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Documentation">Documentation</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Links">Links</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Installation">Installation</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#License">License</a></td></tr>
<tr><td></td></tr>
</table>
</td></tr></table>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<table><tr><td> <!-- Playing with the width -->
<table id="room">
<tr><td></td></tr>
<tr><td><b>Content:</b></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Description">Description</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Download">Download</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Screenshots">Screenshots</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Features">Features</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Hardware">Hardware</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Documentation">Documentation</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Links">Links</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#Installation">Installation</a></td></tr>
<tr><td></td></tr>
<tr><td><a href="#License">License</a></td></tr>
<tr><td></td></tr>
</table>
</td></tr></table>
</div>
</div>
@ -309,11 +311,9 @@
<a href="http://wiki.dungeon.de/all6250_opennas_mit_fhem">
http://wiki.dungeon.de/all6250_opennas_mit_fhem</a></li>
<li>Linux driver installation:
<a href="http://fhem.de/linux.html">
http://fhem.de/linux.html</a></li>
<a href="linux.html">linux.html</a></li>
<li>Misc USB problems:
<a href="http://fhem.de/USB.html">
http://fhem.de/USB.html</a></li>
<a href="USB.html">USB.html</a></li>
<li>Russels Blog for Windows user:
<a href="http://russellallen.info/category/FHEM.aspx">
http://russellallen.info/category/FHEM.aspx</a> <br>

View File

@ -4,16 +4,18 @@
<head>
<title>fhem on the Fritz!Box</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>Fhem on the Fritz!Box</h3>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>Fhem on the Fritz!Box</h3>
</div>
</div>
<div id="right">

View File

@ -4,15 +4,17 @@
<head>
<title>fhem.pl - Hints for GNU/Linux</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=ISO-8859-1"/>
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>fhem.pl - Hints for GNU/Linux</h3>
Version: <b>EN</b>&nbsp;<a href="linux_DE.html">DE</a>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>fhem.pl - Hints for GNU/Linux</h3>
Version: <b>EN</b>&nbsp;<a href="linux_DE.html">DE</a>
</div>
</div>
<div id="right">

View File

@ -4,16 +4,18 @@
<head>
<title>fhem.pl - Hinweise zu GNU/Linux</title>
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<link rel="stylesheet" type="text/css" href="../www/pgm2/style.css" />
<meta http-equiv="Content-type" content="text/html;charset=UTF-8"/>
</head>
<body>
<div id="logo"></div>
<div id="menu">
<h3>fhem.pl - Hinweise zu GNU/Linux</h3>
Version: <a href="linux.html">EN</a>&nbsp;<b>DE</b>
<div id="menuScrollArea">
<div id="logo"></div>
<div id="menu">
<h3>fhem.pl - Hinweise zu GNU/Linux</h3>
Version: <a href="linux.html">EN</a>&nbsp;<b>DE</b>
</div>
</div>
<div id="right">

View File

@ -1,5 +1,5 @@
/* Author: Till */
body { background-color: #444444; background-image:url(../icons/darklogo); background-repeat:no-repeat; color: #CCCCCC; font-family:Arial, Helvetica, sans-serif; font-size:13px;}
body { background-color: #444444; background-image:url(../images/dark/darklogo.png); background-repeat:no-repeat; color: #CCCCCC; font-family:Arial, Helvetica, sans-serif; font-size:13px;}
#logo { position:absolute; top:10px; left:20px; width:140px; visibility:hidden; }
#menu { position:absolute; top:170px;left:20px; width:140px; }
#hdr { position:absolute; top:10px; left:180px; }

View File

@ -4,7 +4,7 @@ input { font-family:Arial, sans-serif; font-size:16px; }
select { font-family:Arial, sans-serif; font-size:16px; }
#logo { margin-top:10px; margin-left:20px; width:120px; height:132px;
background-image:url(../icons/fhemicon.png); }
background-image:url(../images/default/fhemicon.png); }
#menu { margin-top:10px; margin-left:20px; width:140px; }
#menuScrollArea { width: 175px; left:0px; top:0px; height:100%;
position:fixed; overflow-x:hidden; overflow-y:auto; }
@ -28,7 +28,8 @@ table { border-radius:8px; }
table#room { border:1px solid gray; width: 100%; background: #D7FFFF; }
table#room tr.sel { background: #A0FFFF; }
#right { position:absolute; top:20px; left:180px; bottom:20px; right:10px; }
#right { position:absolute; top:20px; left:180px; }
h2,h3,h4 { color:#52865D; line-height:1.3;
margin-top:1.5em; font-family:Arial,Sans-serif; }
div#block { border:1px solid gray; background: #F8F8E0; padding:0.7em; }