Project

General

Profile

« Previous | Next » 

Revision 5f601060

Added by Phil Davis about 10 years ago

Code style usr-local-www diag

View differences:

usr/local/www/diag_logs.php
32 32
	POSSIBILITY OF SUCH DAMAGE.
33 33
*/
34 34

  
35
/*		
35
/*
36 36
	pfSense_MODULE:	system
37 37
*/
38 38

  
......
48 48
$system_logfile = "{$g['varlog_path']}/system.log";
49 49

  
50 50
$nentries = $config['syslog']['nentries'];
51
if (!$nentries)
51
if (!$nentries) {
52 52
	$nentries = 50;
53
}
53 54

  
54
if ($_POST['clear']) 
55
if ($_POST['clear']) {
55 56
	clear_log_file($system_logfile);
57
}
56 58

  
57
if ($_GET['filtertext'])
59
if ($_GET['filtertext']) {
58 60
	$filtertext = htmlspecialchars($_GET['filtertext']);
61
}
59 62

  
60
if ($_POST['filtertext'])
63
if ($_POST['filtertext']) {
61 64
	$filtertext = htmlspecialchars($_POST['filtertext']);
65
}
62 66

  
63
if ($filtertext)
67
if ($filtertext) {
64 68
	$filtertextmeta="?filtertext=$filtertext";
69
}
65 70

  
66 71
$pgtitle = array(gettext("Status"),gettext("System logs"),gettext("General"));
67 72
include("head.inc");
......
110 115
					<td colspan="2" class="listtopic"><?php printf(gettext("Last %s system log entries"),$nentries); ?></td>
111 116
				</tr>
112 117
				<?php
113
					if($filtertext)
118
					if ($filtertext) {
114 119
						dump_clog($system_logfile, $nentries, true, array("$filtertext"), array("ppp"));
115
					else
120
					} else {
116 121
						dump_clog($system_logfile, $nentries, true, array(), array("ppp"));
122
					}
117 123
				?>
118 124
				<tr>
119 125
					<td align="left" valign="top">
120 126
						<form id="filterform" name="filterform" action="diag_logs.php" method="post" style="margin-top: 14px;">
121
              				<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
127
							<input id="submit" name="clear" type="submit" class="formbtn" value="<?=gettext("Clear log");?>" />
122 128
						</form>
123 129
					</td>
124 130
					<td align="right" valign="top" >
125 131
						<form id="clearform" name="clearform" action="diag_logs.php" method="post" style="margin-top: 14px;">
126
              				<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
127
              				<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
132
							<input id="filtertext" name="filtertext" value="<?=$filtertext;?>" />
133
							<input id="filtersubmit" name="filtersubmit" type="submit" class="formbtn" value="<?=gettext("Filter");?>" />
128 134
						</form>
129 135
					</td>
130 136
				</tr>
131 137
			</table>
132
	    	</div>
138
			</div>
133 139
		</td>
134 140
	</tr>
135 141
</table>

Also available in: Unified diff