Blame Identity/Models/Html/phpBB/3.0.4/includes/ucp/ucp_confirm.php

d6e8d8
d6e8d8
/**
d6e8d8
*
d6e8d8
* @package VC
d6e8d8
* @version $Id: ucp_confirm.php 8655 2008-06-13 19:39:01Z acydburn $
d6e8d8
* @copyright (c) 2005 phpBB Group
d6e8d8
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
d6e8d8
*
d6e8d8
*/
d6e8d8
d6e8d8
/**
d6e8d8
* @ignore
d6e8d8
*/
d6e8d8
if (!defined('IN_PHPBB'))
d6e8d8
{
d6e8d8
	exit;
d6e8d8
}
d6e8d8
d6e8d8
/**
d6e8d8
* ucp_confirm
d6e8d8
* Visual confirmation
d6e8d8
*
d6e8d8
* Note to potential users of this code ...
d6e8d8
*
d6e8d8
* Remember this is released under the _GPL_ and is subject
d6e8d8
* to that licence. Do not incorporate this within software
d6e8d8
* released or distributed in any way under a licence other
d6e8d8
* than the GPL. We will be watching ... ;)
d6e8d8
*
d6e8d8
* @package VC
d6e8d8
*/
d6e8d8
class ucp_confirm
d6e8d8
{
d6e8d8
	var $u_action;
d6e8d8
d6e8d8
	function main($id, $mode)
d6e8d8
	{
d6e8d8
		global $db, $user, $phpbb_root_path, $config, $phpEx;
d6e8d8
d6e8d8
		// Do we have an id? No, then just exit
d6e8d8
		$confirm_id = request_var('id', '');
d6e8d8
		$type = request_var('type', 0);
d6e8d8
d6e8d8
		if (!$confirm_id || !$type)
d6e8d8
		{
d6e8d8
			exit;
d6e8d8
		}
d6e8d8
d6e8d8
		// Try and grab code for this id and session
d6e8d8
		$sql = 'SELECT code, seed
d6e8d8
			FROM ' . CONFIRM_TABLE . "
d6e8d8
			WHERE session_id = '" . $db->sql_escape($user->session_id) . "'
d6e8d8
				AND confirm_id = '" . $db->sql_escape($confirm_id) . "'
d6e8d8
				AND confirm_type = $type";
d6e8d8
		$result = $db->sql_query($sql);
d6e8d8
		$row = $db->sql_fetchrow($result);
d6e8d8
		$db->sql_freeresult($result);
d6e8d8
d6e8d8
		// If we have a row then grab data else create a new id
d6e8d8
		if (!$row)
d6e8d8
		{
d6e8d8
			exit;
d6e8d8
		}
d6e8d8
d6e8d8
		if ($config['captcha_gd'])
d6e8d8
		{
d6e8d8
			include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
d6e8d8
		}
d6e8d8
		else
d6e8d8
		{
d6e8d8
			include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
d6e8d8
		}
d6e8d8
d6e8d8
		$captcha = new captcha();
d6e8d8
		$captcha->execute($row['code'], $row['seed']);
d6e8d8
d6e8d8
		garbage_collection();
d6e8d8
		exit_handler();
d6e8d8
	}
d6e8d8
}
d6e8d8
d6e8d8
?>