Changeset 6217
- Timestamp:
- 08/21/08 11:36:00 (3 months ago)
- Location:
- trunk/centreon/www/include/monitoring/status
- Files:
-
- 3 modified
-
monitoringHost.php (modified) (2 diffs)
-
monitoringHostGroup.php (modified) (1 diff)
-
monitoringService.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centreon/www/include/monitoring/status/monitoringHost.php
r6132 r6217 28 28 require_once 'HTML/QuickForm/Renderer/ArraySmarty.php'; 29 29 30 $DBRESULT =& $pearDB->query("SELECT ndo_activate FROM general_opt LIMIT 1"); 31 # Set base value 32 $gopt = array_map("myDecode", $DBRESULT->fetchRow()); 33 34 $ndo = $gopt["ndo_activate"]; 35 36 if ($ndo) 37 $path = "./include/monitoring/status/status-ndo/"; 38 else 39 $path = "./include/monitoring/status/status-log/"; 30 $path = "./include/monitoring/status/status-ndo/"; 40 31 41 32 $pathRoot = "./include/monitoring/"; … … 58 49 } 59 50 } else { 60 if (!$ndo){ 61 include("./include/monitoring/status/resume.php"); 51 52 include_once("./DBNDOConnect.php"); 53 54 if (preg_match("/connect\ failed/", $pearDBndo->toString(), $str)) 55 print "<div class='msg'>"._("Connection Error to NDO DataBase ! \n")."</div>"; 56 else { 57 if ($err_msg = table_not_exists("centreon_acl")) 58 print "<div class='msg'>"._("Warning: ").$err_msg."</div>"; 62 59 switch ($o) { 63 60 case "h" : require_once($path."host.php"); break; 64 case "hpb" : require_once($path."host.php"); break;61 case "hpb" : require_once($path."host.php"); break; 65 62 case "hd" : require_once($pathDetails."hostDetails.php"); break; 66 63 case "hak" : require_once($pathRoot."acknowlegement/hostAcknowledge.php"); break; 67 64 default : require_once($path."host.php"); break; 68 65 } 69 } else {70 include_once("./DBNDOConnect.php");71 if (preg_match("/connect\ failed/", $pearDBndo->toString(), $str))72 print "<div class='msg'>"._("Connection Error to NDO DataBase ! \n")."</div>";73 else {74 if ($err_msg = table_not_exists("centreon_acl"))75 print "<div class='msg'>"._("Warning: ").$err_msg."</div>";76 switch ($o) {77 case "h" : require_once($path."host.php"); break;78 case "hpb" : require_once($path."host.php"); break;79 case "hd" : require_once($pathDetails."hostDetails.php"); break;80 case "hak" : require_once($pathRoot."acknowlegement/hostAcknowledge.php"); break;81 default : require_once($path."host.php"); break;82 }83 }84 66 } 85 67 } -
trunk/centreon/www/include/monitoring/status/monitoringHostGroup.php
r6132 r6217 28 28 require_once 'HTML/QuickForm/Renderer/ArraySmarty.php'; 29 29 30 $DBRESULT =& $pearDB->query("SELECT ndo_activate FROM general_opt LIMIT 1"); 31 # Set base value 32 $gopt = array_map("myDecode", $DBRESULT->fetchRow()); 33 34 $ndo = $gopt["ndo_activate"]; 35 36 37 if ($ndo) 38 $path = "./include/monitoring/status/status-ndo/"; 39 else{ 40 $path = "./include/monitoring/status/status-log/"; 41 } 30 $path = "./include/monitoring/status/status-ndo/"; 42 31 43 32 $pathDetails = "./include/monitoring/objectDetails/"; 44 33 45 if ($ndo){ 46 include_once("./DBNDOConnect.php"); 47 48 if (preg_match("/connect\ failed/", $pearDBndo->toString(), $str)) 49 print "<div class='msg'>"._("Connection Error to NDO DataBase ! \n")."</div>"; 50 else { 51 if ($err_msg = table_not_exists("centreon_acl")) 52 print "<div class='msg'>"._("Warning: ").$err_msg."</div>"; 53 switch ($o) { 54 case "hg" : require_once($path."hostGroup.php"); break; 55 case "hgpb" : require_once($path."hostGroup.php"); break; 56 case "hgd" : require_once($pathDetails."hostgroupDetails.php"); break; 57 default : require_once($path."hostGroup.php"); break; 58 } 59 } 60 } else { 61 include("./include/monitoring/status/resume.php"); 34 include_once("./DBNDOConnect.php"); 35 36 if (preg_match("/connect\ failed/", $pearDBndo->toString(), $str)) 37 print "<div class='msg'>"._("Connection Error to NDO DataBase ! \n")."</div>"; 38 else { 39 if ($err_msg = table_not_exists("centreon_acl")) 40 print "<div class='msg'>"._("Warning: ").$err_msg."</div>"; 62 41 switch ($o) { 63 case "hg" : require_once($path."host group.php"); break;64 case "hgpb" : require_once($path."host group_problem.php"); break;42 case "hg" : require_once($path."hostGroup.php"); break; 43 case "hgpb" : require_once($path."hostGroup.php"); break; 65 44 case "hgd" : require_once($pathDetails."hostgroupDetails.php"); break; 66 default : require_once($path."host group.php"); break;45 default : require_once($path."hostGroup.php"); break; 67 46 } 68 47 } -
trunk/centreon/www/include/monitoring/status/monitoringService.php
r6132 r6217 40 40 submitPassiveCheck(); 41 41 42 $DBRESULT =& $pearDB->query("SELECT ndo_activate FROM general_opt LIMIT 1");43 # Set base value44 $gopt = array_map("myDecode", $DBRESULT->fetchRow());45 46 $ndo = $gopt["ndo_activate"];47 48 42 if ($o == "svcSch"){ 49 43 $_GET["sort_types"] = "next_check"; … … 53 47 $metaservicepath = "metaService.php"; 54 48 55 if (isset($ndo) && !$ndo){ 56 $path = "./include/monitoring/status/status-log/"; 57 include("./include/monitoring/status/resume.php"); 58 $problem = "_problem"; 59 $metaservicepath = $path."metaService.php"; 60 } else { 61 $problem = ""; 62 $path = "./include/monitoring/status/status-ndo/"; 63 $metaservicepath = $path."service.php"; 64 } 49 $problem = ""; 50 $path = "./include/monitoring/status/status-ndo/"; 51 $metaservicepath = $path."service.php"; 65 52 66 53 $pathRoot = "./include/monitoring/";
