Révision 99d55f5a
Ajouté par Colin Fleming il y a presque 10 ans
usr/local/www/diag_logs_filter.php | ||
---|---|---|
159 | 159 |
<tr> |
160 | 160 |
<td> |
161 | 161 |
<div id="mainarea"> |
162 |
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" sortableMultirow="<?=$config['syslog']['filterdescriptions'] === "2"?2:1?>" summary="main area"> |
|
163 |
<thead> |
|
162 |
<table class="tabcont sortable" width="100%" border="0" cellpadding="0" cellspacing="0" style="sortableMultirow:<?=$config['syslog']['filterdescriptions'] === "2"?2:1?>" summary="main area"> |
|
164 | 163 |
<tr> |
165 | 164 |
<td colspan="<?=(!isset($config['syslog']['rawfilter']))?7:2?>" align="left" valign="middle"> |
166 |
<div id="filterlogentries_show" class="widgetconfigdiv" style=<?=(!isset($config['syslog']['rawfilter']))?"":"display:none"?>>
|
|
165 |
<div id="filterlogentries_show" class="widgetconfigdiv" style="<?=(!isset($config['syslog']['rawfilter']))?"":"display:none"?>">
|
|
167 | 166 |
<form id="filterlogentries" name="filterlogentries" action="diag_logs_filter.php" method="post"> |
168 | 167 |
<?php |
169 | 168 |
$Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act'])); |
... | ... | |
231 | 230 |
</table> |
232 | 231 |
</form> |
233 | 232 |
</div> |
234 |
<div id="filterform_show" class="widgetconfigdiv" style=<?=(!isset($config['syslog']['rawfilter']))?"display:none":""?>>
|
|
233 |
<div id="filterform_show" class="widgetconfigdiv" style="<?=(!isset($config['syslog']['rawfilter']))?"display:none":""?>">
|
|
235 | 234 |
<form id="filterform" name="filterform" action="diag_logs_filter.php" method="post"> |
236 | 235 |
<table width="0%" border="0" cellpadding="0" cellspacing="0" summary="firewall log"> |
237 | 236 |
<tr> |
238 | 237 |
<td> |
239 | 238 |
<div align="center" style="vertical-align:top;"><?=gettext("Interface");?></div> |
240 | 239 |
<div align="center" style="vertical-align:top;"> |
241 |
<select name="interface" onChange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
|
|
240 |
<select name="interface" onchange="dst_change(this.value,iface_old,document.iform.dsttype.value);iface_old = document.iform.interface.value;typesel_change();">
|
|
242 | 241 |
<option value="" <?=$interfacefilter?"":"selected=\"selected\""?>>*Any interface</option> |
243 | 242 |
<?php |
244 | 243 |
$iflist = get_configured_interface_with_descr(false, true); |
... | ... | |
320 | 319 |
</td> |
321 | 320 |
</tr> |
322 | 321 |
<tr class="sortableHeaderRowIdentifier"> |
323 |
<td width="10%" class="listhdrr"><?=gettext("Act");?></ td>
|
|
324 |
<td width="10%" class="listhdrr"><?=gettext("Time");?></ td>
|
|
325 |
<td width="15%" class="listhdrr"><?=gettext("If");?></ td>
|
|
322 |
<td width="10%" class="listhdrr"><?=gettext("Act");?></td> |
|
323 |
<td width="10%" class="listhdrr"><?=gettext("Time");?></td> |
|
324 |
<td width="15%" class="listhdrr"><?=gettext("If");?></td> |
|
326 | 325 |
<?php if ($config['syslog']['filterdescriptions'] === "1"):?> |
327 |
<td width="10%" class="listhdrr"><?=gettext("Rule");?></ td>
|
|
326 |
<td width="10%" class="listhdrr"><?=gettext("Rule");?></td> |
|
328 | 327 |
<?php endif;?> |
329 |
<td width="25%" class="listhdrr"><?=gettext("Source");?></ td>
|
|
330 |
<td width="25%" class="listhdrr"><?=gettext("Destination");?></ td>
|
|
331 |
<td width="15%" class="listhdrr"><?=gettext("Proto");?></ td>
|
|
328 |
<td width="25%" class="listhdrr"><?=gettext("Source");?></td> |
|
329 |
<td width="25%" class="listhdrr"><?=gettext("Destination");?></td> |
|
330 |
<td width="15%" class="listhdrr"><?=gettext("Proto");?></td> |
|
332 | 331 |
</tr> |
333 |
</thead> |
|
334 | 332 |
<?php |
335 | 333 |
if ($config['syslog']['filterdescriptions']) |
336 | 334 |
buffer_rules_load(); |
... | ... | |
344 | 342 |
<a onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"> |
345 | 343 |
<img border="0" src="<?php echo find_action_image($filterent['act']);?>" width="11" height="11" align="middle" alt="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" /> |
346 | 344 |
<?php if ($filterent['count']) echo $filterent['count'];?></a></center></td> |
347 |
<td class="listMRr" nowrap="nowrap"><?php echo htmlspecialchars($filterent['time']);?></td>
|
|
348 |
<td class="listMRr" nowrap="nowrap">
|
|
345 |
<td class="listMRr nowrap"><?php echo htmlspecialchars($filterent['time']);?></td>
|
|
346 |
<td class="listMRr nowrap">
|
|
349 | 347 |
<?php if ($filterent['direction'] == "out"): ?> |
350 | 348 |
<img border="0" src="/themes/<?= $g['theme']; ?>/images/icons/out.gif" alt="Direction=OUT" title="Direction=OUT"/> |
351 | 349 |
<?php endif; ?> |
... | ... | |
385 | 383 |
if ($filterent['proto'] == "TCP") |
386 | 384 |
$filterent['proto'] .= ":{$filterent['tcpflags']}"; |
387 | 385 |
?> |
388 |
<td class="listMRr" nowrap="nowrap"><?php echo htmlspecialchars($filterent['proto']);?></td>
|
|
386 |
<td class="listMRr nowrap"><?php echo htmlspecialchars($filterent['proto']);?></td>
|
|
389 | 387 |
</tr> |
390 | 388 |
<?php if (isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions'] === "2"):?> |
391 | 389 |
<tr class="<?=$evenRowClass?>"> |
... | ... | |
407 | 405 |
dump_clog($filter_logfile, $nentries); |
408 | 406 |
?> |
409 | 407 |
<?php endif; ?> |
410 |
<tfoot> |
|
411 | 408 |
<tr> |
412 | 409 |
<td align="left" valign="top" colspan="3"> |
413 | 410 |
<form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;"> |
... | ... | |
415 | 412 |
</form> |
416 | 413 |
</td> |
417 | 414 |
</tr> |
418 |
</tfoot> |
|
419 | 415 |
</table> |
420 | 416 |
</div> |
421 | 417 |
</td> |
... | ... | |
428 | 424 |
|
429 | 425 |
<!-- AJAXY STUFF --> |
430 | 426 |
<script type="text/javascript"> |
431 |
|
|
427 |
//<![CDATA[ |
|
432 | 428 |
function resolve_with_ajax(ip_to_resolve) { |
433 | 429 |
var url = "/diag_logs_filter.php"; |
434 | 430 |
|
... | ... | |
448 | 444 |
function resolve_ip_callback(transport) { |
449 | 445 |
var response = jQuery.parseJSON(transport.responseText); |
450 | 446 |
var resolve_class = htmlspecialchars(response.resolve_ip.replace(/[.:]/g, '-')); |
451 |
var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '</small>'; |
|
447 |
var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '<\/small>';
|
|
452 | 448 |
|
453 | 449 |
jQuery('span.RESOLVE-' + resolve_class).html(resolve_text); |
454 | 450 |
jQuery('img.ICON-' + resolve_class).removeAttr('title'); |
... | ... | |
462 | 458 |
function htmlspecialchars(str) { |
463 | 459 |
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '''); |
464 | 460 |
} |
461 |
//]]> |
|
465 | 462 |
</script> |
466 | 463 |
|
467 | 464 |
</body> |
Formats disponibles : Unified diff
Tidy up "diag_logs_filter.php" XHTML
Change "sortableMultirow" to a STYLE
Add missing quotes
Tidy up TD tags
Remove THEAD and TFOOT.
Move NOWRAP into CLASS statement
Add CDATA sections to SCRIPTS