コード例 #1
0
ファイル: view_entry.php プロジェクト: rhertzog/lcs
// default if access control is not enabled
if (access_is_enabled()) {
    $can_show_log = access_can_access_function(ACCESS_ACTIVITY_LOG);
}
if ($can_show_log) {
    $hideActivityStr = translate('Hide activity log');
    $showActivityStr = translate('Show activity log');
    echo '
      <li><a title="' . (!$show_log ? $showActivityStr . '" class="nav" href="view_entry.php?id=' . $id . '&amp;log=1">' . $showActivityStr : $hideActivityStr . '" class="nav" href="view_entry.php?id=' . $id . '">' . $hideActivityStr) . '</a></li>';
}
echo '
    </ul>';
if ($can_show_log && $show_log) {
    $PAGE_SIZE = 25;
    // number of entries to show at once
    echo generate_activity_log($id);
}
if (access_can_access_function(ACCESS_EXPORT) && (!$is_private && !$is_confidential || !access_is_enabled()) && !$hide_details) {
    $exportStr = translate('Export');
    $exportThisStr = translate('Export this entry to');
    $palmStr = translate('Palm Pilot');
    $selectStr = generate_export_select();
    $userStr = !empty($user) ? '<input type="hidden" name="user" value="' . $user . '" />' : '';
    echo <<<EOT
    <br />
    <form method="post" name="exportform" action="export_handler.php">
      <label for="exformat">{$exportThisStr}:&nbsp;</label>
      {$selectStr}
      <input type="hidden" name="id" value="{$id}" />
          {$userStr}
      <input type="submit" value="{$exportStr}" />
コード例 #2
0
ファイル: activity_log.php プロジェクト: rhertzog/lcs
 *  for other groups that they are not supposed to have access to.)
 */
include_once 'includes/init.php';
if (!$is_admin || access_is_enabled() && !access_can_access_function(ACCESS_ACTIVITY_LOG)) {
    die_miserable_death(print_not_auth(2));
}
$eventsStr = translate('Events');
$nextStr = translate('Next');
$prevStr = translate('Previous');
$PAGE_SIZE = 25;
// Number of entries to show at once.
$startid = getValue('startid', '-?[0-9]+', true);
$sys = $is_admin && getGetValue('system') != '';
print_header();
ob_start();
echo generate_activity_log('', $sys, $startid);
echo '
    <div class="navigation">' . (!empty($nextpage) ? '
      <a title="' . $prevStr . '&nbsp;' . $PAGE_SIZE . '&nbsp;' . $eventsStr . '" class="prev" href="activity_log.php?startid=' . $nextpage . ($sys ? '&amp;system=1' : '') . '">' . $prevStr . '&nbsp;' . $PAGE_SIZE . '&nbsp;' . $eventsStr . '</a>' : '');
if (!empty($startid)) {
    $previd = $startid + $PAGE_SIZE;
    $res = dbi_execute('SELECT MAX( cal_log_id ) FROM webcal_entry_log');
    if ($res) {
        if ($row = dbi_fetch_row($res)) {
            // Go FORWARD in time.
            echo '
      <a title="' . $nextStr . '&nbsp;' . $PAGE_SIZE . '&nbsp;' . $eventsStr . '" class="next" href="activity_log.php' . ($row[0] <= $previd ? $sys ? '?system=1' : '' : '?startid=' . $previd . ($sys ? '&amp;system=1' : '')) . '">' . $nextStr . '&nbsp;' . $PAGE_SIZE . '&nbsp;' . $eventsStr . '</a><br />';
        }
        dbi_free_result($res);
    }
}