2 include_once $gfplugins.'webcalendar/www/includes/init.php';
3 include_once $gfplugins.'webcalendar/www/includes/site_extras.php';
7 echo "<h3>" . translate("Activity Log") . "</h3>\n";
9 echo "<a title=\"" . translate("Admin") . "\" class=\"nav\" href=\"adminhome.php\">« " . translate("Admin") . "</a><br /><br />\n";
12 echo "<tr><th class=\"usr\">\n" .
13 translate("User") . "</th><th class=\"cal\">\n" .
14 translate("Calendar") . "</th><th class=\"scheduled\">\n" .
15 translate("Date") . "/" . translate("Time") . "</th><th class=\"dsc\">\n" .
16 translate("Event") . "</th><th class=\"action\">\n" .
17 translate("Action") . "\n</th></tr>\n";
18 $sql = "SELECT webcal_entry_log.cal_login, webcal_entry_log.cal_user_cal, " .
19 "webcal_entry_log.cal_type, webcal_entry_log.cal_date, " .
20 "webcal_entry_log.cal_time, webcal_entry.cal_id, " .
21 "webcal_entry.cal_name, webcal_entry_log.cal_log_id " .
22 "FROM webcal_entry_log, webcal_entry " .
23 "WHERE webcal_entry_log.cal_entry_id = webcal_entry.cal_id ";
24 $startid = getIntValue ( 'startid', true );
25 if ( ! empty ( $startid ) )
26 $sql .= "AND webcal_entry_log.cal_log_id <= $startid ";
27 $sql .= "ORDER BY webcal_entry_log.cal_log_id DESC";
28 $res = dbi_query ( $sql );
34 while ( $row = dbi_fetch_row ( $res ) ) {
36 if ( $num > $PAGE_SIZE ) {
42 echo " class=\"odd\"";
45 $row[0] . "</td><td>\n" .
46 $row[1] . "</td><td>\n" .
47 date_to_str ( $row[3] ) . " " .
48 display_time ( $row[4] ) . "</td><td>\n" .
50 htmlspecialchars($row[6]) . "\" href=\"view_entry.php?id=$row[5]\">" .
51 htmlspecialchars($row[6]) . "</a></td><td>\n";
52 if ( $row[2] == $LOG_CREATE )
53 etranslate("Event created");
54 else if ( $row[2] == $LOG_APPROVE )
55 etranslate("Event approved");
56 else if ( $row[2] == $LOG_REJECT )
57 etranslate("Event rejected");
58 else if ( $row[2] == $LOG_UPDATE )
59 etranslate("Event updated");
60 else if ( $row[2] == $LOG_DELETE )
61 etranslate("Event deleted");
62 else if ( $row[2] == $LOG_NOTIFICATION )
63 etranslate("Notification sent");
64 else if ( $row[2] == $LOG_REMINDER )
65 etranslate("Reminder sent");
68 echo "\n</td></tr>\n";
71 dbi_free_result ( $res );
73 echo translate("Database error") . ": " . dbi_error ();
77 <div class="navigation">
80 if ( ! empty ( $nextpage ) ) {
82 translate("Previous") . " $PAGE_SIZE " .
83 translate("Events") . "\" class=\"prev\" href=\"activity_log.php?startid=$nextpage\">" .
84 translate("Previous") . " $PAGE_SIZE " .
85 translate("Events") . "</a>\n";
88 if ( ! empty ( $startid ) ) {
89 $previd = $startid + $PAGE_SIZE;
90 $res = dbi_query ( "SELECT MAX(cal_log_id) FROM " .
93 if ( $row = dbi_fetch_row ( $res ) ) {
94 if ( $row[0] <= $previd ) {
97 $prevarg = "?startid=$previd";
101 translate("Next") . " $PAGE_SIZE " .
102 translate("Events") . "\" class=\"next\" href=\"activity_log.php$prevarg\">" .
103 translate("Next") . " $PAGE_SIZE " .
104 translate("Events") . "</a><br />\n";
106 dbi_free_result ( $res );
111 <?php print_trailer(); ?>