function showCalendar(date_box, click_obj)
{
var calendar = document.getElementById('calendar');
+ var year = document.getElementById(date_box+'year').value;
+ var month = document.getElementById(date_box+'month').value;
if(date_box == 'from') {
var xpos = document.getElementById('frompic').offsetLeft;
var ypos = document.getElementById('frompic').offsetTop;
if(calendar.style.visibility == "" || calendar.style.visibility == 'hidden') {
calendar.style.visibility = 'visible';
calendar.innerHTML = "Loading...";
- calendar.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=get_calendar_matrix'));
+ calendar.innerHTML = HTML_AJAX.grab(encodeURI('rpc.php?action=get_calendar_matrix&year=' + year + '&month=' + month));
calendar_shown = 1;
}
else {
break;
case 'get_calendar_matrix':
- if((is_numeric($_GET['year']) || $_GET['year'] == "") &&
- (is_numeric($_GET['month']) || $_GET['month'] == "") &&
- (is_numeric($_GET['day']) || $_GET['month'] == "")) {
+ if((is_numeric($_GET['year']) || !isset($_GET['year'])) &&
+ (is_numeric($_GET['month']) || !isset($_GET['month'])) &&
+ (is_numeric($_GET['day']) || !isset($_GET['day']))) {
$fspot->get_calendar_matrix($_GET['year'], $_GET['month'], $_GET['day']);
}
break;