Skip to content
Snippets Groups Projects
Commit 645668a8 authored by ands's avatar ands
Browse files

Widgets relocated, Abfahrtsmonitor added

parent 8cea10d9
No related branches found
No related tags found
No related merge requests found
<?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)
);
?>
......@@ -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)
{
......
function fillAbfahrtsmonitor(response) {
$("#Abfahrtsmonitor").html(response);
}
function updateAbfahrtsmonitor () {
$.get("widgets/Abfahrtsmonitor/ajax.php", function (response)
{
fillAbfahrtsmonitor(response);
});
}
$(document).ready(function()
{
addFunctionToMinuteTimer(updateAbfahrtsmonitor);
updateAbfahrtsmonitor();
}
);
<?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;
}
}
?>
<?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>');
?>
webroot/widgets/Marvin/img/marvin.jpg

31.2 KiB | W: | H:

webroot/widgets/Marvin/img/marvin.jpg

54.3 KiB | W: | H:

webroot/widgets/Marvin/img/marvin.jpg
webroot/widgets/Marvin/img/marvin.jpg
webroot/widgets/Marvin/img/marvin.jpg
webroot/widgets/Marvin/img/marvin.jpg
  • 2-up
  • Swipe
  • Onion skin
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment