Projet

Général

Profil

« Précédent | Suivant » 

Révision d085e7ac

Ajouté par Colin Fleming il y a presque 10 ans

Tidy up "log.widget.php" XHTML

Add CR to SCRIPT
Update HTML Boolean operators
Move NOWRAP into CLASS statement
Deprecate Ampersand in Anchor tags
Add dummy row to TBODY, but don't display it.

Voir les différences:

usr/local/www/widgets/widgets/log.widget.php
57 57
	write_config("Saved Filter Log Entries via Dashboard");
58 58
  $filename = $_SERVER['HTTP_REFERER'];
59 59
  if(headers_sent($file, $line)){
60
    echo '<script type="text/javascript">';
61
    echo '//<![CDATA[';
62
    echo 'window.location.href="'.$filename.'";';
63
    echo '//]]>';
64
    echo '</script>';
65
    echo '<noscript>';
66
    echo '<meta http-equiv="refresh" content="0;url='.$filename.'" />';
67
    echo '</noscript>';
60
    echo "<script type=\"text/javascript\">\n";
61
    echo "//<![CDATA[\n";
62
    echo "window.location.href=\"" . $filename . "\";\n";
63
    echo "//]]>\n";
64
    echo "</script>\n";
65
    echo "<noscript>\n";
66
    echo "<meta http-equiv=\"refresh\" content=\"0;url=" . $filename . "\" />\n";
67
    echo "</noscript>\n";
68 68
  }
69 69
	Header("Location: /");
70 70
}
......
134 134
		Number of lines to display:
135 135
		<select name="filterlogentries" class="formfld unknown" id="filterlogentries">
136 136
		<?php for ($i = 1; $i <= 20; $i++) { ?>
137
			<option value="<?php echo $i;?>" <?php if ($nentries == $i) echo "SELECTED";?>><?php echo $i;?></option>
137
			<option value="<?php echo $i;?>" <?php if ($nentries == $i) echo "selected=\"selected\"";?>><?php echo $i;?></option>
138 138
		<?php } ?>
139 139
		</select>
140 140

  
......
152 152
                      <?php
153 153
						$interfaces = get_configured_interface_with_descr();
154 154
					  	foreach ($interfaces as $iface => $ifacename): ?>
155
                        <option value="<?=$iface;?>" <?php if ($nentriesinterfaces == $iface) echo "selected='selected'";?>>
155
                        <option value="<?=$iface;?>" <?php if ($nentriesinterfaces == $iface) echo "selected=\"selected\"";?>>
156 156
                      <?=htmlspecialchars($ifacename);?>
157 157
                      </option>
158 158
                      <?php endforeach; ?>
......
187 187
	$rowIndex++;
188 188
	?>
189 189
		<tr class="<?=$evenRowClass?>">
190
			<td class="listMRlr" nowrap="nowrap" align="center">
190
			<td class="listMRlr nowrap" align="center">
191 191
			<a href="#" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);">
192 192
			<img border="0" src="<?php echo find_action_image($filterent['act']);?>" width="11" height="11" alt="<?php echo $filterent['act'];?>" title="<?php echo $filterent['act'];?>" />
193 193
			</a>
......
195 195
			<td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['time']);?>"><?php echo substr(htmlspecialchars($filterent['time']),0,-3);?></td>
196 196
			<td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['interface']);?>"><?php echo htmlspecialchars($filterent['interface']);?></td>
197 197
			<td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['src']);?>">
198
				<a href="#" onclick="javascript:getURL('diag_dns.php?host=<?php echo "{$filterent['srcip']}"; ?>&dialog_output=true', outputrule);" title="<?=gettext("Reverse Resolve with DNS");?>">
198
				<a href="#" onclick="javascript:getURL('diag_dns.php?host=<?php echo "{$filterent['srcip']}"; ?>&amp;dialog_output=true', outputrule);" title="<?=gettext("Reverse Resolve with DNS");?>">
199 199
				<?php echo htmlspecialchars($filterent['srcip']);?></a></td>
200 200
			<td class="listMRr ellipsis nowrap" title="<?php echo htmlspecialchars($filterent['dst']);?>">
201
				<a href="#" onclick="javascript:getURL('diag_dns.php?host=<?php echo "{$filterent['dstip']}"; ?>&dialog_output=true', outputrule);" title="<?=gettext("Reverse Resolve with DNS");?>">
201
				<a href="#" onclick="javascript:getURL('diag_dns.php?host=<?php echo "{$filterent['dstip']}"; ?>&amp;dialog_output=true', outputrule);" title="<?=gettext("Reverse Resolve with DNS");?>">
202 202
				<?php echo htmlspecialchars($filterent['dstip']);?></a><?php echo ":" . htmlspecialchars($filterent['dstport']);?></td>
203 203
			<?php
204 204
				if ($filterent['proto'] == "TCP")
......
206 206
			?>
207 207
		</tr>
208 208
	<?php endforeach; ?>
209
		<tr style="display:none;"><td></td></tr>
209 210
	</tbody>
210 211
</table>
211 212

  

Formats disponibles : Unified diff