<?php if (isset($_GET['welcome']) && isset($_GET['referer']) && isset($_GET['board_url'])) { $redirect_url = isset($_GET['referer']) && trim($_GET['referer']) ? trim($_GET['referer']) : ''; $board_url = isset($_GET['board_url']) && trim($_GET['board_url']) ? trim($_GET['board_url']) : ''; if (strpos($redirect_url, $_REQUEST['SERVER_NAME']) !== false && strpos($redirect_url, $_REQUEST['SERVER_NAME']) !== false || strpos($redirect_url, "/") === '0') { header('Location: ' . $redirect_url); exit; } header('Location: ' . $board_url); } if (isset($_POST['method_name']) && $_POST['method_name'] == 'verify_connection') { $type = isset($_POST['type']) ? $_POST['type'] : 'both'; $code = isset($_POST['code']) ? $_POST['code'] : ''; $connection = new classTTConnection(); @ob_clean(); echo serialize($connection->verify_connection($type, $code)); exit; } if ($_SERVER['REQUEST_METHOD'] == 'GET' && (!isset($_GET['method_name']) || isset($_GET['method_name']) && $_GET['method_name'] != 'set_api_key')) { include 'web.php'; exit; }
/** * action implement */ protected function actionImplement($in) { require_once MBQ_3RD_LIB_PATH . 'classTTConnection.php'; $ttConnection = new classTTConnection(); $this->data = $ttConnection->verify_connection($in->type, $in->code); }