Module: nagvis Branch: master Commit: 4baaf392a0cd17c3517b02a2b228b0126ae9b68d URL: http://nagvis.git.sourceforge.net/git/gitweb.cgi?p=nagvis/nagvis/commit/?id=4baaf392a0cd17c3517b02a2b228b0126ae9b68d
Author: Roman Kyrylych <[email protected]> Date: Wed Aug 19 16:36:01 2009 +0300 gmap: Added NagVisService and NagVisMapsData Signed-off-by: Roman Kyrylych <[email protected]> --- share/netmap/NagVisService.php | 51 ++++++++++++++++++++++++++ uifx/src/modules/gmap/data/NagVisMapsData.as | 33 +++++++++++++++++ 2 files changed, 84 insertions(+), 0 deletions(-) diff --git a/share/netmap/NagVisService.php b/share/netmap/NagVisService.php new file mode 100644 index 0000000..7c6b725 --- /dev/null +++ b/share/netmap/NagVisService.php @@ -0,0 +1,51 @@ +<?php + +/***************************************************************************** + * + * Copyright (C) 2009 NagVis Project + * + * License: + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + *****************************************************************************/ + +class NagVisService +{ + private $CORE; + + private function init() + { + require_once("../nagvis/includes/defines/global.php"); + require_once("../nagvis/includes/defines/matches.php"); + set_include_path(get_include_path() . PATH_SEPARATOR . realpath(dirname(__FILE__)) + . PATH_SEPARATOR . '../nagvis/includes/classes/' + . PATH_SEPARATOR . '../nagvis/includes/classes/validator/' + . PATH_SEPARATOR . '../nagvis/includes/classes/frontend/'); + require_once("../nagvis/includes/functions/oldPhpVersionFixes.php"); + require_once("../nagvis/includes/functions/getuser.php"); + + $this->CORE = new GlobalCore(); + $this->CORE->MAINCFG->setRuntimeValue('user', getUser()); + } + + public function getMaps() + { + $this->init(); + $maps = $this->CORE->getAvailableMaps(); + return array_values($maps); + } +} + +?> diff --git a/uifx/src/modules/gmap/data/NagVisMapsData.as b/uifx/src/modules/gmap/data/NagVisMapsData.as new file mode 100644 index 0000000..24d5459 --- /dev/null +++ b/uifx/src/modules/gmap/data/NagVisMapsData.as @@ -0,0 +1,33 @@ +/***************************************************************************** + * + * Copyright (C) 2009 NagVis Project + * + * License: + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + *****************************************************************************/ + +package modules.gmap.data +{ + import mx.collections.ArrayCollection; + + public class NagVisMapsData extends ArrayCollection + { + public function NagVisMapsData(source : Array = null) + { + super(source); + } + } +} ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Nagvis-checkins mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nagvis-checkins
