~azzar1/unity/add-show-desktop-key

443 by dcoles
Added Forum application along with unmodifed version of phpBB3 "Olympus" 3.0.0
1
<?php
2
/**
3
*
4
* @package VC
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
8
*
9
*/
10
11
/**
12
* @ignore
13
*/
14
if (!defined('IN_PHPBB'))
15
{
16
	exit;
17
}
18
19
/**
20
* ucp_confirm
21
* Visual confirmation
22
*
23
* Note to potential users of this code ...
24
*
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 ... ;)
29
*
30
* @package VC
31
*/
32
class ucp_confirm
33
{
34
	var $u_action;
35
36
	function main($id, $mode)
37
	{
38
		global $db, $user, $phpbb_root_path, $config, $phpEx;
39
40
		// Do we have an id? No, then just exit
41
		$confirm_id = request_var('id', '');
42
		$type = request_var('type', 0);
43
44
		if (!$confirm_id || !$type)
45
		{
46
			exit;
47
		}
48
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);
58
59
		// If we have a row then grab data else create a new id
60
		if (!$row)
61
		{
62
			exit;
63
		}
64
65
		if ($config['captcha_gd'])
66
		{
67
			include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
68
		}
69
		else
70
		{
71
			include($phpbb_root_path . 'includes/captcha/captcha_non_gd.' . $phpEx);
72
		}
73
74
		$captcha = new captcha();
75
		$captcha->execute($row['code'], $row['seed']);
76
		exit;
77
	}
78
}
79
80
?>