'api_password')); $correctLogin = false; $user_in_db = null; $no_login_msg = ""; if (isInACL($ipOrigin)) { if(empty($apiPassword) || (!empty($apiPassword) && $api_password === $apiPassword)) { $user_in_db = process_user_login($user, $password); if ($user_in_db !== false) { $config['id_user'] = $user_in_db; $correctLogin = true; } else { $no_login_msg = "Incorrect user credentials"; } } else { $no_login_msg = "Incorrect given API password"; } } else { $no_login_msg = "IP $ipOrigin is not in ACL list"; } if ($correctLogin) { if (($op !== 'get') && ($op !== 'set') && ($op !== 'help')) returnError('no_set_no_get_no_help', $returnType); else { if (!function_exists($op.'_'.$op2)) returnError('no_exist_operation', $returnType); else { if (!DEBUG) { error_reporting(0); } if (VERBOSE) { error_reporting(E_ALL); ini_set("display_errors", 1); } call_user_func($op.'_'.$op2, $id, $id2, $other, $returnType, $user_in_db); } } } else { db_pandora_audit("API access Failed", $no_login_msg, $user, $ipOrigin); echo 'auth error'; } ?>