init commit
132
2.php
Executable file
@@ -0,0 +1,132 @@
|
|||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="300">
|
||||||
|
<link rel="stylesheet" href="./infoscreenframe.css">
|
||||||
|
<link rel="stylesheet" href="./woocommerce-FlexSlider/flexslider.css" type="text/css">
|
||||||
|
<script src="./woocommerce-FlexSlider/jquery.min.js"></script>
|
||||||
|
<script src="./woocommerce-FlexSlider/jquery.flexslider.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" charset="utf-8" src="load.js"></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Infoscreen</title>
|
||||||
|
<style media="screen">
|
||||||
|
pre.code {
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
height: 280px;
|
||||||
|
overflow: auto;
|
||||||
|
background: #181818;
|
||||||
|
border: solid 2px #181818;
|
||||||
|
}
|
||||||
|
|
||||||
|
#codelines {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#svg {
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: solid 2px #ccc;
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
font: 1em source-sans-pro, Source Sans Pro, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="splittop top">
|
||||||
|
<?php require("slideshow.php"); ?>
|
||||||
|
<div class="header">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 220"><path id="impulsPath" class="impulsPath" d="M0,61.43H1018c2.41,0,6.77-2.28,9.12-2.28,2.66,0,8.3,6.58,11.65,6.58,3.16,0,7.47-15.07,10-15.07,4.3,0,10.38,29.62,14.18,29.62s11.89-55.47,13.67-55.47c5.32,0,10.63,86.34,14.18,86.34,4.3,0,10.63-111.15,13.42-111.15,3.54,0,8.86,123.56,13.17,123.56,3.8,0,8.36-116.85,13.55-116.85,3.42,0,8.74,100,13.67,100,3.67,0,9.24-71.15,12.91-71.15,3.42,0,10.51,41.78,12.91,41.78,3.42,0,8.48-24.56,12.41-24.56,4.43,0,7.93,12.91,12.41,12.91,5.7,0,8.3-6.58,11.65-6.58s6.77,2.28,9.12,2.28h64"/><g id="FET-logotext"><g id="F"><path d="M1042,82.71l12.7-35.9v-.1c.2-.3,3.8-8.5,13.1-9.6h37.9l-4,11.6h-25.8a7.19,7.19,0,0,0-4.8,3.7l-.6,1.6h14.1l-4.1,11.7h-14l-6.1,17Z"/><path class="FET-logotext-stroke" d="M1102.9,39l-2.6,7.6h-24.6a9.18,9.18,0,0,0-6.4,5l-1.6,4.4h14.1l-2.7,7.7h-14l-6.1,17h-14.2l11.7-33.2s3.3-7.5,11.5-8.5h34.9m5.7-4h-40.9c-10.4,1.3-14.5,10.4-14.7,10.8l-.1.1V46L1041,79.31l-1.9,5.3h22.7l.9-2.7,5.1-14.4H1082l.9-2.7,2.7-7.7,1.9-5.3h-13.7a5.48,5.48,0,0,1,2.3-1.4h27.1l.9-2.7,2.6-7.6,1.9-5.1Z"/></g><g id="E"><path d="M1101.3,82.71h-.2a8.59,8.59,0,0,1-6.2-3.8,9.86,9.86,0,0,1-.7-7.9l8.8-24.9.1-.1c.2-.3,4.3-8.1,13.3-9H1154l-4,11.7-26-.1a7.1,7.1,0,0,0-4.6,3.7l-.6,1.7h14.1l-4.1,11.7h-14.2l-1.1,3.1a2.37,2.37,0,0,0,.2,1.6,2.23,2.23,0,0,0,1.2.7h27l-4,11.7h-36.6Z"/><path class="FET-logotext-stroke" d="M1151.2,39l-2.6,7.7-24.8-.1a9.21,9.21,0,0,0-6.2,5l-1.7,4.4H1130l-2.7,7.7h-14.1l-1.6,4.5s-1.1,4.1,3,4.9H1139l-2.6,7.7h-35c-7.8-1.3-5.3-9.1-5.3-9.1l8.7-24.6s3.7-7.1,11.7-7.9l34.7-.2m5.6-4h-40.6c-10.1,1-14.7,9.7-14.9,10l-.1.3-.1.3-8.7,24.6v.2c-.2.5-1.6,5.4.9,9.6a10.41,10.41,0,0,0,7.5,4.7l.3.1h38.2l.9-2.7,2.6-7.7,1.8-5.3h-29l.5-1.4h14.1l.9-2.7,2.7-7.7,1.9-5.3H1122a6.42,6.42,0,0,1,2.2-1.4l24.3.1h2.9l.9-2.7,2.6-7.7,1.9-5.3Z"/></g><g id="T"><path d="M1154.3,82.71l12-34-15.1-.1.9-2.6a14.39,14.39,0,0,1,11.5-9H1204l-4.1,11.7h-15l-12.1,34.1h-18.5Z"/><path class="FET-logotext-stroke" d="M1201.2,38.91l-2.7,7.7h-15l-12.1,34.1h-14.3l12-34-15.1-.1a12.54,12.54,0,0,1,9.9-7.7h37.3m5.7-4h-43.6a16.53,16.53,0,0,0-13.1,10.3l-1.8,5.3h5.6l9.5.1-10.1,28.7-1.9,5.3h22.7l.9-2.7,11.1-31.4h15l.9-2.7,2.7-7.7,2.1-5.2Z"/></g></g>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div class="content-area">
|
||||||
|
<!-- Inhaltsbereich -->
|
||||||
|
<div class="flexslider">
|
||||||
|
<ul class="slides">
|
||||||
|
<?php
|
||||||
|
foreach ($javascriptArray as $image) {
|
||||||
|
echo $image;
|
||||||
|
echo"<li>";
|
||||||
|
echo"<img class='images' src=./slideshow/".$image.">";
|
||||||
|
echo"</li>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="splitbot bottom">
|
||||||
|
<div id="demo"></div>
|
||||||
|
|
||||||
|
<script defer src="./infos.js"></script>
|
||||||
|
PETER.
|
||||||
|
|
||||||
|
<div class="content-area">
|
||||||
|
<!-- Inhaltsbereich -->
|
||||||
|
1.GUFODSAJFSLDKJF<br>
|
||||||
|
2. <br>
|
||||||
|
3.<br>
|
||||||
|
4.<br>
|
||||||
|
5.<br>
|
||||||
|
6.<br>
|
||||||
|
7.<br>
|
||||||
|
8.<br>
|
||||||
|
9.<br>
|
||||||
|
10.<br>
|
||||||
|
11<br>
|
||||||
|
12<br>
|
||||||
|
13<br>
|
||||||
|
14<br>
|
||||||
|
15<br>
|
||||||
|
16<br>
|
||||||
|
17<br>
|
||||||
|
18<br>
|
||||||
|
19<br>
|
||||||
|
20 <br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<div class="adress">
|
||||||
|
<h3>Fachschaft Elektrotechnik</h3>
|
||||||
|
<p>Gußhausstraße 25-27<br>Room CD 01 09 (1st floor)<br>1040 Vienna</p>
|
||||||
|
</div>
|
||||||
|
<div class="contact">
|
||||||
|
<h3>Kontakt</h3>
|
||||||
|
<p>
|
||||||
|
E-Mail: service@fet.at<br>
|
||||||
|
Web: fet.at<br>
|
||||||
|
Phone: +43-1-58801 49553<br></p>
|
||||||
|
</div>
|
||||||
|
<div class="servicecontainer">
|
||||||
|
<div class="servicetime">
|
||||||
|
<h3>Beratung</h3><br>
|
||||||
|
<p style="text-align: right">Mon to Thur: 9am to 2pm<br>Fri: 9am to 12am<br>
|
||||||
|
<span id="time"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="servicestatus">
|
||||||
|
<!-- <svg class="servicestatusled">
|
||||||
|
<circle id="servicestatusled" cx="10" cy="15" r="10" style="fill: red" />
|
||||||
|
</svg> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
104
XXX_infoscreenframe.html
Executable file
@@ -0,0 +1,104 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Infoscreen</title>
|
||||||
|
<style media="screen">
|
||||||
|
pre.code {
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
height: 280px;
|
||||||
|
overflow: auto;
|
||||||
|
background: #181818;
|
||||||
|
border: solid 2px #181818;
|
||||||
|
}
|
||||||
|
|
||||||
|
#codelines {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#svg {
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: solid 2px #ccc;
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
font: 1em source-sans-pro, Source Sans Pro, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="./infoscreenframe.css">
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="header">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 200">
|
||||||
|
<path id="impulsPath" class="impulsPath" d="M0,61.43H1018c2.41,0,6.77-2.28,9.12-2.28,2.66,0,8.3,6.58,11.65,6.58,3.16,0,7.47-15.07,10-15.07,4.3,0,10.38,29.62,14.18,29.62s11.89-55.47,13.67-55.47c5.32,0,10.63,86.34,14.18,86.34,4.3,0,10.63-111.15,13.42-111.15,3.54,0,8.86,123.56,13.17,123.56,3.8,0,8.36-116.85,13.55-116.85,3.42,0,8.74,100,13.67,100,3.67,0,9.24-71.15,12.91-71.15,3.42,0,10.51,41.78,12.91,41.78,3.42,0,8.48-24.56,12.41-24.56,4.43,0,7.93,12.91,12.41,12.91,5.7,0,8.3-6.58,11.65-6.58s6.77,2.28,9.12,2.28h64"/>
|
||||||
|
<g id="FET-logotext"><g id="F"><path d="M1042,82.71l12.7-35.9v-.1c.2-.3,3.8-8.5,13.1-9.6h37.9l-4,11.6h-25.8a7.19,7.19,0,0,0-4.8,3.7l-.6,1.6h14.1l-4.1,11.7h-14l-6.1,17Z"/><path class="FET-logotext-stroke" d="M1102.9,39l-2.6,7.6h-24.6a9.18,9.18,0,0,0-6.4,5l-1.6,4.4h14.1l-2.7,7.7h-14l-6.1,17h-14.2l11.7-33.2s3.3-7.5,11.5-8.5h34.9m5.7-4h-40.9c-10.4,1.3-14.5,10.4-14.7,10.8l-.1.1V46L1041,79.31l-1.9,5.3h22.7l.9-2.7,5.1-14.4H1082l.9-2.7,2.7-7.7,1.9-5.3h-13.7a5.48,5.48,0,0,1,2.3-1.4h27.1l.9-2.7,2.6-7.6,1.9-5.1Z"/></g><g id="E"><path d="M1101.3,82.71h-.2a8.59,8.59,0,0,1-6.2-3.8,9.86,9.86,0,0,1-.7-7.9l8.8-24.9.1-.1c.2-.3,4.3-8.1,13.3-9H1154l-4,11.7-26-.1a7.1,7.1,0,0,0-4.6,3.7l-.6,1.7h14.1l-4.1,11.7h-14.2l-1.1,3.1a2.37,2.37,0,0,0,.2,1.6,2.23,2.23,0,0,0,1.2.7h27l-4,11.7h-36.6Z"/><path class="FET-logotext-stroke" d="M1151.2,39l-2.6,7.7-24.8-.1a9.21,9.21,0,0,0-6.2,5l-1.7,4.4H1130l-2.7,7.7h-14.1l-1.6,4.5s-1.1,4.1,3,4.9H1139l-2.6,7.7h-35c-7.8-1.3-5.3-9.1-5.3-9.1l8.7-24.6s3.7-7.1,11.7-7.9l34.7-.2m5.6-4h-40.6c-10.1,1-14.7,9.7-14.9,10l-.1.3-.1.3-8.7,24.6v.2c-.2.5-1.6,5.4.9,9.6a10.41,10.41,0,0,0,7.5,4.7l.3.1h38.2l.9-2.7,2.6-7.7,1.8-5.3h-29l.5-1.4h14.1l.9-2.7,2.7-7.7,1.9-5.3H1122a6.42,6.42,0,0,1,2.2-1.4l24.3.1h2.9l.9-2.7,2.6-7.7,1.9-5.3Z"/></g><g id="T"><path d="M1154.3,82.71l12-34-15.1-.1.9-2.6a14.39,14.39,0,0,1,11.5-9H1204l-4.1,11.7h-15l-12.1,34.1h-18.5Z"/><path class="FET-logotext-stroke" d="M1201.2,38.91l-2.7,7.7h-15l-12.1,34.1h-14.3l12-34-15.1-.1a12.54,12.54,0,0,1,9.9-7.7h37.3m5.7-4h-43.6a16.53,16.53,0,0,0-13.1,10.3l-1.8,5.3h5.6l9.5.1-10.1,28.7-1.9,5.3h22.7l.9-2.7,11.1-31.4h15l.9-2.7,2.7-7.7,2.1-5.2Z"/></g></g>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="content-area">
|
||||||
|
<!-- Inhaltsbereich -->
|
||||||
|
|
||||||
|
|
||||||
|
asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>
|
||||||
|
asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>
|
||||||
|
asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>
|
||||||
|
asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>asdasd<br>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<div class="adress">
|
||||||
|
<h3>Fachschaft Elektrotechnik</h3>
|
||||||
|
<p>Gußhausstraße 25-27<br>Room CD 01 09 (1st floor)<br>1040 Vienna</p>
|
||||||
|
</div>
|
||||||
|
<div class="contact">
|
||||||
|
<h3>Kontakt</h3>
|
||||||
|
<p>
|
||||||
|
E-Mail: service@fet.at<br>
|
||||||
|
Web: fet.at<br>
|
||||||
|
Phone: +43-1-58801 49553<br></p>
|
||||||
|
</div>
|
||||||
|
<div class="servicecontainer">
|
||||||
|
<div class="servicetime">
|
||||||
|
<h3>Beratung</h3><br>
|
||||||
|
<p style="text-align: right">Mon to Thur: 9am to 2pm<br>Fri: 9am to 12am<br>
|
||||||
|
<span id="time"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="servicestatus">
|
||||||
|
<!-- <svg class="servicestatusled">
|
||||||
|
<circle id="servicestatusled" cx="10" cy="15" r="10" style="fill: red" />
|
||||||
|
</svg> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
54
calendar.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This example demonstrates how the Ics-Parser should be used.
|
||||||
|
*
|
||||||
|
* PHP Version 5
|
||||||
|
*
|
||||||
|
* @category Example
|
||||||
|
* @package Ics-parser
|
||||||
|
* @author Martin Thoma <info@martin-thoma.de>
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||||
|
* @version SVN: <svn_id>
|
||||||
|
* @link http://code.google.com/p/ics-parser/
|
||||||
|
* @example $ical = new ical('MyCal.ics');
|
||||||
|
* print_r( $ical->get_event_array() );
|
||||||
|
*/
|
||||||
|
require 'class.iCalReader.php';
|
||||||
|
|
||||||
|
$ical = new ICal('fet_calendar.ics');
|
||||||
|
$events = $ical->events();
|
||||||
|
|
||||||
|
$date = $events[0]['DTSTART'];
|
||||||
|
echo "The ical date: ";
|
||||||
|
echo $date;
|
||||||
|
echo "<br/>";
|
||||||
|
|
||||||
|
echo "The Unix timestamp: ";
|
||||||
|
echo $ical->iCalDateToUnixTimestamp($date);
|
||||||
|
echo "<br/>";
|
||||||
|
|
||||||
|
echo "The number of events: ";
|
||||||
|
echo $ical->event_count;
|
||||||
|
echo "<br/>";
|
||||||
|
|
||||||
|
echo "The number of todos: ";
|
||||||
|
echo $ical->todo_count;
|
||||||
|
echo "<br/>";
|
||||||
|
echo "<hr/><hr/>";
|
||||||
|
|
||||||
|
foreach ($events as $event) {
|
||||||
|
echo "SUMMARY: ".$event['SUMMARY']."<br/>";
|
||||||
|
echo "DTSTART: ".$event['DTSTART']." - UNIX-Time: ".$ical->iCalDateToUnixTimestamp($event['DTSTART'])."<br/>";
|
||||||
|
echo "DTEND: ".$event['DTEND']."<br/>";
|
||||||
|
echo "DTSTAMP: ".$event['DTSTAMP']."<br/>";
|
||||||
|
echo "UID: ".$event['UID']."<br/>";
|
||||||
|
echo "CREATED: ".$event['CREATED']."<br/>";
|
||||||
|
echo "DESCRIPTION: ".$event['DESCRIPTION']."<br/>";
|
||||||
|
echo "LAST-MODIFIED: ".$event['LAST-MODIFIED']."<br/>";
|
||||||
|
echo "LOCATION: ".$event['LOCATION']."<br/>";
|
||||||
|
echo "SEQUENCE: ".$event['SEQUENCE']."<br/>";
|
||||||
|
echo "STATUS: ".$event['STATUS']."<br/>";
|
||||||
|
echo "TRANSP: ".$event['TRANSP']."<br/>";
|
||||||
|
echo "<hr/>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
322
class.iCalReader.php
Normal file
@@ -0,0 +1,322 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* This PHP-Class should only read a iCal-File (*.ics), parse it and give an
|
||||||
|
* array with its content.
|
||||||
|
*
|
||||||
|
* PHP Version 5
|
||||||
|
*
|
||||||
|
* @category Parser
|
||||||
|
* @package Ics-parser
|
||||||
|
* @author Martin Thoma <info@martin-thoma.de>
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||||
|
* @version SVN: <svn_id>
|
||||||
|
* @link http://code.google.com/p/ics-parser/
|
||||||
|
* @example $ical = new ical('MyCal.ics');
|
||||||
|
* print_r( $ical->events() );
|
||||||
|
*/
|
||||||
|
|
||||||
|
error_reporting(E_ALL);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the iCal-class
|
||||||
|
*
|
||||||
|
* @category Parser
|
||||||
|
* @package Ics-parser
|
||||||
|
* @author Martin Thoma <info@martin-thoma.de>
|
||||||
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||||
|
* @link http://code.google.com/p/ics-parser/
|
||||||
|
*
|
||||||
|
* @param {string} filename The name of the file which should be parsed
|
||||||
|
* @constructor
|
||||||
|
*/
|
||||||
|
class ICal
|
||||||
|
{
|
||||||
|
/* How many ToDos are in this ical? */
|
||||||
|
public /** @type {int} */ $todo_count = 0;
|
||||||
|
|
||||||
|
/* How many events are in this ical? */
|
||||||
|
public /** @type {int} */ $event_count = 0;
|
||||||
|
|
||||||
|
/* The parsed calendar */
|
||||||
|
public /** @type {Array} */ $cal;
|
||||||
|
|
||||||
|
/* Which keyword has been added to cal at last? */
|
||||||
|
private /** @type {string} */ $_lastKeyWord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates the iCal-Object
|
||||||
|
*
|
||||||
|
* @param {string} $filename The path to the iCal-file
|
||||||
|
*
|
||||||
|
* @return Object The iCal-Object
|
||||||
|
*/
|
||||||
|
public function __construct($filename)
|
||||||
|
{
|
||||||
|
if (!$filename) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$lines = file($filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
||||||
|
if (stristr($lines[0], 'BEGIN:VCALENDAR') === false) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
// TODO: Fix multiline-description problem (see http://tools.ietf.org/html/rfc2445#section-4.8.1.5)
|
||||||
|
foreach ($lines as $line) {
|
||||||
|
$line = trim($line);
|
||||||
|
$add = $this->keyValueFromString($line);
|
||||||
|
if ($add === false) {
|
||||||
|
$this->addCalendarComponentWithKeyAndValue($type, false, $line);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
list($keyword, $value) = $add;
|
||||||
|
|
||||||
|
switch ($line) {
|
||||||
|
// http://www.kanzaki.com/docs/ical/vtodo.html
|
||||||
|
case "BEGIN:VTODO":
|
||||||
|
$this->todo_count++;
|
||||||
|
$type = "VTODO";
|
||||||
|
break;
|
||||||
|
|
||||||
|
// http://www.kanzaki.com/docs/ical/vevent.html
|
||||||
|
case "BEGIN:VEVENT":
|
||||||
|
//echo "vevent gematcht";
|
||||||
|
$this->event_count++;
|
||||||
|
$type = "VEVENT";
|
||||||
|
break;
|
||||||
|
|
||||||
|
//all other special strings
|
||||||
|
case "BEGIN:VCALENDAR":
|
||||||
|
case "BEGIN:DAYLIGHT":
|
||||||
|
// http://www.kanzaki.com/docs/ical/vtimezone.html
|
||||||
|
case "BEGIN:VTIMEZONE":
|
||||||
|
case "BEGIN:STANDARD":
|
||||||
|
$type = $value;
|
||||||
|
break;
|
||||||
|
case "END:VTODO": // end special text - goto VCALENDAR key
|
||||||
|
case "END:VEVENT":
|
||||||
|
case "END:VCALENDAR":
|
||||||
|
case "END:DAYLIGHT":
|
||||||
|
case "END:VTIMEZONE":
|
||||||
|
case "END:STANDARD":
|
||||||
|
$type = "VCALENDAR";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->addCalendarComponentWithKeyAndValue($type,
|
||||||
|
$keyword,
|
||||||
|
$value);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $this->cal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add to $this->ical array one value and key.
|
||||||
|
*
|
||||||
|
* @param {string} $component This could be VTODO, VEVENT, VCALENDAR, ...
|
||||||
|
* @param {string} $keyword The keyword, for example DTSTART
|
||||||
|
* @param {string} $value The value, for example 20110105T090000Z
|
||||||
|
*
|
||||||
|
* @return {None}
|
||||||
|
*/
|
||||||
|
public function addCalendarComponentWithKeyAndValue($component,
|
||||||
|
$keyword,
|
||||||
|
$value)
|
||||||
|
{
|
||||||
|
if ($keyword == false) {
|
||||||
|
$keyword = $this->last_keyword;
|
||||||
|
switch ($component) {
|
||||||
|
case 'VEVENT':
|
||||||
|
$value = $this->cal[$component][$this->event_count - 1]
|
||||||
|
[$keyword].$value;
|
||||||
|
break;
|
||||||
|
case 'VTODO' :
|
||||||
|
$value = $this->cal[$component][$this->todo_count - 1]
|
||||||
|
[$keyword].$value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stristr($keyword, "DTSTART") or stristr($keyword, "DTEND")) {
|
||||||
|
$keyword = explode(";", $keyword);
|
||||||
|
$keyword = $keyword[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
switch ($component) {
|
||||||
|
case "VTODO":
|
||||||
|
$this->cal[$component][$this->todo_count - 1][$keyword] = $value;
|
||||||
|
//$this->cal[$component][$this->todo_count]['Unix'] = $unixtime;
|
||||||
|
break;
|
||||||
|
case "VEVENT":
|
||||||
|
$this->cal[$component][$this->event_count - 1][$keyword] = $value;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$this->cal[$component][$keyword] = $value;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$this->last_keyword = $keyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a key-value pair of a string.
|
||||||
|
*
|
||||||
|
* @param {string} $text which is like "VCALENDAR:Begin" or "LOCATION:"
|
||||||
|
*
|
||||||
|
* @return {array} array("VCALENDAR", "Begin")
|
||||||
|
*/
|
||||||
|
public function keyValueFromString($text)
|
||||||
|
{
|
||||||
|
preg_match("/([^:]+)[:]([\w\W]*)/", $text, $matches);
|
||||||
|
if (count($matches) == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
$matches = array_splice($matches, 1, 2);
|
||||||
|
return $matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return Unix timestamp from ical date time format
|
||||||
|
*
|
||||||
|
* @param {string} $icalDate A Date in the format YYYYMMDD[T]HHMMSS[Z] or
|
||||||
|
* YYYYMMDD[T]HHMMSS
|
||||||
|
*
|
||||||
|
* @return {int}
|
||||||
|
*/
|
||||||
|
public function iCalDateToUnixTimestamp($icalDate)
|
||||||
|
{
|
||||||
|
$icalDate = str_replace('T', '', $icalDate);
|
||||||
|
$icalDate = str_replace('Z', '', $icalDate);
|
||||||
|
|
||||||
|
$pattern = '/([0-9]{4})'; // 1: YYYY
|
||||||
|
$pattern .= '([0-9]{2})'; // 2: MM
|
||||||
|
$pattern .= '([0-9]{2})'; // 3: DD
|
||||||
|
$pattern .= '([0-9]{0,2})'; // 4: HH
|
||||||
|
$pattern .= '([0-9]{0,2})'; // 5: MM
|
||||||
|
$pattern .= '([0-9]{0,2})/'; // 6: SS
|
||||||
|
preg_match($pattern, $icalDate, $date);
|
||||||
|
|
||||||
|
// Unix timestamp can't represent dates before 1970
|
||||||
|
if ($date[1] <= 1970) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// Unix timestamps after 03:14:07 UTC 2038-01-19 might cause an overflow
|
||||||
|
// if 32 bit integers are used.
|
||||||
|
$timestamp = mktime((int)$date[4],
|
||||||
|
(int)$date[5],
|
||||||
|
(int)$date[6],
|
||||||
|
(int)$date[2],
|
||||||
|
(int)$date[3],
|
||||||
|
(int)$date[1]);
|
||||||
|
return $timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array of arrays with all events. Every event is an associative
|
||||||
|
* array and each property is an element it.
|
||||||
|
*
|
||||||
|
* @return {array}
|
||||||
|
*/
|
||||||
|
public function events()
|
||||||
|
{
|
||||||
|
$array = $this->cal;
|
||||||
|
return $array['VEVENT'];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a boolean value whether thr current calendar has events or not
|
||||||
|
*
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
public function hasEvents()
|
||||||
|
{
|
||||||
|
return ( count($this->events()) > 0 ? true : false );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns false when the current calendar has no events in range, else the
|
||||||
|
* events.
|
||||||
|
*
|
||||||
|
* Note that this function makes use of a UNIX timestamp. This might be a
|
||||||
|
* problem on January the 29th, 2038.
|
||||||
|
* See http://en.wikipedia.org/wiki/Unix_time#Representing_the_number
|
||||||
|
*
|
||||||
|
* @param {boolean} $rangeStart Either true or false
|
||||||
|
* @param {boolean} $rangeEnd Either true or false
|
||||||
|
*
|
||||||
|
* @return {mixed}
|
||||||
|
*/
|
||||||
|
public function eventsFromRange($rangeStart = false, $rangeEnd = false)
|
||||||
|
{
|
||||||
|
$events = $this->sortEventsWithOrder($this->events(), SORT_ASC);
|
||||||
|
|
||||||
|
if (!$events) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
$extendedEvents = array();
|
||||||
|
|
||||||
|
if ($rangeStart !== false) {
|
||||||
|
$rangeStart = new DateTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($rangeEnd !== false or $rangeEnd <= 0) {
|
||||||
|
$rangeEnd = new DateTime('2038/01/18');
|
||||||
|
} else {
|
||||||
|
$rangeEnd = new DateTime($rangeEnd);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rangeStart = $rangeStart->format('U');
|
||||||
|
$rangeEnd = $rangeEnd->format('U');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// loop through all events by adding two new elements
|
||||||
|
foreach ($events as $anEvent) {
|
||||||
|
$timestamp = $this->iCalDateToUnixTimestamp($anEvent['DTSTART']);
|
||||||
|
if ($timestamp >= $rangeStart && $timestamp <= $rangeEnd) {
|
||||||
|
$extendedEvents[] = $anEvent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $extendedEvents;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a boolean value whether thr current calendar has events or not
|
||||||
|
*
|
||||||
|
* @param {array} $events An array with events.
|
||||||
|
* @param {array} $sortOrder Either SORT_ASC, SORT_DESC, SORT_REGULAR,
|
||||||
|
* SORT_NUMERIC, SORT_STRING
|
||||||
|
*
|
||||||
|
* @return {boolean}
|
||||||
|
*/
|
||||||
|
public function sortEventsWithOrder($events, $sortOrder = SORT_ASC)
|
||||||
|
{
|
||||||
|
$extendedEvents = array();
|
||||||
|
|
||||||
|
// loop through all events by adding two new elements
|
||||||
|
foreach ($events as $anEvent) {
|
||||||
|
if (!array_key_exists('UNIX_TIMESTAMP', $anEvent)) {
|
||||||
|
$anEvent['UNIX_TIMESTAMP'] =
|
||||||
|
$this->iCalDateToUnixTimestamp($anEvent['DTSTART']);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!array_key_exists('REAL_DATETIME', $anEvent)) {
|
||||||
|
$anEvent['REAL_DATETIME'] =
|
||||||
|
date("d.m.Y", $anEvent['UNIX_TIMESTAMP']);
|
||||||
|
}
|
||||||
|
|
||||||
|
$extendedEvents[] = $anEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($extendedEvents as $key => $value) {
|
||||||
|
$timestamp[$key] = $value['UNIX_TIMESTAMP'];
|
||||||
|
}
|
||||||
|
array_multisort($timestamp, $sortOrder, $extendedEvents);
|
||||||
|
|
||||||
|
return $extendedEvents;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
3754
fet_calendar.ics
Normal file
24244
get-pip.py
Normal file
277
index.php
Executable file
@@ -0,0 +1,277 @@
|
|||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="300">
|
||||||
|
<link rel="stylesheet" href="./woocommerce-FlexSlider/flexslider.css" type="text/css">
|
||||||
|
<script src="./woocommerce-FlexSlider/jquery.min.js"></script>
|
||||||
|
<script src="./woocommerce-FlexSlider/jquery.flexslider.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" charset="utf-8" src="load.js"></script>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Infoscreen</title>
|
||||||
|
<style media="screen">
|
||||||
|
pre.code {
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
padding: 10px;
|
||||||
|
height: 280px;
|
||||||
|
overflow: auto;
|
||||||
|
background: #181818;
|
||||||
|
border: solid 2px #181818;
|
||||||
|
}
|
||||||
|
|
||||||
|
#codelines {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#svg {
|
||||||
|
-moz-border-radius: 10px;
|
||||||
|
-webkit-border-radius: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: solid 2px #ccc;
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
float: left;
|
||||||
|
margin-right: 10px;
|
||||||
|
font: 1em source-sans-pro, Source Sans Pro, Helvetica, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
html {
|
||||||
|
background-color: #fff;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
img{
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 40vh;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
display: block; /* remove extra space below image */
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
height: 300px;
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Split the screen in half */
|
||||||
|
.split {
|
||||||
|
height: 50%;
|
||||||
|
width: 100%;
|
||||||
|
position: fixed;
|
||||||
|
overflow-x: hidden;
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Control the top side */
|
||||||
|
.top {
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Control the bottom side */
|
||||||
|
.bottom {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #00FF00;
|
||||||
|
color: white;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.impulsPath {
|
||||||
|
fill: none;
|
||||||
|
stroke: #04669c;
|
||||||
|
stroke-miterlimit: 1;
|
||||||
|
stroke-width: 6px;
|
||||||
|
stroke-dasharray: 1946.243;
|
||||||
|
stroke-dashoffset: 0;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
stroke-linecap: round;
|
||||||
|
animation: dash 7s ease-out infinite;
|
||||||
|
animation-direction: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.FET-logotext-stroke {
|
||||||
|
fill: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#FET-logotext {
|
||||||
|
opacity: 0;
|
||||||
|
animation: logotext 7s ease-in infinite;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.content-area {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
margin: 0;
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-40%);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 6vh;
|
||||||
|
background-color: #04669c;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
bottom: 0;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
color: #fff;
|
||||||
|
flex-basis: bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer h3,
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0 20px;
|
||||||
|
font-family: Helvetica, Arial;
|
||||||
|
letter-spacing: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer h3 {
|
||||||
|
padding-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer .adress {
|
||||||
|
margin: auto;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer .contact {
|
||||||
|
margin: auto;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer .servicecontainer{
|
||||||
|
display: inline-flex;
|
||||||
|
margin: auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
.footer .servicecontainer .servicetime {
|
||||||
|
margin: auto;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer .servicecontainer .servicetime #time {
|
||||||
|
font-size: 0.7em
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer .servicecontainer .servicestatus{
|
||||||
|
margin: auto;
|
||||||
|
width:20px;
|
||||||
|
height: 100%
|
||||||
|
padding-right: 30px;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*K E Y F R A M E S*/
|
||||||
|
|
||||||
|
@keyframes dash {
|
||||||
|
from {
|
||||||
|
stroke-dashoffset: 1946.243;
|
||||||
|
opacity: 0;
|
||||||
|
stroke-width: 0.5;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
stroke-dashoffset: 0;
|
||||||
|
stroke-width: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes logotext {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="split top">
|
||||||
|
<?php require("slideshow.php"); ?>
|
||||||
|
<div class="header">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 220"><path id="impulsPath" class="impulsPath" d="M0,61.43H1018c2.41,0,6.77-2.28,9.12-2.28,2.66,0,8.3,6.58,11.65,6.58,3.16,0,7.47-15.07,10-15.07,4.3,0,10.38,29.62,14.18,29.62s11.89-55.47,13.67-55.47c5.32,0,10.63,86.34,14.18,86.34,4.3,0,10.63-111.15,13.42-111.15,3.54,0,8.86,123.56,13.17,123.56,3.8,0,8.36-116.85,13.55-116.85,3.42,0,8.74,100,13.67,100,3.67,0,9.24-71.15,12.91-71.15,3.42,0,10.51,41.78,12.91,41.78,3.42,0,8.48-24.56,12.41-24.56,4.43,0,7.93,12.91,12.41,12.91,5.7,0,8.3-6.58,11.65-6.58s6.77,2.28,9.12,2.28h64"/><g id="FET-logotext"><g id="F"><path d="M1042,82.71l12.7-35.9v-.1c.2-.3,3.8-8.5,13.1-9.6h37.9l-4,11.6h-25.8a7.19,7.19,0,0,0-4.8,3.7l-.6,1.6h14.1l-4.1,11.7h-14l-6.1,17Z"/><path class="FET-logotext-stroke" d="M1102.9,39l-2.6,7.6h-24.6a9.18,9.18,0,0,0-6.4,5l-1.6,4.4h14.1l-2.7,7.7h-14l-6.1,17h-14.2l11.7-33.2s3.3-7.5,11.5-8.5h34.9m5.7-4h-40.9c-10.4,1.3-14.5,10.4-14.7,10.8l-.1.1V46L1041,79.31l-1.9,5.3h22.7l.9-2.7,5.1-14.4H1082l.9-2.7,2.7-7.7,1.9-5.3h-13.7a5.48,5.48,0,0,1,2.3-1.4h27.1l.9-2.7,2.6-7.6,1.9-5.1Z"/></g><g id="E"><path d="M1101.3,82.71h-.2a8.59,8.59,0,0,1-6.2-3.8,9.86,9.86,0,0,1-.7-7.9l8.8-24.9.1-.1c.2-.3,4.3-8.1,13.3-9H1154l-4,11.7-26-.1a7.1,7.1,0,0,0-4.6,3.7l-.6,1.7h14.1l-4.1,11.7h-14.2l-1.1,3.1a2.37,2.37,0,0,0,.2,1.6,2.23,2.23,0,0,0,1.2.7h27l-4,11.7h-36.6Z"/><path class="FET-logotext-stroke" d="M1151.2,39l-2.6,7.7-24.8-.1a9.21,9.21,0,0,0-6.2,5l-1.7,4.4H1130l-2.7,7.7h-14.1l-1.6,4.5s-1.1,4.1,3,4.9H1139l-2.6,7.7h-35c-7.8-1.3-5.3-9.1-5.3-9.1l8.7-24.6s3.7-7.1,11.7-7.9l34.7-.2m5.6-4h-40.6c-10.1,1-14.7,9.7-14.9,10l-.1.3-.1.3-8.7,24.6v.2c-.2.5-1.6,5.4.9,9.6a10.41,10.41,0,0,0,7.5,4.7l.3.1h38.2l.9-2.7,2.6-7.7,1.8-5.3h-29l.5-1.4h14.1l.9-2.7,2.7-7.7,1.9-5.3H1122a6.42,6.42,0,0,1,2.2-1.4l24.3.1h2.9l.9-2.7,2.6-7.7,1.9-5.3Z"/></g><g id="T"><path d="M1154.3,82.71l12-34-15.1-.1.9-2.6a14.39,14.39,0,0,1,11.5-9H1204l-4.1,11.7h-15l-12.1,34.1h-18.5Z"/><path class="FET-logotext-stroke" d="M1201.2,38.91l-2.7,7.7h-15l-12.1,34.1h-14.3l12-34-15.1-.1a12.54,12.54,0,0,1,9.9-7.7h37.3m5.7-4h-43.6a16.53,16.53,0,0,0-13.1,10.3l-1.8,5.3h5.6l9.5.1-10.1,28.7-1.9,5.3h22.7l.9-2.7,11.1-31.4h15l.9-2.7,2.7-7.7,2.1-5.2Z"/></g></g>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
<div class="content-area">
|
||||||
|
<!-- Inhaltsbereich -->
|
||||||
|
<div class="flexslider">
|
||||||
|
<ul class="slides">
|
||||||
|
<?php
|
||||||
|
foreach ($javascriptArray as $image) {
|
||||||
|
echo $image;
|
||||||
|
echo"<li>";
|
||||||
|
echo"<img class='images' src=./slideshow/".$image.">";
|
||||||
|
echo"</li>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="split bottom">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="content-area">
|
||||||
|
<!-- Inhaltsbereich -->
|
||||||
|
<img src="tobi.jpg" height='50%'><br>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="footer">
|
||||||
|
<div class="adress">
|
||||||
|
<h3>Fachschaft Elektrotechnik</h3>
|
||||||
|
<p>Gußhausstraße 25-27<br>Room CD 01 09 (1st floor)<br>1040 Vienna</p>
|
||||||
|
</div>
|
||||||
|
<div class="contact">
|
||||||
|
<h3>Kontakt</h3>
|
||||||
|
<p>
|
||||||
|
E-Mail: service@fet.at<br>
|
||||||
|
Web: fet.at<br>
|
||||||
|
Phone: +43-1-58801 49553<br></p>
|
||||||
|
</div>
|
||||||
|
<div class="servicecontainer">
|
||||||
|
<div class="servicetime">
|
||||||
|
<h3>Beratung</h3><br>
|
||||||
|
<p style="text-align: right">Mon to Thur: 9am to 2pm<br>Fri: 9am to 12am<br>
|
||||||
|
<span id="time"></span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="servicestatus">
|
||||||
|
<!-- <svg class="servicestatusled">
|
||||||
|
<circle id="servicestatusled" cx="10" cy="15" r="10" style="fill: red" />
|
||||||
|
</svg> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
7
infos.js
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
let text = "Total width/height: " + screen.width + "*" + screen.height + "<br>" +
|
||||||
|
"Available width/height: " + screen.availWidth + "*" + screen.availHeight + "<br>" +
|
||||||
|
"Color depth: " + screen.colorDepth + "<br>" +
|
||||||
|
"Color resolution: " + screen.pixelDepth;
|
||||||
|
|
||||||
|
document.getElementById("demo").innerHTML = text;
|
||||||
7
load.js
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
$(window).load(function() {
|
||||||
|
$('.flexslider').flexslider({
|
||||||
|
animation: "slide",
|
||||||
|
slideshowSpeed: 5000,
|
||||||
|
controlNav: false
|
||||||
|
});
|
||||||
|
});
|
||||||
88
python/FET_Infoscreen_bot.py
Executable file
@@ -0,0 +1,88 @@
|
|||||||
|
from telegram.ext import Updater, CommandHandler
|
||||||
|
import telegram
|
||||||
|
import FET_photoDownload
|
||||||
|
import time
|
||||||
|
import sys
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# This script was written by pet@fet.at in 1.2021
|
||||||
|
# It is used to get images sent to a telegram bot and save them to a folder
|
||||||
|
# It will automatically keep the last 10 and move the older ones to a different folder
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
#sys.stdout = open('infoscreen_bot.log', 'a')
|
||||||
|
print("Started")
|
||||||
|
|
||||||
|
def FET_infoscreen_bot():
|
||||||
|
while True:
|
||||||
|
|
||||||
|
bot = telegram.Bot(token='1687598897:AAGt9XsK5oGF9Eoz8hRq96q7rkRfHn8mBJ4')
|
||||||
|
#print(bot.get_me())
|
||||||
|
|
||||||
|
#check the id of the last message we've read to start from there
|
||||||
|
last_update_id_file = open("last_update_id.txt", "r")
|
||||||
|
last_update_id = int(last_update_id_file.read())
|
||||||
|
last_update_id_file.close()
|
||||||
|
|
||||||
|
updates = bot.get_updates(last_update_id+1)
|
||||||
|
|
||||||
|
|
||||||
|
for u in updates:
|
||||||
|
now = datetime.now()
|
||||||
|
current_time = now.strftime("%Y%m%d-%H:%M:%S")
|
||||||
|
print(str(current_time) + " Received Messages:")
|
||||||
|
#print(u)
|
||||||
|
chat_id = u.message.chat_id
|
||||||
|
username = str(u.message.from_user['username'])
|
||||||
|
userid = str(u.message.from_user['id'])
|
||||||
|
print("From:" + str(username))
|
||||||
|
print("Id:" + str(u.update_id))
|
||||||
|
print("Text:" + str(u.message.text))
|
||||||
|
if u.message.text == "/start":
|
||||||
|
answer = """Wie benütze ich den FET-Infoscreen und was ist das eigentlich:
|
||||||
|
*Der Infoscreen hängt vor der Bürotür der FET (siehe fet.at)
|
||||||
|
*Er zeigt automatisch die letzten 10 an diesen Channel gesendeten Fotos in einer Slideshow an.
|
||||||
|
*Das schaut so aus: infoscreen.fet.at
|
||||||
|
*Bitte melde unpassende Inhalte direkt an service@fet.at"""
|
||||||
|
bot.send_message(chat_id=chat_id, text=answer)
|
||||||
|
elif u.message.text == "/help":
|
||||||
|
answer = """Wie benütze ich den FET-Infoscreen und was ist das eigentlich:
|
||||||
|
*Der Infoscreen hängt vor der Bürotür der FET (siehe fet.at)
|
||||||
|
*Er zeigt automatisch die letzten 10 an diesen Channel gesendeten Fotos in einer Slideshow an.
|
||||||
|
*Das schaut so aus: infoscreen.fet.at
|
||||||
|
*Bitte melde unpassende Inhalte direkt an service@fet.at"""
|
||||||
|
bot.send_message(chat_id=chat_id, text=answer)
|
||||||
|
elif u.message.photo:
|
||||||
|
print("Photo gefunden.")
|
||||||
|
answer = "Danke "+username+""", sehr fein dieses Foto. Ich werds gleich auf den Infoscreen legen und mit den letzten 9 anderen Fotos durchrotieren.
|
||||||
|
*Das dauert immer etwas, da der Infoscreen sehr langsam rotiert, gib mir 5min.
|
||||||
|
*Bitte melde unpassende Inhalte direkt an service@fet.at"""
|
||||||
|
bot.send_message(chat_id=chat_id, text=answer)
|
||||||
|
photo = bot.getFile(u.message.photo[-1].file_id)
|
||||||
|
FET_photoDownload.photoDownload(photo, username, userid)
|
||||||
|
else:
|
||||||
|
answer = """Des check i ned. Ich kann nicht lesen..
|
||||||
|
*Schick mir entweder /help für Hilfe oder direkt ein Bild das du am Infoscreen sehen willst.
|
||||||
|
*Frag alternativ @ppetl für weitere Infos.
|
||||||
|
*Bitte melde unpassende Inhalte direkt an service@fet.at"""
|
||||||
|
bot.send_message(chat_id=chat_id, text=answer)
|
||||||
|
|
||||||
|
last_update_id = u.update_id
|
||||||
|
|
||||||
|
#save the id of the last message we've read so we don't have to start over
|
||||||
|
last_update_id_file = open("last_update_id.txt", "w")
|
||||||
|
last_update_id_file.write(str(last_update_id))
|
||||||
|
last_update_id_file.close()
|
||||||
|
|
||||||
|
time.sleep(7)
|
||||||
|
|
||||||
|
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
FET_infoscreen_bot()
|
||||||
|
except Exception as e:
|
||||||
|
print("Exeption:")
|
||||||
|
print(e)
|
||||||
49
python/FET_photoDownload.py
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
from os import path
|
||||||
|
import shutil
|
||||||
|
from random import randint
|
||||||
|
|
||||||
|
#
|
||||||
|
# This script was written by pet@fet.at in 1.2021
|
||||||
|
# It is used by the FET_infoscreen bot
|
||||||
|
# It gets an image, saves it in a folder and moves the oldest image into a different one
|
||||||
|
# 10 Images is preconfigured
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
def photoDownload(photo, username, userid):
|
||||||
|
|
||||||
|
#save file after checking if we've got a collision
|
||||||
|
filepath = "../slideshow/"+username+"-"+userid+"-"+str(randint(10, 1000))+".jpg" #first try with lower numbers
|
||||||
|
while path.exists("filepath"):
|
||||||
|
filepath = "../slideshow/"+username+"-"+userid+"-"+str(randint(1000, 99999999))+".jpg"
|
||||||
|
photo.download(filepath)
|
||||||
|
|
||||||
|
recent_images_file = open("recent_images.txt", "r")
|
||||||
|
recent_images = recent_images_file.readlines()
|
||||||
|
recent_images.append(filepath) # add the newest photo
|
||||||
|
recent_images_file.close()
|
||||||
|
print(recent_images)
|
||||||
|
|
||||||
|
if len(recent_images) >= 10:
|
||||||
|
first_image = 0
|
||||||
|
else:
|
||||||
|
first_image = 1
|
||||||
|
|
||||||
|
recent_images_file = open("recent_images.txt", "w")
|
||||||
|
|
||||||
|
for image in recent_images:
|
||||||
|
#print("Image: "+str(image.strip()))
|
||||||
|
if first_image == 0:
|
||||||
|
#print(str(image.strip() + " moved to old.")
|
||||||
|
image_name= image.split("slideshow/",1)[1] # get the image name without path
|
||||||
|
try: #try to move it if it has not been deleted
|
||||||
|
shutil.move(image.rstrip(), "../slideshow/old/"+image_name)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
first_image = 1
|
||||||
|
else:
|
||||||
|
#print(image.strip() + " saved.")
|
||||||
|
recent_images_file.write(image.rstrip() + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
recent_images_file.close()
|
||||||
BIN
python/__pycache__/FET_photoDownload.cpython-37.pyc
Normal file
0
python/index.php
Executable file
1596445
python/infoscreen_bot.log
Normal file
1
python/last_update_id.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
174751632
|
||||||
9
python/recent_images.txt
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
../slideshow/bogdylan-837638978-517.jpg
|
||||||
|
../slideshow/bogdylan-837638978-108.jpg
|
||||||
|
../slideshow/bogdylan-837638978-971.jpg
|
||||||
|
../slideshow/TimothyTheKing-1113014551-593.jpg
|
||||||
|
../slideshow/edgelord1-1611286282-935.jpg
|
||||||
|
../slideshow/edgelord1-1611286282-48.jpg
|
||||||
|
../slideshow/edgelord1-1611286282-465.jpg
|
||||||
|
../slideshow/Leuti-832042206-457.jpg
|
||||||
|
../slideshow/edgelord1-1611286282-531.jpg
|
||||||
5
python/start_FET_Infoscreen_bot.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd /var/www/infoscreen/python
|
||||||
|
python3 -u FET_Infoscreen_bot.py > /var/www/infoscreen/python/infoscreen_bot.log 2>&1 &
|
||||||
|
|
||||||
3854
python/ystemctl status mariadb.service
Normal file
0
slideshow.css
Executable file
23
slideshow.php
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
<?php
|
||||||
|
// PHP section
|
||||||
|
|
||||||
|
// set some variables
|
||||||
|
// Image directory! fill in! relative to root
|
||||||
|
$imageDir = '/slideshow/';
|
||||||
|
define('SERVERPATH', $_SERVER['DOCUMENT_ROOT'].$imageDir);
|
||||||
|
define('HTTPPATH', 'http://'.$_SERVER['HTTP_HOST'].$imageDir);
|
||||||
|
|
||||||
|
// read the names of images from the image directory
|
||||||
|
$dir = opendir(SERVERPATH);
|
||||||
|
$javascriptArray = null;
|
||||||
|
$i = null;
|
||||||
|
while (false !== ($file = readdir($dir))) {
|
||||||
|
if (substr($file, -3) == 'jpg'){
|
||||||
|
$javascriptArray[$i] = $file;
|
||||||
|
$i = $i+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir($dir);
|
||||||
|
|
||||||
|
// Html section
|
||||||
|
?>
|
||||||
BIN
slideshow/Leuti-832042206-457.jpg
Normal file
|
After Width: | Height: | Size: 166 KiB |
BIN
slideshow/TimothyTheKing-1113014551-593.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
slideshow/bogdylan-837638978-108.jpg
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
slideshow/bogdylan-837638978-517.jpg
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
slideshow/bogdylan-837638978-971.jpg
Normal file
|
After Width: | Height: | Size: 122 KiB |
BIN
slideshow/edgelord1-1611286282-465.jpg
Normal file
|
After Width: | Height: | Size: 191 KiB |
BIN
slideshow/edgelord1-1611286282-48.jpg
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
slideshow/edgelord1-1611286282-531.jpg
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
slideshow/edgelord1-1611286282-935.jpg
Normal file
|
After Width: | Height: | Size: 168 KiB |
BIN
slideshow/old/FETterTimothyTheKing-1113014551-331.jpg
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
slideshow/old/FETterTimothyTheKing-1113014551-482.jpg
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
slideshow/old/FETterTimothyTheKing-1113014551-856.jpg
Normal file
|
After Width: | Height: | Size: 233 KiB |
BIN
slideshow/old/FETterTimothyTheKing-1113014551-920.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
slideshow/old/KENAN_FET-99338453-703.jpg
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
slideshow/old/Manuel_FET-65302520-636.jpg
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
slideshow/old/Manuel_FET-65302520-719.jpg
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
slideshow/old/None-108021014-94.jpg
Normal file
|
After Width: | Height: | Size: 101 KiB |
BIN
slideshow/old/None-1113014551-211.jpg
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
slideshow/old/None-1113014551-360.jpg
Normal file
|
After Width: | Height: | Size: 141 KiB |
BIN
slideshow/old/None-1113014551-383.jpg
Normal file
|
After Width: | Height: | Size: 117 KiB |
BIN
slideshow/old/None-1113014551-384.jpg
Normal file
|
After Width: | Height: | Size: 184 KiB |
BIN
slideshow/old/None-1113014551-397.jpg
Normal file
|
After Width: | Height: | Size: 154 KiB |
BIN
slideshow/old/None-1113014551-47.jpg
Normal file
|
After Width: | Height: | Size: 163 KiB |
BIN
slideshow/old/None-1113014551-694.jpg
Normal file
|
After Width: | Height: | Size: 234 KiB |
BIN
slideshow/old/None-1113014551-731.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
slideshow/old/None-1113014551-825.jpg
Normal file
|
After Width: | Height: | Size: 66 KiB |
BIN
slideshow/old/None-1113014551-837.jpg
Normal file
|
After Width: | Height: | Size: 151 KiB |
BIN
slideshow/old/None-1113014551-852.jpg
Normal file
|
After Width: | Height: | Size: 175 KiB |
BIN
slideshow/old/None-1113014551-861.jpg
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
slideshow/old/None-1113014551-925.jpg
Normal file
|
After Width: | Height: | Size: 245 KiB |
BIN
slideshow/old/None-1113014551-947.jpg
Normal file
|
After Width: | Height: | Size: 149 KiB |
BIN
slideshow/old/None-1113014551-951.jpg
Normal file
|
After Width: | Height: | Size: 170 KiB |
BIN
slideshow/old/None-1113014551-970.jpg
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
slideshow/old/None-246202887-161.jpg
Normal file
|
After Width: | Height: | Size: 227 KiB |
BIN
slideshow/old/None-246202887-231.jpg
Normal file
|
After Width: | Height: | Size: 183 KiB |
BIN
slideshow/old/None-246202887-323.jpg
Normal file
|
After Width: | Height: | Size: 208 KiB |
BIN
slideshow/old/None-246202887-441.jpg
Normal file
|
After Width: | Height: | Size: 177 KiB |
BIN
slideshow/old/None-246202887-707.jpg
Normal file
|
After Width: | Height: | Size: 133 KiB |
BIN
slideshow/old/None-251685884-34.jpg
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
slideshow/old/None-559449035-179.jpg
Normal file
|
After Width: | Height: | Size: 128 KiB |
BIN
slideshow/old/None-559449035-294.jpg
Normal file
|
After Width: | Height: | Size: 343 KiB |
BIN
slideshow/old/None-559449035-423.jpg
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
slideshow/old/None-559449035-527.jpg
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
slideshow/old/None-559449035-546.jpg
Normal file
|
After Width: | Height: | Size: 286 KiB |
BIN
slideshow/old/None-559449035-637.jpg
Normal file
|
After Width: | Height: | Size: 160 KiB |
BIN
slideshow/old/None-559449035-88.jpg
Normal file
|
After Width: | Height: | Size: 277 KiB |
BIN
slideshow/old/None-710547066-131.jpg
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
slideshow/old/None-710547066-20.jpg
Normal file
|
After Width: | Height: | Size: 199 KiB |
BIN
slideshow/old/None-710547066-225.jpg
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
slideshow/old/None-710547066-261.jpg
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
slideshow/old/None-710547066-295.jpg
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
slideshow/old/None-710547066-297.jpg
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
slideshow/old/None-710547066-36.jpg
Normal file
|
After Width: | Height: | Size: 123 KiB |
BIN
slideshow/old/None-710547066-38.jpg
Normal file
|
After Width: | Height: | Size: 182 KiB |
BIN
slideshow/old/None-710547066-433.jpg
Normal file
|
After Width: | Height: | Size: 454 KiB |
BIN
slideshow/old/None-710547066-440.jpg
Normal file
|
After Width: | Height: | Size: 208 KiB |
BIN
slideshow/old/None-710547066-489.jpg
Normal file
|
After Width: | Height: | Size: 211 KiB |
BIN
slideshow/old/None-710547066-578.jpg
Normal file
|
After Width: | Height: | Size: 257 KiB |
BIN
slideshow/old/None-710547066-639.jpg
Normal file
|
After Width: | Height: | Size: 162 KiB |
BIN
slideshow/old/None-710547066-688.jpg
Normal file
|
After Width: | Height: | Size: 275 KiB |
BIN
slideshow/old/None-710547066-693.jpg
Normal file
|
After Width: | Height: | Size: 416 KiB |
BIN
slideshow/old/None-710547066-872.jpg
Normal file
|
After Width: | Height: | Size: 209 KiB |
BIN
slideshow/old/None-710547066-875.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
slideshow/old/None-710547066-881.jpg
Normal file
|
After Width: | Height: | Size: 132 KiB |
BIN
slideshow/old/None-710547066-900.jpg
Normal file
|
After Width: | Height: | Size: 52 KiB |
BIN
slideshow/old/None-710547066-989.jpg
Normal file
|
After Width: | Height: | Size: 144 KiB |
BIN
slideshow/old/None-710547066-991.jpg
Normal file
|
After Width: | Height: | Size: 198 KiB |
BIN
slideshow/old/Vickynger-310880474-168.jpg
Normal file
|
After Width: | Height: | Size: 165 KiB |
BIN
slideshow/old/baby345678-27261257-391.jpg
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
slideshow/old/baby345678-27261257-552.jpg
Normal file
|
After Width: | Height: | Size: 96 KiB |
BIN
slideshow/old/baby345678-27261257-888.jpg
Normal file
|
After Width: | Height: | Size: 111 KiB |
BIN
slideshow/old/bogdylan-837638978-445.jpg
Normal file
|
After Width: | Height: | Size: 350 KiB |
BIN
slideshow/old/bogdylan-837638978-717.jpg
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
slideshow/old/bogdylan-837638978-791.jpg
Normal file
|
After Width: | Height: | Size: 771 KiB |
BIN
slideshow/old/erdlof-12655966-439.jpg
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
slideshow/old/flixs-270270113-130.jpg
Normal file
|
After Width: | Height: | Size: 174 KiB |
BIN
slideshow/old/flixs-270270113-160.jpg
Normal file
|
After Width: | Height: | Size: 238 KiB |
BIN
slideshow/old/flixs-270270113-228.jpg
Normal file
|
After Width: | Height: | Size: 271 KiB |
BIN
slideshow/old/flixs-270270113-350.jpg
Normal file
|
After Width: | Height: | Size: 234 KiB |
BIN
slideshow/old/flixs-270270113-479.jpg
Normal file
|
After Width: | Height: | Size: 140 KiB |