function showIPTables() = Missing Period in output
I was trying to figure out why this was not appending the correct state to the data, as it should have been. In the code, it is just missing a simple period to bring all of the $html together.
Current Code:
function showIPTables() { global $app; $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'iptables_rules' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); if(isset($record['data'])) { $html = '
data = unserialize(
record['data']);
if ($data == '') {
$html .= 'Problem, there are no rules listed for the server
'; } else {html = nl2br(
data['output']);
}
$html .= 'There is no data available at the moment.
'; } return $html; }Code Fixed:
function showIPTables() { global $app; $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'iptables_rules' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); if(isset($record['data'])) { $html = '
data = unserialize(
record['data']);
if ($data == '') {
$html .= 'Problem, there are no rules listed for the server
'; } else {html .= nl2br(
data['output']);
}
$html .= 'There is no data available at the moment.
'; } return $html; }