2010-05-27 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_api.php, include/api.php: cleaned and organice the source code. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2811 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
416564addf
commit
b090faa33b
|
@ -1,3 +1,8 @@
|
||||||
|
2010-05-27 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_api.php, include/api.php: cleaned and organice the
|
||||||
|
source code.
|
||||||
|
|
||||||
2010-05-27 Ramon Novoa <rnovoa@artica.es>
|
2010-05-27 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* extensions/update_manager/main.php: Show an error instead of
|
* extensions/update_manager/main.php: Show an error instead of
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//Pandora FMS- http://pandorafms.com
|
//Pandora FMS- http://pandorafms.com
|
||||||
// ==================================================
|
// ==================================================
|
||||||
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
// Copyright (c) 2005-2009 Artica Soluciones Tecnologicas
|
||||||
|
@ -14,21 +13,23 @@
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
|
|
||||||
//Set character encoding to UTF-8 - fixes a lot of multibyte character headaches
|
|
||||||
|
|
||||||
require_once ("config.php");
|
require_once ("config.php");
|
||||||
require_once("functions_api.php");
|
require_once("functions_api.php");
|
||||||
enterprise_include_once ('include/functions_enterprise_api.php');
|
enterprise_include_once ('include/functions_enterprise_api.php');
|
||||||
|
|
||||||
//Get the parameters and parse if necesary.
|
|
||||||
$ipOrigin = $_SERVER['REMOTE_ADDR'];
|
$ipOrigin = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
|
//Get the parameters and parse if necesary.
|
||||||
$op = get_parameter('op');
|
$op = get_parameter('op');
|
||||||
$op2 = get_parameter('op2');
|
$op2 = get_parameter('op2');
|
||||||
$id = get_parameter('id');
|
$id = get_parameter('id');
|
||||||
$id2 = get_parameter('id2');
|
$id2 = get_parameter('id2');
|
||||||
$other = parseOtherParameter(get_parameter('other'), get_parameter('other_mode', 'url_encode'));
|
$otherSerialize = get_parameter('other');
|
||||||
|
$otherMode = get_parameter('other_mode', 'url_encode');
|
||||||
$returnType = get_parameter('return_type', 'string');
|
$returnType = get_parameter('return_type', 'string');
|
||||||
|
|
||||||
|
$other = parseOtherParameter($otherSerialize, $otherMode);
|
||||||
|
|
||||||
if (isInACL($ipOrigin)) {
|
if (isInACL($ipOrigin)) {
|
||||||
if (($op !== 'get') && ($op !== 'set') && ($op !== 'help'))
|
if (($op !== 'get') && ($op !== 'set') && ($op !== 'help'))
|
||||||
returnError('no_set_no_get_no_help', $returnType);
|
returnError('no_set_no_get_no_help', $returnType);
|
||||||
|
|
|
@ -79,7 +79,9 @@ function returnError($typeError, $returnType) {
|
||||||
*
|
*
|
||||||
* @param $returnType
|
* @param $returnType
|
||||||
* @param $data
|
* @param $data
|
||||||
* @return unknown_type
|
* @param $separator
|
||||||
|
*
|
||||||
|
* @return
|
||||||
*/
|
*/
|
||||||
function returnData($returnType, $data, $separator = ';') {
|
function returnData($returnType, $data, $separator = ';') {
|
||||||
switch ($returnType) {
|
switch ($returnType) {
|
||||||
|
|
Loading…
Reference in New Issue