forked from cmotika/rtsysstammtisch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcron.php
36 lines (31 loc) · 1.15 KB
/
cron.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
require('config.php');
require('include.php');
$nextMeetingTS = getNextMeetingTimeStamp();
$nextMeetingDate = date('D, d.m.Y', $nextMeetingTS);
$nextMeetingDateShort = date('F j', $nextMeetingTS);
$mid = getNextMeeting();
$locationName = getMeetingLocationName($mid);
$locationAddress = getMeetingLocationAddress($mid);
//$locationLabel = getMeetingLocationLabel($mid);
$meetingWhen = " on ".$nextMeetingDate;
if (isMeetingDay($TODAY)) {
$nextMeetingDate = "today";
$nextMeetingDateShort = "today";
$meetingWhen = " <b>TODAY</b> ";
}
$locationText = "The next <i>Stammtisch</i> ".$meetingWhen." is going to happen here:<BR><a href='http://www.google.de/search?q=".$locationName.", ".$locationAddress."' target='_blank'>".$locationName.", ".$locationAddress."</a>";
if ($locationName == "") {
$locationText = "The next <i>Stammtisch</i> will be on ".$nextMeetingDate.".<BR>The venue has not been chosen yet.";
}
if ($pwd == $CRONPWD) {
printf($locationText."<BR>[mid=".$mid."]<BR>");
if (isMeetingDay($TODAY)) {
printf("isMeetingDay:TRUE<BR>");
} else {
printf("isMeetingDay:FALSE<BR>");
}
cron();
}
denyService();
?>