phpBB

Code Changes

File: includes/ucp/ucp_confirm.php

  Unmodified   Added   Modified   Removed
Line 3Line 3
*
* @package VC
* @version $Id$

*
* @package VC
* @version $Id$

* @copyright (c) 2005 phpBB Group

* @copyright (c) 2005 2008 phpBB Group

* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

Line 37Line 37
	{
global $db, $user, $phpbb_root_path, $config, $phpEx;


	{
global $db, $user, $phpbb_root_path, $config, $phpEx;


		// Do we have an id? No, then just exit
$confirm_id = request_var('id', '');
$type = request_var('type', 0);

if (!$confirm_id || !$type)
{
exit;
}

// Try and grab code for this id and session
$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 we have a row then grab data else create a new id
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']);

		include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
$captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']);
$captcha->init(request_var('type', 0));
$captcha->execute();


































garbage_collection();
exit_handler();


garbage_collection();
exit_handler();