Show
Ignore:
Timestamp:
08/21/08 11:36:00 (5 months ago)
Author:
jmathis
Message:

remove support without NDO

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/centreon/www/include/monitoring/status/monitoringHost.php

    r6132 r6217  
    2828        require_once 'HTML/QuickForm/Renderer/ArraySmarty.php'; 
    2929 
    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/"; 
    4031 
    4132        $pathRoot = "./include/monitoring/"; 
     
    5849                } 
    5950        } 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>"; 
    6259                        switch ($o)     { 
    6360                                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; 
    6562                                case "hd"       : require_once($pathDetails."hostDetails.php");         break; 
    6663                                case "hak"      : require_once($pathRoot."acknowlegement/hostAcknowledge.php");         break; 
    6764                                default         : require_once($path."host.php");                                       break; 
    6865                        } 
    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                         } 
    8466                } 
    8567        }