\t\tdocument.getElementById(color).className += ' borderblack'; //highlight chosen color \t} \tfunction disable_select(select){ \t\tif(document.getElementById(select).disabled==true) \t\t\tdocument.getElementById(select).disabled=false; \t\telse \t\t\tdocument.getElementById(select).disabled=true; \t} JAVASCRIPT; if (isset($_GET['month'])) { $month = $_GET['month']; } else { $month = date('n', time()); } if (isset($_GET['year'])) { $year = $_GET['year']; } else { $year = date('Y', time()); } $smarty = smarty(array('paginator')); $smarty->assign('INLINEJAVASCRIPT', $javascript); $smarty->assign_by_ref('plans', $plans); $smarty->assign_by_ref('year', $year); $smarty->assign_by_ref('month', $month); $smarty->assign('available_colors', ArtefactTypeCalendar::get_available_colors()); $smarty->assign('PAGEHEADING', hsc(get_string("calendar", "artefact.calendar"))); if (!(array_key_exists('ajax', $_GET) && $_GET["ajax"] == true)) { $smarty->display('artefact:calendar:index.tpl'); }
require_once dirname(dirname(dirname(__FILE__))) . '/artefact/calendar/lib.php'; require_once dirname(dirname(dirname(__FILE__))) . '/artefact/plans/lib.php'; // offset and limit $offset = param_integer('offset', 0); $limit = param_integer('limit', 1000); $userkey = $_GET['fid']; $user = $_GET['uid']; if (!$userkey) { echo get_string('missingparamid', 'error') . ": feed id"; } else { if (!$user) { echo get_string('missingparamid', 'error') . ": user id"; } else { if (isset($_GET['export_only'])) { if ($_GET['export_only'] == 'all') { $plans = ArtefactTypeCalendar::get_plans_of_user($user, $offset, $limit); //all plans } else { $plans = ArtefactTypeCalendar::get_plans_of_user($user, $offset, $limit, $_GET['export_only']); //one plan } } else { $plans = ArtefactTypeCalendar::get_plans_of_user($user, $offset, $limit); //all plans } $feed = ArtefactTypeCalendar::build_feed($plans, $user, $userkey); ob_clean(); //cleans the output, otherwise additional empty lines show up which kills the feed echo $feed; } }