Dateien nach "/" hochladen

This commit is contained in:
gruinelli 2024-03-17 17:18:17 +00:00
commit 44a0800b48
5 changed files with 392 additions and 0 deletions

BIN
logo_small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

153
month.php Normal file
View File

@ -0,0 +1,153 @@
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Shows all events of a month in a nice overview,
ready to be copied to an office program
Copyright 2017 by George Ruinelli <george@ruinelli.ch>
Licence: GPL
Last Change: 13.10.2017
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<img src="logo_small.png" >
<!-- <span style="font-family: Arial; font-size: 24pt;">K<font color=red>I</font>RCHE NEUWIES</span> -->
<span style="<? echo($titleStyleLarger); ?>" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Programm <? echo("$month $year"); ?> </span> <br>
<span style="<? echo($textStyleLarger); ?>" ><u style="padding:20px">www.kirche-neuwies.ch</u></span>
<br><br>
<table>
<?
// exit();
// $events = $ical->eventsFromInterval('2 week');
// $events = $ical->eventsFromRange("23.04.2017 00:00 T", "30.04.2017 23:59 T");
$events = $ical->eventsFromRange($startDateIcs, $endDateIcs);
$prev_dtstart = new \DateTime('@' . (int) $ical->iCalDateToUnixTimestamp(0));
$printdate = false;
foreach ($events as $event){
$dtstart = new \DateTime('@' . (int) $ical->iCalDateToUnixTimestamp($event->dtstart_tz));
$description = $event->description;
if($description != ""){
$description = str_replace("Kalender:Extern &amp; Info", "", $description);
$description = str_replace("Kalender:Hauptveranstaltungen - ", "", $description);
$description = str_replace("Kalender:Hauptveranstaltungen", "", $description);
$description = str_replace("Kalender:Weitere Veranstaltung", "", $description);
$description = preg_replace('/^ - /', '', $description); //Remove " - " if at beginning of line
$description = preg_replace('/^- /', '', $description); //Remove " - " if at beginning of line
}
if(trim($description) == trim($event->summary)){
//Ignore description as it is identically to summary
$description = "";
}
if($dtstart->format('N') == 7){ //sunday => bold, gray
$isSunday = true;
}
else{
$isSunday = false;
}
if($dtstart->format('d.m') != $prev_dtstart->format('d.m')){ //new date => show weekday
$isNewDay = true;
}
else{
$isNewDay = false;
}
if($dtstart->format('H:i') == "00:00"){ //full day event
$isFullDayEvent = true;
}
else{
$isFullDayEvent = false;
}
?>
<tr <? if($isNewDay){ echo("class=\"spaceOver\" "); } if($isSunday){ echo("bgcolor=\"#C0C0C0\""); } ?> >
<?
// $a1 = trim($startDMY);
// $a2 = trim($dtstart->format('d.m.Y'));
// if(strcmp($a1, $a2) == 0){ // its the printing date, show a "heute" instead of the date
// if($printdate == false){ // its the printing date, show a "heute" instead of the date
// $printdate = true;
// // echo("<td colspan=2 align=right><b>Heute<b></td>");
// echo("<td colspan=2 align=center><span style=\"$textStyleLarger\"><b>Heute<b></span></td>");
// }
// else{
?>
<td><span style="<? echo($textStyleLarger); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
if($isNewDay){ //new date => show weekday
echo($weekdays[$dtstart->format('N') - 1]);
}
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){ //make sure the column has the same numbe rof lines in Word as the next column
echo("<br>&nbsp;");
}
?>
</span></td>
<td><span style="<? echo($textStyleLarger); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
if($isNewDay){ //new date => show date
echo($dtstart->format('d.m.'));
}
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){ //make sure the column has the same numbe rof lines in Word as the next column
echo("<br>&nbsp;");
}
?>
</span></td>
<? //} ?>
<td><span style="<? echo($textStyleLarger); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
if(!$isFullDayEvent){ //not full day event => show time
echo($dtstart->format('H:i'));
}
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){ //make sure the column has the same numbe rof lines in Word as the next column
echo("<br>&nbsp;");
}
?>
</span></td>
<td><span style="<? echo($textStyleLarger); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
echo($event->summary);
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){
echo("<br><i>");
echo($description);
echo("</i>");
}
?>
</span></td>
</tr>
<?
$prev_dtstart = $dtstart;
}
?>
</table>

88
style.css Normal file
View File

