public static function data() { $data = file_get_contents(Application::host() . '/ext/hn_captcha/hn_captcha.x1.example.php'); $data = preg_replace('#.*(<input type="hidden" name="hncaptcha" value="[^"]*">).*(<input type="hidden" name="public_key" value="[^"]*">).*(<img class="captchapict"[^>]*>).*(<input class="captcha" type="text" name="private_key"[^>]*>).*#s', '\\1\\2<span id="captchaImage">\\3</span><span id="captchaInput">\\4</span>', $data); $data = '<span id="captchaData">' . $data . '</span>'; return $data; }
public function handleRedirection($handler, $get_vars = '', $keep_post = true) { if ($get_vars) { $get_string = '&' . http_build_query($get_vars, 'vars_'); } else { $get_string = ''; } if (!$keep_post) { header('Status: 303 See Other'); } header('Location: ' . Application::host() . Application::MAIN . '?h=' . $handler . '&ajax=true&remote_num=' . $this->remoteNum() . $get_string); exit(1); }
/** * This is implemented being part of the RedirectionListener interface */ public function handleRedirection($handler, $get_vars = '', $keep_post = true) { $get_string = 'h=' . $handler; if ($get_vars) { $get_string .= '&' . Display::queryStringFromVars($get_vars, 'vars_'); } if (!$keep_post) { header('Status: 303 See Other'); } header('Location: ' . Application::host() . '/' . Application::MAIN . '?' . $get_string); exit(1); }