$url, 'result' => $result); return $return; } function extension_api_checker() { global $config; $url = io_safe_output(get_parameter('url', '')); $ip = io_safe_output(get_parameter('ip', '127.0.0.1')); $pandora_url = io_safe_output(get_parameter('pandora_url', $config['homeurl_static'])); $apipass = io_safe_output(get_parameter('apipass', '')); $user = io_safe_output(get_parameter('user', $config['id_user'])); $password = io_safe_output(get_parameter('password', '')); $op = io_safe_output(get_parameter('op', 'get')); $op2 = io_safe_output(get_parameter('op2', 'test')); $id = io_safe_output(get_parameter('id', '')); $id2 = io_safe_output(get_parameter('id2', '')); $return_type = io_safe_output(get_parameter('return_type', '')); $other = io_safe_output(get_parameter('other', '')); $other_mode = io_safe_output(get_parameter('other_mode', 'url_encode_separator_|')); $api_execute = get_parameter('api_execute', 0); $return_call_api = ''; if ($api_execute) { $return_call_api = api_execute($url, $ip, $pandora_url, $apipass, $user, $password, $op, $op2, urlencode($id), urlencode($id2), $return_type, urlencode($other), $other_mode); } ui_print_page_header (__("API checker"), "images/extensions.png", false, "", true, ""); $table = null; $table->data = array(); $row = array(); $row[] = __("IP"); $row[] = html_print_input_text('ip', $ip, '', 50, 255, true); $table->data[] = $row; $row = array(); $row[] = __("Pandora Console URL"); $row[] = html_print_input_text('pandora_url', $pandora_url, '', 50, 255, true); $table->data[] = $row; $row = array(); $row[] = __("API Pass"); $row[] = html_print_input_password('apipass', $apipass, '', 50, 255, true); $table->data[] = $row; $row = array(); $row[] = __("User"); $row[] = html_print_input_text('user', $user, '', 50, 255, true); $table->data[] = $row; $row = array(); $row[] = __("Password"); $row[] = html_print_input_password('password', $password, '', 50, 255, true); $table->data[] = $row; $table2 = null; $table2->data = array(); $row = array(); $row[] = __("Action (get or set)"); $row[] = html_print_input_text('op', $op, '', 50, 255, true); $table2->data[] = $row; $row = array(); $row[] = __("Operation"); $row[] = html_print_input_text('op2', $op2, '', 50, 255, true); $table2->data[] = $row; $row = array(); $row[] = __("ID"); $row[] = html_print_input_text('id', $id, '', 50, 255, true); $table2->data[] = $row; $row = array(); $row[] = __("ID 2"); $row[] = html_print_input_text('id2', $id2, '', 50, 255, true); $table2->data[] = $row; $row = array(); $row[] = __("Return Type"); $row[] = html_print_input_text('return_type', $return_type, '', 50, 255, true); $table2->data[] = $row; $row = array(); $row[] = __("Other"); $row[] = html_print_input_text('other', $other, '', 50, 255, true); $table2->data[] = $row; $row = array(); $row[] = __("Other Mode"); $row[] = html_print_input_text('other_mode', $other_mode, '', 50, 255, true); $table2->data[] = $row; $table3 = null; $table3->data = array(); $row = array(); $row[] = __("Raw URL"); $row[] = html_print_input_text('url', $url, '', 150, 255, true); $table3->data[] = $row; echo "
"; echo ""; if ($api_execute) { echo ""; } ?>