Bulk cosmetic fixes

This commit is contained in:
f0o 2016-02-10 15:40:50 +00:00
parent 2e59ada075
commit f606369309
No known key found for this signature in database
GPG Key ID: 239034DF4C471089
9 changed files with 14 additions and 14 deletions

View File

@ -68,14 +68,14 @@ if ($device['sysContact']) {
<td>Contact</td>';
if (get_dev_attrib($device, 'override_sysContact_bool')) {
echo '
<td>'.htmlspecialchars(get_dev_attrib($device, 'override_sysContact_string')).'</td>
<td>'.get_dev_attrib($device, 'override_sysContact_string').'</td>
</tr>
<tr>
<td>SNMP Contact</td>';
}
echo '
<td>'.htmlspecialchars($device['sysContact']).'</td>
<td>'.$device['sysContact'].'</td>
</tr>';
}

View File

@ -15,7 +15,7 @@ if (!isset($alert_entry['device'])) {
</td>';
}
echo '<td>'.htmlspecialchars($alert_entry['name']).'</td>';
echo '<td>'.$alert_entry['name'].'</td>';
if ($alert_state != '') {
if ($alert_state == '0') {

View File

@ -8,10 +8,10 @@ if (device_permitted($entry['device_id'])) {
if ($vars['page'] != 'device') {
$syslog_output .= '<td>'.$entry['date'].'</td>
<td><strong>'.generate_device_link($entry).'</strong></td>
<td><strong>'.$entry['program'].' : </strong> '.htmlspecialchars($entry['msg']).'</td>';
<td><strong>'.$entry['program'].' : </strong> '.$entry['msg'].'</td>';
}
else {
$syslog_output .= '<td><i>'.$entry['date'].'</i>&nbsp;&nbsp;&nbsp;<strong>'.$entry['program'].'</strong>&nbsp;&nbsp;&nbsp;'.htmlspecialchars($entry['msg']).'</td>';
$syslog_output .= '<td><i>'.$entry['date'].'</i>&nbsp;&nbsp;&nbsp;<strong>'.$entry['program'].'</strong>&nbsp;&nbsp;&nbsp;'.$entry['msg'].'</td>';
}
$syslog_output .= '</tr>';

View File

@ -66,7 +66,7 @@ foreach (dbFetchRows($full_query, $param) as $alert_entry) {
$data[] = array(
$alert_entry['time_logged'],
$hostname,
htmlspecialchars($alert_entry['name']),
$alert_entry['name'],
$text,
);
}//end if

View File

@ -77,7 +77,7 @@ foreach (dbFetchRows($sql, $param) as $alertlog) {
'time_logged' => $alertlog['humandate'],
'details' => '<a class="glyphicon glyphicon-plus incident-toggle" style="display:none" data-toggle="collapse" data-target="#incident'.($rulei).'" data-parent="#alerts"></a>',
'hostname' => '<div class="incident">'.generate_device_link($dev, shorthost($dev['hostname'])).'<div id="incident'.($rulei).'" class="collapse">'.$fault_detail.'</div></div>',
'alert' => htmlspecialchars($alertlog['alert']),
'alert' => $alertlog['alert'],
'status' => "<b><span class='glyphicon glyphicon-".$glyph_icon."' style='color:".$glyph_color."'></span> $text</b>",
);
}//end foreach

View File

@ -66,7 +66,7 @@ foreach (dbFetchRows($sql, $param) as $eventlog) {
'datetime' => $eventlog['humandate'],
'hostname' => generate_device_link($dev, shorthost($dev['hostname'])),
'type' => $type,
'message' => htmlspecialchars($eventlog['message']),
'message' => $eventlog['message'],
);
}

View File

@ -66,7 +66,7 @@ foreach (dbFetchRows($sql, $param) as $syslog) {
'timestamp' => $syslog['date'],
'device_id' => generate_device_link($dev, shorthost($dev['hostname'])),
'program' => $syslog['program'],
'msg' => htmlspecialchars($syslog['msg']),
'msg' => $syslog['msg'],
);
}

View File

@ -466,7 +466,7 @@ var grid = $("#devices").bootgrid({
return {
id: "devices",
format: '<?php echo mres($vars['format']); ?>',
hostname: '<?php echo htmlspecialchars($vars['hostname']); ?>',
hostname: '<?php echo mres($vars['hostname']); ?>',
os: '<?php echo mres($vars['os']); ?>',
version: '<?php echo mres($vars['version']); ?>',
hardware: '<?php echo mres($vars['hardware']); ?>',

View File

@ -81,10 +81,10 @@ var grid = $("#syslog").bootgrid({
{
return {
id: "syslog",
device: '<?php echo htmlspecialchars($vars['device']); ?>',
program: '<?php echo htmlspecialchars($vars['program']); ?>',
to: '<?php echo htmlspecialchars($vars['to']); ?>',
from: '<?php echo htmlspecialchars($vars['from']); ?>',
device: '<?php echo $vars['device']; ?>',
program: '<?php echo $vars['program']; ?>',
to: '<?php echo $vars['to']; ?>',
from: '<?php echo $vars['from']; ?>',
};
},
url: "ajax_table.php"