-
Notifications
You must be signed in to change notification settings - Fork 1
/
calendar_show.php
115 lines (113 loc) · 3.61 KB
/
calendar_show.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!doctype html>
<html>
<head>
<link href="calCss.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript">
function initialCalendar(){
var hr = new XMLHttpRequest();
var url = "calendar_start.php";
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var year = currentTime.getFullYear();
showmonth = month;
showyear = year;
var vars = "showmonth="+showmonth+"&showyear="+showyear;
hr.open("POST",url,true);
hr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
hr.onreadystatechange = function () {
if(hr.readyState == 4 && hr.status == 200){
var return_data = hr.responseText;
document.getElementById("showCalendar").innerHTML=return_data;
}
}
hr.send(vars);
document.getElementById("showCalendar").innerHTML="processing....";
}
</script>
<script type="text/javascript">
function next_month(){
var nextmonth = showmonth + 1;
if(nextmonth>12){
nextmonth = 1;
showyear = showyear + 1;
}
showmonth = nextmonth;
var hr = new XMLHttpRequest();
var url = "calendar_start.php";
var vars = "showmonth="+showmonth+"&showyear="+showyear;
hr.open("POST",url,true);
hr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
hr.onreadystatechange = function () {
if(hr.readyState == 4 && hr.status == 200){
var return_data = hr.responseText;
document.getElementById("showCalendar").innerHTML=return_data;
}
}
hr.send(vars);
document.getElementById("showCalendar").innerHTML="processing....";
}
</script>
<script type="text/javascript">
function last_month(){
var lastmonth = showmonth - 1;
if(lastmonth<1){
lastmonth = 12;
showyear = showyear - 1;
}
showmonth = lastmonth;
var hr = new XMLHttpRequest();
var url = "calendar_start.php";
var vars = "showmonth="+showmonth+"&showyear="+showyear;
hr.open("POST",url,true);
hr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
hr.onreadystatechange = function () {
if(hr.readyState == 4 && hr.status == 200){
var return_data = hr.responseText;
document.getElementById("showCalendar").innerHTML=return_data;
}
}
hr.send(vars);
document.getElementById("showCalendar").innerHTML="processing....";
}
</script>
<script type="text/javascript">
function overlay() {
el = document.getElementById("overlay");
el.style.display = (el.style.display == "block") ? "none" : "block";
el = document.getElementById("events");
el.style.display = (el.style.display == "block") ? "none" : "block";
el = document.getElementById("eventsBody");
el.style.display = (el.style.display == "block") ? "none" : "block";
}
</script>
<script type="text/javascript">
function show_details(theId){
var deets = (theId.id);
el = document.getElementById("overlay");
el.style.display = (el.style.display == "block") ? "none" : "block";
el = document.getElementById("events");
el.style.display = (el.style.display == "block") ? "none" : "block";
var hr = new XMLHttpRequest();
var url="events.php";
var vars = "deets="+deets;
hr.open("POST",url,true);
hr.setRequestHeader("Content-type","application/x-www-form-urlencoded");
hr.onreadystatechange = function () {
if(hr.readyState == 4 && hr.status == 200){
var return_data = hr.responseText;
document.getElementById("events").innerHTML=return_data;
}
}
hr.send(vars);
document.getElementById("events").innerHTML="processing....";
}
</script>
<title>Untitled Document</title>
</head>
<body onLoad="initialCalendar();">
<div id="showCalendar"></div>
<div id="overlay">
<div id="events"></div>
</div>
</body>
</html>