324
324
$display_start_day = new DateTime($day_start);
326
$display_end_day = clone $display_start_day; $display_end_day->modify('+'.$num_of_days.' day');
326
$display_end_day = clone $display_start_day;
327
$display_end_day->modify('+'.$num_of_days.' day');
328
329
$display_start_day_str = $display_start_day->format('Y-m-d');
329
330
$display_end_day_str = $display_end_day->format('Y-m-d');
512
513
$display_minus_month = clone $display_start_day;
513
514
$display_minus_month->modify('-1 '.$long_interval);
514
515
$left->appendChild($button = $doc->createElement('input'));
515
$button->setAttribute('type', 'image');
516
$button->setAttribute('type', 'submit');
516
517
$button->setAttribute('name', 'day_start');
517
518
$button->setAttribute('value', $display_minus_month->format('Y-m-d'));
518
519
$button->setAttribute('class', 'link_prev2_small');
521
522
$display_minus_week = clone $display_start_day;
522
523
$display_minus_week->modify('-1 '.$short_interval);
523
524
$left->appendChild($button = $doc->createElement('input'));
524
$button->setAttribute('type', 'image');
525
$button->setAttribute('type', 'submit');
525
526
$button->setAttribute('name', 'day_start');
526
527
$button->setAttribute('value', $display_minus_week->format('Y-m-d'));
527
528
$button->setAttribute('class', 'link_prev_small');
532
533
// TODO: The daily calendar view should probably redirect to a daily log-type page
533
534
$middle->appendChild($button = $doc->createElement('input'));
534
$button->setAttribute('type', 'image');
535
$button->setAttribute('type', 'submit');
535
536
$button->setAttribute('name', 'view_day');
536
537
$button->setAttribute('class', 'link_day_small');
537
538
$button->setAttribute('title', 'View Day');
539
540
$middle->appendChild($button = $doc->createElement('input'));
540
$button->setAttribute('type', 'image');
541
$button->setAttribute('type', 'submit');
541
542
$button->setAttribute('name', 'num_of_days');
542
543
$button->setAttribute('value', 7);
543
544
$button->setAttribute('class', 'link_week_small');
544
545
$button->setAttribute('title', 'View Week');
546
547
$middle->appendChild($button = $doc->createElement('input'));
547
$button->setAttribute('type', 'image');
548
$button->setAttribute('type', 'submit');
548
549
$button->setAttribute('name', 'num_of_days');
549
550
$button->setAttribute('value', 14);
550
551
$button->setAttribute('class', 'link_range_small');
551
552
$button->setAttribute('title', 'View Fortnight');
553
554
$middle->appendChild($button = $doc->createElement('input'));
554
$button->setAttribute('type', 'image');
555
$button->setAttribute('type', 'submit');
555
556
$button->setAttribute('name', 'num_of_days');
556
557
$button->setAttribute('value', 31);
557
558
$button->setAttribute('class', 'link_month_small');
562
563
$display_plus_week = clone $display_start_day;
563
564
$display_plus_week->modify('+1 '.$short_interval);
564
565
$right->appendChild($button = $doc->createElement('input'));
565
$button->setAttribute('type', 'image');
566
$button->setAttribute('type', 'submit');
566
567
$button->setAttribute('name', 'day_start');
567
568
$button->setAttribute('value', $display_plus_week->format('Y-m-d'));
568
569
$button->setAttribute('class', 'link_next_small');
569
570
$button->setAttribute('title', 'Next '.$short_interval);
572
572
$display_plus_month = clone $display_start_day;
573
573
$display_plus_month->modify('+1 '.$long_interval);
574
574
$right->appendChild($button = $doc->createElement('input'));
575
$button->setAttribute('type', 'image');
575
$button->setAttribute('type', 'submit');
576
576
$button->setAttribute('name', 'day_start');
577
577
$button->setAttribute('value', $display_plus_month->format('Y-m-d'));
578
578
$button->setAttribute('class', 'link_next2_small');
2489
2489
$display_minus_month = clone $display_start_day;
2490
2490
$display_minus_month->modify('-1 '.$long_interval);
2491
2491
$left->appendChild($button = $doc->createElement('input'));
2492
$button->setAttribute('type', 'image');
2492
$button->setAttribute('type', 'submit');
2493
2493
$button->setAttribute('name', 'day_start');
2494
2494
$button->setAttribute('value', $display_minus_month->format('Y-m-d'));
2495
2495
$button->setAttribute('class', 'link_prev2_small');
2498
2498
$display_minus_week = clone $display_start_day;
2499
2499
$display_minus_week->modify('-1 '.$short_interval);
2500
2500
$left->appendChild($button = $doc->createElement('input'));
2501
$button->setAttribute('type', 'image');
2501
$button->setAttribute('type', 'submit');
2502
2502
$button->setAttribute('name', 'day_start');
2503
2503
$button->setAttribute('value', $display_minus_week->format('Y-m-d'));
2504
2504
$button->setAttribute('class', 'link_prev_small');
2509
2509
// TODO: The daily calendar view should probably redirect to a daily log-type page
2510
2510
$middle->appendChild($button = $doc->createElement('input'));
2511
$button->setAttribute('type', 'image');
2511
$button->setAttribute('type', 'submit');
2512
2512
$button->setAttribute('name', 'view_day');
2513
2513
// $button->setAttribute('value', 1);
2514
2514
$button->setAttribute('class', 'link_day_small');
2515
2515
$button->setAttribute('title', 'View Day');
2517
2517
$middle->appendChild($button = $doc->createElement('input'));
2518
$button->setAttribute('type', 'image');
2518
$button->setAttribute('type', 'submit');
2519
2519
$button->setAttribute('name', 'num_of_days');
2520
2520
$button->setAttribute('value', 7);
2521
2521
$button->setAttribute('class', 'link_week_small');
2522
2522
$button->setAttribute('title', 'View Week');
2524
2524
$middle->appendChild($button = $doc->createElement('input'));
2525
$button->setAttribute('type', 'image');
2525
$button->setAttribute('type', 'submit');
2526
2526
$button->setAttribute('name', 'num_of_days');
2527
2527
$button->setAttribute('value', 14);
2528
2528
$button->setAttribute('class', 'link_range_small');
2529
2529
$button->setAttribute('title', 'View Fortnight');
2531
2531
$middle->appendChild($button = $doc->createElement('input'));
2532
$button->setAttribute('type', 'image');
2532
$button->setAttribute('type', 'submit');
2533
2533
$button->setAttribute('name', 'num_of_days');
2534
2534
$button->setAttribute('value', 31);
2535
2535
$button->setAttribute('class', 'link_month_small');
2540
2540
$display_plus_week = clone $display_start_day;
2541
2541
$display_plus_week->modify('+1 '.$short_interval);
2542
2542
$right->appendChild($button = $doc->createElement('input'));
2543
$button->setAttribute('type', 'image');
2543
$button->setAttribute('type', 'submit');
2544
2544
$button->setAttribute('name', 'day_start');
2545
2545
$button->setAttribute('value', $display_plus_week->format('Y-m-d'));
2546
2546
$button->setAttribute('class', 'link_next_small');
2550
2550
$display_plus_month = clone $display_start_day;
2551
2551
$display_plus_month->modify('+1 '.$long_interval);
2552
2552
$right->appendChild($button = $doc->createElement('input'));
2553
$button->setAttribute('type', 'image');
2553
$button->setAttribute('type', 'submit');
2554
2554
$button->setAttribute('name', 'day_start');
2555
2555
$button->setAttribute('value', $display_plus_month->format('Y-m-d'));
2556
2556
$button->setAttribute('class', 'link_next2_small');