site_list.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003 This file  is part  of HGSM.   HGSM is a  web application  for keeping
00004 information about a hierarchical structure (in this case a grid).
00005 
00006 Copyright 2005, 2006 Dashamir Hoxha, dashohoxha@users.sourceforge.net
00007 
00008 HGSM is free software; you  can redistribute it and/or modify it under
00009 the terms of  the GNU General Public License as  published by the Free
00010 Software  Foundation; either  version 2  of the  License, or  (at your
00011 option) any later version.
00012 
00013 HGSM is  distributed in the hope  that it will be  useful, but WITHOUT
00014 ANY WARRANTY; without even  the implied warranty of MERCHANTABILITY or
00015 FITNESS FOR A PARTICULAR PURPOSE.   See the GNU General Public License
00016 for more details.
00017 
00018 You  should have received  a copy  of the  GNU General  Public License
00019 along with HGSM; if not,  write to the Free Software Foundation, Inc.,
00020 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00021 */
00022 
00023 include_once FORM_PATH."formWebObj.php";
00024 
00028 class site_list extends WebObject
00029 {
00030   function on_del($event_args)
00031     {
00032       include_once TPL.'/goc/delete.php';
00033       $site_id = $event_args['site_id'];
00034       $site_list = "'$site_id'";
00035 
00036       //delete the site and the nodes, contacts and downtimes
00037       del_sites($site_list);
00038 
00039       //update the menu
00040       include_once MENU.'/rebuild_menu.php'; 
00041     }
00042 
00043   function on_add($event_args)
00044     {
00045       WebApp::setSVar('site_edit->mode', 'add');
00046       WebApp::setSVar('site_edit->site_id', UNDEFINED);
00047     }
00048 
00049   function on_edit($event_args)
00050     {
00051       WebApp::setSVar('site_edit->mode', 'edit');
00052       WebApp::setSVar('site_edit->site_id', $event_args['site_id']);
00053     } 
00054 }
00055 ?>

Generated on Fri Jan 20 10:34:52 2006 for HGSM by  doxygen 1.4.5