5
* @version $Id: ucp_confirm.php,v 1.27 2007/10/05 14:36:33 acydburn Exp $
6
* @copyright (c) 2005 phpBB Group
7
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
14
if (!defined('IN_PHPBB'))
23
* Note to potential users of this code ...
25
* Remember this is released under the _GPL_ and is subject
26
* to that licence. Do not incorporate this within software
27
* released or distributed in any way under a licence other
28
* than the GPL. We will be watching ... ;)
36
function main($id, $mode)
38
global $db, $user, $phpbb_root_path, $config, $phpEx;
40
// Do we have an id? No, then just exit
41
$confirm_id = request_var('id', '');
42
$type = request_var('type', 0);
44
if (!$confirm_id || !$type)
49
// Try and grab code for this id and session
50
$sql = 'SELECT code, seed
51
FROM ' . CONFIRM_TABLE . "
52
WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
53
AND confirm_id = '" . $db->sql_escape($confirm_id) . "'
54
AND confirm_type = $type";
55
$result = $db->sql_query($sql);
56
$row = $db->sql_fetchrow($result);
57
$db->sql_freeresult($result);
59
// If we have a row then grab data else create a new id
65
if ($config['captcha_gd'])
67
include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
71
include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
74
$captcha = new captcha();
75
$captcha->execute($row['code'], $row['seed']);
b'\\ No newline at end of file'