source: trunk/services/templates/log_list.ihtml @ 457

Last change on this file since 457 was 457, checked in by anonymous, 10 years ago

Removed use of requireAccessClearance(). Adjusted sequence of sslOn() and requireLogin(). Added ACL::requireAllow() method. Added arguments to SortOrder::set(). Changed behavior of Validator::validateStrDate(). Added use of Validator::validateStrDate() to module maker templates.

File size: 3.2 KB
Line 
1<form action="<?php echo oTxt($_SERVER['PHP_SELF']); ?>" method="get" class="sc-form">
2<?php $app->printHiddenSession(false); ?>
3<div class="commandbox">
4<?php if (is_array($logs) && !empty($logs)) { ?>
5    <table>
6    <?php
7    foreach ($logs as $l) {
8        ?>
9        <tr>
10            <td>
11                <?php if ($l['filename'] == $tmp_prefs->get('log_file')) { ?>
12                    <strong class="sc-padright"><?php echo sprintf(_("%s"), $l['filename']); ?></strong>
13                <?php } else { ?>
14                    <a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?log=' . $l['filename']); ?>"><strong><?php echo sprintf(_("%s"), $l['filename']); ?></strong></a>
15                <?php } ?>
16            </td>
17            <td>
18                <em class="sc-padright"><?php echo sprintf(_("%01.1f KB, last modified %s"), ($l['filesize']/1024), date($app->getParam('date_format'), $l['modified'])); ?></em>
19            </td>
20            <td>
21                <?php if (!preg_match($no_download_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?op=download&log=' . $l['filename']); ?>"><?php echo _("Download"); ?></a><?php } ?>
22                <?php if (!preg_match($no_archive_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?op=archive&log=' . $l['filename']); ?>"><?php echo _("Archive"); ?></a><?php } ?>
23                <?php if (!preg_match($no_clear_files, $l['filename'])) { ?><a class="sc-padright" href="<?php echo $app->oHREF('/admin/logs.php?op=clear&log=' . $l['filename']); ?>" onclick="javascript:return confirm('<?php printf(_("Are you sure you want to clear the log file %s? This will empty this file of its contents. This action is not reversible."), $l['filename'])?>')"><?php echo _("Clear"); ?></a><?php } ?>
24                <?php if (!preg_match($no_delete_files, $l['filename'])) { ?><a href="<?php echo $app->oHREF('/admin/logs.php?op=delete&log=' . $l['filename']); ?>" onclick="javascript:return confirm('<?php printf(_("Are you sure you want to delete the log file %s? This will remove this log file permanently. This action is not reversible."), $l['filename'])?>')"><?php echo _("Delete"); ?></a><?php } ?>
25            </td>
26        </tr><?php
27    }
28    ?>
29    </table>
30<?php } ?>
31    <div class="form">
32        <input type="text" class="sc-small" size="20" name="search_query" value="<?php echo oTxt(getFormData('search_query')); ?>" title="<?php echo _("All lines in currently viewed log file are searched."); ?>" />
33        <label class="sc-normal"><input type="checkbox" name="search_grep"<?php frmChecked(getFormData('search_grep')) ?> /><?php echo _("Use Regex"); ?></label>
34        <input class="sc-padleft" type="submit" name="list" value="<?php echo _("Search"); ?>" />
35    </div>
36</div>
37
38<?php include 'list_info.ihtml'; ?>
39
40<pre style="font: 9px monaco;">
41<?php
42for ($i = $page->first_item; $i <= $page->last_item && $page->total_items; $i++) {
43    echo $list[$i];
44}
45?>
46</pre>
47
48<?php if ($page->total_pages > 1) { ?>
49<div class="sc-nowrap commanditem" style="float: right;"><?php echo _("Pages:"); ?>&nbsp;<?php $page->printPageNumbers() ?></div>
50<?php } ?>
51</form>
Note: See TracBrowser for help on using the repository browser.