phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: netsaint/inc class.bonetsaint.inc.php,1.22,1.23


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: netsaint/inc class.bonetsaint.inc.php,1.22,1.23
Date: Fri, 18 Jan 2002 18:31:37 -0500

Update of /cvsroot/phpgroupware/netsaint/inc
In directory subversions:/tmp/cvs-serv17962/inc

Modified Files:
        class.bonetsaint.inc.php 
Log Message:
update

Index: class.bonetsaint.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/netsaint/inc/class.bonetsaint.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** class.bonetsaint.inc.php    12 Dec 2001 23:48:27 -0000      1.22
--- class.bonetsaint.inc.php    18 Jan 2002 23:31:35 -0000      1.23
***************
*** 471,475 ****
                        if (is_array($co))
                        {
!                               if ($co['conf_dir'])
                                {
                                        if 
(substr($co['conf_dir'],0,strlen($doc_root)) == $doc_root)
--- 471,475 ----
                        if (is_array($co))
                        {
!                               if (isset($co['conf_dir']))
                                {
                                        if 
(substr($co['conf_dir'],0,strlen($doc_root)) == $doc_root)
***************
*** 478,487 ****
                                        }
                                }
-                               else
-                               {
-                                       $msg[] = lang('Please contact the 
administrator to configure netsaint !');
-                               }
  
!                               if (!$co['ns_dir'] || !$co['ns_user'] || 
!$co['ns_group'])
                                {
                                        $msg[] = lang('Please contact the 
administrator to configure netsaint !');
--- 478,483 ----
                                        }
                                }
  
!                               if (! isset($co['ns_conf']) || ! 
isset($co['ns_log']) || ! isset($co['ns_group']) || ! isset($co['ns_user']) || 
! isset($co['ns_extcom']) || ! isset($co['ns_lock']) || ! 
isset($co['conf_dir']))
                                {
                                        $msg[] = lang('Please contact the 
administrator to configure netsaint !');
***************
*** 509,515 ****
                function create_config()
                {
!                       global $phpgw;
! 
!                       $co = $this->get_config();
  
                        if (!is_dir($co['conf_dir'] . '/netsaint'))
--- 505,510 ----
                function create_config()
                {
!                       $this->t        = $GLOBALS['phpgw']->template;
!                       $co                     = $this->get_config();
  
                        if (!is_dir($co['conf_dir'] . '/netsaint'))
***************
*** 522,527 ****
  // --------------------------------- timeperiod 
-------------------------------
  
!                       $config = 
$phpgw->template->set_file(array('config_time_t' => 'config_time.tpl'));
!                       $config .= 
$phpgw->template->set_block('config_time_t','config_time','time');
  
                        $this->sotimeperiod = 
CreateObject('netsaint.sotimeperiod');
--- 517,522 ----
  // --------------------------------- timeperiod 
-------------------------------
  
!                       $config = $this->t->set_file(array('config_time_t' => 
'config_time.tpl'));
!                       $config .= 
$this->t->set_block('config_time_t','config_time','time');
  
                        $this->sotimeperiod = 
CreateObject('netsaint.sotimeperiod');
***************
*** 531,535 ****
                        for ($i=0;$i<count($time_list);$i++)
                        {
!                               $config .= $phpgw->template->set_var(array
                                (
                                        'tp_name'       => 
stripslashes($time_list[$i]['name']),
--- 526,530 ----
                        for ($i=0;$i<count($time_list);$i++)
                        {
!                               $config .= $this->t->set_var(array
                                (
                                        'tp_name'       => 
stripslashes($time_list[$i]['name']),
***************
*** 544,551 ****
                                ));
  
!                               $phpgw->template->fp('time','config_time',True);
                        }
  
!                       $config .= 
$phpgw->template->fp('out','config_time_t',True);
  
  // --------------------------------- end timeperiod 
---------------------------
--- 539,546 ----
                                ));
  
!                               $this->t->fp('time','config_time',True);
                        }
  
!                       $config .= $this->t->fp('out','config_time_t',True);
  
  // --------------------------------- end timeperiod 
---------------------------
***************
*** 553,558 ****
  // --------------------------------- host group 
-------------------------------
  
!                       $config .= 
$phpgw->template->set_file(array('config_hg_t' => 'config_hg.tpl'));
!                       $config .= 
$phpgw->template->set_block('config_hg_t','config_hg','hg');
  
                        $this->sonshost = CreateObject('netsaint.sonshost');
--- 548,553 ----
  // --------------------------------- host group 
-------------------------------
  
!                       $config .= $this->t->set_file(array('config_hg_t' => 
'config_hg.tpl'));
!                       $config .= 
$this->t->set_block('config_hg_t','config_hg','hg');
  
                        $this->sonshost = CreateObject('netsaint.sonshost');
***************
*** 561,565 ****
                        for ($i=0;$i<count($hg_list);$i++)
                        {
!                               $config .= $phpgw->template->set_var(array
                                (
                                        'hg_name'       => 
stripslashes($hg_list[$i]['name']),
--- 556,560 ----
                        for ($i=0;$i<count($hg_list);$i++)
                        {
!                               $config .= $this->t->set_var(array
                                (
                                        'hg_name'       => 
stripslashes($hg_list[$i]['name']),
***************
*** 569,576 ****
                                ));
  
!                               $phpgw->template->fp('hg','config_hg',True);
                        }
  
!                       $config .= 
$phpgw->template->fp('out','config_hg_t',True);
  
  // --------------------------------- end host group 
-------------------------------
--- 564,571 ----
                                ));
  
!                               $this->t->fp('hg','config_hg',True);
                        }
  
!                       $config .= $this->t->fp('out','config_hg_t',True);
  
  // --------------------------------- end host group 
-------------------------------
***************
*** 578,583 ****
  // --------------------------------- contact group 
-------------------------------
  
!                       $config .= 
$phpgw->template->set_file(array('config_cg_t' => 'config_cg.tpl'));
!                       $config .= 
$phpgw->template->set_block('config_cg_t','config_cg','cg');
  
                        $this->sonscontact = 
CreateObject('netsaint.sonscontact');
--- 573,578 ----
  // --------------------------------- contact group 
-------------------------------
  
!                       $config .= $this->t->set_file(array('config_cg_t' => 
'config_cg.tpl'));
!                       $config .= 
$this->t->set_block('config_cg_t','config_cg','cg');
  
                        $this->sonscontact = 
CreateObject('netsaint.sonscontact');
***************
*** 586,590 ****
                        for ($i=0;$i<count($cg_list);$i++)
                        {
!                               $config .= $phpgw->template->set_var(array
                                (
                                        'cg_name'               => 
stripslashes($cg_list[$i]['name']),
--- 581,585 ----
                        for ($i=0;$i<count($cg_list);$i++)
                        {
!                               $config .= $this->t->set_var(array
                                (
                                        'cg_name'               => 
stripslashes($cg_list[$i]['name']),
***************
*** 593,600 ****
                                ));
  
!                               $phpgw->template->fp('cg','config_cg',True);
                        }
  
!                       $config .= 
$phpgw->template->fp('out','config_cg_t',True);
  
  // --------------------------------- end contact group 
-------------------------------
--- 588,595 ----
                                ));
  
!                               $this->t->fp('cg','config_cg',True);
                        }
  
!                       $config .= $this->t->fp('out','config_cg_t',True);
  
  // --------------------------------- end contact group 
-------------------------------
***************
*** 602,607 ****
  // --------------------------------- beginn not host group 
-------------------------------
  
!                       $config .= 
$phpgw->template->set_file(array('config_ehost_t' => 'config_not_host.tpl'));
!                       $config .= 
$phpgw->template->set_block('config_ehost_t','config_ehost','ehost');
  
                        $eh_list = 
$this->sonetsaint->read_config_escal('host',$host_name = '');
--- 597,602 ----
  // --------------------------------- beginn not host group 
-------------------------------
  
!                       $config .= $this->t->set_file(array('config_ehost_t' => 
'config_not_host.tpl'));
!                       $config .= 
$this->t->set_block('config_ehost_t','config_ehost','ehost');
  
                        $eh_list = 
$this->sonetsaint->read_config_escal('host',$host_name = '');
***************
*** 609,613 ****
                        for ($i=0;$i<count($eh_list);$i++)
                        {
!                               $config .= $phpgw->template->set_var(array
                                (
                                        'e_name'        => 
stripslashes($eh_list[$i]['name']),
--- 604,608 ----
                        for ($i=0;$i<count($eh_list);$i++)
                        {
!                               $config .= $this->t->set_var(array
                                (
                                        'e_name'        => 
stripslashes($eh_list[$i]['name']),
***************
*** 616,623 ****
                                        'e_cg'          => 
stripslashes($eh_list[$i]['cg'])
                                ));
!                               
$phpgw->template->fp('ehost','config_ehost',True);
                        }
  
!                       $config .= 
$phpgw->template->fp('out','config_ehost_t',True);
  
  // --------------------------------- end not host group 
-------------------------------
--- 611,618 ----
                                        'e_cg'          => 
stripslashes($eh_list[$i]['cg'])
                                ));
!                               $this->t->fp('ehost','config_ehost',True);
                        }
  
!                       $config .= $this->t->fp('out','config_ehost_t',True);
  
  // --------------------------------- end not host group 
-------------------------------
***************
*** 631,636 ****
  // --------------------------------- commands 
-----------------------------------------
  
!                       $config = 
$phpgw->template->set_file(array('config_command_t' => 'config_comands.tpl'));
!                       $config .= 
$phpgw->template->set_block('config_command_t','config_command','command');
  
                        $command_list = 
$this->sonetsaint->read_config_commands();
--- 626,631 ----
  // --------------------------------- commands 
-----------------------------------------
  
!                       $config = $this->t->set_file(array('config_command_t' 
=> 'config_comands.tpl'));
!                       $config .= 
$this->t->set_block('config_command_t','config_command','command');
  
                        $command_list = 
$this->sonetsaint->read_config_commands();
***************
*** 638,642 ****
                        for ($i=0;$i<count($command_list);$i++)
                        {
!                               $config .= $phpgw->template->set_var(array
                                (
                                        'c_name'                => 
stripslashes($command_list[$i]['name']),
--- 633,637 ----
                        for ($i=0;$i<count($command_list);$i++)
                        {
!                               $config .= $this->t->set_var(array
                                (
                                        'c_name'                => 
stripslashes($command_list[$i]['name']),
***************
*** 644,651 ****
                                ));
  
!                               
$phpgw->template->fp('command','config_command',True);
                        }
  
!                       $config .= 
$phpgw->template->fp('out','config_command_t',True);
  
                        $conf_file = $co['conf_dir'] . '/commands.cfg';
--- 639,646 ----
                                ));
  
!                               $this->t->fp('command','config_command',True);
                        }
  
!                       $config .= $this->t->fp('out','config_command_t',True);
  
                        $conf_file = $co['conf_dir'] . '/commands.cfg';
***************
*** 656,661 ****
  // --------------------------------- contacts 
-----------------------------------
  
!                       $config = 
$phpgw->template->set_file(array('config_contact_t' => 'config_contact.tpl'));
!                       $config .= 
$phpgw->template->set_block('config_contact_t','config_contact','contact');
  
                        $contact_list = 
$this->sonscontact->read_config_contacts();
--- 651,656 ----
  // --------------------------------- contacts 
-----------------------------------
  
!                       $config = $this->t->set_file(array('config_contact_t' 
=> 'config_contact.tpl'));
!                       $config .= 
$this->t->set_block('config_contact_t','config_contact','contact');
  
                        $contact_list = 
$this->sonscontact->read_config_contacts();
***************
*** 663,667 ****
                        for ($i=0;$i<count($contact_list);$i++)
                        {
!                               $config .= $phpgw->template->set_var(array
                                (
                                        'c_name'                => 
stripslashes($contact_list[$i]['name']),
--- 658,662 ----
                        for ($i=0;$i<count($contact_list);$i++)
                        {
!                               $config .= $this->t->set_var(array
                                (
                                        'c_name'                => 
stripslashes($contact_list[$i]['name']),
***************
*** 681,693 ****
                                ));
  
!                               
$phpgw->template->fp('contact','config_contact',True);
                        }
  
!                       $config .= 
$phpgw->template->fp('out','config_contact_t',True);
  
                        $conf_file = $co['conf_dir'] . '/contacts.cfg';
                        $this->save_config($conf_file,$config);
  
!                       $netsaint_include[] = '/etc/contacts.cfg'; 
  
  // --------------------------------- end contacts 
-------------------------------
--- 676,688 ----
                                ));
  
!                               $this->t->fp('contact','config_contact',True);
                        }
  
!                       $config .= $this->t->fp('out','config_contact_t',True);
  
                        $conf_file = $co['conf_dir'] . '/contacts.cfg';
                        $this->save_config($conf_file,$config);
  
!                       $netsaint_include[] = '/contacts.cfg'; 
  
  // --------------------------------- end contacts 
-------------------------------
***************
*** 699,726 ****
                        for ($i=0;$i<count($host_list);$i++)
                        {
!                               $config = 
$phpgw->template->set_file(array('config_host'        => 'config_host.tpl',
!                                                                               
                                'config_service'        => 'config_service.tpl',
!                                                                               
                                'config_nservice'       => 
'config_not_service.tpl',
!                                                                               
                                'config_eservice'       => 
'config_e_service.tpl'));
! 
!                               $config .= 
$phpgw->template->set_var('h_name',stripslashes($host_list[$i]['name']));
!                               $config .= 
$phpgw->template->set_var('h_alias',stripslashes($host_list[$i]['alias']));
!                               $config .= 
$phpgw->template->set_var('h_address',stripslashes($host_list[$i]['address']));
!                               $config .= 
$phpgw->template->set_var('h_parent',stripslashes($host_list[$i]['parent']));
!                               $config .= 
$phpgw->template->set_var('h_command',stripslashes($host_list[$i]['command']));
!                               $config .= 
$phpgw->template->set_var('h_max',$host_list[$i]['max']);
!                               $config .= 
$phpgw->template->set_var('h_intval',$host_list[$i]['intval']);
!                               $config .= 
$phpgw->template->set_var('h_period',stripslashes($host_list[$i]['period']));
!                               $config .= 
$phpgw->template->set_var('h_rec',$host_list[$i]['recover']);
!                               $config .= 
$phpgw->template->set_var('h_down',$host_list[$i]['down']);
!                               $config .= 
$phpgw->template->set_var('h_unreach',$host_list[$i]['unreach']);
!                               $config .= 
$phpgw->template->set_var('h_event',stripslashes($host_list[$i]['event']));
  
!                               $config .= 
$phpgw->template->fp('out','config_host',True);
  
                                $service_list = 
$this->sonetsaint->read_config_services($host_list[$i]['name']);
                                for ($j=0;$j<count($service_list);$j++)
                                {
!                                       $config .= 
$phpgw->template->set_var(array
                                        (
                                                's_host'                => 
stripslashes($service_list[$j]['host']),
--- 694,721 ----
                        for ($i=0;$i<count($host_list);$i++)
                        {
!                               $config = 
$this->t->set_file(array('config_host'        => 'config_host.tpl',
!                                                                               
                'config_service'        => 'config_service.tpl',
!                                                                               
                'config_nservice'       => 'config_not_service.tpl',
!                                                                               
                'config_eservice'       => 'config_e_service.tpl'));
! 
!                               $config .= 
$this->t->set_var('h_name',stripslashes($host_list[$i]['name']));
!                               $config .= 
$this->t->set_var('h_alias',stripslashes($host_list[$i]['alias']));
!                               $config .= 
$this->t->set_var('h_address',stripslashes($host_list[$i]['address']));
!                               $config .= 
$this->t->set_var('h_parent',stripslashes($host_list[$i]['parent']));
!                               $config .= 
$this->t->set_var('h_command',stripslashes($host_list[$i]['command']));
!                               $config .= 
$this->t->set_var('h_max',$host_list[$i]['max']);
!                               $config .= 
$this->t->set_var('h_intval',$host_list[$i]['intval']);
!                               $config .= 
$this->t->set_var('h_period',stripslashes($host_list[$i]['period']));
!                               $config .= 
$this->t->set_var('h_rec',$host_list[$i]['recover']);
!                               $config .= 
$this->t->set_var('h_down',$host_list[$i]['down']);
!                               $config .= 
$this->t->set_var('h_unreach',$host_list[$i]['unreach']);
!                               $config .= 
$this->t->set_var('h_event',stripslashes($host_list[$i]['event']));
  
!                               $config .= 
$this->t->fp('out','config_host',True);
  
                                $service_list = 
$this->sonetsaint->read_config_services($host_list[$i]['name']);
                                for ($j=0;$j<count($service_list);$j++)
                                {
!                                       $config .= $this->t->set_var(array
                                        (
                                                's_host'                => 
stripslashes($service_list[$j]['host']),
***************
*** 740,752 ****
                                                's_command'             => 
stripslashes($service_list[$j]['command'])
                                        ));
!                                       $config .= 
$phpgw->template->fp('service','config_service',True);
                                }
  
!                               $config .= 
$phpgw->template->fp('out','config_nservice',True);
  
                                $es_list = 
$this->sonetsaint->read_config_escal('serv',$host_list[$i]['name']);
                                for ($k=0;$k<count($es_list);$k++)
                                {
!                                       $config .= 
$phpgw->template->set_var(array
                                        (
                                                'es_name'       => 
stripslashes($es_list[$k]['name']),
--- 735,747 ----
                                                's_command'             => 
stripslashes($service_list[$j]['command'])
                                        ));
!                                       $config .= 
$this->t->fp('service','config_service',True);
                                }
  
!                               $config .= 
$this->t->fp('out','config_nservice',True);
  
                                $es_list = 
$this->sonetsaint->read_config_escal('serv',$host_list[$i]['name']);
                                for ($k=0;$k<count($es_list);$k++)
                                {
!                                       $config .= $this->t->set_var(array
                                        (
                                                'es_name'       => 
stripslashes($es_list[$k]['name']),
***************
*** 756,760 ****
                                                'es_cg'         => 
stripslashes($es_list[$k]['cg'])
                                        ));
!                                       $config .= 
$phpgw->template->fp('eservice','config_eservice',True);
                                }
  
--- 751,755 ----
                                                'es_cg'         => 
stripslashes($es_list[$k]['cg'])
                                        ));
!                                       $config .= 
$this->t->fp('eservice','config_eservice',True);
                                }
  
***************
*** 762,766 ****
                                $this->save_config($conf_file,$config);
  
!                               $netsaint_include[] = '/etc/' . 
$host_list[$i]['name'] . '.cfg'; 
                        }
  
--- 757,761 ----
                                $this->save_config($conf_file,$config);
  
!                               $netsaint_include[] = '/' . 
$host_list[$i]['name'] . '.cfg'; 
                        }
  
***************
*** 769,789 ****
  // --------------------------------- ns 
------------------------------------------
  
!                       $config = 
$phpgw->template->set_file(array('config_ns_t' => 'config_netsaint.tpl'));
!                       $config .= 
$phpgw->template->set_block('config_ns_t','config_ns','ns');
  
!                       $config .= 
$phpgw->template->set_var('ns_dir',$co['ns_dir']);
!                       $config .= 
$phpgw->template->set_var('ns_user',$co['ns_user']);
!                       $config .= 
$phpgw->template->set_var('ns_group',$co['ns_group']);
  
                        for ($i=0;$i<count($netsaint_include);$i++)
                        {
!                               $config .= $phpgw->template->set_var(array
                                (
                                        'include_files' => 'cfg_file=' . 
$co['ns_dir'] . $netsaint_include[$i]
                                ));     
!                               $phpgw->template->fp('ns','config_ns',True);
                        }
  
!                       $config .= 
$phpgw->template->fp('out','config_ns_t',True);
  
                        $conf_file = $co['conf_dir'] . '/netsaint.cfg';
--- 764,787 ----
  // --------------------------------- ns 
------------------------------------------
  
!                       $config = $this->t->set_file(array('config_ns_t' => 
'config_netsaint.tpl'));
!                       $config .= 
$this->t->set_block('config_ns_t','config_ns','ns');
  
!                       $config .= $this->t->set_var('ns_conf',$co['ns_conf']);
!                       $config .= $this->t->set_var('ns_user',$co['ns_user']);
!                       $config .= 
$this->t->set_var('ns_group',$co['ns_group']);
!                       $config .= 
$this->t->set_var('ns_extcom',$co['ns_extcom']);
!                       $config .= $this->t->set_var('ns_lock',$co['ns_lock']);
!                       $config .= $this->t->set_var('ns_log',$co['ns_log']);
  
                        for ($i=0;$i<count($netsaint_include);$i++)
                        {
!                               $config .= $this->t->set_var(array
                                (
                                        'include_files' => 'cfg_file=' . 
$co['ns_dir'] . $netsaint_include[$i]
                                ));     
!                               $this->t->fp('ns','config_ns',True);
                        }
  
!                       $config .= $this->t->fp('out','config_ns_t',True);
  
                        $conf_file = $co['conf_dir'] . '/netsaint.cfg';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]