From ea0cb3ab7ac5344c8ae5f0c7dc6c2678091d0c24 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Sun, 07 Dec 2008 10:42:28 -0500
Subject: [PATCH] 

---
 interface/web/monitor/tools.inc.php |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/interface/web/monitor/tools.inc.php b/interface/web/monitor/tools.inc.php
index 7f8cfb5..0348461 100644
--- a/interface/web/monitor/tools.inc.php
+++ b/interface/web/monitor/tools.inc.php
@@ -30,7 +30,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'server_load' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'server_load' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $data = unserialize($record['data']);
@@ -76,7 +76,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'disk_usage' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'disk_usage' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $data = unserialize($record['data']);
@@ -119,7 +119,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mem_usage' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mem_usage' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $data = unserialize($record['data']);
@@ -155,7 +155,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'cpu_info' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'cpu_info' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $data = unserialize($record['data']);
@@ -189,7 +189,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'services' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'services' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $data = unserialize($record['data']);
@@ -302,7 +302,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'system_update' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'system_update' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $html =
@@ -332,7 +332,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'raid_state' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'raid_state' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $html =
@@ -364,7 +364,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'rkhunter' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'rkhunter' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $html =
@@ -396,7 +396,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mailq' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mailq' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['data'])) {
         $data = unserialize($record['data']);
@@ -412,7 +412,7 @@
     global $app;
 
     /* fetch the Data from the DB */
-    $record = $app->dbmaster->queryOneRecord("SELECT created FROM monitor_data WHERE type = '" . $type . "' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
+    $record = $app->db->queryOneRecord("SELECT created FROM monitor_data WHERE type = '" . $type . "' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc");
 
     if(isset($record['created'])) {
         $res = date('Y-m-d H:i', $record['created']);

--
Gitblit v1.9.1