mirror of
				https://github.com/phpbb/phpbb.git
				synced 2025-10-24 21:26:24 +02:00 
			
		
		
		
	- UTF-8 code is nicer (fixed a bug :P) - new CAPTCHA. Replaced the old one for size and usability issues. The old CAPTCHA will most likely be released as a separate package git-svn-id: file:///svn/phpbb/trunk@6549 89ea8834-ac86-4346-8a33-228a782c2dd0
		
			
				
	
	
		
			72 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			72 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| /** 
 | |
| *
 | |
| * @package VC
 | |
| * @version $Id$
 | |
| * @copyright (c) 2005 phpBB Group 
 | |
| * @license http://opensource.org/licenses/gpl-license.php GNU Public License 
 | |
| *
 | |
| */
 | |
| 
 | |
| /**
 | |
| * ucp_confirm
 | |
| * Visual confirmation
 | |
| *
 | |
| * Note to potential users of this code ...
 | |
| *
 | |
| * Remember this is released under the _GPL_ and is subject
 | |
| * to that licence. Do not incorporate this within software 
 | |
| * released or distributed in any way under a licence other
 | |
| * than the GPL. We will be watching ... ;)
 | |
| *
 | |
| * @package VC
 | |
| */
 | |
| class ucp_confirm
 | |
| {
 | |
| 	var $u_action;
 | |
| 
 | |
| 	function main($id, $mode)
 | |
| 	{
 | |
| 		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  
 | |
| 			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']);
 | |
| 		exit;
 | |
| 	}
 | |
| }
 | |
| 
 | |
| ?>
 |