| <?php |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if (!defined('IN_PHPBB')) |
| { |
| exit; |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| class ucp_confirm |
| { |
| var $u_action; |
| |
| function main($id, $mode) |
| { |
| global $db, $user, $phpbb_root_path, $config, $phpEx; |
| |
| |
| $confirm_id = request_var('id', ''); |
| $type = request_var('type', 0); |
| |
| if (!$confirm_id || !$type) |
| { |
| exit; |
| } |
| |
| |
| $sql = 'SELECT code, seed |
| FROM ' . CONFIRM_TABLE . " |
| WHERE session_id = '" . $db->sql_escape($user->session_id) . "' |
| AND confirm_id = '" . $db->sql_escape($confirm_id) . "' |
| AND confirm_type = $type"; |
| $result = $db->sql_query($sql); |
| $row = $db->sql_fetchrow($result); |
| $db->sql_freeresult($result); |
| |
| |
| if (!$row) |
| { |
| exit; |
| } |
| |
| if ($config['captcha_gd']) |
| { |
| include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx); |
| } |
| else |
| { |
| include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx); |
| } |
| |
| $captcha = new captcha(); |
| $captcha->execute($row['code'], $row['seed']); |
| |
| garbage_collection(); |
| exit_handler(); |
| } |
| } |
| |
| ?> |