@ -0,0 +1,88 @@
/* -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Copyright 2017 by George Ruinelli <george@ruinelli.ch>
Licence: GPL
Last Change: 13.10.2017
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
body {
background-image: url("wallpaper.jpg");
/* background-color: #cccccc; */
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
display: block;
position: relative;
margin: 0 auto;
z-index: 0;
}
body{
font-family: Arial;
padding:10px
}
span{
font-family: Arial;
}
table {
border-collapse: separate;
border-spacing: 0px;
}
td{
padding-left: 2px;
padding-top: 2px;
padding-bottom: 2px;
padding-right: 2px;
}
button,.button, input[type=submit] {
background: #3498db;
background-image: -webkit-linear-gradient(top, #3498db, #2980b9);
background-image: -moz-linear-gradient(top, #3498db, #2980b9);
background-image: -ms-linear-gradient(top, #3498db, #2980b9);
background-image: -o-linear-gradient(top, #3498db, #2980b9);
background-image: linear-gradient(to bottom, #3498db, #2980b9);
-webkit-border-radius: 10;
-moz-border-radius: 10;
border-radius: 10px;
font-family: Arial;
color: #ffffff;
font-size: 100%;
padding: 10px 20px 10px 20px;
text-decoration: none;
height: 40px;
}
button:hover, input[type=submit]]:hover {
background: #3cb0fd;
background-image: -webkit-linear-gradient(top, #3cb0fd, #3498db);
background-image: -moz-linear-gradient(top, #3cb0fd, #3498db);
background-image: -ms-linear-gradient(top, #3cb0fd, #3498db);
background-image: -o-linear-gradient(top, #3cb0fd, #3498db);
background-image: linear-gradient(to bottom, #3cb0fd, #3498db);
text-decoration: none;
}
.content {
/* opacity: 0.7; */
background-color: #FFFFFF;
background: rgb(255, 255, 255); /* Fallback for older browsers without RGBA-support */
background: rgba(255, 255, 255, 0.5);
margin: 5px;
width: 700px;
padding: 5px;
}

BIN
wallpaper.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

151
week.php Normal file
View File

@ -0,0 +1,151 @@
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Shows all events of one or multiple weeks in a nice overview,
ready to be copied to an office program
Copyright 2017 by George Ruinelli <george@ruinelli.ch>
Licence: GPL
Last Change: 13.10.2017
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- <span style="<? echo($titleStyle); ?>" ><? echo("Programm vom $startDMY bis $endDMY"); ?> </span> -->
<span style="<? echo($titleStyle); ?>" ><? echo("Programm vom $formatedDateSpan"); ?> </span>
<table>
<?
// exit();
// $events = $ical->eventsFromInterval('2 week');
// $events = $ical->eventsFromRange("23.04.2017 00:00 T", "30.04.2017 23:59 T");
$events = $ical->eventsFromRange($startDateIcs, $endDateIcs);
$prev_dtstart = new \DateTime('@' . (int) $ical->iCalDateToUnixTimestamp(0));
$printdate = false;
foreach ($events as $event){
$dtstart = new \DateTime('@' . (int) $ical->iCalDateToUnixTimestamp($event->dtstart_tz));
$description = $event->description;
if($description != ""){
$description = str_replace("Kalender:Extern &amp; Info", "", $description);
$description = str_replace("Kalender:Hauptveranstaltungen - ", "", $description);
$description = str_replace("Kalender:Hauptveranstaltungen", "", $description);
$description = str_replace("Kalender:Weitere Veranstaltung", "", $description);
$description = preg_replace('/^ - /', '', $description); //Remove " - " if at beginning of line
$description = preg_replace('/^- /', '', $description); //Remove " - " if at beginning of line
}
if(trim($description) == trim($event->summary)){
//Ignore description as it is identically to summary
$description = "";
}
if($dtstart->format('N') == 7){ //sunday => bold, gray
$isSunday = true;
}
else{
$isSunday = false;
}
if($dtstart->format('d.m') != $prev_dtstart->format('d.m')){ //new date => show weekday
$isNewDay = true;
}
else{
$isNewDay = false;
}
if($dtstart->format('H:i') == "00:00"){ //full day event
$isFullDayEvent = true;
}
else{
$isFullDayEvent = false;
}
?>
<tr <? if($isNewDay){ echo("class=\"spaceOver\" "); } if($isSunday){ echo("bgcolor=\"#C0C0C0\""); } ?> >
<?
// $a1 = trim($startDMY);
// $a2 = trim($dtstart->format('d.m.Y'));
// if(strcmp($a1, $a2) == 0){ // its the printing date, show a "heute" instead of the date
if($printdate == false){ // its the printing date, show a "heute" instead of the date
$printdate = true;
// echo("<td colspan=2 align=right><b>Heute<b></td>");
echo("<td colspan=2 align=center><span style=\"$textStyle\"><b>Heute<b></span></td>");
}
else{
?>
<td><span style="<? echo($textStyle); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
if($isNewDay){ //new date => show weekday
echo($weekdays[$dtstart->format('N') - 1]);
}
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){ //make sure the column has the same number of lines in Word as the next column
echo("<br>&nbsp;");
}
?>
</span></td>
<td><span style="<? echo($textStyle); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
if($isNewDay){ //new date => show date
echo($dtstart->format('d.m.'));
}
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){ //make sure the column has the same number of lines in Word as the next column
echo("<br>&nbsp;");
}
?>
</span></td>
<? } ?>
<td><span style="<? echo($textStyle); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
if(!$isFullDayEvent){ //not full day event => show time
echo($dtstart->format('H:i'));
}
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){ //make sure the column has the same number of lines in Word as the next column
echo("<br>&nbsp;");
}
?>
</span></td>
<td><span style="<? echo($textStyle); ?>" >
<?
if($isSunday){ //Sunday => bold
echo("<b>");
}
echo($event->summary);
if($isSunday){ //Sunday => bold
echo("</b>");
}
if($description != ""){
echo("<br><i>");
echo($description);
echo("</i>");
}
?>
</span></td>
</tr>
<?
$prev_dtstart = $dtstart;
}
?>
</table>