From ebd0e986ed11f2a34fb58cdd33efbfab192083ad Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 22 Apr 2016 05:26:17 -0400
Subject: [PATCH] Added PHP 7 check in installer and updater.

---
 interface/web/monitor/show_sys_state.php |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/interface/web/monitor/show_sys_state.php b/interface/web/monitor/show_sys_state.php
index aa97317..23c32fb 100644
--- a/interface/web/monitor/show_sys_state.php
+++ b/interface/web/monitor/show_sys_state.php
@@ -191,7 +191,7 @@
 	/*
      * Get all monitoring-data from the server and process then
 	*/
-	$records = $app->db->queryAllRecords("SELECT DISTINCT type, data FROM monitor_data WHERE server_id = " . $serverId);
+	$records = $app->db->queryAllRecords("SELECT DISTINCT type, data FROM monitor_data WHERE server_id = " . intval($serverId));
 	$osData = null;
 	$veInfo = null;
 	$ispcData = null;
@@ -223,7 +223,8 @@
 	/*
 	 * Info of a VE inside a OpenVz-Host
 	*/
-	$html_ve  = '<div class="systemmonitor-ve state-' . $serverState . '-ve os-' . $osData['name'] . '">';
+	//$html_ve  = '<div class="systemmonitor-ve state-' . $serverState . '-ve os-' . $osData['name'] . '">';
+	$html_ve  = '<div class="systemmonitor state-' . $serverState . ' os-' . $osData['name'] . '">';
 	if ($osData != null) {
 		$html_ve .= '<div class="icoDevice"><p class="status"></p></div>';
 	}
@@ -319,7 +320,7 @@
     * state
 	*/
 	// get the State from the DB
-	$record = $app->db->queryOneRecord("SELECT state FROM monitor_data WHERE type = '" . $type . "' and server_id = " . $serverId . " order by created desc");
+	$record = $app->db->queryOneRecord("SELECT state FROM monitor_data WHERE type = '" . $app->db->quote($type) . "' and server_id = " . intval($serverId) . " order by created desc");
 
 	// change the new state to the highest state
 	/*

--
Gitblit v1.9.1