2012-06-18 17:26:22 +02:00
|
|
|
<?php
|
|
|
|
// Pandora FMS - http://pandorafms.com
|
|
|
|
// ==================================================
|
|
|
|
// Copyright (c) 2005-2012 Artica Soluciones Tecnologicas
|
|
|
|
// Please see http://pandorafms.org for full contribution list
|
|
|
|
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation for version 2.
|
|
|
|
// 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.
|
|
|
|
$get_sec_pages = get_parameter('get_sec_pages');
|
|
|
|
include_once("include/functions_menu.php");
|
|
|
|
|
|
|
|
if ($get_sec_pages) {
|
|
|
|
$sec = get_parameter('sec');
|
|
|
|
$menu_hash = get_parameter('menu_hash');
|
|
|
|
|
2014-10-15 18:14:56 +02:00
|
|
|
// WARNING: 'mobile' is a very special section
|
|
|
|
if ($sec === 'mobile') {
|
|
|
|
global $config;
|
|
|
|
require_once($config['homedir']."/mobile/operation/home.php");
|
|
|
|
|
|
|
|
$home = new Home();
|
|
|
|
$pagesItems = $home->getPagesItems();
|
|
|
|
|
|
|
|
if (empty($pagesItems)) {
|
|
|
|
$pagesItems = array();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
ksort($pagesItems);
|
|
|
|
}
|
|
|
|
|
|
|
|
$pages = array();
|
|
|
|
foreach ($pagesItems as $page => $data) {
|
|
|
|
$pages[$page] = $data['name'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$pages = menu_get_sec_pages($sec,$menu_hash);
|
|
|
|
}
|
2012-06-18 17:26:22 +02:00
|
|
|
|
|
|
|
echo json_encode($pages);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|