diff --git a/webroot/config.php b/webroot/config.php index b48d05ef7eb161c2f5a65d9b7265ea3ab4fdcbaf..7eb7034b2e3799792b88b12e4dbb0e9dfc6a20b2 100644 --- a/webroot/config.php +++ b/webroot/config.php @@ -1,20 +1,20 @@ <?php - $widget_unit_width = 185; - $widget_unit_height = 170; + $widget_unit_width = 180; + $widget_unit_height = 180; - $widget_spacing_x = 10; - $widget_spacing_y = 10; + $widget_spacing_x = 4; + $widget_spacing_y = 4; $widgets = array( //array("widget_name", "style_name", position_x, position_y, size_x, size_y); array("Logo", "widget", 0,0, 2,1), array("ZoneOffen", "widget_dark", 4,0, 2,1), array("RSSFeed", "widget_light", 0,1, 3,2), - array("Wettervorhersage", "widget_light", 3,1, 1,2), - array("TwitterWall", "widget_light", 4,1, 2,4), - array("Prepaid", "widget_light", 0,3, 2,3), - array("Jukezone", "widget_dark", 2,3, 2,2), - array("Dummy", "widget_light", 2,5, 2,1), - array("Marvin", "widget_light", 4,5, 2,1) + array("Wettervorhersage", "widget_light", 3,1, 1,2), + array("TwitterWall", "widget_light", 0,3, 2,3), + array("Prepaid", "widget_light", 4,1, 2,5), + array("Jukezone", "widget_dark", 2,3, 2,3), + array("Abfahrtsmonitor", "widget_light", 0,6, 2,5), + //array("Marvin", "widget_light", 0,6, 6,5) ); ?> diff --git a/webroot/index.php b/webroot/index.php index 83e3773b911fa53944ec4f7ee6f0f1b67aefb06e..00cef5992962b63e27f0dfb8dc42a9f4e7c50714 100644 --- a/webroot/index.php +++ b/webroot/index.php @@ -9,7 +9,7 @@ </head> <body> <?php require_once "config.php"; ?> - <div style="position:absolute;left:<?php print($widget_spacing_x); ?>px;top:<?php print($widget_spacing_y); ?>px;"> + <div style="overflow:hidden;width:1078;height:1918;position:absolute;left:<?php print($widget_spacing_x/2); ?>px;top:<?php print($widget_spacing_y/2); ?>px;"> <?php foreach ($widgets as $widgetconfig) { diff --git a/webroot/widgets/Abfahrtsmonitor/Abfahrtsmonitor.js b/webroot/widgets/Abfahrtsmonitor/Abfahrtsmonitor.js new file mode 100644 index 0000000000000000000000000000000000000000..e47b2751e396a95828f6aa4ad4dc0b7380c97984 --- /dev/null +++ b/webroot/widgets/Abfahrtsmonitor/Abfahrtsmonitor.js @@ -0,0 +1,20 @@ +function fillAbfahrtsmonitor(response) { + $("#Abfahrtsmonitor").html(response); +} + +function updateAbfahrtsmonitor () { + $.get("widgets/Abfahrtsmonitor/ajax.php", function (response) + { + fillAbfahrtsmonitor(response); + }); +} + + +$(document).ready(function() + { + addFunctionToMinuteTimer(updateAbfahrtsmonitor); + updateAbfahrtsmonitor(); + } +); + + diff --git a/webroot/widgets/Abfahrtsmonitor/Abfahrtsmonitor.php b/webroot/widgets/Abfahrtsmonitor/Abfahrtsmonitor.php new file mode 100644 index 0000000000000000000000000000000000000000..65d0692415a43ec97a1fdab88e939eab6da72943 --- /dev/null +++ b/webroot/widgets/Abfahrtsmonitor/Abfahrtsmonitor.php @@ -0,0 +1,23 @@ +<?php + +require_once 'widgets/iWidget.php'; + +class Abfahrtsmonitor implements iWidget +{ + public function __construct($width, $height) + { + + } + + + public function giveOutput() + { + $widgetOutput = '<script src="widgets/Abfahrtsmonitor/Abfahrtsmonitor.js" type="text/javascript"></script>'."\n"; + $widgetOutput .= '<h1>Abfahrtsmonitor:</h1>'."\n"; + $widgetOutput .= '<span id="Abfahrtsmonitor"></span>'."\n"; + + return $widgetOutput; + } +} + +?> diff --git a/webroot/widgets/Abfahrtsmonitor/ajax.php b/webroot/widgets/Abfahrtsmonitor/ajax.php new file mode 100644 index 0000000000000000000000000000000000000000..6191d1e18927a1267e6479c655343c89729def95 --- /dev/null +++ b/webroot/widgets/Abfahrtsmonitor/ajax.php @@ -0,0 +1,15 @@ +<?php + $httpRequest = new HttpRequest('http://mobil.stadtwerke-muenster.de/XSLT_DM_REQUEST?language=de&sessionID=0&mode=direct&type_dm=stopID&name_dm=24043411&placeInfo_dm=5515000:29&limit=10&useAllStops=1&itdLPxx_script=true', HttpRequest::METH_GET); + $httpRequest->send(); + + $content = $httpRequest->getResponseBody(); + list($dummy,$content) = split( '<input type="hidden" name="limit" value="20" />' , $content , 2 ); + list($content,$dummy) = split( '<table>' , $content , 2 ); + $content = str_replace('<img src="images/means/nf_bus.gif" alt="MOTs/bus" />','Bus',$content); + $content = str_replace('width="100%"','width="336"',$content); + $content = str_replace('bgcolor="#FFFFFF"','class="box"',$content); + $content = str_replace('bgcolor="#E6F2F8"','class="invisiblebox"',$content); + $content = str_replace('<hr style="background:#000000;width:100%;" align="left" />','',$content); + //$content = preg_replace('~<\a.*\a>~U','',$content); + print('<div class="invisiblebox">'.utf8_encode($content).'</div>'); +?> diff --git a/webroot/widgets/Marvin/img/marvin.jpg b/webroot/widgets/Marvin/img/marvin.jpg index d33ae7db7b391aba1feb84e4da66ae836e7443b1..53cfe3923029abe6c822ba2f25eebb44f00a6fb7 100644 Binary files a/webroot/widgets/Marvin/img/marvin.jpg and b/webroot/widgets/Marvin/img/marvin.jpg differ diff --git a/webroot/widgets/Prepaid/karten.txt b/webroot/widgets/Prepaid/karten.txt index 627eb3a5e4f4eb9054fff6892ea4289df89293b0..ae47ce82eb6769b79a21549a59fd1b17d1177b98 100644 --- a/webroot/widgets/Prepaid/karten.txt +++ b/webroot/widgets/Prepaid/karten.txt @@ -1,2 +1,34 @@ +SuperVirus +2 +crnf +4 +da1l6 +8 +Philipp +10 +Commander1024 +2 +ElliotDenk +3 ands -0 +5 +StuC +5 +Deaddy +4 +phryk +3 +fenkt +4 +shell +8 +Mitch +4 +Cpt.Charisma +5 +blueling +1 +Fusselkater +3 +MrFischer +6