* can edit/delete report. */ include_once 'includes/init.php'; load_user_categories(); $updating_public = false; $error = ""; if (empty($reports_enabled) || $reports_enabled != 'Y') { $error = translate("You are not authorized") . "."; } if ($is_admin && !empty($public) && $public_access == "Y") { $updating_public = true; $report_user = "******"; } else { $report_user = ''; } $report_id = getIntValue("report_id", true); $adding_report = false; if (empty($report_id)) { $adding_report = true; $report_id = -1; $include_header = 'Y'; $report_is_global = 'N'; $report_allow_nav = 'Y'; } $show_participants = true; if ($single_user == 'Y' || $disable_participants_field == 'Y') { $show_participants = false; } if ($login == "__public__") { $error = translate("You are not authorized"); }
if ($use_all_dates != 'y') { $use_all_dates = ''; } $include_layers = getPostValue('include_layers'); if ($include_layers != 'y') { $include_layers = ''; } $fromyear = getIntValue('fromyear', true); $frommonth = getIntValue('frommonth', true); $fromday = getIntValue('fromday', true); $endyear = getIntValue('endyear', true); $endmonth = getIntValue('endmonth', true); $endday = getIntValue('endday', true); $modyear = getIntValue('modyear', true); $modmonth = getIntValue('modmonth', true); $modday = getIntValue('modday', true); mt_srand((double) microtime() * 1000000); if (empty($id)) { $id = "all"; } if ($format == "ical") { transmit_header('text/ical', "webcalendar-{$id}.ics"); export_ical($id); } elseif ($format == "vcal") { transmit_header('text/vcal', "webcalendar-{$id}.vcs"); export_vcal($id); } elseif ($format == "pilot-csv") { transmit_header('text/csv', "webcalendar-{$id}.csv"); export_pilot_csv($id); } elseif ($format == "pilot-text") { transmit_header('text/plain', "webcalendar-{$id}.txt");
// header ( 'Content-type: application/rss+xml'); header('Content-type: text/xml'); echo '<?xml version="1.0" encoding="' . $charset . '"?> <rss version="2.0" xml:lang="' . $lang . '"> <channel> <title><![CDATA[' . $appStr . ']]></title> <link>' . $SERVER_URL . '</link> <description><![CDATA[' . $descr . ']]></description> <language>' . $lang . '</language> <generator>WebCalendar ' . $PROGRAM_VERSION . '</generator> <image> <title><![CDATA[' . $appStr . ']]></title> <link>' . $SERVER_URL . '</link> <url>http://www.k5n.us/k5n_small.gif</url> </image>' . "\n"; $num = getIntValue(false, 'num'); if (empty($num) || $num <= 0 || $num > 100) { $num = 100; } echo rss_activity_log(false, $num); echo " </channel>\n</rss>\n"; exit; /* Generate the activity log. */ function rss_activity_log($sys, $entries) { global $SERVER_URL, $login; $sql_params = array(); $limit = $where = ''; switch ($GLOBALS['db_type']) { case 'mysqli':
} if ($load_layers) { load_user_layers($username); } //load_user_categories (); // Calculate date range $date = getIntValue("date", true); if (empty($date) || strlen($date) != 8) { // If no date specified, start with today $date = date("Ymd"); } $thisyear = substr($date, 0, 4); $thismonth = substr($date, 4, 2); $thisday = substr($date, 6, 2); $startTime = mktime(3, 0, 0, $thismonth, $thisday, $thisyear); $x = getIntValue("days", true); if (!empty($x)) { $numDays = $x; } // Don't let a malicious user specify more than 365 days if ($numDays > 365) { $numDays = 365; } $endTime = mktime(3, 0, 0, $thismonth, $thisday + $numDays, $thisyear); $endDate = date("Ymd", $endTime); /* Pre-Load the repeated events for quckier access */ $repeated_events = read_repeated_events($username, $cat_id, $date); /* Pre-load the non-repeating events for quicker access */ $events = read_events($username, $date, $endDate, $cat_id); // Print header without custom header and no style sheet ?>
<?php include_once 'includes/init.php'; include_once 'includes/site_extras.php'; $PAGE_SIZE = 25; print_header(); echo "<h3>" . translate("Activity Log") . "</h3>\n"; echo "<a title=\"" . translate("Admin") . "\" class=\"nav\" href=\"adminhome.php\">« " . translate("Admin") . "</a><br /><br />\n"; echo "<table>\n"; echo "<tr><th class=\"usr\">\n" . translate("User") . "</th><th class=\"cal\">\n" . translate("Calendar") . "</th><th class=\"scheduled\">\n" . translate("Date") . "/" . translate("Time") . "</th><th class=\"dsc\">\n" . translate("Event") . "</th><th class=\"action\">\n" . translate("Action") . "\n</th></tr>\n"; $sql = "SELECT webcal_entry_log.cal_login, webcal_entry_log.cal_user_cal, " . "webcal_entry_log.cal_type, webcal_entry_log.cal_date, " . "webcal_entry_log.cal_time, webcal_entry.cal_id, " . "webcal_entry.cal_name, webcal_entry_log.cal_log_id " . "FROM webcal_entry_log, webcal_entry " . "WHERE webcal_entry_log.cal_entry_id = webcal_entry.cal_id "; $startid = getIntValue('startid', true); if (!empty($startid)) { $sql .= "AND webcal_entry_log.cal_log_id <= {$startid} "; } $sql .= "ORDER BY webcal_entry_log.cal_log_id DESC"; $res = dbi_query($sql); $nextpage = ""; if ($res) { $num = 0; while ($row = dbi_fetch_row($res)) { $num++; if ($num > $PAGE_SIZE) { $nextpage = $row[7]; break; } else { echo "<tr"; if ($num % 2) { echo " class=\"odd\""; } echo "><td>\n" . $row[0] . "</td><td>\n" . $row[1] . "</td><td>\n" . date_to_str($row[3]) . " " . display_time($row[4]) . "</td><td>\n" . "<a title=\"" . htmlspecialchars($row[6]) . "\" href=\"view_entry.php?id={$row['5']}\">" . htmlspecialchars($row[6]) . "</a></td><td>\n";
if (!empty($user) && $user != $login && (!empty($allow_view_other) && $allow_view_other == 'Y' || $is_admin)) { $report_user = $user; $u_url = "&user={$user}"; } else { $u_url = ""; } if (empty($reports_enabled) || $reports_enabled != 'Y') { $error = translate("You are not authorized") . "."; } $updating_public = false; if ($is_admin && !empty($public) && $public_access == "Y") { $updating_public = true; $report_user = "******"; } $report_id = getIntValue("report_id", true); $offset = getIntValue("offset", true); if (empty($offset)) { $offset = 0; } // If no report id is specified, then generate a list of reports for // the user to select from. if (empty($error) && empty($report_id) && $login == "__public__") { $error = translate("You are not authorized") . "."; } if (empty($error) && empty($report_id)) { $list = ""; if ($is_admin) { if (!$updating_public) { $list .= "<p><a title=\"" . translate("Click here") . " " . translate("to manage reports for the Public Access calendar") . "." . "\" href=\"report.php?public=1\">" . translate("Click here") . " " . translate("to manage reports for the Public Access calendar") . "." . "</a></p>\n"; $sql = "SELECT cal_report_id, cal_report_name " . "FROM webcal_report WHERE cal_login = '******' OR " . "cal_is_global = 'Y' ORDER BY cal_update_date DESC, cal_report_name"; } else {
if (!@is_writable($db_cachedir)) { $response_msg2 = $failureStr . $cachedirStr . ' ' . translate('is not writable'); } else { } } } } // Is this a Timezone Convert? //Manual tzoffset input in URL $tzoffset = getGetValue('tzoffset'); if (!empty($tzoffset)) { $action = 'tz_convert'; } // If so, run it if (!empty($action) && $action == 'tz_convert' && !empty($_SESSION['validuser'])) { $cutoffdate = getIntValue('cutoffdate'); $db_persistent = false; $db_type = $settings['db_type']; $db_host = $settings['db_host']; $db_database = $settings['db_database']; $db_login = $settings['db_login']; $db_password = $settings['db_password']; $db_cachedir = getPostValue('form_db_cachedir'); // Avoid false visibilty of single user login $onload = 'auth_handler();'; $real_db = $db_database; if ($db_type == 'sqlite') { $real_db = get_full_include_path($db_database); } if ($db_password == 'none') { $db_password = '';
$showTasks = false; } // Show event popups $showPopups = empty($UPCOMING_DISPLAY_POPUPS) || $UPCOMING_DISPLAY_POPUPS == 'Y'; if (getGetValue('showPopups') != '') { $showPopups = getGetValue('showPopups', "[01]", true) != '0'; } // Allow the URL to override the user setting such as // "upcoming.php?user=craig" $allow_user_override = !empty($UPCOMING_ALLOW_OVR) && $UPCOMING_ALLOW_OVR == 'Y'; // Load layers $load_layers = !empty($UPCOMING_DISPLAY_LAYERS) && $UPCOMING_DISPLAY_LAYERS == 'Y'; // Load just a specified category (by its id) // Leave blank to not filter on category (unless specified in URL) // Can override in URL with "upcoming.php?cat_id=4" $cat_id = getIntValue('cat_id'); // Display timezone abbrev name // 1 = Display all times as GMT wo/TZID // 2 = Adjust times by user's GMT offset Show TZID // 3 = Display all times as GMT w/TZID $display_tzid = 2; // End configurable settings... // Login of calendar user to use // '__public__' is the login name for the public user $username = '******'; if ($allow_user_override) { $username = getValue('user'); if (empty($username)) { $username = '******'; } } else {