2 <legend><?php print_string('commontasks', 'calendar'); ?></legend>
3 <form method=
"get" action=
"export_execute.php">
4 <div><?php print_string('iwanttoexport', 'calendar'); ?>:
</div>
6 <input type=
"radio" name=
"preset_what" id=
"pw_all" value=
"all" checked=
"checked"/><label for=
"pw_all"><?php print_string('eventsall', 'calendar'); ?></label><br />
7 <input type=
"radio" name=
"preset_what" id=
"pw_course" value=
"courses" /><label for=
"pw_course"><?php print_string('eventsrelatedtocourses', 'calendar'); ?></label><br />
9 <div><?php print_string('for', 'calendar'); ?>:
</div>
11 <?php if($allowthisweek) { ?>
12 <input type=
"radio" name=
"preset_time" id=
"pt_wknow" value=
"weeknow" checked=
"checked"/><label for=
"pt_wknow"><?php print_string('weekthis', 'calendar'); ?></label><br />
14 <?php if($allownextweek) { ?>
15 <input type=
"radio" name=
"preset_time" id=
"pt_wknext" value=
"weeknext" /><label for=
"pt_wknext"><?php print_string('weeknext', 'calendar'); ?></label><br />
17 <input type=
"radio" name=
"preset_time" id=
"pt_monnow" value=
"monthnow" /><label for=
"pt_monnow"><?php print_string('monththis', 'calendar'); ?></label><br />
18 <?php if($allownextmonth) { ?>
19 <input type=
"radio" name=
"preset_time" id=
"pt_monnext" value=
"monthnext" /><label for=
"pt_monnext"><?php print_string('monthnext', 'calendar'); ?></label><br />
21 <input type=
"radio" name=
"preset_time" id=
"pt_recupc" value=
"recentupcoming" /><label for=
"pt_recupc"><?php print_string('recentupcoming', 'calendar'); ?></label><br />
23 <div style=
"text-align: right;">
24 <input type=
"hidden" name=
"cal_d" value=
"" />
25 <input type=
"hidden" name=
"cal_m" value=
"" />
26 <input type=
"hidden" name=
"cal_y" value=
"" />
27 <input type=
"hidden" name=
"username" value=
"<?php echo $username; ?>" />
28 <input type
="hidden" name
="authtoken" value
="<?php echo $authtoken; ?>" />
29 <script type
="text/javascript">
31 function generate_url() {
32 if (document
.getElementById("pw_course").checked
) {
33 preset_what
= "courses";
38 if (<?php
echo (int) $allowthisweek; ?> && document.getElementById(
"pt_wknow").checked) {
39 preset_time =
"weeknow";
40 } else if (
<?php echo (int) $allownextweek; ?> && document.getElementById(
"pt_wknext").checked) {
41 preset_time =
"weeknext";
42 } else if (
<?php echo (int) $allownextmonth; ?> && document.getElementById(
"pt_monnext").checked) {
43 preset_time =
"monthnext";
44 } else if (document.getElementById(
"pt_monnow").checked) {
45 preset_time =
"monthnow";
47 preset_time =
"recentupcoming";
50 url =
"<?php echo $CFG->wwwroot; ?>/calendar/export_execute.php?preset_what=" + preset_what +
"&preset_time=" + preset_time +
"&username=<?php echo $usernameencoded; ?>&authtoken=<?php echo $authtoken; ?>";
51 document
.getElementById("url").innerText
= url
;
52 document
.getElementById("url").innerHTML
= url
; //Need this as well, for Firefox
54 document
.getElementById("urlbox").style
.display
= "block";
58 <input type
="button" value
="<?php print_string('generateurlbutton', 'calendar'); ?>" onclick
="javascript:generate_url()" />
59 <input type
="submit" value
="<?php print_string('exportbutton', 'calendar'); ?>" />
63 <div id
="urlbox" style
="display: none; ">
64 <p
><?php
print_string('urlforical', 'calendar'); ?>:
</p>
65 <div id=
"url" style=
"overflow: scroll; width: 650px; "></div>