forked from bofhgit/web_meetme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaily.php
133 lines (112 loc) · 3.99 KB
/
daily.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<?php
include ("./lib/defines.php");
include ("./lib/functions.php");
include ("locale.php");
session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title><?php print GUI_TITLE; ?> <?php print _("control"); ?></title>
<meta http-equiv="Content-Type" content="text/html">
<link rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
@import url("css/content.css");
@import url("css/docbook.css");
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
function monthPop(objForm,selectIndex) {
timeA = new Date(objForm.year.options[objForm.year.selectedIndex].text, objForm.month.options[objForm.month.selectedIndex].value,1);
timeDifference = timeA - 86400000;
timeB = new Date(timeDifference);
var daysInMonth = timeB.getDate();
for (var i = 0; i < objForm.day.length; i++) {
objForm.day.options[0] = null;
}
for (var i = 0; i < daysInMonth; i++) {
objForm.day.options[i] = new Option(i+1);
if (i < 9){
objForm.day.options[i].value = "0"+(i+1);
} else {
objForm.day.options[i].value = i+1;
}
}
objForm.day.options.selectedIndex = 0;
reportUpdate(objForm);
}
function reportUpdate(objForm){
var ReportId = document.getElementById('ReportPNG');
var Reportsrc="./lib/report-gen.php?now="+objForm.year.options[objForm.year.selectedIndex].value+"-"+objForm.month.options[objForm.month.selectedIndex].value+"-"+objForm.day.options[objForm.day.options.selectedIndex].value;
ReportId.src=Reportsrc;
}
//-->
</script>
</head>
<body>
<br><br>
<!-- ** ** ** ** ** Part to display the conference ** ** ** ** ** -->
<center>
<?php
$now=subStr(getConfDate(),0,10);
$starttime=strtotime(getConfDate());
?>
<FORM METHOD=POST NAME="WMReport">
<b><?php print _("Total Conferences Scheduled and used on"); ?>: </b>
<SELECT NAME="month" onChange="monthPop(this.form,this.form.day.selectedIndex)">
<?php for ($i=0; $i<12; $i++){
if ( $i < 9 ){
if ( $i+1 == intval(date("n", $starttime)) ){ ?>
<OPTION SELECTED VALUE="0<?php echo $i+1; ?>"><?php echo $months[$i]; ?>
<?php } else { ?>
<OPTION VALUE="0<?php echo $i+1; ?>"><?php echo $months[$i]; ?>
<?php } ?>
<?php } else {
if ( $i+1 == intval(date("n", $starttime)) ){ ?>
<OPTION SELECTED VALUE="<?php echo $i+1; ?>"><?php echo $months[$i]; ?>
<?php } else { ?>
<OPTION VALUE="<?php echo $i+1;?>"><?php echo $months[$i]; ?>
<?php } ?>
<?php } ?>
<?php } ?>
</SELECT>
<SELECT NAME="day" onChange="reportUpdate(this.form)">
<?php $tmp=intval(date("n", $starttime));
for ($i=1; $i<= $days[$tmp-1]; $i++) {
if ( $i < 9 ){
if ( $i == intval(date("j", $starttime)) ){ ?>
<OPTION SELECTED VALUE="0<?php echo $i; ?>"><?php echo $i; ?>
<?php } else { ?>
<OPTION VALUE="0<?php echo $i; ?>"><?php echo $i; ?>
<?php } ?>
<?php } else {
if ( $i == intval(date("j", $starttime)) ){ ?>
<OPTION SELECTED VALUE="<?php echo $i; ?>"><?php echo $i; ?>
<?php } else { ?>
<OPTION VALUE="<?php echo $i; ?>"><?php echo $i; ?>
<?php } ?>
<?php } ?>
<?php } ?>
</SELECT>
<SELECT NAME="year" onChange="monthPop(this.form,this.form.month.selectedIndex)" >
<?php for ($i=0; $i<=3; $i++){
$tmp=intval(date("Y", $starttime));
if ( $tmp-$i == intval(date("Y", $starttime)) ){ ?>
<OPTION SELECTED VALUE="<?php echo $tmp; ?>"><?php echo $tmp; ?>
<?php } else { ?>
<OPTION VALUE="<?php echo $tmp-$i; ?>"><?php echo $tmp-$i; ?>
<?php } ?>
<?php } ?>
</SELECT>
</FORM>
<br></br>
<img src="./lib/report-gen.php?now=<?php echo $now ?>" id="ReportPNG" border=1>
</center>
<br></br>
<br></br>
<!-- END -->
</body>
</html>