Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f028d22
commit 09af828
Showing
1,180 changed files
with
25,504 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SVN | ||
0.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
<!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>CometVisu-Client: Config file check</title> | ||
</head> | ||
<body> | ||
<?php | ||
|
||
require_once('lib/library_version.inc.php'); | ||
|
||
$error_array = array(); | ||
|
||
// this function was inspired by: | ||
// http://www.php.net/manual/en/function.highlight-string.php#84661 | ||
function xml_highlight($s) | ||
{ | ||
$s = htmlspecialchars($s); | ||
$s = preg_replace("#<([/]*?)(.*)([\s]*?)>#sU", | ||
"<font color=\"#0000FF\"><\\1\\2\\3></font>",$s); | ||
$s = preg_replace("#<([\?])(.*)([\?])>#sU", | ||
"<font color=\"#800000\"><\\1\\2\\3></font>",$s); | ||
$s = preg_replace("#<([^\s\?/=])(.*)([\[\s/]|>)#iU", | ||
"<<font color=\"#808000\">\\1\\2</font>\\3",$s); | ||
$s = preg_replace("#<([/])([^\s]*?)([\s\]]*?)>#iU", | ||
"<\\1<font color=\"#808000\">\\2</font>\\3>",$s); | ||
$s = preg_replace("#([^\s]*?)\=("|')(.*)("|')#isU", | ||
"<font color=\"#800080\">\\1</font>=<font color=\"#FF00FF\">\\2\\3\\4</font>",$s); | ||
$s = preg_replace("#<(.*)(\[)(.*)(\])>#isU", | ||
"<\\1<font color=\"#800080\">\\2\\3\\4</font>>",$s); | ||
return preg_replace( '#<br */>$#', '', nl2br($s) ); | ||
} | ||
|
||
function libxml_display_error( $error ) | ||
{ | ||
global $lines, $error_array; | ||
|
||
$error_array[] = $error->line; | ||
|
||
switch ($error->level) | ||
{ | ||
case LIBXML_ERR_WARNING: | ||
$return .= '<b>Warning ' . $error->code . '</b>: '; | ||
break; | ||
case LIBXML_ERR_ERROR: | ||
$return .= '<b>Error ' . $error->code . '</b>: '; | ||
break; | ||
case LIBXML_ERR_FATAL: | ||
$return .= '<b>Fatal Error ' . $error->code . '</b>: '; | ||
break; | ||
} | ||
|
||
$return .= trim( $error->message ); | ||
$return .= ' on <a href="#' . ($error->line-1) . '">line <b>' . $error->line . '</b></a>'; | ||
|
||
$return .= '<pre>'; | ||
for( $i = max( 0, $error->line - 1 - 3); $i <= $error->line - 1 + 3; $i++ ) | ||
{ | ||
if( $i == $error->line - 1 ) $return .= '<b>'; | ||
$return .= sprintf( '%4d: ', $i+1 ); | ||
$return .= xml_highlight( $lines[ $i ] ); | ||
if( $i == $error->line - 1 ) $return .= '</b>'; | ||
} | ||
$return .= '</pre>'; | ||
|
||
return $return; | ||
} | ||
|
||
function checkVersion( $dom ) | ||
{ | ||
echo '<hr />'; | ||
$pages = $dom->getElementsByTagName("pages"); | ||
if( 1 != $pages->length ) | ||
{ | ||
echo 'Fatal error: Could not find <pages> element in config file!<br/>'; | ||
echo '(Note: this can also be caused by unbalanced elements, bad quotation marks, ...)'; | ||
return; | ||
} | ||
$fileVersion = $pages->item(0)->getAttribute('lib_version'); | ||
echo "The config file uses a library version of '" . $fileVersion . "', current version is '" | ||
. LIBRARY_VERSION . "', so this is " . ($fileVersion==LIBRARY_VERSION?'':'NOT ') . "up to date."; | ||
if( $fileVersion != LIBRARY_VERSION ) | ||
echo ' Please run <a href="upgrade/index.php?config='.$_GET['config']. | ||
'">Configuration Upgrade</a> when you are sure that the config file is valid XML.'; | ||
} | ||
|
||
// Enable user error handling | ||
libxml_use_internal_errors(true); | ||
|
||
$dom = new DomDocument(); | ||
$conffile = 'config/visu_config'; | ||
if ($_GET['config']) { | ||
$conffile .= "_" . $_GET['config']; | ||
} | ||
$conffile .= '.xml'; | ||
|
||
if ( false === is_readable( $conffile ) ) { | ||
$conffile = 'config/demo/visu_config'; | ||
if ($_GET['config']) { | ||
$conffile .= "_" . $_GET['config']; | ||
} | ||
$conffile .= '.xml'; | ||
} | ||
|
||
if( false === is_readable( $conffile ) ) | ||
{ | ||
$old_conffile = 'visu_config'; | ||
if ($_GET['config']) { | ||
$old_conffile .= "_" . $_GET['config']; | ||
} | ||
$old_conffile .= '.xml'; | ||
|
||
if( true === is_readable( $old_conffile ) ) | ||
{ | ||
$conffile = $old_conffile; | ||
echo '<font color="#f00"><b>WARNING:</b> Depreciated position of config file!</font><hr/>'; | ||
} else { | ||
echo "File <b>$conffile</b> (nor the depreciated <b>$old_conffile</b>) does not exist!"; | ||
echo '</body></html>'; | ||
exit; | ||
} | ||
} | ||
|
||
$lines = file( $conffile ); | ||
$dom->load( $conffile ); | ||
|
||
if( $dom->schemaValidate( 'visu_config.xsd' ) ) | ||
{ | ||
print ("config <b>" . $conffile . " is valid </b> XML<br/>"); | ||
|
||
checkVersion( $dom ); | ||
} else { | ||
print ("config <b>" . $conffile . " is NOT </b> valid XML"); | ||
|
||
checkVersion( $dom ); | ||
|
||
echo '<hr />'; | ||
|
||
$errors = libxml_get_errors(); | ||
foreach( $errors as $error ) | ||
{ | ||
echo libxml_display_error( $error ); | ||
} | ||
libxml_clear_errors(); | ||
} | ||
|
||
echo '<hr />'; | ||
|
||
echo '<pre>'; | ||
foreach( $lines as $line_num => $line ) | ||
{ | ||
$error_in_line = in_array( $line_num+1, $error_array ); | ||
if( $error_in_line ) echo '<b>'; | ||
printf( '<a name="%s">%4d</a>: ', $line_num, $line_num+1 ); | ||
echo xml_highlight( $line ); | ||
if( $error_in_line ) echo '</b>'; | ||
} | ||
echo '</pre>'; | ||
?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
CACHE MANIFEST | ||
# Version 0.9.0:20151018-183636 | ||
|
||
CACHE: | ||
index.html | ||
visu_config.xsd | ||
dependencies/require-2.1.15.min.js | ||
dependencies/css.js | ||
icon/comet_64_ff8000.png | ||
icon/comet_webapp_icon_114.png | ||
icon/comet_webapp_icon_144.png | ||
icon/comet_webapp_icon_android_36.png | ||
icon/comet_webapp_icon_android_48.png | ||
icon/comet_webapp_icon_android_72.png | ||
icon/comet_webapp_icon_android_96.png | ||
icon/comet_webapp_icon_android_144.png | ||
icon/comet_webapp_icon_android_192.png | ||
icon/iconconfig.js | ||
lib/templateengine.js | ||
designs/discreet_sand/mobile.css | ||
designs/discreet_sand/basic.css | ||
designs/discreet_sand/design_setup.js | ||
designs/discreet_sand/fonts/liberationsans-regular.ttf | ||
designs/discreet_sand/fonts/liberationsans-bold.ttf | ||
designs/alaska/mobile.css | ||
designs/alaska/basic.css | ||
designs/alaska/design_setup.js | ||
designs/alaska/fonts/Tuffy_Bold.ttf | ||
designs/alaska/fonts/Tuffy.ttf | ||
designs/alaska/colors.css | ||
designs/pure/mobile.css | ||
designs/pure/basic.css | ||
designs/pure/design_setup.js | ||
designs/planet/mobile.css | ||
designs/planet/basic.css | ||
designs/planet/design_setup.js | ||
designs/planet/fonts/OSP/OSP-DIN.ttf | ||
designs/planet/fonts/ubuntu-font-family/UbuntuMono-R.ttf | ||
designs/planet/fonts/ubuntu-font-family/UbuntuMono-B.ttf | ||
designs/discreet_slim/mobile.css | ||
designs/discreet_slim/basic.css | ||
designs/discreet_slim/design_setup.js | ||
designs/discreet_slim/fonts/liberationsans-regular.ttf | ||
designs/discreet_slim/fonts/liberationsans-bold.ttf | ||
designs/alaska_slim/mobile.css | ||
designs/alaska_slim/basic.css | ||
designs/alaska_slim/design_setup.js | ||
designs/alaska_slim/colors.css | ||
designs/designglobals.css | ||
designs/discreet/mobile.css | ||
designs/discreet/basic.css | ||
designs/discreet/design_setup.js | ||
designs/discreet/fonts/liberationsans-regular.ttf | ||
designs/discreet/fonts/liberationsans-bold.ttf | ||
designs/pitchblack/mobile.css | ||
designs/pitchblack/basic.css | ||
designs/pitchblack/design_setup.js | ||
designs/metal/mobile.css | ||
designs/metal/basic.css | ||
designs/metal/design_setup.js | ||
designs/metal/fonts/Dosis-Medium.ttf | ||
plugins/colorchooser/farbtastic/farbtastic.css | ||
plugins/colorchooser/structure_plugin.js | ||
plugins/strftime/strftime.css | ||
plugins/strftime/structure_plugin.js | ||
plugins/infoaction/infoaction.css | ||
plugins/infoaction/structure_plugin.js | ||
plugins/timeout/structure_plugin.js | ||
plugins/calendarlist/structure_plugin.js | ||
plugins/clock/structure_plugin.js | ||
plugins/diagram/structure_plugin.js | ||
plugins/gauge/gauge.css | ||
plugins/gauge/structure_plugin.js | ||
plugins/rsslog/rsslog.css | ||
plugins/rsslog/structure_plugin.js | ||
plugins/rss/zrssfeed/jquery.zrssfeed.css | ||
plugins/rss/structure_plugin.js | ||
plugins/upnpcontroller/structure_plugin.js | ||
plugins/upnpcontroller/upnpcontroller.css | ||
plugins/svg/structure_plugin.js | ||
|
||
NETWORK: | ||
index_external_editor_test.html | ||
check_config.php | ||
designs/get_designs.php | ||
config/structure_custom.js | ||
editor/index.php | ||
editor/bin/ | ||
editor/dataproviders/ | ||
upgrade/ | ||
lib/library_version.inc.php | ||
* | ||
http://* | ||
https://* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# ignoring text configs | ||
visu_* | ||
|
||
# but keep default configs | ||
!visu_config.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<building name="MyBuilding" orientation="45"> | ||
<floor name="Underground" height="2.44"> | ||
<nodes> | ||
<node id="1" x="0.0" y="0.0" /> | ||
<node id="2" x="5.0" y="0.0" /> | ||
<node id="3" x="10.0" y="0.0" /> | ||
<node id="4" x="10.0" y="10.0" /> | ||
<node id="5" x="5.0" y="10.0" /> | ||
<node id="6" x="0.0" y="10.0" /> | ||
</nodes> | ||
<walls> | ||
<wall start="1" end="2" thickness=".24" texture="wall" /> | ||
<wall start="2" end="3" thickness=".24" > | ||
<hole id="window01" distance="0.5" width="0.88" paparet="0.6" lintel="0.5" /> | ||
<hole id="window11" distance="2.5" width="0.88" paparet="0.6" lintel="0.5" /> | ||
</wall> | ||
<wall start="3" end="4" thickness=".24" > | ||
<hole id="window02" distance="0.5" width="0.88" paparet="1.6" lintel="0.0" /> | ||
</wall> | ||
<wall start="4" end="5" thickness=".24" /> | ||
<wall start="5" end="6" thickness=".24" /> | ||
<wall start="6" end="1" thickness=".24" texture="wall" /> | ||
<wall start="2" end="5" thickness=".24" > | ||
<hole id="door02" distance="0.5" width="0.88" paparet="0.0" lintel="0.2" /> | ||
</wall> | ||
</walls> | ||
<rooms> | ||
<room name="Room1"> | ||
<zone name="all" onclick="alert('Bad')"> | ||
<corner nodeid="1" /> | ||
<corner nodeid="2" /> | ||
<corner nodeid="5" /> | ||
<corner nodeid="6" /> | ||
</zone> | ||
</room> | ||
<room name="Room2"> | ||
<zone name="all" onclick="alert('Kind')"> | ||
<corner nodeid="2" /> | ||
<corner nodeid="3" /> | ||
<corner nodeid="4" /> | ||
<corner nodeid="5" /> | ||
</zone> | ||
</room> | ||
</rooms> | ||
</floor> | ||
<floor name="Ground" height="2.44"> | ||
<nodes> | ||
<node id="100" x="0" y="0" /> | ||
<node id="101" x="0" y="5" /> | ||
<node id="102" x="0" y="10" /> | ||
<node id="103" x="10" y="10" /> | ||
<node id="104" x="10" y="5" /> | ||
<node id="105" x="10" y="0" /> | ||
</nodes> | ||
<walls> | ||
<wall start="100" end="101" thickness=".24" texture="wall" > | ||
<hole id="window100" distance="0.3" width="1.385" paparet="1.13" lintel="0.3" /> | ||
</wall> | ||
<wall start="101" end="102" thickness=".24" texture="wall" > | ||
<hole id="window101" distance="0.05" width="0.76" paparet="1.13" lintel="0.3" /> | ||
</wall> | ||
<wall start="102" end="103" thickness=".24" > | ||
<hole id="window102" distance="0.7" width="2.01" paparet="0.485" lintel="0.3" /> | ||
</wall> | ||
<wall start="103" end="104" thickness=".24" > | ||
<hole id="door100" distance="4.37" width="1.01" paparet="0.0" lintel="0.3" /> | ||
</wall> | ||
<wall start="104" end="105" thickness=".24" > | ||
<hole id="window104" distance="0.5" width="1.26" paparet="0.6" lintel="0.3" /> | ||
</wall> | ||
<wall start="105" end="100" thickness=".24" > | ||
<hole id="door101" distance="0.05" width="1.01" paparet="0.0" lintel="0.3" /> | ||
</wall> | ||
<wall start="101" end="104" thickness=".24" > | ||
<hole id="door102" distance="0.37" width="2.25" paparet="0.0" lintel="0.3" /> | ||
</wall> | ||
</walls> | ||
<rooms> | ||
<room name="Bad EG"> | ||
<zone name="all" onclick="alert('Bad EG')"> | ||
<corner nodeid="100" /> | ||
<corner nodeid="101" /> | ||
<corner nodeid="104" /> | ||
<corner nodeid="105" /> | ||
</zone> | ||
</room> | ||
</rooms> | ||
</floor> | ||
<textures> | ||
<texture id="wall" src="./textures/Wand.jpg" width="1" height="1" /> | ||
<texture id="ground" src="./textures/BodenGrau_1_3.jpg" width="1" height="1" /> | ||
</textures> | ||
</building> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.